AnsweredAssumed Answered

AD5420 is not working

Question asked by mustafa on Mar 7, 2013
Latest reply on Mar 10, 2013 by tjohnson

I have the below code and the waveforms are attached. I followed the schematic proposed in evaluation board and datasheet. But the output is zero. I could not be able to make it work. I tried to read the content of the control reg but it only outputs the previous data sent to the shift register. What am i doing wrong? I use inner ref and dvcc and they seem to be working. I'm applying 11.85V to the ad5420. Spi frequency is 136.718,75 Hz. I tried different frequencies and clock schemes with no luck. Thanks.

 

 

     // Make sure it accpets commands

     AD5420_CLEAR = 0;

     // Dummy latch
    AD5420_LATCH = 0;
    __delay32(490);             // 7us
    AD5420_LATCH = 1;
    __delay32(490);             // 7us
    AD5420_LATCH = 0;

   

     // Issue a RESET
    spi_rw8_dac(RESETREG_ADR);
    spi_rw16_dac(0x0001);
    AD5420_LATCH = 0;
    __delay32(490);             // 7us
    AD5420_LATCH = 1;
    __delay32(490);             // 7us
    AD5420_LATCH = 0;

 

 

    // Load Control Reg
    spi_rw8_dac(CONTROLREG_ADR);
    spi_rw16_dac(0b0011111100010101);   // Rext:active, output enabled, slew rate enabled, 4-20mA, daisy chain disabled, 3300 Hz, 1 LSB
    AD5420_LATCH = 0;
    __delay32(490);             // 7us
    AD5420_LATCH = 1;
    __delay32(490);             // 7us
    AD5420_LATCH = 0;

 

 

    // Clear output to 4mA
    AD5420_CLEAR = 1;
    __delay32(4900);             // 70us
    AD5420_CLEAR = 0;

Attachments

Outcomes