Works Well with Gravity 320x240 LCD #96
TDStrasser
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It works beautifully on a Pico on a Gravity Pico Shield with GDI Port with a Gravity DFR0664 320x240 2 inch LCD. The config_helper is a great tool to get it set up. The trick was to unravel DFRobot's GDI port wiring configuration which they don't always publish.
The tft_config.py file content follows:
"""Gravity 320x240 IPS LCD display for Pico GDI Interface"""
from machine import Pin, SPI
import st7789
TFA = 0 # top free area when scrolling
BFA = 0 # bottom free area when scrolling
def config(rotation=0, buffer_size=0, options=0):
return st7789.ST7789(
SPI(0, baudrate=62500000, sck=Pin(6), mosi=Pin(7)),
240,
320,
reset=Pin(17, Pin.OUT),
cs=Pin(5, Pin.OUT),
dc=Pin(13, Pin.OUT),
backlight=Pin(12, Pin.OUT),
rotation=rotation,
options=options,
buffer_size=buffer_size)
Thanks for the contribution.
Beta Was this translation helpful? Give feedback.
All reactions