MCLK of AD5934

Hello,

i am working on a project involving the CN-0349 and therefore the AD5934 with a Raspberry Pi Model 3. I already did some tests, which were working fine.

My main problem is to get the right frequency parameters to the AD5934. The data sheet states (page 4), that the maximum clock speed is somewhere around 16 MHz, with a frequency range from 1 kHz to 100 kHz. I tried to use the equations on page 13 and 21 to calculate the code to send to the AD5934. Using the exact same values (start frequency 30 kHz, 10 Hz increment, 150 steps) used on page 13, everything works fine. But i can't seem to go below 25 kHz. Only the start frequency code seems to break my python code. After sending wrong(?) code to the AD5934, the status register only shows no valid data/dft not complete. The only way to get valid data again is to reboot the CN-0349.

Now i already tried to check if something with the equation might be wrong. I checked the baudrate of the raspberry pi(400 kHz) and changed the MCLK in my formula, only to get errors on every try. The start frequency and other parameters do not seem to matter anymore. After changing MCLK back to 16 MHz in the equation (Raspi still 400 kHz), it works again in the range described above (30 kHz +- 5 kHz). 

Since many sources state the raspberry pi baudrate is 400 kbps, not 400 kHz and i could not find any I2C bus baudrates of 16 MHz, mabye my understanding of these frequencies/speeds might be wrong? Is there a vaild way to get the baudrate in Hz? Did someone have similar problems with the frequency parameters? 

This might not be part of my problem, but i do not understand where the 16 in the equation comes from. Is it derived from the 16 MHz? Do i need to change it with a different MCLK or is it a constant?

I would be very grateful for any help!

Regards,

Richard



tag
[edited by: lallison at 2:28 PM (GMT 0) on 5 Aug 2019]
Parents Reply Children
No Data