SH1122 OLED I2C display update speed #2305
-
I got a couple of 256x64 resolution 2" OLED display modules based on the SH1122 controller wired for I2C operation. These displays work fine with u8g2, except their update speed is veeeeery slooooow. I can actually see the display content updating from top to bottom, which takes about half a second. Looking into this I realized these are 4-bit (16-level) grayscale displays, and with that resolution a full screen update is 256x64x4 = 64k bits. Combined with an I2C clock speed of 400 kHz gives a maximum fps of 6. Given the overhead of the I2C bus protocol and the controller protocol I get where that 2 fps I see comes from. My question is: Is there a way to improve this? Maybe there's an easy way to mod these modules to use SPI instead of I2C? Or maybe they can be made to run at a higher I2C clock speed? Maybe there's a secret 1-bit monochrome mode? If anyone has any tips I'd love to hear them, since they are otherwise really nice displays and they fit my application perfectly, so it would be a shame to have to replace them. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
HW reconfig to SPI should be the best option. You can also try setBusClock function to increase bus clock beyond 400kHz. And finally there are some compiler options to increase speed in u8g2.h Usually I try to use monochrome modes whenever possible, but if I remember correctly, there was no such mode for this controller. |
Beta Was this translation helpful? Give feedback.
HW reconfig to SPI should be the best option. You can also try setBusClock function to increase bus clock beyond 400kHz. And finally there are some compiler options to increase speed in u8g2.h
Usually I try to use monochrome modes whenever possible, but if I remember correctly, there was no such mode for this controller.