Dear all,
I am stuck and cry for help.
I am using the ESP-IDF master version. I use it for programming a Heltec LoRa32 board with a 0.96" 128 x 64 OLED driven by a SSD1306 using I2C.
The display shows nothing. I have tested a couple of initialization sequences, I have tried 100kHz and 400 kHz clock, I have included the i2c_master_probe() successfully, the call to i2c_master_bus_add_device returns OK and so does all calls to i2c_master_transmit(). I have inserted 100ms delay between commands.
Heltec offers a test of the OLED, but it is in binary and ready to install. I have done it, and it works. Hence the hardware is OK.
Please, if anyone has code developed on ESP-IDF and proven to work on a SSD1306, please leave me a copy. Code limited to demonstrating the OLED SSD1306 is most welcome.
I attach the code I use.
Regards,
Jorgen
Heltec LoRa OLED SSD1306 code
Heltec LoRa OLED SSD1306 code
- Attachments
-
- CMakeLists.txt
- (144 Bytes) Downloaded 31 times
-
- main.c
- (7.23 KiB) Downloaded 48 times
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Heltec LoRa OLED SSD1306 code
Dear Microcontroller,
Thank you for replying.
I have tried a few of the possibilities you list, but they do not work. I get more and more the impression that there is a deviation of the I2C timing of the Heltec LoRa32 controller of the 0.96" 128x64 OLED.
If you know of source code that works with the Heltec LoRa32, please point me to it.
Regards,
Jorgen
Thank you for replying.
I have tried a few of the possibilities you list, but they do not work. I get more and more the impression that there is a deviation of the I2C timing of the Heltec LoRa32 controller of the 0.96" 128x64 OLED.
If you know of source code that works with the Heltec LoRa32, please point me to it.
Regards,
Jorgen
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Heltec LoRa OLED SSD1306 code
From the schematics it seems that the OLED is powered via "Vext", which in turn can be switched on and off by "Vext Ctrl", i.e. GPIO36 (active low, on-board pull-up). Try and drive GPIO36 low before attempting to communicate with the OLED and see if that gets you any further.
Re: Heltec LoRa OLED SSD1306 code
Dear Microcontroller,
Thank you a thousand times.
Well, my problem has then been that the OLED was not powered. What a pity Heltec does not provide a few pages on how to use the OLED. It is strange that i2c_master_probe() return successfully, when the OLED is not powered. I have discovered, that the RST line shall be high for i2c_master_probe to return success.
Your help is highly appreciated.
Regards,
Jorgen
Thank you a thousand times.
Well, my problem has then been that the OLED was not powered. What a pity Heltec does not provide a few pages on how to use the OLED. It is strange that i2c_master_probe() return successfully, when the OLED is not powered. I have discovered, that the RST line shall be high for i2c_master_probe to return success.
Your help is highly appreciated.
Regards,
Jorgen
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Heltec LoRa OLED SSD1306 code
Note that it's probably not a good idea to drive RST (or any other of the OLED pins) high while the OLED/Vext is off.
Who is online
Users browsing this forum: No registered users and 3 guests