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.

Compiler/ADS1292R: Data output code and SPI

Part Number: ADS1292R
Other Parts Discussed in Thread: ADS1292

Tool/software: TI C/C++ Compiler

Hi, 

I've have question about data output. In datasheet section "RREG: Read From Register" on page 38 suggest that 2 op codes must be issued and then on 17'th SCLK reg data are shifted out. If I got it right, first 8 SCLK's are for RREG command, second 8 SCLK's are for number of register's i want to read - 1. Meaning, I want to read ID register on addres 0x00 -->

Write_SPI(0x20);//first 8 SCLK's
Write_SPI(0x00);//I want to read 1 register (second 8 SCLK's)
Write_SPI(0x00);//another 8 SCLK's for reg data

Thing I don't really understand is when I want to read multiple registers. If second opcode is Write_SPI(0x06) does that mean i want to read 5 registers? For propper read I should send another 40 SCLK's?

My read_byte function is in while loop so I'm reading constantly shown in below example pictures.

This is picture from oscilloscope when i send 48 SCLK's (8 clocks more than I actually shoud've sent)

And this one is when I send 7 SCLK's 

Why I have to send 7 byte clocks (after 2 byte opcode clocks) to get propper read?

And why on 6 byte clocks (after 2 byte opcode clocks) the last reg data is being read at first opcode from another read_byte function?

During RREG command no data should be sent via DIN but according to last picture it looks like ADS is acting like SPI full duplex protocol but it shouldn't, or?

  • Hi Mate,

    For the ADS1292 - when using the RREG command, the second OpCode is the number of registers to read minus one, so your Write_SPI(0x06) would be asking the device to send back the content of the first seven registers.  You would need to issue 9 'bytes' worth of SCLK, one for the command, one for the # of registers to read and then seven more to retrieve the register detail.

    If you do not read through all the registers you asked for (i.e. - send only 8 bytes of clock), the last register you asked to 'read' in the first command will be present on SDO.  If you check carefully, on the first iteration of that loop, you would not see any data on SDO - you'll only see it on loops 2 through X.