MCP23S17 Some time can use some time cannot

I am using an ESP32 with the MCP23S17. However, sometimes the MCP23S17 is able to work, while other times it is not. When it is working, it may power off by itself after a few minutes. Sometimes, I need to unplug and plug back in the USB to make it work.

How do you power the MCP?
What load connected to the MCP?

Since unplug/plug power cycles the Arduino, there's also a possibility it's your code. Please, show it.
In fact, please review this, as you've given us very little to work on:

Oh, and by the way. Welcome! This is a great forum for getting help with your software and hardware problems, but you'll find we're obsessed with getting details about your project. That's because, in the end, we very often find that some detail the OP(original Poster) didn't mention, because "it wasn't relevant", turns out to be the heart of the problem. So be patient, answer our queries and provide the information requested per the "How to...", and we'll move forward.

1 Like

I power the MCP by using the 5V from the ESP32.

I follow the code of this sample code.

It works well but in the end it stop working.
From what I found by using the multi meter is look like it is because reset pin accident trigger. So, any solution to prevent it?

You know that the ESP32 uses 3.3V logic signals?

Unmodified? Or with changes? Please, just post the code here, in code tags. In the IDE, press ctrl-T, then ctrl-shift-C; in a new message in this thread, press ctrl-V. That should insert your code, properly formatted. Don't make helpers here go digging anywhere to see your code.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.