Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
The 1.9inch Touch LCD features a 170 × 320 resolution capacitive touchscreen, supporting either a 12PIN terminal interface or an 18PIN FPC slot for connection. It also provides example documentation for Raspberry Pi, ESP32, Pico, Arduino, etc.
| LCD Pin | Pin description | 
| VCC | Power positive (3.3V / 5V power input) | 
| GND | Ground | 
| LCD_DIN | SPI communication MOSI pin | 
| LCD_LCK | SPI communication SCLK pin | 
| LCD_CS | LCD chip select pin, active low | 
| LCD_DC | LCD data/command pin, low level indicates command, high level indicates data | 
| LCD_RST | LCD reset pin, active low | 
| LCD_BL | LCD backlight pin | 
| TP_SDA | TP data pin | 
| TP_SCL | TP clock pin | 
| TP_RST | TP reset pin, active low | 
| TP_IRQ | TP interrupt pin | 

(Please ensure that the supply voltage and logic voltage are consistent, otherwise, it may fail to function properly)
| Parameter Name | Parameter | 
| Supply voltage | 3.3V/5V | 
| LCD type | IPS | 
| Communication interface | Display: SPI | 
| Touch: I2C | |
| Controller Chip | Display: ST7789V2 | 
| Touch: CST816 | |
| Resolution | 170 (H) x 320 (V) | 
| LCD Pin | Raspberry Pi (BCM) | 
| VCC | 3.3V | 
| GND | GND | 
| LCD_DIN | 10 | 
| LCD_CLK | 11 | 
| LCD_CS | 8 | 
| LCD_DC | 25 | 
| LCD_RST | 27 | 
| LCD_BL | 18 | 
| TP_SDA | 2 | 
| TP_SCL | 3 | 
| TP_IRQ | 4 | 
| TP_RST | 17 | 
sudo raspi-config



sudo raspi-config



sudo reboot
more /boot/config.txt

ls /dev/spi*

sudo apt-get update sudo apt-get install python3-pip sudo apt-get install python3-pil sudo apt-get install python3-numpy sudo apt-get install python3-spidev
cd wget https://files.waveshare.com/wiki/1.9inch_Touch_LCD/1.9inch_Touch_LCD_Pi.zip
sudo apt-get install unzip
unzip 1.9inch_Touch_LCD_Pi.zip -d ./1.9inch_Touch_LCD
cd 1.9inch_Touch_LCD/Python
sudo python 1.9inch_Touch_LCD.py
git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v
cd wget https://files.waveshare.com/wiki/1.9inch_Touch_LCD/1.9inch_Touch_LCD_Pi.zip
sudo apt-get install unzip
unzip 1.9inch_Touch_LCD_Pi.zip -d ./1.9inch_Touch_LCD
cd 1.9inch_Touch_LCD/C
sudo make clean sudo make -j
sudo ./main
| LCD Pin | Raspberry Pi Pico | 
| VCC | 3.3V | 
| GND | GND | 
| LCD_DIN | GP11 | 
| LCD_CLK | GP10 | 
| LCD_CS | GP9 | 
| LCD_DC | GP14 | 
| LCD_RST | GP13 | 
| LCD_BL | GP15 | 
| TP_SDA | GP6 | 
| TP_SCL | GP7 | 
| TP_IRQ | GP8 | 
| TP_RST | GP5 | 



(Please note that the following examples run with ESP32S3, please adjust the pin definition for other ESP32 models)
| LCD Pin | ESP32S3 | 
| VCC | 3.3V | 
| GND | GND | 
| LCD_DIN | 2 | 
| LCD_CLK | 1 | 
| LCD_CS | 39 | 
| LCD_DC | 41 | 
| LCD_RST | 40 | 
| LCD_BL | 6 | 
| TP_SDA | 15 | 
| TP_SCL | 7 | 
| TP_IRQ | 17 | 
| TP_RST | 16 | 

| Library Name | Description | Version | Library Installation Requirement | 
|---|---|---|---|
| GFX_Library_for_Arduino | LCD driver library | --- | Install Offline | 
| CST816 | Touch driver library | --- | "Install Offline" | 
| lvgl | Graphical library | v8.4.0 | "Install Offline" | 
【Demo description】
This demo demonstrates how to use 1.9inch Touch LCD to run the lvgl demos
【Hardware connection】
【Code analysis】
lv_demo_widgets(); // lv_demo_benchmark(); // lv_demo_keypad_encoder(); // lv_demo_music(); // lv_demo_stress();
【Result demonstration】

【Demo description】
This demo demonstrates how ESP32S3 uses 1.9inch Touch LCD to run the lvgl demo in the ESP-IDF environment
【Hardware connection】
【Code analysis】
    I2c_bus_init();         // Initialize I2C
    spi_bus_init();         // Initialize SPI
    display_init();          // Initialize display screen
    touch_init();           // Initialize touchscreen driver
    brightness_init();       // Initialize backlight control module
    brightness_set_level(20); // Set the backlight brightness to 20% (support 0-100 level adjustment)
    lv_port_init(); // Initialize LVGL
    if (lvgl_lock(-1)) // Obtain LVGL thread lock (-1 indicates blocking wait) to ensure multi-threaded safety
    {
        // lv_demo_benchmark();
        // lv_demo_music();
        lv_demo_widgets();  // Start LVGL demo
        lvgl_unlock();  // Release LVGL thread lock
    }
【Result demonstration】

| LCD Pin | Arduino | 
| VCC | 5V | 
| GND | GND | 
| LCD_DIN | 11 | 
| LCD_CLK | 13 | 
| LCD_CS | 10 | 
| LCD_DC | 7 | 
| LCD_RST | 8 | 
| LCD_BL | 9 | 
| TP_SDA | SDA | 
| TP_SCL | SCL | 
| TP_IQR | 3 | 
| TP_RST | 4 | 
| Library Name | Description | Library Installation Requirement | 
|---|---|---|
| GFX_Library_for_Arduino | LCD driver library | "Install Online" or "Install Offline" | 
| CST816 | Touch driver library | "Install Offline" | 


Please note whether the GPIO level on the board matches the power supply voltage of the product!
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com