AnsweredAssumed Answered

AD9859 not working

Question asked by josancardenasm on Feb 7, 2015
Latest reply on Feb 8, 2015 by josancardenasm

Hello. i'm working in a design with a AD9589 that i haven't design. i have built the PCB but the device is nor working correctly. I attach a PDF with the schematic if you see any issue.

DDS.png

 

The device is correctly supplied but in the pin IOUT i have a constant 1.8V.

I have observed that the in the pin 8 i have a signal of 25 MHz and 60mVpp, but in the pin 9 i only have noise. I think that i should have the same signal but opposite than the pin 8, but i have changed the crystal two times and the result is the same.

 

This is a sample code that i have written. i'm using Maple IDE of LeafLabs

 

//Constants
//========
#define PIN_DDS_IO_UPDATE D9
#define PIN_DDS_CS_       D14
#define PIN_SCLK      D13
#define PIN_SDIO      D11
#define PIN_DDS_RESET   D4

// Use SPI port number 1
//========
HardwareSPI spi(1);

void setup() {
    // Turn on the SPI port
    pinMode(PIN_DDS_IO_UPDATE, OUTPUT);
    digitalWrite(PIN_DDS_IO_UPDATE, LOW);
    pinMode(PIN_DDS_CS_, OUTPUT);
    digitalWrite(PIN_DDS_CS_, HIGH);
    pinMode(PIN_DDS_RESET, OUTPUT);
    digitalWrite(PIN_DDS_RESET, LOW);
    spi.begin(SPI_1_125MHZ, MSBFIRST, SPI_MODE_3);
}

void loop() {
   // Print out the response received.
START_PROG:
   SerialUSB.println("Pulse 'c' para continuar");
   while(1){
       if ((SerialUSB.available()) && (SerialUSB.read()=='c')) break;
   }

   //Reset DDS
   //========
   digitalWrite(PIN_DDS_RESET, HIGH);
   delay(1);
   digitalWrite(PIN_DDS_RESET, LOW);
   delay(1000);
  
   //Register 0: SDO enabled. Clk sync out disabled
   //=====================================
   digitalWrite(PIN_DDS_CS_, LOW);
   spi.transfer(0x00);  //Write
   spi.transfer(0x00);
   spi.transfer(0x00);
   spi.transfer(0x02);
   spi.transfer(0x12);
   digitalWrite(PIN_DDS_CS_, HIGH);
   
   digitalWrite(PIN_DDS_IO_UPDATE, HIGH);
   digitalWrite(PIN_DDS_IO_UPDATE, LOW);
   
   //PLL on, M=16, fsys = 400MHz
   //=====================================
   digitalWrite(PIN_DDS_CS_, LOW);
   spi.transfer(0x01);  //Write
   spi.transfer(0x00);
   spi.transfer(0x00);
   spi.transfer(0x80);
   digitalWrite(PIN_DDS_CS_, HIGH);
   
   digitalWrite(PIN_DDS_IO_UPDATE, HIGH);
   digitalWrite(PIN_DDS_IO_UPDATE, LOW);
   
   // enable clock
   //=====================================
   digitalWrite(PIN_DDS_CS_, LOW);
   spi.transfer(0x00);  //Write
   spi.transfer(0x00);
   spi.transfer(0x00);
   spi.transfer(0x02);
   spi.transfer(0x00);
   digitalWrite(PIN_DDS_CS_, HIGH);
   
   digitalWrite(PIN_DDS_IO_UPDATE, HIGH);
   digitalWrite(PIN_DDS_IO_UPDATE, LOW);
   
   
   // Configure frequency waveform
   // freq = 400*FTW/2^32 = 70 MHz
   // FTW = 70*2^32/400 = 0x2CCCCCCD
   //=====================================

   digitalWrite(PIN_DDS_CS_, LOW);
   spi.transfer(0x04);  //Write
   spi.transfer(0x2C);  //Data
   spi.transfer(0xCC);
   spi.transfer(0xCC);
   spi.transfer(0xCD);
   digitalWrite(PIN_DDS_CS_, HIGH);
   
   digitalWrite(PIN_DDS_IO_UPDATE, HIGH);
   digitalWrite(PIN_DDS_IO_UPDATE, LOW);
      
}


Outcomes