Post Go back to editing

# Output Frequency of CN0349

Category: Hardware
Product Number: CN-0349

Hi,

my question has been asked several times in different versions, but none of the answers given seem to help in my case. My problem is the output frequency of "vanilla" CN0349 Boards. It seems to me, that with the 1Mhz oscillator connected to MCLK of the AD5934, it is not possible to programm any values greater than approx. 7250 Hz into the Start Frequency Registers. My logic so far is that with the euqation given on page 13 of the AD5934 datasheet, the maximum value programmable to the AD5934 in Hz, which is still <= 24 Bit is about 7250. I came across this problem, because my measurements were consistantly wrong and all of them wrong in the same way. Now i've tested this theory and so far it seems to be true. As long as i program values below the 7250 Hz threshold, i can use the registers and get the desired output frequency. BUT for some unkown reason, which i cannot find an answer to, at about 30 kHz the Board just randomly changes direction and lowers the frequency instead of increasing it.

Now it would be just great if anybody could help me out. My 2 questions beeing:

1. Am i right with my assumption that with the given equation on page 13 of the AD5934 datasheet, it is not possible to programm values greater than ~7250 Hz, since this is the maximum value still equal to/under 24 bit?

2. Why is it not possible to increase the frequency above 30/31 kHz? Are there any ways to work around this problem?

If you have any questions i will gladly answer them.

Parents
• The maximum frequency you can get from the AD4934 is by writing 0xFF into all 3 registers.  With the 1 MHz MCLK frequency used  on the CN-0349 board, from the formula on page 13 of the datasheet you mentioned, the AD5934 would produce the maximum frequency of about 7812.5 Hz.
To make the board operate at 30 KHz it would be necessary to remove the U6 FXO-HC536R-1 1 MHz oscillator and replace it with a higher frequency one (for example, FXO-HC536R-16) or wire in the MCLK signal from some higher frequency external source such as lab generator, etc.
If the datasheet 16 MHz MCLK frequency is used, the maximum frequency the AD5934 would be able to generate is about 125 KHz.

• Thank you so much. I just dont understand how someone would NOT write something like that in the datasheet. Would have saved me days of work finding that out the hard way..

Anyways, thanks again.

• Yes, unfortunately the documentation is not clear and there are quite a few behaviors in this chip family that are completely undocumented. Bumping into those in the middle of a project does create serious setbacks. Documentation limits marketplace acceptance of these otherwise rather unique chips.
Best of luck with the rest of your project, please do not hesitate to ask if you have any further questions.

• I had a look through the Circuit Note and the datasheet. It is true - it would have been a good idea to explicitly state the frequency range and resolution of the CN0349 given the 1 MHz master clock. It also looks like there's little to no mention of changing the frequency from a default value of 2Khz. The only mention in the note is "This oscillator allows the AD5934 to excite the conductivity cell with a frequency of 2 kHz, which is well suited for conductivity measurements." (Does the supplied GUI even allow the frequency to be changed?) Again, I absolutely agree that this should have been documented better in the circuit note.

But I don't see any ambiguity in the AD5934 datasheet - all formulas are expressed in terms of  MCLK frequency, with 16 MHz used as an example. The last paragraph on page 29 also explains when you might want to use a lower MCLK frequency.

I dug into the no-OS and Linux driver documentation as well. The only bare metal drivers for the AD5934 seem to be here: https://wiki.analog.com/resources/tools-software/uc-drivers/microchip/ad5933 . (note the title is actually for the AD5933.) This should be considered legacy code, any new development would be in the no-OS repository. It looks like the AD5933 IS supported in no-OS, and the exernal clock frequency is defined here:

and can be changed through the driver functions:

Similarly, the external clock must be defined for the Linux driver:

Once the MCLK is defined for these drivers, you should be able to set / read back the frequency properly.

Acknowledging this was frustrating for @muzot , hope this helps in the future.

-Mark

•  all formulas are expressed in terms of  MCLK frequency, with 16 MHz used as an example.

Indeed those formulas seem relatively straightforward, but evidently not to all users.

The last paragraph on page 29 also explains when you might want to use a lower MCLK frequency.

The last paragraph on page 29, however, is an example of a rather ambiguous text: it refers to 16.776 MHz as the "nominal clock frequency," while the rest of the datasheet text uses 16 MHz as typical MCLK frequency. 16.776 MHz is the frequency of the AD5933 internal oscillator, so this is the frequency that cannot "be scaled down" as it is not under user's control. When this passage is found in the AD5934 datasheet it is even more confusing as the AD5934 does not have the internal oscillator. And nowhere in the AD5934 datasheet it says that on power up the chip is set to operate from the clock coming from this non-existent internal oscillator. Naturally, this clock is not coming and the chip appears dead. So it is user's responsibility to enable it's operation from the external clock by programmatically setting bit D3 in the control register, but how one would know?

in reply to Snorlax

This is more of an after thought, but I turned that formula into a little Excel spreadsheet to help with some quick calculations based on the MCLK frequency.  Note this doesn't take into consideration any absolute maximum inputs/outputs, its purely that equation just solved for Fout.XLSX