I'm helping a friend to get 1749-1806kHz to be used for a Polyakov (RA3AAE) sub-harmonic mixer for 80m, but I ran into big problems in the lower end of the range.
Yes, I should be able to solve this using a divider and enter a multiple of the requested frequency, but it is not needed with the 5351, as it is able to go as far down as 500kHz with DIV_1 for PLL@900MHz.
I found out by bisecting that the frequency of 1757813Hz works but not 1757812Hz!
It turns out to be the point where the frac.a value become 512 and greater.
Rev B of the 5351 supports up to 1800 as frac.a.
It is easily fixed.
Current row 222 in si5351-avr-tiny-minimal.c:
128 * 512 is 65536 so my guess is that this part of the expression overflows the 16 bit logic inferred by the frac.a 16 bit size. I'm using avr-gcc (GCC) 4.9.2 on an Ubuntu 16.04 system.
An alternative fix is to change the type of frac.a to uint32_t, but the suggested fix saves 2 bytes of memory.
I'm helping a friend to get 1749-1806kHz to be used for a Polyakov (RA3AAE) sub-harmonic mixer for 80m, but I ran into big problems in the lower end of the range.
Yes, I should be able to solve this using a divider and enter a multiple of the requested frequency, but it is not needed with the 5351, as it is able to go as far down as 500kHz with DIV_1 for PLL@900MHz.
I found out by bisecting that the frequency of 1757813Hz works but not 1757812Hz! It turns out to be the point where the frac.a value become 512 and greater.
Rev B of the 5351 supports up to 1800 as frac.a.
It is easily fixed. Current row 222 in si5351-avr-tiny-minimal.c:
Change to:
128 * 512 is 65536 so my guess is that this part of the expression overflows the 16 bit logic inferred by the frac.a 16 bit size. I'm using avr-gcc (GCC) 4.9.2 on an Ubuntu 16.04 system. An alternative fix is to change the type of frac.a to uint32_t, but the suggested fix saves 2 bytes of memory.
73 de SA5MOG