AnsweredAssumed Answered

Reading from AD7705 doesn't work, /DRDY doesn't go low

Question asked by matoha on Mar 30, 2013
Latest reply on Apr 9, 2013 by ChrisD.Rama

Hello!

 

I'm trying to interface AD7705 via SPI with a microcontroller Microchip PIC18F452. The problem is, that the ADC doesn't respond to my communication.

 

Few things I though where could be a mistake:

 

- no power - checked, 5.0V

- bad crystal - crystal is up and running (checked on oscilloscope)

- serial clock polarity - in the AD7705 datasheet the polarity is idle high, the microcontroller sends correct clock (checked on oscilloscope)

- data in - the microcontroller sends correct bytes (checked on oscilloscope)

- /CS - tied to ground

- /Reset - tied to Vdd

- bad pin connections - double checked

 

According to manual, the startup sequence is:

- write to communication register, next step is write to clock register

- write to clock register

- write to communication register, next step is write to setup register

- write to setup register, initiate self-cal

- poll /DRDY pin, wait for /DRDY low --- Problem is, that DRDY doesn't go low

 

I tried to skip the callibration and write to setup register normal mode instead of Self-cal

- write to communication register, next step is read from data register

- wait for /DRDY low -- DRDY also doesn't go low

 

What I am doing wrong?

I'm struggling with the ADC for few days and I don't have idea where is the mistake. I simply can't get DRDY low (except turning the power off ).

Thank you very much for your help.

 

My microcontroller code (the SPI part):

 

OpenSPI(SPI_FOSC_64, MODE_11, SMPMID);

PORTCbits.RC1 = 0;   //CS low

WriteSPI(0x20);    // next step is write to Clock register

WriteSPI(0x04);    // Clock Register Write CH1

WriteSPI(0x10);   // next step is write to Setup Register

WriteSPI(0x5C);  // Setup Register Write CH1

while(PORTCbits.RC0 != 0); // wait for DRDY low

WriteSPI(0x38);   // next step is read from Data Register

while(PORTCbits.RC0 != 0); // wait for DRDY low

getsSPI(rcvdString, 16);   // read data

Outcomes