DDS ad9910 - arduino

Hello guys ,

I have a AD9910 Evaluation Board and i can controlling with Pc software. So now i have project to do frequency's ramp.

Anyone knows how i controlling this board using ARDUINO ? I don't know how start . Is there a code for arduino ?

Thanks

Rick

  • Hi Rick,

    You can check this document for the basic things to do when controlling DDS evaluation boards externally.

    Best regards,

    Mark

  • I've made all necessary connections among the AD9910 and the Arduino, but they haven't shown any changes in the output signal. I also have tried the Mbed code below, but no sucess. Got any ideia?

    #include "mbed.h"

    #include "stdio.h"

     

     

    //CONFIG PINS SPI

    SPI DDS(p5, p6, p7); // mosi, miso, sclk

    DigitalOut SPI_EN(p8); //DDS' Enable pin.

    DigitalOut IO_UPD(p9); //DDS' Output pin.

    DigitalOut RST(p10); //DDS' Reset pin.

    DigitalOut EXT_PWD(p11); //EXT_POWER_DOWN pin of DDS.

     

    //CONFIG SERIAL PC

    Serial pc(USBTX, USBRX); // tx, rx

    //CONIG DIGITAL OUTS

    DigitalOut Led1(LED1);

    DigitalOut Led2(LED2);

    DigitalOut Led3(LED3);

    DigitalOut Led4(LED4);

    //MAIN PROGRAM

    int main (void){

    //CONFIG INICIAL

      RST=0;

      wait_ms(1);

      EXT_PWD=0;

      wait_ms(1);

      SPI_EN = 1;

      wait_ms(1);

      IO_UPD = 0;

      wait_ms(1);

     

    //REGISTER DDS CONFIG

      char DDS_CONF[28]={0x00,0x00,0x00,0x00,0x00,0x40,0x08,0x20,0x1F,0x3F,0x40,0x00,0x00,0x00,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x1E,0xB8,0x52};     

     

    //CONFIG SPI

      DDS.format(8,0);

      DDS.frequency(10000);

     

    //CONFIG CFR1               

      SPI_EN = 0;

      DDS.write(0x00);

      for(int i=0; i<=3; i++){

      DDS.write(DDS_CONF[i]);

      }

      SPI_EN = 1;

      wait_ms(1);

      IO_UPD = 1;

      wait_ms(1);

      IO_UPD = 0;

     

      Led1=1;

     

    //CONFIG CFR2

    SPI_EN = 0;

    DDS.write(0x01);

    for(int i=4; i<=7; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led2=1;

     

    //CONFIG CFR3

    SPI_EN = 0;

    DDS.write(0x02);

    for(int i=8; i<=11; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led3=1;

    //CONFIG AUXILIARY DAC CONTROL

    SPI_EN = 0;

    DDS.write(0x03);

    for(int i=12; i<=15; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led4=1;

    //CONFIG I/O UPDATE RATE

    SPI_EN = 0;

    DDS.write(0x04);

    for(int i=16; i<=19; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led1=0;

    //CONFIG FTW FREQUENCY TUNING WORD

    SPI_EN = 0;

    DDS.write(0x04);

    for(int i=20; i<=23; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led2=0;

    //CONFIG SINGLE TONE PROFILE 0

    SPI_EN = 0;

    DDS.write(0x0E);

    for(int i=24; i<=27; i++){

    DDS.write(DDS_CONF[i]);

    }

    SPI_EN = 1;

    wait_ms(1);

    IO_UPD = 1;

    wait_ms(1);

    IO_UPD = 0;

     

    Led3=0;

    }

    Thanks in advance.

  • Hi,

    For your program:

    1. The address for FTW should be 0x07.

    2. Eight bytes are assigned for Profile 0x0E. Having only four bytes for 0x0E does not program the FTW for the profile.

    Best regards,

    Mark

  • Where did you find the mbed,h library? I am not getting it. Please help 

  • Hi Azil,

    We're you able to get the output after the changes suggested by Mark...

    I am trying with Arduino, no success till now.