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.

TLA2528: I2C Reading ADC Data

Part Number: TLA2528
Other Parts Discussed in Thread: ADS7138

I have been having issues implementing the TLA2528 and was about to post here for assistance before I solved my own issue.  I've found the datasheets for this family of chips lacking regarding reading from the ADC and so I'm posting here to help anyone else struggling the way I did and to bring it to the attention of TI.

Most of my issues came from using Figure 29 as it appeared to be what I needed when it is not.  Adding another figure similar to this and a section on how to read the ADC would be a great addition to the datasheets of this and similar ADCs (such as the ADS7138 and other ADCs with almost identical functions and datasheets).

To read an ADC value, first, write to the CHANNEL_SEL Register the channel you want to read from.  This requires 4 frames: Slave Address + Write Bit; OPCODE 00001000B WRITE; CHANNEL_SEL Register 00010001b; and the channel you want to read 00000000b-00000111b.  Afterwards a simple read with the appropriate amount of frames (2-3) is all that's left.

I've also condensed my code down to some pseudo-code if anyone prefers that.

ADDRESS = 0x10
RECIEVE_BUFFER = bytearray(3)

for CHANNEL in range(8):
  SEND_BUFFER = [0b00001000, 0b00010001, CHANNEL]
  I2C.write(ADDRESS, SEND_BUFFER)
  I2C.read(ADDRESS, REVIEVE_BUFFER)
  BUFFER[CHANNEL] = REVIEVE_BUFFER

Hope this helps anyone else that is struggling as much as I was!

Cheers,

Jan