diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-12-12 16:10:12 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-12-12 16:10:12 +0100 |
commit | 789b0ad2d10a5274af798c3a1c45f8ee5a27eedc (patch) | |
tree | 64ab0043bbaef968c5974f715c1d376b88ed934d | |
parent | 341400d0d35efe01f5e0b8737e23cbec6b973986 (diff) | |
download | picardy-789b0ad2d10a5274af798c3a1c45f8ee5a27eedc.tar.gz picardy-789b0ad2d10a5274af798c3a1c45f8ee5a27eedc.tar.bz2 picardy-789b0ad2d10a5274af798c3a1c45f8ee5a27eedc.zip |
Move to 6MHz IF
-rw-r--r-- | freqplan.py | 26 | ||||
-rw-r--r-- | kicad/baseband.sch | 6 | ||||
-rw-r--r-- | sw/picardy/src/state.rs | 6 |
3 files changed, 19 insertions, 19 deletions
diff --git a/freqplan.py b/freqplan.py index 9272c41..e01e6e5 100644 --- a/freqplan.py +++ b/freqplan.py @@ -1,39 +1,37 @@ #!/usr/bin/env python3 # -# OUTDATED -# This document is outdated because the VHF LO is not generated -# externally from fractions import Fraction from math import floor xtal = 25 +PLLa_mult = 35 print() -print("# 116MHz and 4.915 MHz on PLLa") +print("# 6000.694 - 2.200 kHz on PLLa") -PLLa = xtal * 32 -print(f"PLLa = xtal * 32 = {PLLa} MHz") +PLLa = xtal * PLLa_mult +print(f"PLLa = xtal * {PLLa_mult} = {PLLa} MHz") + +if PLLa < 600 or PLLa > 900: + print(f"Error PLL {PLLA} out of bounds") # x/y = a + b/y # a = floor(x/y) # b = x - (a * y) -f1 = 116 -a = floor(PLLa / f1) -b = PLLa - (a * f1) -div1 = Fraction(b, f1) -print(f"CLK1: f1 = PLLa / ({a} + {div1.numerator} / {div1.denominator}) = {f1}") - -f2 = 4.91521 +f2 = (6000.694 - 2.200) / 1000 a = floor(PLLa / f2) b = PLLa - (a * f2) div1 = Fraction(round(b * 10000), round(f2 * 10000)) print(f"CLK2: f2 = PLLa / ({a} + {div1.numerator} / {div1.denominator}) = {f2}") +VHF_LO = 114.285 # Fixed XTAL +BAND_EDGE_LOW = 144 - VHF_LO +BAND_EDGE_HIGH = 145 - VHF_LO print() -print("# VFO between 23 and 25 MHz on PLLb") +print(f"# VFO between {BAND_EDGE_LOW:6.6} and {BAND_EDGE_HIGH:6.6} MHz on PLLb") def calculate(frequency): divider = floor(900000000 / frequency) # Calculate the division ratio. 900,000,000 is the maximum internal diff --git a/kicad/baseband.sch b/kicad/baseband.sch index 0b1fd55..98f8bad 100644 --- a/kicad/baseband.sch +++ b/kicad/baseband.sch @@ -5,7 +5,7 @@ $Descr A4 11693 8268 encoding utf-8 Sheet 3 6 Title "Picardy Anglian Mashup" -Date "2020-03-18" +Date "2020-12-12" Rev "" Comp "HB9EGM" Comment1 "" @@ -702,7 +702,7 @@ L Device:C_Small C329 U 1 1 5E3C120C P 6400 3150 F 0 "C329" H 6308 3104 50 0000 R CNN -F 1 "220pF" H 6308 3195 50 0000 R CNN +F 1 "27pF" H 6308 3195 50 0000 R CNN F 2 "Capacitor_SMD:C_0603_1608Metric_Pad1.05x0.95mm_HandSolder" H 6400 3150 50 0001 C CNN F 3 "~" H 6400 3150 50 0001 C CNN F 4 "0" H 6400 3150 50 0001 C CNN "Need_order" @@ -3231,4 +3231,6 @@ F 6 "47uF" H 10300 6050 50 0001 C CNN "OriginalValue" 1 10300 6050 -1 0 0 -1 $EndComp +Text Notes 950 6100 0 47 ~ 0 +Currently assembled:\n4 6MHz crystals\nY301=Y306=12pF\nC310=C365=10pF\nC364=12pF\nTODO adapt L310 $EndSCHEMATC diff --git a/sw/picardy/src/state.rs b/sw/picardy/src/state.rs index 466fd32..b29b8b4 100644 --- a/sw/picardy/src/state.rs +++ b/sw/picardy/src/state.rs @@ -1,8 +1,8 @@ pub const VHF_BAND_EDGE : u32 = 144_000_000; pub const VHF_INITIAL_VFO : u32 = 144_300_000; -pub const VHF_LO : u32 = 114_285_000; -pub const BFO_LSB : u32 = 4_915_940; -pub const BFO_USB : u32 = 4_914_910; +pub const VHF_LO : u32 = 114_286_400; +pub const BFO_LSB : u32 = 6_000_700 + 2_200; +pub const BFO_USB : u32 = 6_000_700 - 2_200; // Defines which parameter is changed by the encoder #[derive(Clone, Copy, PartialEq, Eq)] |