AD9850 DDS Signal Generator sketch

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 39

  • @El-vl5ii
    @El-vl5ii 3 года назад +1

    what is the Peak to Peak Amplitude at 100kHz? If you don't mind me asking!

    • @grtyvr
      @grtyvr  3 года назад +1

      It is about 1v. That is all positive amplitude. There is no split supply and it does not generate negative voltages.

  • @carlosgracia6312
    @carlosgracia6312 Год назад

    Thanks for the video! Allow me two questions.
    - Is the signal current or voltage?
    - For any frequency, the amplitude is 1V?
    Thanksss

    • @grtyvr
      @grtyvr  Год назад

      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.

  • @Stefan98andon
    @Stefan98andon Год назад

    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.

    • @grtyvr
      @grtyvr  Год назад

      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.

  • @usamafaraz344
    @usamafaraz344 6 лет назад

    You shared a link in description, I wanted to know , How to program ATmega328 using programming header?

    • @grtyvr
      @grtyvr  6 лет назад

      i did a video here... ruclips.net/video/LV2L0zAp_Bw/видео.html

  • @b313156
    @b313156 3 года назад

    Can the AD9833 be tuned to 1 frequency without programming?

    • @grtyvr
      @grtyvr  3 года назад

      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.

    • @b313156
      @b313156 3 года назад

      @@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

  • @kevinatkab5219
    @kevinatkab5219 7 лет назад

    Thanks. Question: Where is the square wave output coming from?

    • @grtyvr
      @grtyvr  7 лет назад

      The 9850 is an arbitrary pulse generator. The module outputs the sine and square wave on 9, 10 and 7, 8 respectively.

    • @spehropefhany
      @spehropefhany 5 лет назад

      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.

  • @tejeshwvardhan1165
    @tejeshwvardhan1165 6 лет назад

    is pulse volt is 0-5 or -2.5 to +2.5 peak to peak?

    • @grtyvr
      @grtyvr  6 лет назад

      I don't recall a DC offset on the sine wave so -2.5 to +2.5

  • @jrM5492
    @jrM5492 6 лет назад

    have a question. are you able to program the ad9850 to generate sweep sine with this setup?

    • @grtyvr
      @grtyvr  6 лет назад

      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.

    • @jrM5492
      @jrM5492 6 лет назад

      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?

    • @grtyvr
      @grtyvr  6 лет назад +2

      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.

    • @jrM5492
      @jrM5492 6 лет назад

      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?

    • @grtyvr
      @grtyvr  6 лет назад

      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.

  • @lodayabhavin
    @lodayabhavin 6 лет назад

    Can v used as movile singal booster

  • @maxk4324
    @maxk4324 5 лет назад

    I thought the ad9850 was rated up to 30mhz?!? I just recently ordered one under this assumption.

    • @grtyvr
      @grtyvr  5 лет назад

      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.

    • @maxk4324
      @maxk4324 5 лет назад

      ​@@grtyvr Have you tested more than one? Hopefully it was just a manufacturing flaw

    • @grtyvr
      @grtyvr  5 лет назад

      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.

    • @maxk4324
      @maxk4324 5 лет назад +1

      @@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.

    • @grtyvr
      @grtyvr  5 лет назад +1

      @@maxk4324 no worries. Good luck with your project!

  • @TheMoreds
    @TheMoreds 7 лет назад

    Hi G , nice job,good case,👏🏼👏🏼

  • @marcinwitkowski6443
    @marcinwitkowski6443 6 лет назад

    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...

    • @grtyvr
      @grtyvr  6 лет назад

      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

  • @muhammadfaizannisar955
    @muhammadfaizannisar955 5 лет назад

    Excellent work can u please help me to find out amplitude variation with ad9850 thanks in advance

    • @grtyvr
      @grtyvr  5 лет назад +1

      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?

    • @grtyvr
      @grtyvr  5 лет назад

      I can take a look at that the next time I have the project open on my bench.

  • @evgeniypytikov6662
    @evgeniypytikov6662 7 лет назад

    👍👍👍👍👍👍👍👍👍👍👍👍👍👍