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.

ADS1258-ep data read with AVR

Other Parts Discussed in Thread: ADS1258-EP

Hello,

I have recently purchased an ADS1258-EP ADC. I am now currently trying to interface it via SPI communication and a Atmega 328 (Arduino Duemnilanove, just for testing the communication). I have tried the register format data read. According to the datasheet, after I set up the register configuration, I have to give it the Channel data read command (first 3 bits 001 and 4th 1 for multiple register access) and than read 4 bytes of incoming data (one status byte and 3 actual data bytes). My question is: do I have to send the Channel data read command (register format) every time I want to read the 4 bytes or can I just send it once and then continously read blocks of 4 bytes of incoming data on the SPI ? I'm using the default register values. The only modified registers are MUXSG0 and MUXSG1 from where I selected only two channels, just to test the communication. Code:

SPI.transfer(0b00110000); // channel data read command - do I have to put this in the loop read loop, every time I try to read the next converted data ?

while(1) {

stat = SPI.transfer(0x00); // status byte

b1 = SPI.transfer(0x00);

b2 = SPI.transfer(0x00);

b3 = SPI.transfer(0x00);

}

Same question goes with the direct data read: do I have to send SPI.transfer(0b00000000); with first 3 bits being the direct data read command or can I only sync with the DRDY pulses and only read the 4 byte blocks ?

After testing the ADS with the AVR, I will use a RM48 or MSP430 microcontroller for the long run project.

I thank you in advance !

  • I haven't figured it out yet. Could someone give me some tips, please ?

  • Hi Cristian,

    Sorry for the delay!

    The EP version of this part is supported by our high reliability group (forum link: http://e2e.ti.com/support/applications/high_reliability/default.aspx), however, I will help you with this issue. Regarding your questions:

    • The channel data read command must be issued each time data is read.

    • For channel data read direct, you hold DIN either HIGH or LOW and start clocking data out. (The ADC will recognize this as the "channel data read direct command"). This does need to be somewhat "sync'd" with /DRDY because you will want to perform this "command" after /DRDY goes low and before it goes low again to prevent data corruption (The ADC will be updating data while you are still reading it out). The channel data read command does not need to be sync'd with /DRDY and may be better to use if you are not monitoring /DRDY.

    Note: That when using channel data read direct, there is also requirement to toggle /CS or wait for the SPI interface to timeout, before you can send another command.

    From page 31 of the datasheet:

     

    Best regards,
    Chris

  • Thank you for your response !