Skip to content

Instantly share code, notes, and snippets.

@sjfricke
Last active February 25, 2022 18:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjfricke/74ac20e8f9195aaee74afb12ea94caed to your computer and use it in GitHub Desktop.
Save sjfricke/74ac20e8f9195aaee74afb12ea94caed to your computer and use it in GitHub Desktop.
Waveshare 4 inch HDMI LCD display for Raspberry Pi Quick Start - Append to /boot/config.txt
# Display Monitor Timings - DMT
hdmi_group=2
# CVT (coordinated video timings)
hdmi_mode=87
# hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb>
## width (required) width in pixels
## height (required) height in pixels
## framerate (required) framerate in Hz
## aspect 1=4:3, 2=14:9, 3=16:9 (default), 4=5:4, 5=16:10, 6=15:9
## margins 0=margins disabled (default), 1=margins enabled
## interlace 0=progressive (default), 1=interlaced
## rb 0=normal (default), 1=reduced blanking
hdmi_cvt 480 800 60 6 0 0 0
# For Touch screen
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
# Rotates 90 degrees
# Use 2 or 0 for vertical, but rest will be need to be changedas 800x480
display_rotate=3
@sjfricke
Copy link
Author

BIG NOTE the dtoverlay will make it so you cannot use your spidev or any use of the SPI ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment