I am experimenting with a AD9834 freq generator chip and a Raspberry pi pico chip, communicating via SPI. I can get a waveform to show on my scope but it doesnt seem
to correspond correctly with my calculated freq word. I am using the AD9834 with 75 mhz clock. So my freq calcs are: 7 mhz desired, so 7e6 * 2^28/75e6=0x17E4B18. When I chop the result up into two 14 bit values, and OR the freq reg 0 bits (01) on the end, I end up with MSB=0x45F9 and LSB=0x4b18. I load this into my micropython program, run the program, load the LSB first into the AD9834, then MSB it starts OK but my actual freq is 13 mHz. I get a nice sine wave, 200 mV peak to peak, but wrong freq. I am pulling my hair out trying to figure this out, I checked and rechecked my LSB MSB calculation several times , I know those are right. Its almost like the MCLK is not really running at 75 mHZ, but my scope confirmed it was (74.9ish mhz). ANyone run into this?
to correspond correctly with my calculated freq word. I am using the AD9834 with 75 mhz clock. So my freq calcs are: 7 mhz desired, so 7e6 * 2^28/75e6=0x17E4B18. When I chop the result up into two 14 bit values, and OR the freq reg 0 bits (01) on the end, I end up with MSB=0x45F9 and LSB=0x4b18. I load this into my micropython program, run the program, load the LSB first into the AD9834, then MSB it starts OK but my actual freq is 13 mHz. I get a nice sine wave, 200 mV peak to peak, but wrong freq. I am pulling my hair out trying to figure this out, I checked and rechecked my LSB MSB calculation several times , I know those are right. Its almost like the MCLK is not really running at 75 mHZ, but my scope confirmed it was (74.9ish mhz). ANyone run into this?