0

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?

asked May 11, 2017 at 6:39
2
  • Because you're using bitbanged SPI...? Commented May 11, 2017 at 8:58
  • Is copy pasting code really that hard? Commented May 11, 2017 at 13:57

1 Answer 1

1

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.

answered May 11, 2017 at 10:43
5
  • 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. Commented May 11, 2017 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. Commented May 11, 2017 at 21:28
  • I checked. There are no delays. github.com/adafruit/Adafruit-ST7735-Library/blob/master/… Commented May 11, 2017 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. Commented May 11, 2017 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 Commented May 12, 2017 at 12:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.