Page 1 of 1

is it possible to configure an input port? A parallel input on 8 pins that loads a register?

Posted: Tue Sep 10, 2024 11:25 am
by LazyElectron
I'm thinking to do a mini-revolution on my plans and to use the ESP as a main uC, instead to demand just some ops to it, governed by a main faster microcontroller (650mhz).
Its main limitation seems to be the lack of not dedicated GPIO pins, IMHO.
I could think about the usage of an external I2C GPIO extender, such a PCA9539 that extends the GPIO pins number of 16 units (in my case, more units can be commanded by the same I2C port), completely and individually configurable, but they are serially managed, and the input strategy in this case is too slow for me.
It's not the first time that I use such IC family, and they work flawlessly, but in this case I need to load the content of a whole byte to be written in a uC byte register in a single uC cycle, using what is normally called a "port" in many uC's, cause I need to interface a 8bit 80SMPS ADC.
Is it possible to configure 8 pins as a "port" and store their content in a register of one byte, in just one uC cycle? In that case I could just test the content with a simple if.

thank you

Re: is it possible to configure an input port? A parallel input on 8 pins that loads a register?

Posted: Wed Sep 11, 2024 11:21 pm
by chegewara
If i understand correctly you may make us of parallel IO on H2, C5, C6 or P4
https://docs.espressif.com/projects/esp ... arlio.html

P4 is most powerful and can handle up to 16+2 lines.

Re: is it possible to configure an input port? A parallel input on 8 pins that loads a register?

Posted: Thu Sep 12, 2024 6:59 am
by LazyElectron
Thank you.
I've seen the P4 version but there is no documentation available on the Espressif site AFAIK, and I don't even know if it is produced at the moment.
With 55 GPIO it could be a real monster but I've to develop my project in months, not years, in order to show a prototype ASAP to the public.

Anyway, thank you very much for the moment.

Re: is it possible to configure an input port? A parallel input on 8 pins that loads a register?

Posted: Thu Sep 12, 2024 7:39 am
by ok-home
if using esp32s3 there are several options
- dedicated GPIO - cpu controlled transfer
- cam module - dma controlled transfer
- spi octal mode - cpu/dma controlled transfer

Re: is it possible to configure an input port? A parallel input on 8 pins that loads a register?

Posted: Thu Sep 12, 2024 10:44 am
by chegewara
LazyElectron wrote:
Thu Sep 12, 2024 6:59 am
Thank you.
I've seen the P4 version but there is no documentation available on the Espressif site AFAIK, and I don't even know if it is produced at the moment.
With 55 GPIO it could be a real monster but I've to develop my project in months, not years, in order to show a prototype ASAP to the public.

Anyway, thank you very much for the moment.
Last time i checked you could buy P4 dev kit, with 7" LCD, cam etc from espressif shop on alliexpres for circa $60.

dedicated GPIO
https://docs.espressif.com/projects/esp ... _gpio.html
https://github.com/espressif/esp-idf/tr ... cated_gpio
1.5.2 Fast GPIO Interface
ESP32-S3’s Xtensa processor adds two signal ports, i.e., GPIO_OUT and GPIO_IN. You can route signals from
the two ports to specified GPIO pins via the GPIO Matrix
https://www.espressif.com/sites/default ... ual_en.pdf