¿ªÔÆÌåÓý

Re: Like to test a S-meter and soon an AGC/Tx-monitor for your bitx40?


 

I think we just hack Allard's code to try smaller Si5351 solutions, or to add other features. ? Perhaps use #ifdef's so it is easy to select various features and libraries as room on the Nano allows. ? If Allard decides what we wind up with is good, he can incorporate it. ?Lots and lots of stuff in the Etherkit library we don't need, could use that flash for other stuff.

Line 307 of version 2.0.5 of the Etherkit code has the pll_reset() commented out for output frequencies less than 100 mhz. ?That's probably what was giving us tuning clicks in recent versions. ?CLK[0,1,2] all use PLLA with that VCO frozen to 800mhz, it is only the output divider msynth's that get messed with. ?An exception is made for output frequencies greater than 100mhz, but that does not apply to us.

A google search for "si5351 pll reset" suggests that Pavel's code where the VCO ?is changed with each touch of the tuning knob may occasionally need a PLL reset. ?We could reset the PLL's only on major excursions from where last reset, could read the Si5351 lock status and reset only when needed, or follow Etherkit's lead and only mess with the output dividers. ? I doubt the slight added phase noise of non-integer output dividers would ever be much of an issue for the Bix40.

One curious thing I see: ?the "c" of (a+b/c) was getting set to 0xFFFFF by the Etherkit code, now it is set to an even million so 0xF4240. ?Pavel's code sets it to 1048574, which is 0xFFFFE. ? ?Why not 0xFFFFF?

Here's python code for an algorithm to compute (a+b/c)I haven't seen elsewhere. ? All values are integers, the divides need to handle 64 bits.of dividend. ?Without the final correction to c, I get slightly better accuracy than I do with the downshifting trick of the code previously posted. ?This is about the same algorithm as what's in the Etherkit library. ?With the final correction, it is five times better.

    c = 0x100000-1
    a = v/x
    b = ((v%x)*c)/x
    c = b*x/(v%x)
Jerry, KE7ER
?

On Fri, Jun 23, 2017 at 02:59 pm, Pavel Milanes Costa wrote:
That will make the lib bigger than my simple lib, and at the end we will need to change the lib on the raduino code if Allard approve it; then why not just changing the Raduino code?

Join [email protected] to automatically receive all group messages.