Hi,
I have very recently purchased Esp32 Devkit V1 (Esp-wroom-32) and I want to connect it to an OLED which is driven by an 1106 driver as noted on the vendor web page. The pinout of the OLED is quite different from the examples I found online and I tried many of them but none of them seem to be working.
On the OLED package, I can the following information:
1.3' OLED 4-SPI
and it has a pinout like:
GND, VDD, SCK, SDA, RES, DC, CS
On the vendor page, there is a code example but the wiring concerns ESP8266 (the wbepage is in Danish).
https://jentronic.dk/content/12-oled-di ... e-eksempel
Apparently the OLED must be connected to a 5v supply but I can see on many video tutorials that similar OLED packages can be supplied by 3.3v.
Does anybody have a hint?
Best,
Aff
How does ESP32 drives OLED 1106
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: How does ESP32 drives OLED 1106
Seems the OLED itself is a 3.3V part, but the board has a small LDO on it that converts an external 5V power supply to 3.3V. You could likely convert the OLED module back to 3.3V by soldering a bridge over the correct pins of the LDO (U2), or you could just feed it 5V.
Re: How does ESP32 drives OLED 1106
Thanks for your reply.ESP_Sprite wrote: ↑Tue Jul 07, 2020 8:13 amSeems the OLED itself is a 3.3V part, but the board has a small LDO on it that converts an external 5V power supply to 3.3V. You could likely convert the OLED module back to 3.3V by soldering a bridge over the correct pins of the LDO (U2), or you could just feed it 5V.
this is a good point. There is a voltage regulator 662K on the board which could potentially be bypassed but my main issue is the correct wiring and the corresponding code for it. Even the vendor's example concerns ESP8266 and the shown pinout does not completely match with ESP32. I could not find any example which coould perfectly match with my setup.
Do you have one example of wiring and the corresponding code?
Bes,
Aff
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: How does ESP32 drives OLED 1106
I do not, but I can imagine whatever code you end up using will tell you explicitly what GPIOs it expects the signals to be on. The ESP32 hardware doesn't quite care; it's mostly the software that needs to match up with your wiring.
-
- Posts: 166
- Joined: Wed Aug 01, 2018 12:06 pm
Re: How does ESP32 drives OLED 1106
The u8g2 library works on the SH1106 OLED, https://github.com/olikraus/u8g2/wiki
Example of a sh1106 instantiation,
You can see the default pin numbers/connections and you can change them to suit your thingies.
Example of a sh1106 instantiation,
Select an instantiation that matches your OLED.U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
You can see the default pin numbers/connections and you can change them to suit your thingies.
Re: How does ESP32 drives OLED 1106
These display modules can either be SPI or I2C. It sounds like yours defaults to I2C.
I2C connects to the SCK & SDA pins. They should normally have the required I@C pull ups on the display board.
DC in I2C is used as an I2C address selector. If it is pulled low then the address should normally be 0x3C. If it is high the address is 0x3D.
CS should be pulled low or connected to 0V to enable it.
RES resets the internal controller. Some displays power up OK but in my experience when there is a RES pin then you should pulse it low / high during initialisation code. Not all libraries allow for this so you may need to do it in the application code.
Although the onboard LDO regulator allows for supplying from 5V, it has a low drop out so the display will work fine when supplied with 3.3V without having to bypass it.
I2C connects to the SCK & SDA pins. They should normally have the required I@C pull ups on the display board.
DC in I2C is used as an I2C address selector. If it is pulled low then the address should normally be 0x3C. If it is high the address is 0x3D.
CS should be pulled low or connected to 0V to enable it.
RES resets the internal controller. Some displays power up OK but in my experience when there is a RES pin then you should pulse it low / high during initialisation code. Not all libraries allow for this so you may need to do it in the application code.
Although the onboard LDO regulator allows for supplying from 5V, it has a low drop out so the display will work fine when supplied with 3.3V without having to bypass it.
Who is online
Users browsing this forum: No registered users and 46 guests