# HG changeset patch # User Daniele Nicolodi # Date 1342795811 -7200 # Node ID 65e277fdf01f3c098e9de467b93f94467b9b2b48 # Parent b7b3b5f1c5a61d719e0f01821a7a08249fc8dbac Correct DDS3 frequency adjustement on N3 measurement We need to take into account the phase locked loop divisor factor that links DDS1 frequency change to repetition rate change. diff -r b7b3b5f1c5a6 -r 65e277fdf01f FXAnalyse.c --- a/FXAnalyse.c Thu Jul 19 20:01:40 2012 +0200 +++ b/FXAnalyse.c Fri Jul 20 16:50:11 2012 +0200 @@ -1222,7 +1222,7 @@ SetCtrlVal(MainPanel, PANEL_DDS4, FrequDDS4 + DeltakHz_3 * 1000); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, FrequDDS4 + DeltakHz_3 * 1000); // compensate with DDS3 to keep measured beatnote in counter box range - double fDDS3 = FrequencyDDS3Init + N3/N1 * DeltakHz_3; + double fDDS3 = FrequencyDDS3Init + N3/N1 * Ndiv * DeltakHz_3; SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3); // allow counter to settle @@ -1254,7 +1254,7 @@ SetCtrlVal(MainPanel, PANEL_DDS4, FrequDDS4 - DeltakHz_3 * 1000); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, FrequDDS4 - DeltakHz_3 * 1000); // compensate with DDS3 to keep measured beatnote in counter box range - double fDDS3 = FrequencyDDS3Init - N3/N1 * DeltakHz_3; + double fDDS3 = FrequencyDDS3Init - N3/N1 * Ndiv * DeltakHz_3; SetCtrlVal(MainPanel, PANEL_DDS3, fDDS3); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3); // allow counter to settle