ESP32 LOLIN Confusion

For general Flowcode discussion that does not belong in the other sections.
Post Reply
User avatar
p.erasmus
Posts: 434
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

ESP32 LOLIN Confusion

Post by p.erasmus »

Hi Team,
I am starting to work with ESP32 and I have a LED blinking on GPIO17 however I want to interface to the SPI of the device and just there my confusion started ,I try show below what my confusion is

ON the LOLIN32 board the top numbering seems to be GPIOx ( 2 ,4,17 etc) this I used Pin 17 and it works fine
P4.jpg
P4.jpg (63.88 KiB) Viewed 2524 times
P2.jpg
P2.jpg (47.48 KiB) Viewed 2524 times
However when trying to set the SPI pins we have now PORTA and PORTB numbers ,example there is PIN PORTA0 and PORTB0 but on the Board there is only 1 pin marked 0 is this now PORTA or B

:oops: again the I am is lost What am I missing ,How do I interpret the PORT pins A and B to the GPIO pin numbering
I tried the datasheet that also give no PORTA & B descriptions only GPIO naming
P3.jpeg
P3.jpeg (58.44 KiB) Viewed 2524 times
P1.jpg
P1.jpg (48.03 KiB) Viewed 2524 times
Regards Peter - QME Electronics

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: ESP32 LOLIN Confusion

Post by BenR »

Hello

Sorry for the confusion flowcode and the esp core works in ports however mainly due to arduino there has been a push to use pin numbers as references.

PortA includes pins 0 to 31. So digital pin 18 is PortA 18.

PortB includes pins 32 onwards so digital pin 34 is PortB 2.

Hope this helps.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: ESP32 LOLIN Confusion

Post by p.erasmus »

Hello Ben.

Thank you this make sense will do as such , :D

Have good time
Regards Peter - QME Electronics

Post Reply