

The TCA9535 is a 16-bit I2C I/O port expander manufactured by MEOW. It is designed to expand the number of GPIO pins available in microcontroller-based applications. The device communicates via the I2C protocol, making it easy to integrate into systems with limited GPIO resources. The TCA9535 features two 8-bit ports, interrupt capabilities, and supports multiple devices on the same I2C bus through configurable I2C addresses.








The following table outlines the key technical details of the TCA9535:
| Parameter | Value |
|---|---|
| Supply Voltage (Vcc) | 1.65V to 5.5V |
| I2C Bus Voltage | 1.65V to 5.5V |
| Maximum I2C Clock Frequency | 400 kHz (Fast Mode) |
| GPIO Voltage Levels | 0V to Vcc |
| GPIO Current Sink Capability | 25 mA per pin (max) |
| Operating Temperature Range | -40°C to +85°C |
| Interrupt Output | Open-drain, active low |
| Package Options | TSSOP, QFN |
The TCA9535 is available in a 24-pin package. Below is the pin configuration and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | A0 | I2C Address Selection Bit 0 |
| 2 | A1 | I2C Address Selection Bit 1 |
| 3 | A2 | I2C Address Selection Bit 2 |
| 4 | RESET | Active-low Reset Input |
| 5-12 | P0_0 to P0_7 | GPIO Port 0 Pins |
| 13 | GND | Ground |
| 14-21 | P1_0 to P1_7 | GPIO Port 1 Pins |
| 22 | INT | Interrupt Output (active low, open-drain) |
| 23 | SCL | I2C Clock Input |
| 24 | SDA | I2C Data Input/Output |
Below is an example of how to use the TCA9535 with an Arduino UNO to toggle GPIO pins:
#include <Wire.h> // Include the Wire library for I2C communication
#define TCA9535_ADDR 0x20 // Default I2C address (adjust based on A0, A1, A2)
// TCA9535 Register Addresses
#define INPUT_PORT_0 0x00
#define INPUT_PORT_1 0x01
#define OUTPUT_PORT_0 0x02
#define OUTPUT_PORT_1 0x03
#define CONFIG_PORT_0 0x06
#define CONFIG_PORT_1 0x07
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure all pins on Port 0 as outputs
Wire.beginTransmission(TCA9535_ADDR);
Wire.write(CONFIG_PORT_0); // Point to configuration register for Port 0
Wire.write(0x00); // Set all pins as outputs (0 = output, 1 = input)
Wire.endTransmission();
// Set all pins on Port 0 to LOW
Wire.beginTransmission(TCA9535_ADDR);
Wire.write(OUTPUT_PORT_0); // Point to output register for Port 0
Wire.write(0x00); // Set all pins to LOW
Wire.endTransmission();
}
void loop() {
// Toggle all pins on Port 0
Wire.beginTransmission(TCA9535_ADDR);
Wire.write(OUTPUT_PORT_0); // Point to output register for Port 0
Wire.write(0xFF); // Set all pins to HIGH
Wire.endTransmission();
delay(1000); // Wait for 1 second
Wire.beginTransmission(TCA9535_ADDR);
Wire.write(OUTPUT_PORT_0); // Point to output register for Port 0
Wire.write(0x00); // Set all pins to LOW
Wire.endTransmission();
delay(1000); // Wait for 1 second
}
I2C Communication Failure:
GPIO Pins Not Responding:
Interrupt Pin Not Working:
Overheating or Damage:
Q: Can the TCA9535 operate at 3.3V?
A: Yes, the TCA9535 supports a supply voltage range of 1.65V to 5.5V, making it compatible with 3.3V systems.
Q: How many TCA9535 devices can be connected to the same I2C bus?
A: Up to 8 devices can be connected by configuring the A0, A1, and A2 address pins.
Q: Is the TCA9535 compatible with 5V logic?
A: Yes, the TCA9535 can operate with 5V logic as long as the supply voltage (Vcc) is within the 1.65V to 5.5V range.
Q: What happens if the RESET pin is left floating?
A: The RESET pin should not be left floating. Tie it to Vcc if not used to prevent accidental resets.