ST7735 LCD display instructions 1.8 inch 128x160 V1.1 By D@CC On 2021EMay22 LCD-025 pin count: 8 This contains 3 sub-articles 1) too complex 2) Simple Wiring and Software by Jake Walker uses SPI and Python-3 on a Raspberry Pi 3) SPI on the WeatherHat-Pro used with a Raspberry Pi ******************************************************************************************************************** ignore everything down to Jake walker Pins on Pins in Raspberry Photo Description ST7735 Document Pi Label ST7735 Pi LED SCK SPI clock SLCK SPI clock SDA A0 18 RESET RST GPIO24 19 CS CS CEO 23 Chip Select GND GND GND VCC Vin 3V3 1 1 ? ? D/C GPIO25 SPI Chip Select ? MOSI SPI MOSI LITE 3V3 backlight of screen Vin 3V3 Gnd SCC SO SI RST D/C CCS Lite GPIO Pi 1.8 photo ST7735 Documentation name phys pin name pin Description Gnd 6 10 Black GND 2 GND ok 3V3 1 9 Red LED 8 LITE (connected to 3v3) GPIO24 18 8 Blue RESET 4 RST ok GPIO25 22 7 Purple A0? 5 D/C SPI Chip Select ok bit A nc 6 SPI-CEO 24 5 White CS 3 CS SPI Chip Select ok bit B SPI-MOSI 19 4 Yellow SDA? 6 MOSI SPI-SCLK 23 3 Green SCK 7 SPI CLK nc 2 3V3 1 1 Red VCC 1 3V ok SPI-MISO 21 nc SPI-CEI 26 nc Source 01: https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/#displayio.FourWire ******************************************************************************************************************************* This Wiring corresponds to Source 02 below Screen Pin Raspberry Pi Pin Screen Pin (bottom his ST7735 my ST7735 to top) pin label BL Not connected 8 LED SCL GPIO 11 (pin 23) 7 SCK SDA GPIO 10 (pin 19) 6 SDA DC GPIO 24 (pin 18) 5 A0 Note: above uses GPIO25 instead RES GPIO 25 (pin 22) 4 RESET Note: above uses GPIO24 instead CS GPIO 8 (pin 24) 3 CS GND Ground (pins 6, 9, 14, 20, 25, 30, 34 or 39) 2 GND VCC 5v Power (pins 2 or 4) 1 VCC After wiring, the screen should glow white. His install and setup code: # inserted by D@CC NOTE Be sure to use Python 3 (not Python 2) >>> sudo apt update ---------------------------------------------------------------------------------------------------------------------------------------- >>> sudo raspi-config select '3- Interface Options', then 'Pr-SPI', select 'Yes" >>> sudo python3 -m pip install Rpi.GPIO spidev Pillow numpy >>> sudo python3 -m pip install st7735 ----------------------------------------------------------------------------------------------------------------------------------------- progName="st7735-pi.py" # by jakew.me on 2018/01/19 print(progName) ----------------------------------------------------------------------------------------------------------------------------------------- from PIL import Image from PIL import ImageDraw from PIL import ImageFont import ST7735 disp = ST7735.ST7735(port=0, cs=0, dc=24, backlight=None, rst=25, width=128, height=160, rotation=0, invert=False) WIDTH = disp.width HEIGHT = disp.height img = Image.new('RGB', (WIDTH, HEIGHT)) draw = ImageDraw.Draw(img) # Load default font. font = ImageFont.load_default() # Write some text draw.text((5, 5), "Hello World!", font=font, fill=(255, 255, 255)) # Write buffer to display hardware, must be called to make things visible on the # display! disp.display(img) # by jakew.me #source: https://jakew.me/2018/01/19/st7735-pi/ ----------------------------------------------------------------------------------------------- print("end of ", progName) #end program ------------------------------------------------------------------------------------------------ This appears to match the wiring shown in at the previous web site (above) but GPIO24 and GPIO25 are switched. This is supposed to show "Hello World" on the ST7735 display. Source 02 by Jake Walker ST7735 on a Raspberry Pi https://jakew.me/2018/01/19/st7735-pi/ Source 03 (not reviewed by D@CC) https://www.ebay.co.uk/usr/karens_e-shop ****************************************************************************** The SPI pins on the WeatherHat-Pro are Pi label on ST7735 GPIO WeatherHat-Pro label 3.3V 3V3 1 VCC GPIO10 MOSI 6 SDA GPIO 9 MISO nc GPIO11 SCLK 7 SCK GPIO 8 CE0? SP10 5 A0 need to discover GPIO 7 CE1? SP11 3 CS need to verify GND GND 2 GND ? nc 8 LED unused ? RESET 4 RESET need to assign /ST7735_LCD.txt