Hello,
I'm having two problems with the AD9102 DDS sig gen. Besides using it as Arbitrary Waveform Generator, I also want to use it as a standard function generator, outputting sine, square and triangle. I've got the sine and AWG working fine. However the Square and Triangle are a problem.
For the Square I planned to put low and high values into the AWG memory, set the pattern length to 2, and then clock it with the DDS_MSB. In this way I should have been able to make a variable frequency square wave generator (though with jitter of incoming clock period). But I couldn't get it to work as described in the data sheet. Secondly, I want a variable frequency Triangle wave. But I found the triangle wave can only be produced with just 64 frequencies, each a half of the previous frequency, and fixed to starting at CLK/32768 in frequency. This seems useless to almost everyone. So I must be doing something wrong. So to expand:
1. DDS Clock Source
I cannot make the DDS_MSB_EN in the DDS_CONFIG register work.
My assumption is that if I program the RAM to have two values, 0x1FFF <<2 and 0x2000 <<2 at 0x6000 on, I set Start_addr to 0 <<4 and Stop_addr to 1<<4, and Pattern_period to 2, then I should get a square wave. If the DDS_MSB_EN is 0, then the square wave frequency should be CLK/2 frequency. If DDS_MSB_EN = 1, then the square wave should be at the DDS/2 frequency - which is what I want.
However, the DDS_MSB_EN bit does not seem to have any effect.
2. Sawtooth Frequency
I cannot work out how to change the Sawtooth frequency. Set to Triangle, I see the generator outputting 16384 samples increasing from -max to + max, and then 16384 samples from +max to -max, and repeating this. This yields just one frequency at CLK IN/32768.
I can see that I can dwell at one sample for between 1 and 64 clock cycles, but that is a very coarse approach to setting the frequency. It means you can only get 64 frequencies - the next being half of the previous one. Kind of not very useful! I had assumed (silly of me) that the part would use the phase accumulator with the linear to sine wave conversion turned off (just as the AD9834 does), and so I could get any frequency. However, I cannot figure out how to do this. I would be grateful for any help.
Can you clarify what I'm doing wrong? Thanks.
Bart