Closed buhe closed 2 years ago
Hello Buhe,
I'm the creator of the waveshare feature PR, i'm using the Waveshare ESP32 board with 4.2" screen which use the following pin :
ESP32 Waveshare driver board
BUSY = 25
CS = 15
RST = 26
DC = 27
SCK = 13
SDI/MISO = 12 // Master-In Slave-Out not used, as no data from display
SDO/DIN/MOSI = 14
On another project I also use the same screen with a LILYGO-T18 Board using the following pinout :
BUSY = 4
CS = 5
RST = 26
DC = 27
SCK = 18
SDI/MISO = 19 // Master-In Slave-Out not used, as no data from display
SDO/DIN/MOSI = 23
Did you manage to run the code with your own pin configuration ?
Simon
thanks @simon0356 reply
The code is definitely correct. I just have a question, look at that picture. The picture says gpio14 is sck and the code is mosi, so I want to ask why.
Please, what are you based on? I read the data sheet as well.
The Waveshare ESP32 board use different pinout for SPI2 as i understand. I use the hardware connection as documented here : https://www.waveshare.com/wiki/4.2inch_e-Paper_Module Tab "User Guides of ESP32" section "Hardware connection" table "Connect to ESP32 Driver Board "
thanks @simon0356 reply
The code is definitely correct. I just have a question, look at that picture. The picture says gpio14 is sck and the code is mosi, so I want to ask why.
What the picture is telling you is what e.g. gpio14 is usually used for. You can use SPI1/SPI2 with any pin configuration. It is just that some configurations are slightly more efficient as then the pin routing goes via IOMUX (Direct IO) and not via the GPIO matrix.
Consult p45 in the ESP32 Technical Reference: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
Excuse me @ivmarkov , how does this project map the GPIO matrix, thanks.
Hi, I use esp32 devkit and waveshare 1.54in e-paper, i see doc gpio14 is spi clk pin and gpio13 is mosi ,but code is sclk: gpio::Gpio13, sdo: gpio::Gpio14,. why?
thanks
buhe