Sharing input/output GPIO without frying anything
Posted: Fri Jun 16, 2023 6:47 am
Hello experts.
Newbie here. I have this little project, which I'm working on - it features an ESP32-WROVER, as well as a e-ink display.
It wakes up, updates the screen every hour, then goes back to sleep.
My problem is that I would like to add an interrupt-based, freely programmable button or maybe even a 5-point joystick, which should "do something", like show the next/previous page, but all usable pins seems to have been taken and since the chip contains FSRAM, fewer are available than usual. Datasheet can be found here: https://www.espressif.com/sites/default ... eet_en.pdf
Is it possible to hijack pins, used for the screen? Since the software controls, when a screen is drawn, I thought about configuring pins as inputs per default and change to output when the screen updates. Is this the "usual way"? I mean, it won't potentially cause short circuits or anything, if the screen updates and the button is pressed at the same time? If so, which pin would you use? Can I just use TDX0/RXD0 freely, as long as the chip isn't flashed?
If I go for a 5-way joystick, what would you recommend? Some kind of multiplexer, so that I only need one GPIO?
General recommendations, hints and do's and don'ts would be really appreciated.
Newbie here. I have this little project, which I'm working on - it features an ESP32-WROVER, as well as a e-ink display.
It wakes up, updates the screen every hour, then goes back to sleep.
My problem is that I would like to add an interrupt-based, freely programmable button or maybe even a 5-point joystick, which should "do something", like show the next/previous page, but all usable pins seems to have been taken and since the chip contains FSRAM, fewer are available than usual. Datasheet can be found here: https://www.espressif.com/sites/default ... eet_en.pdf
Is it possible to hijack pins, used for the screen? Since the software controls, when a screen is drawn, I thought about configuring pins as inputs per default and change to output when the screen updates. Is this the "usual way"? I mean, it won't potentially cause short circuits or anything, if the screen updates and the button is pressed at the same time? If so, which pin would you use? Can I just use TDX0/RXD0 freely, as long as the chip isn't flashed?
If I go for a 5-way joystick, what would you recommend? Some kind of multiplexer, so that I only need one GPIO?
General recommendations, hints and do's and don'ts would be really appreciated.