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.

ADS1220: How to read temperature as I always seem to read the AIN0 value?

Part Number: ADS1220


When I enable the register for the temperature sensor and then send a start cmd, wait for DRDY, the data I read is the same data as I read for AIN0-VSS (0x08 setting in the mux)

It doesn't seem to set the TS mode. I know I am reading the AIN0 input as when I increase its voltage, the temp reading rises with it.

What is the sequence required to read the temperature sensor? Just now I do the following sequence in pseudo commands.

set_TS(1)

SendStartCMD()

WaitForDRDY()

ReadADCBytes()

set_TS(0)

The ADC reading of 3 bytes is the AIN0 value. 

  • Hi Dave,

    That would be the correct procedure.  One common mistake with writing/reading the ADS1220 registers is in using the correct command.  What is often confused is the 'rrnn' bit settings in the WREG and RREG commands.

    Bits 3 and 4 of the commands determine which register is to be written:

    • '00' register 0
    • '01' register 1
    • '10' register 2
    • '11' register 3

    So to correctly write to register 1 the command should be 0x44 (0100 0100b) and the data byte following is 0x02 (0000 0010b).  If you think you are giving the correct commands, then please provide oscilloscope or logic analyzer shots of your communication for verification.

    Best regards,

    Bob B

  • Hi Bob, thanks for the reply.

    I am using the TI code sbac227 (https://www.ti.com/lit/zip/sbac227) ported to run on an ATTiny1614 with SPI.

    The registers write and read back so I know that it is being written to correctly. I'll setup a scope and capture the SPI.