It is a voltage signal that is generated. The Sine wave function is 1v pp. It is a positive wave, so the low peak is at 0v. The amplitude is fairly flat out to about 10MHz where it starts to fall off. I have not measured the -3dB point. But that should be in the datasheet of the AD9850.
Hello, I made the same DDS, but since I need it for a radio transmitter, I need it to always remember the given frequency. I don't know much about programming so I'm wondering what I need to change in the code to get this. Thanks a lot if you can help me.
If all you want is to have a different startup frequency then you just need to change this line: long unsigned int freq = 1000; // Set initial frequency. However if you want it to remember the last frequency it was set at across power cycles then that will require some non-volatile storage like an sd card and a fair bit more effort.
not easily. The chip is designed to be programmed. You could put together some logic circuitry to mimic a microcontroller but that would be way more expensive than just putting in an ATTiny or something like that.
The square wave comes from feeding the analog sine wave to a comparator (on the chip). It seems, at first blush, like a strange way to generate a square wave in a digital circuit, but if you think about it that’s how the resolution can be finer than a clock cycle.
I have not looked at how hard it would be to do, but my first reaction is that it should be possible. I have not tested how fast you can change frequency and I am not sure if the ad9850 has a sweep mode.
Thanks. ad9850 should have a sweep mode. I replaced the microcontroller with Arduino Nano so i can upload sketch through usb, but I'm wondering how do I program 9850 through arduino or is that even accessible?
I just looked at the data sheet for the ad9850. www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf Does not look like it has a sweep mode. You program it by sending either 8bit parallel on pins 1-4 + 25-28 (D7 = MSB, D0=LSB) or 40 bit serial on pin 28. So the sketch would need to communicate with the ad9850 on those pins ( plus a clock ) and send the frequencies and phase that you want the ad9850 to output. Frequency change takes 18 clock cycles at 125MHz clock means a max sweep speed of just less than 7 M frequencies per second so that should work. So in the original project they used serial. // transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line void tfr_byte(byte data) { for (int i = 0; i < 8; i++, data >>= 1) { digitalWrite(DATA, data & 0x01); pulseHigh(W_CLK); //after each bit sent, CLK is pulsed high } } To send frequency they did this: void sendFrequency(double frequency) { int32_t freq1 = frequency * 4294967295/AD9850_CLOCK; // note 125 MHz clock on 9850 for (int b = 0; b < 4; b++, freq1 >>= 8) { tfr_byte(freq1 & 0xFF); } tfr_byte(0x000); // Final control byte, all 0 for 9850 chip pulseHigh(FQ_UD); // Done! Should see output } So to do a sweep function you could loop on sendFrequency from lowFreq to highFrequency over a time interval calculated based on the frequency range and length of time you want the sweep to take.
on page 14 it says:'Other operational modes (frequency sweeping, sleep, serial input) are available to the user via keyboard/mouse control' not sure what it means... do you need a ST-Link V2 to communicate with ad9850?
I think they are talking about a development board that you can get the chip on. The module I used is not the dev. board. But they do give a schematic, pcb layout and BOM for building one! Nice. They describe how to program the chip on page 9.
Both modules I have used exhibit that behaviour. Also, as noted in the original design by John, he saw the same. The 9850 certainly does produce a sine wave well beyond 10MHz, but the amplitude of that wave decreases as you move past 10 MHz.
@@grtyvr oh ok, so I would just need an amplifier stage then, that's alright, I was worried that you meant it was a hard limit to the output. Thank you for answering my questions.
ps.. U clearing all disp when you changing freq ... u dont need to do that. just use background color for text and it will be 0 of blinking all elements on disp...
I will fix that as well as fixing the annoying feature of jumping back to the 10MHz setting if you try to lower the frequency below 1Hz in the next version of my project. ruclips.net/video/kwTbjOf6Yqc/видео.html
In the data sheet www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf they list a lot of specs for the DAC output. Is what you are looking for something different?
what is the Peak to Peak Amplitude at 100kHz? If you don't mind me asking!
It is about 1v. That is all positive amplitude. There is no split supply and it does not generate negative voltages.
Thanks for the video! Allow me two questions.
- Is the signal current or voltage?
- For any frequency, the amplitude is 1V?
Thanksss
It is a voltage signal that is generated. The Sine wave function is 1v pp. It is a positive wave, so the low peak is at 0v. The amplitude is fairly flat out to about 10MHz where it starts to fall off. I have not measured the -3dB point. But that should be in the datasheet of the AD9850.
Hello, I made the same DDS, but since I need it for a radio transmitter, I need it to always remember the given frequency. I don't know much about programming so I'm wondering what I need to change in the code to get this. Thanks a lot if you can help me.
If all you want is to have a different startup frequency then you just need to change this line:
long unsigned int freq = 1000; // Set initial frequency.
However if you want it to remember the last frequency it was set at across power cycles then that will require some non-volatile storage like an sd card and a fair bit more effort.
You shared a link in description, I wanted to know , How to program ATmega328 using programming header?
i did a video here... ruclips.net/video/LV2L0zAp_Bw/видео.html
Can the AD9833 be tuned to 1 frequency without programming?
not easily. The chip is designed to be programmed. You could put together some logic circuitry to mimic a microcontroller but that would be way more expensive than just putting in an ATTiny or something like that.
@@grtyvr Hello!
I want to generate only 30 kilohertz. Dip 8 suits me.
Can you do what is needed for a fee?
Here, for contact with me: indnk@abv.bg
Thanks. Question: Where is the square wave output coming from?
The 9850 is an arbitrary pulse generator. The module outputs the sine and square wave on 9, 10 and 7, 8 respectively.
The square wave comes from feeding the analog sine wave to a comparator (on the chip). It seems, at first blush, like a strange way to generate a square wave in a digital circuit, but if you think about it that’s how the resolution can be finer than a clock cycle.
is pulse volt is 0-5 or -2.5 to +2.5 peak to peak?
I don't recall a DC offset on the sine wave so -2.5 to +2.5
have a question. are you able to program the ad9850 to generate sweep sine with this setup?
I have not looked at how hard it would be to do, but my first reaction is that it should be possible. I have not tested how fast you can change frequency and I am not sure if the ad9850 has a sweep mode.
Thanks.
ad9850 should have a sweep mode. I replaced the microcontroller with Arduino Nano so i can upload sketch through usb, but I'm wondering how do I program 9850 through arduino or is that even accessible?
I just looked at the data sheet for the ad9850. www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf Does not look like it has a sweep mode. You program it by sending either 8bit parallel on pins 1-4 + 25-28 (D7 = MSB, D0=LSB) or 40 bit serial on pin 28. So the sketch would need to communicate with the ad9850 on those pins ( plus a clock ) and send the frequencies and phase that you want the ad9850 to output. Frequency change takes 18 clock cycles at 125MHz clock means a max sweep speed of just less than 7 M frequencies per second so that should work.
So in the original project they used serial.
// transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line
void tfr_byte(byte data) {
for (int i = 0; i < 8; i++, data >>= 1) {
digitalWrite(DATA, data & 0x01);
pulseHigh(W_CLK); //after each bit sent, CLK is pulsed high
}
}
To send frequency they did this:
void sendFrequency(double frequency) {
int32_t freq1 = frequency * 4294967295/AD9850_CLOCK; // note 125 MHz clock on 9850
for (int b = 0; b < 4; b++, freq1 >>= 8) {
tfr_byte(freq1 & 0xFF);
}
tfr_byte(0x000); // Final control byte, all 0 for 9850 chip
pulseHigh(FQ_UD); // Done! Should see output
}
So to do a sweep function you could loop on sendFrequency from lowFreq to highFrequency over a time interval calculated based on the frequency range and length of time you want the sweep to take.
on page 14 it says:'Other operational modes (frequency sweeping, sleep, serial
input) are available to the user via keyboard/mouse control' not sure what it means... do you need a ST-Link V2 to communicate with ad9850?
I think they are talking about a development board that you can get the chip on. The module I used is not the dev. board. But they do give a schematic, pcb layout and BOM for building one! Nice.
They describe how to program the chip on page 9.
Can v used as movile singal booster
I thought the ad9850 was rated up to 30mhz?!? I just recently ordered one under this assumption.
That is what the spec sheet for the AD9850 says. The module however does not provide that. I have not looked into why that is.
@@grtyvr Have you tested more than one? Hopefully it was just a manufacturing flaw
Both modules I have used exhibit that behaviour. Also, as noted in the original design by John, he saw the same. The 9850 certainly does produce a sine wave well beyond 10MHz, but the amplitude of that wave decreases as you move past 10 MHz.
@@grtyvr oh ok, so I would just need an amplifier stage then, that's alright, I was worried that you meant it was a hard limit to the output. Thank you for answering my questions.
@@maxk4324 no worries. Good luck with your project!
Hi G , nice job,good case,👏🏼👏🏼
ps.. U clearing all disp when you changing freq ... u dont need to do that. just use background color for text and it will be 0 of blinking all elements on disp...
I will fix that as well as fixing the annoying feature of jumping back to the 10MHz setting if you try to lower the frequency below 1Hz in the next version of my project. ruclips.net/video/kwTbjOf6Yqc/видео.html
Excellent work can u please help me to find out amplitude variation with ad9850 thanks in advance
In the data sheet www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf they list a lot of specs for the DAC output. Is what you are looking for something different?
I can take a look at that the next time I have the project open on my bench.
👍👍👍👍👍👍👍👍👍👍👍👍👍👍
Emojis... Eeewwwww