Help: U8G2 + ESP32 + SSD1327 SPI Wiring #1737
glasseffects
started this conversation in
General
Replies: 1 comment 4 replies
-
You need to use the HW SPI constructor: With the current setup, the following "may" work: U8G2_SSD1327_WS_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8, /* clock=*/ 13, /* data=*/ 11) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, first of all, thank you for taking time to read this.
I'm new to SPI interface, mostly I had been working with I2C for it's simplicity of 4 wire connection. Due to a use case scenario, I require two Waveshare 128x128 SSD1327 OLED modules to be driven. Earlier I tried with one OLED module with I2C on Arduino Uno, however the refresh rate was causing distraction. Switching on to SPI offered drastic improvements. The pin configuration was as suggested in the demo example with the following constructor:
U8G2_SSD1327_WS_128X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
The following PIN correlation was used:
CLK: 13
DIN: 11
CS: 10
DC: 9
RST: 8
Then I tried to port the same setup to ESP32. Following is the image of the version I'm working with:
The image suggests I have two SPI peripherals. I decided to go with HSPI. However I can only recognize the following pins
HSPI CLK: D14
HSPI CS: D15
To which pins do I connect the DIN, DC and RST lines?
At present I'm running the code demo code with:
DIN: 13
CLK: 14
CS: 15
DC: 26
RST: 27
With the above configuration, the refresh rate is much slower than running with default demo code on Uno. It appears I'm not using hardware SPI interface.
Request you to guide me.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions