I have edited the adafruit ST7735 library so that it supports esp-32.I made some edits in Adafruit_ST7735.h file. which are as follows.

the definitions for esp32 should be added as in the picture bellow

The code works fine but I had expected the screen to work faster with esp-32(due to higher processing power) but it does not do that.

I checked the time for fill screen operation for esp-32 and arduin mega. They come out to be almost the same. (around 0.12 seconds). Can anyone explain why this is happening and can I increase the speed?

  • Because you're using bitbanged SPI...?
    – Majenko
    May 11 '17 at 8:58
  • Is copy pasting code really that hard?
    – gre_gor
    May 11 '17 at 13:57

The ST7735 uses SPI to communicate. It will always be slow compared to parallel connected screens.

The fact that you appear to be using bitbanged SPI (manually toggling IO pins) makes it even slower.

The fastest you will be able to get with that screen will be to use hardware SPI instead (which most likely limits which pins you can use - I am not familiar with the ESP32 though) but that will still be somewhat slow.

If you want really high speed screen updates then you will need a parallel interface screen, ideally a 16-bit parallel interface screen. However, for that you need around 20 IO pins to drive it.

  • Even with bitbanged SPI, the ESP32 should be do better than the Mega regarding screen refresh rates, that is assuming OP's ESP32 has a much higher clock frequency than 16 MHz, as befits it. May 11 '17 at 21:16
  • @TisteAndii And assuming there aren't specific length delays used in the bit banging, which would remain the same regardless of clock speed.
    – Majenko
    May 11 '17 at 21:28
  • I checked. There are no delays. github.com/adafruit/Adafruit-ST7735-Library/blob/master/… May 11 '17 at 21:48
  • The mega uses hardware SPI which will be faster than bit banging. Bit bang on a fast CPU and you get similar speed to hardware SPI on a mega.
    – Majenko
    May 11 '17 at 21:56
  • If the OP is in fact comparing ESP32 bit-banging with Mega hardware SPI (default speed DIV4 = 4 MHz), then you'd be right. It seems the fastest toggle speed possible on the ESP32 is 10 MHz, and that's when writing to the CPU registers directly to get fairly optimized assembly. esp32.com/viewtopic.php?t=1595 May 12 '17 at 12:17

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.