1
\$\begingroup\$

I'm porting U8G2 display library to ESP32 microcontroller (no suitable tag) with ESP-IDF (its official platform) as the platform, I2C protocol for now, using SSD1306 display for testing. After all improvements and optimisations FPS got stuck at 45. I tried:

  • Changing bus clock (no difference on 800KHz and 1MHz)
  • Disabling waiting for ACK (150+ FPS test do so, but no difference for me)
  • Changing ESP32 processor frequency (160MHz and 240MHz give the same result)
  • Commenting out all delay functions (they probably aren't called at all)

What is likely a critical link in chain here?

\$\endgroup\$
0
1
\$\begingroup\$

The SSD1306 display driver does not have a direct connection to every pixel on the screen. Instead it connects to each row and column of the display matrix and scans across each column sequentially to generate the displayed image. Persistence effects allow your eye to perceive this as a static image.

You can update the graphics ram at any rate you want, but data will only be sent to the pixels on the display when the scan line reaches the ram location. The data used will be whatever is in the memory at that exact point in time.

On your screen it sounds like the SSD1306 is scanning at 45Hz. There are a set of registers you can program to change the display clock (and hence overall refresh rate) but be aware that increasing this will increase power consumption and the panel itself may malfunction if the rate is set too high. The relevant information is on page 22 of the datasheet.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you. Thing is that I measure FPS on controller side and U8G2 library don't get any feedback from display. So, as I get it, this is a speed at which controller write data and not actual refresh rate. \$\endgroup\$ Jan 25 '19 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.