I have a board with a 128x64 OLED display with SPI interface and it works correctly. The SPI connection is correct.
When I replace that display with another TFT IPS 240x240 (using the st7789 libraries) it doesn't work at all.
I also observe that between the pins of the new TFT, the one of CS is missing and in its place a BLK pin appears (backlight?)
How must it be connected for it to work?
Test code is
Code: Select all
from machine import Pin, SoftSPI
from time import sleep
import st7789
tft = st7789.ST7789(
SoftSPI( baudrate=300000, polarity=1, phase=1, sck=Pin(19), mosi=Pin(21), miso=Pin(0)),
240,
240,
reset=Pin(5, Pin.OUT),
dc=Pin(17, Pin.OUT),
cs=Pin(15, Pin.OUT),
backlight=Pin(4, Pin.OUT))
tft.init()
tft.fill(st7789.WHITE)
sleep(1)
tft.fill(st7789.color565(255,0,0))