This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1217: Can not read the converted data properly - I can read all the registers values correctly

Part Number: ADS1217

Please if you could summaryze the steps to properly read the ADC data values (keep in mind that I can read all channels properly)

I am using

2.5V ref =  Internal

buffer = disable

Gain = 1

Clk = 4MHZ

SCLK = 1MHZ

Falling edge

I need 0 .. to 5V input range so my output = 000000h to FFFFFFh (24b is not critical)

My programming steps are as follow:

1.- Set REG 01 = ch# + 1000b = The full command = 51h + 00h + ch#  + 1000b (write to register 1)

2.- delay 50ms

3.- check DRDYn = 0?

4.- read channel date = 01h

5.- next 24 bits = channel value <--- all channels are garbage

Thank you

Fausto bartra

  • sorry but what I meant is that "I can read all configuration registers properly"
  • Hi Fausto,

    Can you send me the complete registers settings you are using? And can you send me your schematic? I would also be interested in seeing your communication as either logic analyzer or oscilloscope plots. I would monitor DRDY to make sure that your read after DRDY transitions from high to low state. Make sure that CS stays low throughout your entire communication transaction.

    Best regards,
    Bob B
  • Bob:

    Thank you very much for your quick response

    -Please find attached the ADC schematic

    -The ADC interfaces with a microchip PIC32 microcontroller (PIC32MX795F512L-80V/PF) via a FPGA device

    -The interface is a 8bit bus to SPI

    -Polarity is set to falling edge

    -What I am not clear is how do you read all channels in sequence ?? (if you have any code example of how to read channels in sequence please email me a copy)

    - I can read all registers correctly evey time

    -This is what I am doing:

    only once after power up: Set Reg 0 = 0x0C : fosc/128 + Int VRef enable + Int Vref = 2.5V + buffer disable + most significant bit first (RA36 in the schematic is not installed, not ext VREF)

    only once after power up: Set Reg 9 = 0x47 : Unipolar + auto settling

    top:

    Wait for "start conversion flag" from microcontroller

    Set "adc busy flag" for micro

    read channel"

    set Reg 1 = channel number + 8 = AIN comm ( 0x51 + 0x00 + ch# + 1000b)

    200ms delay

    check if DRDY pin is low (data ready)

    Read data 24b and store (0x01 than read 24 bits

    clear "busy flag"

    micro reads data

    go back to "top"

    Thank you again for your help

    Fausto Bartra4527.ADC Sch.pdf

  • Bob:

    Do you need a pull up resistor on DRDYn pin?

    Thanks

    Fausto
  • Bob"

    I changed my code to monitor DRDYn falling edge
    Before I was looking for DRDYn = low
    DRDYn pin is always low. There is no short to ground
    Do you need a pullup?

    Thanks
  • Hi Fausto,

    I have not finished going through all the material you sent previously. I did want to tell you that DRDY is an actively driven push-pull pin and is independent of CS. It does not require a pull-up. If you do not see this pin go high or toggle, then the ADC is not converting. Double check your RESET and DSYNC pin to make sure they are both high and that all your supplies are active and powering the ADS1217 at the device pins.

    Also, make sure your crystal is oscillating. You have some very large capacitors on the crystal pins. These should be on the order of 10pF and not 1000pf.

    Best regards,
    Bob B
  • Bob:

    We found the problem
    DRDYn pin was not properly soldered to the board (we do all by hand)
    It is behaving as it should now

    Thank you for your help

    Fausto Bartra