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.

ADS1224 ADC with Microcontroller

Other Parts Discussed in Thread: ADS1224

Hello Guys,

         I am trying to use ADS1224 24 bit ADC with PIC18F4420 controller. Can anyone help me how to read the data and send to hyper terminal (bit by bit is ok)

         I am able to get some value, but it is not correct!!!

I doubt my C code. Please help me

 

Thanks,

Jijo

  • Jijo,

    It always helps to plot the communications with the ADC with an oscilloscope.

    On page 20 of the ADS1224 datasheet, Figure 33 shows a summary of the serial interface waveforms. You should try to duplicate those on a scope plot. If you can, plot them here and I can look them over.

    You should also make sure of a few of things:

    1. SCLK dwells low.
    2. The Data is read out on the falling edge of SCLK.
    3. DRDYn/DOUT is used as an indication that the data is ready to be read out. If the data is read asynchronous to the DRDYn/DOUT pulse, you need to make sure that the data is read before another DRDYn/DOUT pulse comes along, or you will be reading the next data.
    4. SCLK is clean. Noise on the SCLK line can be interpreted as an extra pulse and advance the data bit without you realizing it.

    Those are some generic hints on reading data back. Let me know if you can generate the plots. You'll also want to match the readback with the scope plot to make sure what you are reading matches the scope shot.

    If the data you get back is in error and this is not a communications error, then post what you are reading back, along with what you expect. If you can, post a schematic (if you can't, or don't want to, give a generic description of what you are doing). I would also measure back the analog voltages on the reference and inputs to make sure they are where you expect them.

    Joseph Wu