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: Problem with reading data prom analog inputs

Part Number: TLA2528


Tool/software:

Hi, 

I am using TLA2528 in my design. I configured AIN0-AIN6 as analog inputs. Unfortunately based on datasheet of this IC it is not working. I always get 0x0000 data value from data register where data is stored.

I am using logic analyzer to verify if data frames send via I2C are properly. 

Diagram of connection is below:

After power up the device I am reading status register:


I send address, opcode, reg address, then to read I send address and read 0x81, but I dont get ACK inlast read byte.

Then I clear bor bit:

Then I repeat read status register, where I read 0x80 so BOR bit is cleared properly:



Next, I calibrate the converter:



Next, I set all GPIO's as analog inputs:


Next, I set oversampling as 0:


Next, I set manual mode:

Next, I set channel AIN1(GPIO1):

Next, I set append ID to result

Next, I start conversion:

And try to read data:

I always get 0x00 and 0x00 in last two bytes that should contain results from 0 to 4095. 

Can someone look into the problem and say what I am doing wrong?

Maybe order of sending frames? 

  • Hi Daniel, 

    It looks like you're trying to read from the GPI_VALUE frame. This register doesn't hold ADC conversion data, it holds the status of the inputs when they are configured as inputs. 

    To read conversion data, you will have to set up an I2C read as shown in figure 27 of the datasheet. On the last conversion frame that the device provides, the controller should provide a NACK instead of an ACK (not shown in the datasheet).

    All your other configuration looks to be okay.

    Regards,
    Joel

  • Hi Joel, 

    Your advice has solved my problem. I was reading data in wrong way. It was my misunderstanding of datasheet indeed. 
    Thank you so much. 

    Best regards