From 81fc8a656664d5729d1da876ba55dd2210afadbf Mon Sep 17 00:00:00 2001 From: Casey Halverson Date: Thu, 2 Jul 2015 13:55:16 -0700 Subject: [PATCH] fixed frequency calculation per data sheet fixed frequency calculation per data sheet. this should be a 16 multiplier now vs. 8 for the old RDA 1846. --- HamShield.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HamShield.cpp b/HamShield.cpp index afadace..7fe816a 100644 --- a/HamShield.cpp +++ b/HamShield.cpp @@ -254,7 +254,7 @@ void HamShield::softReset() { void HamShield::setFrequency(uint32_t freq_khz) { radio_frequency = freq_khz; - uint32_t freq_raw = freq_khz << 3; // shift by 3 to multiply by 8 + uint32_t freq_raw = freq_khz << 4; // shift by 4 to multiply by 16 (was shift by 3 in old 1846 chip) // send top 16 bits to A1846S_FREQ_HI_REG uint16_t freq_half = (uint16_t) (0x3FFF & (freq_raw >> 16));