Page 1 of 1

ESP32 interface with I/O Expander

Posted: Fri Dec 13, 2019 10:56 am
by john_peter
I tried to interface TCA6424ARGJR I/O Expander with ESP32 via, I2C protocol

I am setting the Configuration Registers first as output for port pin P00 in I/O expander and then writing
into output port register as value 0(set to low level) that have connected LED to the P00 pin.
I am facing an issue with during power on the ESP32 module led was On for less than 1 sec and turned
off which resultant is as flickering if LED for short moment.
But this flicker of Led does not occur when the ESP32 module is reset using reset button.
Please provide any solution for the flickering during power on.

My logic is as below:-

#define TCA6424A_P00 0

setPinDirection(TCA6424A_P00, false); //set the direction as output for TCA6424A_P00 port
writePin(TCA6424A_P00, false); //set the level as low

Re: ESP32 interface with I/O Expander

Posted: Fri Dec 13, 2019 3:02 pm
by martinayotte
Do you placed a PullUp on RES pin of the TCA6424 ?

Re: ESP32 interface with I/O Expander

Posted: Fri Dec 13, 2019 3:46 pm
by john_peter
Hi,
Thanks for your response.
For TCA6424 I had already added pull up resistor to the RESET pin. I can control the LED normally as code flows on, but the main concern with unit time flicker on LED unit at the time when the board is powered ON.

Footnote:
The direction of port PA00 configured as output [setPinDirection(TCA6424A_P00, false); ] and then set to low voltage level [writePin(TCA6424A_P00, false);], even though it resultant the LED to turn ON for small friction of time <1sec and return to low condition as per firmware instruction.

Re: ESP32 interface with I/O Expander

Posted: Fri Dec 13, 2019 4:02 pm
by boarchuz
john_peter wrote:
Fri Dec 13, 2019 3:46 pm
The direction of port PA00 configured as output and then set to low voltage level
Other way around. Prepare the level, then enable output.

Re: ESP32 interface with I/O Expander

Posted: Sat Dec 14, 2019 6:36 am
by john_peter
Thanks for your valuable response.