From caf328538445a5f7d0f923dbcd77e48db29e79b5 Mon Sep 17 00:00:00 2001 From: JP Stringham Date: Tue, 25 Aug 2026 12:03:28 -0400 Subject: [PATCH] Fixed - si5351 needs tweaking --- src/main.rs | 20 ++++++++++---------- src/si5351.rs | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 629476d..eed4f37 100644 --- a/src/main.rs +++ b/src/main.rs @@ -254,19 +254,19 @@ fn main() -> ! { let tune_str = str::from_utf8(&tune_str_buf[tune_str_buf.len() - len..]).unwrap(); // 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 { - InputMode::DisplayOnly => (), - InputMode::TuneDigit(d) => { - let x = 64 + 6 * (4 - d) as u8; - gfx_buf.draw_bresenham_line(x, 36, x + 5, 36); - } - } + // match input_mode { + // InputMode::DisplayOnly => (), + // InputMode::TuneDigit(d) => { + // let x = 64 + 6 * (4 - d) as u8; + // 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); } } diff --git a/src/si5351.rs b/src/si5351.rs index 0d81160..e8001e8 100644 --- a/src/si5351.rs +++ b/src/si5351.rs @@ -127,14 +127,14 @@ impl Si5351Dev { safe_reg_write( i2c, 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 // 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::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 set_p1_p2_p3_from_abc(i2c, 100, 0, 1, 50);