ESP32 interface with I/O Expander

john_peter
Posts: 7
Joined: Wed May 15, 2019 7:36 am

ESP32 interface with I/O Expander

Postby john_peter » Fri Dec 13, 2019 10:56 am

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

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: ESP32 interface with I/O Expander

Postby martinayotte » Fri Dec 13, 2019 3:02 pm

Do you placed a PullUp on RES pin of the TCA6424 ?

john_peter
Posts: 7
Joined: Wed May 15, 2019 7:36 am

Re: ESP32 interface with I/O Expander

Postby john_peter » Fri Dec 13, 2019 3:46 pm

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.

boarchuz
Posts: 604
Joined: Tue Aug 21, 2018 5:28 am

Re: ESP32 interface with I/O Expander

Postby boarchuz » Fri Dec 13, 2019 4:02 pm

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.

john_peter
Posts: 7
Joined: Wed May 15, 2019 7:36 am

Re: ESP32 interface with I/O Expander

Postby john_peter » Sat Dec 14, 2019 6:36 am

Thanks for your valuable response.

Who is online

Users browsing this forum: No registered users and 181 guests