skpang
Well-known member
I'm trying to use Adafruit 240x240 TFT LCD https://www.adafruit.com/product/3787
With their library
https://github.com/adafruit/Adafruit-ST7735-Library
https://github.com/adafruit/Adafruit-GFX-Library
On a Teensy 4.0
The demo software works on their pre July 24, 2019 unit but not on the new unit. The new board has an extra TE pin. That is just an output pin.
The default SPI clock speed is 12MHz as measured on a scope. I want to slow this down a bit to see if the new units works but can't find the place where the SPI clock speed is set.
I've tried to change value in:
Adafruit-ST7735 library
Adafruit_ST77xx.cpp
#define SPI_DEFAULT_FREQ 32000000 ///< Default SPI data clock frequency
but that didn't change the SPI clock speed.
Then I tried to change the value in:
Adafruit_GFX library
Adafruit_SPITFT.h
#define DEFAULT_SPI_FREQ 1000000L ///< Hardware SPI default speed
That didn't change the SPI clock either.
So the question is where can I change the SPI clock speed ?
With their library
https://github.com/adafruit/Adafruit-ST7735-Library
https://github.com/adafruit/Adafruit-GFX-Library
On a Teensy 4.0
The demo software works on their pre July 24, 2019 unit but not on the new unit. The new board has an extra TE pin. That is just an output pin.
The default SPI clock speed is 12MHz as measured on a scope. I want to slow this down a bit to see if the new units works but can't find the place where the SPI clock speed is set.
I've tried to change value in:
Adafruit-ST7735 library
Adafruit_ST77xx.cpp
#define SPI_DEFAULT_FREQ 32000000 ///< Default SPI data clock frequency
but that didn't change the SPI clock speed.
Then I tried to change the value in:
Adafruit_GFX library
Adafruit_SPITFT.h
#define DEFAULT_SPI_FREQ 1000000L ///< Hardware SPI default speed
That didn't change the SPI clock either.
So the question is where can I change the SPI clock speed ?