IO Expander I2C Address Problem

jmadsenee
Posts: 30
Joined: Tue Apr 19, 2022 1:16 am

IO Expander I2C Address Problem

Postby jmadsenee » Mon Jun 27, 2022 3:02 pm

I am working with and ESP32-S3-Korvo-2. It has an IO expander on it that is shown to be a TCA9554 on the schematic. According to the schematic and the data sheet for the TCA9554, The I2C address is 0x20 (- 0x27, depending on A[0..2] inputs). That address would not work. I confirmed with my scope that the clock and data were present and the correct speed (100kHz). A[0..2] = 0. The chip was powered. The chip would not ACK the address byte. I finally incremented the address from 0 to 127 in a loop and got ACKs at 5 addresses. Eliminating the 4 other things on the I2C bus left me with 0x38 as the only possible address for the expander. And that, it turns out, is the address of the expander. Using it everything works fine.

Looking at the chip, it has a TI logo on it, and looks like it might have a 9554 stamped on it, but the center of the number is rubbed off. Looking at the right angle, it looks like some other number might be stamped under it... It can't really be a TCA9554 if the address is wrong, can it?? There went a couple of wasted hours that should not have been wasted... :evil:

Anyone have any thoughts?

paulfjoju
Posts: 5
Joined: Thu May 05, 2022 9:03 am

Re: IO Expander I2C Address Problem

Postby paulfjoju » Mon Jun 27, 2022 3:19 pm

hello,

regarding the data sheet
if you considere device adress on 7 bits
adresse from 0100 000 => 0x20 to 0x27
but global adress on 8 bits (with the bit R/W)
gives 0x40 to 0x4E

you can't get 0x38

paulfjoju
Posts: 5
Joined: Thu May 05, 2022 9:03 am

Re: IO Expander I2C Address Problem

Postby paulfjoju » Mon Jun 27, 2022 3:24 pm

...oops


but you can get 38 decimal value .. = 0x26

jmadsenee
Posts: 30
Joined: Tue Apr 19, 2022 1:16 am

Re: IO Expander I2C Address Problem

Postby jmadsenee » Mon Jun 27, 2022 9:00 pm

As a 7 bit address, the address of my IO expander is 0x38. (That would be a 0x70 as an 8 bit address with the R/W bit clear.) As I explained in my original post, all address setting inputs are set to 0. The address should be 0x20. Writing to 0x20 does not get a ACK. I wrote a loop to access all addresses from 0 to 0x7f. Nothing in the range 0x20 - 0x27 existed. The address is 0x38. That is a hex value not decimal.

jmadsenee
Posts: 30
Joined: Tue Apr 19, 2022 1:16 am

Re: IO Expander I2C Address Problem

Postby jmadsenee » Tue Jun 28, 2022 3:16 am

Below is a scope trace when trying to address 0x20:
Image
Notice the NAK and that the communication ends. Below is an image when trying to address 0x38:
Image
Notice the ACK and that the communication continues. Using address = 0x38, I can control the outputs of the IO expander.

Turns out that NXP makes an IO expander with the same exact pin out, but with and I2C address of 0x38, the PCF8574A.

Who is online

Users browsing this forum: No registered users and 51 guests