Koellner, Guenter wrote:
> 
> If your L.O. is currently set to 7050khz and its beeing asked to set to -1Hz, 
> it would stay there.
> With 25kHz steps, I just assume that the requested frequency will be rounded 
> by mathematic laws, 
 > which means that any frequency offset between -12.500kHz and +12.499kHz will 
 > still keep the oscillator
 > at the current frequency. So a step must be at least bigger than half of the 
 > L.O. step width to become actually
 > processed Its easier to understand if you think about your example below not 
 > as an increment but as an absolute,
 > probably initial setting: If that 7049999Hz value is simply sent to the L.O. 
 > without knowing that it is an increment,
 > you would definitly go to 705000. You will never set to 7025000 then. Surely.

IMHO what Tobias proposed is the following. The DLL should just compute this 
(in pseudo code) :

diff = Newfreq - Olfreq;  (Oldfreq is kept by the DLL. The initial case needs 
an ad-hoc management)

round abs(diff) to the nearest multiple of 25 kHz, keeping the sign of diff;
if (diff == 0) diff = sign(diff) * 25000;

Newfreq = round((Oldfreq + diff) / 25000) * 25000;     where round() is the 
rounding to the nearest integer

Let's do a few examples :

Oldfreq = 7049123 Hz.  Newfreq = 7049122 Hz.  diff = -1;
rounding diff =>  diff = -25 kHz

Newfreq = round((7049123 - 25000)/25000) * 25000 = round(7024123/25000) * 25000 
= 281 * 25000 = 7025000;
------------------
Another example, suppose that the user has incremented by 1 Hz :

Oldfreq = 7049123 Hz.  Newfreq = 7049124 Hz.  diff = +1;
rounding diff =>  diff = +25 kHz

Newfreq = round((7049123 + 25000)/25000 * 25000 = round(7074123/25000) * 25000 
= 283 * 25000 = 7075000;
------------------

Well, at least in these two cases the procedure worked, but maybe for other 
values it won't. I haven't checked it 
thoroughly. But even in this eventuality, it should not be too difficult to fix 
it.

73  Alberto  I2PHD




_______________________________________________
Winrad mailing list
[email protected]
http://winrad.org/mailman/listinfo/winrad_winrad.org

Reply via email to