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...
Anyone have any thoughts?
IO Expander I2C Address Problem
Re: IO Expander I2C Address Problem
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
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
Re: IO Expander I2C Address Problem
...oops
but you can get 38 decimal value .. = 0x26
but you can get 38 decimal value .. = 0x26
Re: IO Expander I2C Address Problem
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.
Re: IO Expander I2C Address Problem
Below is a scope trace when trying to address 0x20:
Notice the NAK and that the communication ends. Below is an image when trying to address 0x38:
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.
Notice the NAK and that the communication ends. Below is an image when trying to address 0x38:
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 65 guests