Other Parts Discussed in Thread: TCA9544A
Hello Everyone,
We are using TCA9554A in a design and need to configure P0 as an input so that when it is pulled low INT changes. I have already been successful in programming TCA9554APWR using the I2C interface and a Raspberry PI Pico W to turn P0-P7 on and off repeatedly as output, so it was a real suprise when I configured the same pins as inputs and pulled them down that no change is registered on the pins.
To make conversation and debugging on this topic I tried to make my program simple it looks like this:
#include <Wire.h>
int i2cDeviceAddress = 0x3F; // TCA9554A I2C device address
void setup() {
Wire.begin();
// Configure pin 5 (P1) as an output
Wire.beginTransmission(i2cDeviceAddress);
Wire.write(0x03); // Configuration register
Wire.write(0b11111111);
Wire.endTransmission();
}
void loop() {
delay(500);
// Read input states
//Wire.beginTransmission(i2cDeviceAddress);
Wire.requestFrom(i2cDeviceAddress, 1); // Request input port state
if (Wire.available()) {
byte inputState = Wire.read(); // Read input port state
Serial.print("Input states: ");
for (int i = 0; i < 8; i++) {
Serial.print((inputState >> i) & 0x01); // Print each input state
}
Serial.println("L");
}
//Wire.endTransmission();
}
No matter what I do my output in the serial console reports high for all pin positions. Because it is the most accessible on my PCA my primary test is to pull the pin connected to P1 to COM at which point I would expect a zero in the second position from the left.
What is even more strange about all of this is that the TCA9554APWR thinks its pins are all high which I have confirmed by looking at the scope output of the I2C. Channel 1 (Yellow) is the clock and Channel 3 (Blue) is the data.
The schematic for traces in question are attached in the subsequent images.
It would be great to get some assistance that would allow this chip to read input and would transform the capability and versatility of this product. By reading when P0(EX0) goes low I can tell our microcontroller when to perform and action by detecting a groundfault. This is something that is important for our project.
Thank You and I look forward speaking with you.
Kindly
Daniel Corda
Hardware Engineer
Megger
4545 West Davis Street Dallas Texas 75211
5163121767