1.14-inch Color Screen
Module Source
Purchase Link: 1.14寸TFT显示屏ips液晶屏1.14寸st7789并口屏高清TFT LCD135240
Baidu Netdisk Download Link: https://pan.baidu.com/s/1cVzawBFj3ZkGml5Dj-368A
Password: 8888
Specifications
Operating Voltage: 3.3V
Operating Current:20MA
Module Dimensions:31.4(H) x 28(V) MM
Pixel Resolution:135(H) x 240(V)RGB
Driver Chip:ST7789V
Communication Protocol:8-bit Parallel
Pin Count:16 Pin(2.54mm pitch header)
Hardware Connection
For the 8-bit parallel TFT screen, the following data lines D0 to D7, along with read, write, chip select, data/command switching, and reset signal pins need to be connected. Ensure to adjust the following pin definitions according to your specific hardware:
- D0-D7 - 8-bit data lines
- WR - Write signal
- RD - Read signal (if not using the read function, it can be connected to VCC)
- CS - Chip select signal
- DC - Data/command switching signal
- RST - Reset signal
#define LCD_D0 8
#define LCD_D1 9
#define LCD_D2 2
#define LCD_D3 3
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
#define LCD_RD A0
#define LCD_WR A1
#define LCD_RS A2
#define LCD_CS A3
#define LCD_RST A4
2
3
4
5
6
7
8
9
10
11
12
13
Usage Method
Installing Library Files (skip this step if already installed)
- Open the Arduino IDE.
- Go to “Tools” > “Manage Libraries…”.
- Search for “MCUFRIEND_kbv” and “Adafruit GFX”, and install each library individually.
Enter the code:
For the 1.14-inch ST7789V screen with a resolution of 135x240 pixels using an 8-bit parallel interface, there aren't many available parallel libraries in the Arduino IDE. Therefore, we have written a library file based on this screen.
INFO
.CPP
Place the file in the project folder, at the same level as the .ino file.
Next, write the following code in the .ino file:
/******************************************************************************
* Test Hardware: LCSC ColorEasyDuino Development Board
* Version Number: V1.0
* Modified By: www.lckfb.com
* Modification Date: March 26, 2024
* Function Overview:
*****************************************************************************
* Open-source development board hardware and software information and related projects hardware and software information on official website
* Development board official website: www.lckfb.com
* Technical support resident forum, any technical problems are welcome at any time to exchange learning
* LCSC Forum: club.szlcsc.com
* Follow our Bilibili account: [立创开发板], stay toned to our latest news!
* We focus on cultivating Chinese engineers rather than profiting from board sales.
******************************************************************************/
#define LCD_D0 8
#define LCD_D1 9
#define LCD_D2 2
#define LCD_D3 3
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
#define LCD_RD A0
#define LCD_WR A1
#define LCD_RS A2
#define LCD_CS A3
#define LCD_RST A4
// //LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST|
// //UNO pins |7 |6 |5 |4 |3 |2 |9 |8 | |A0 |A1 |A2 |A3 |A4 |
#include "ST7789_8Bit_parallel.h"
ST7789_8Bit_parallel tft = ST7789_8Bit_parallel(135,240,LCD_D0, LCD_D1, LCD_D2, LCD_D3, LCD_D4, LCD_D5, LCD_D6, LCD_D7, LCD_RD, LCD_WR, LCD_RS, LCD_CS, LCD_RST);
void setup() {
tft.begin(); //Initialize the screen
tft.setRotation(0); // Set rotation
tft.LCD_Fill(0,0,135,240,BLACK); // Clear screen to black
tft.setTextSize(2); // Set text size
tft.setTextColor(RED); // Set text color
tft.setCursor(5, 100); // Set text display coordinates
tft.print("Hello, World"); // Set displayed text
}
unsigned char dat = 0;
void loop() {
tft.drawPixel(dat, 10, RED);
dat =( dat+1)%130;
delay(10);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51