Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

ADS1258-ep data read with AVR

$
0
0

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 !


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>