Fixed - si5351 needs tweaking

This commit is contained in:
2026-08-25 12:03:28 -04:00
parent f18f91072e
commit caf3285384
2 changed files with 13 additions and 13 deletions

View File

@@ -254,19 +254,19 @@ fn main() -> ! {
let tune_str = str::from_utf8(&tune_str_buf[tune_str_buf.len() - len..]).unwrap(); let tune_str = str::from_utf8(&tune_str_buf[tune_str_buf.len() - len..]).unwrap();
// info!("len {}", len); // info!("len {}", len);
gfx_buf.draw_string(64 + 6 * (5 - len as u8), 28, tune_str); // gfx_buf.draw_string(64 + 6 * (5 - len as u8), 28, tune_str);
gfx_buf.draw_string(20, 40, message); // gfx_buf.draw_string(20, 40, message);
match input_mode { // match input_mode {
InputMode::DisplayOnly => (), // InputMode::DisplayOnly => (),
InputMode::TuneDigit(d) => { // InputMode::TuneDigit(d) => {
let x = 64 + 6 * (4 - d) as u8; // let x = 64 + 6 * (4 - d) as u8;
gfx_buf.draw_bresenham_line(x, 36, x + 5, 36); // gfx_buf.draw_bresenham_line(x, 36, x + 5, 36);
} // }
} // }
gfx_buf.redraw(); // gfx_buf.redraw();
// sh1106_dev.blit_framebuffer(&mut i2c, &mut gfx_buf); // sh1106_dev.blit_framebuffer(&mut i2c, &mut gfx_buf);
} }
} }

View File

@@ -127,14 +127,14 @@ impl Si5351Dev {
safe_reg_write( safe_reg_write(
i2c, i2c,
Si5351Register::CrystalInternalLoadCapacitance as u8, Si5351Register::CrystalInternalLoadCapacitance as u8,
CrystalLoadBits::CL_8 as u8, CrystalLoadBits::CL_10 as u8,
); );
// P1, P2 and P3 are split in very weird ways and determine PLLA aka VCO freq // P1, P2 and P3 are split in very weird ways and determine PLLA aka VCO freq
// See AN619 for a terrible but thorough explanation. // See AN619 for a terrible but thorough explanation.
let if_freq = 737_100_000; let if_freq = 737_010_000;
configure_pll_vco(i2c, PLL::A, if_freq); configure_pll_vco(i2c, PLL::A, if_freq);
configure_pll_vco(i2c, PLL::B, 1_407_400_000 - if_freq); // get us up to 14.074MHz configure_pll_vco(i2c, PLL::B, 1_407_286_000 - if_freq); // get us up to 14.074MHz
// apply 64x multisynth divider // apply 64x multisynth divider
set_p1_p2_p3_from_abc(i2c, 100, 0, 1, 50); set_p1_p2_p3_from_abc(i2c, 100, 0, 1, 50);