Out Of Stock
Description
The LCD TFT 2.8-inch Touch Display Module is a compact and versatile display solution for your project. With a screen size of 2.8 inches and a resolution of 320 x 240 pixels, it offers a clear and bright display. The touch feature makes it easy to interact with the display, providing an intuitive user experience. This display module is compatible with the popular Geekcreit platform, making it easy to integrate into your projects. Whether you're building an interactive device, a portable display, or simply adding a visual display to your project, the LCD TFT 2.8-inch Touch Display Module is a great choice.
Package Includes:
- 1 x LCD TFT 2.8-inch Touch Display Module
Features:
- 2.8 inch TFT display with touch capability
- Large, high-resolution display with 320 x 240 pixels for clear and detailed image display
- ILI9341 drive chip for improved display performance and reliability
- An 8-bit parallel interface for easy connectivity to microcontrollers and single-board computers
- The effective display area of 57.6 x 43.2 mm for more screen real estate
- Compact PCB size of 78.22 x 52.7 mm for easy integration into small projects
- Wide working temperature range of -20°C to 70°C for use in a variety of environments
- With an SD card slot convenient extension experiment
- Provide the Arduino libraries, provide a rich example program
Description:
The LCD TFT 2.8-inch Touch Display Module is a compact and feature-packed solution for your display needs. With a size of 2.8 inches and a type of TFT, the display provides clear and vibrant visuals. The drive chip used in this module is ILI9341, which is known for its high-quality performance. The resolution of the display is 320 x 240 pixels, offering a sharp and detailed display. The module interface is an 8-bit parallel interface, making it easy to integrate into your projects. The effective display area of this module is 57.6 x 43.2 mm, providing ample space for your content. The module PCB size is 78.22 x 52.7 mm, making it a compact solution that can fit into tight spaces. The working temperature of this module is -20 ° to 70 °, making it suitable for a wide range of environments and applications. Whether you're building a portable device, an interactive display, or simply need a visual display for your project, the LCD TFT 2.8-inch Touch Display Module is a great choice.
Principle of Work:
The LCD TFT 2.8-inch Touch Display Module with a resolution of 320x240 pixels is a display module that utilizes the ILI9341 drive chip. This module uses an 8-bit parallel interface to communicate with the host system and display information. The effective display area is 57.6 x 43.2 mm, and the module PCB size is 78.22 x 52.7 mm. The operating temperature range for this display is between -20°C to 70°C. The ILI9341 drive chip is a widely used display controller that supports the 8-bit and 16-bit parallel interfaces, as well as serial peripheral interface (SPI) communication. It supports a resolution of up to 240x320 pixels and has the capability to display up to 262,144 colors. The ILI9341 implements a display refresh drive mechanism to ensure stable and smooth display quality. It also supports multiple power-saving modes to reduce power consumption and extend the battery life of portable devices.
Pinout of the Module:
- LCO_RST: This pin is the reset pin for the display, which is used to reset the display.
- LCD_CS: This pin is the Chip Select pin, which is used to select the display for communication.
- LCO_RS: This pin is the Register Select pin, which is used to select between the instruction register and the data register.
- LCO_WR: This pin is the Write pin, which is used to write data to the display.
- LCD_RD: This pin is the Read pin, which is used to read data from the display.
- GND: This pin is the Ground pin, which is used to provide a reference voltage for the display.
- 5V: This pin is the power pin for the display, which provides a voltage of 5V.
- 3V3: This pin is a 3.3V power pin for the display.
- LCD_D0: This pin is the data pin 0, which is used to transfer data between the display and the microcontroller.
- LCD_D1: This pin is data pin 1, which is used to transfer data between the display and the microcontroller.
- LCD_D2: This pin is data pin 2, which is used to transfer data between the display and the microcontroller.
- LCD_D3: This pin is data pin 3, which is used to transfer data between the display and the microcontroller.
- LCD_D4: This pin is data pin 4, which is used to transfer data between the display and the microcontroller.
- LCD_D5: This pin is the data pin 5, which is used to transfer data between the display and the microcontroller.
- LCD_D6: This pin is data pin 6, which is used to transfer data between the display and the microcontroller.
- LCD_D7: This pin is data pin 7, which is used to transfer data between the display and the microcontroller.
- SD_SS: This pin is the Slave Select pin, which is used to select the SD card for communication.
- SD_DI: This pin is the Data Input pin, which is used to transfer data into the SD card.
- SD_DO: This pin is the Data Output pin, which is used to transfer data from the SD card.
- SD_SCK: This pin is the Serial Clock pin, which is used to provide the clock signal for the communication between the SD card and the microcontroller.
Applications:
- User interfaces for electronics projects: The display can be used to create graphical user interfaces for various electronics projects, providing a visually appealing and interactive way for users to interact with the device.
- Handheld devices: The compact size of the display makes it suitable for use in handheld devices such as portable gaming consoles, GPS devices, and handheld electronic organizers.
- Industrial control and monitoring: The display can be used in industrial control and monitoring systems, allowing operators to monitor and control process parameters in real time.
- Automotive applications: The display can be used in automotive applications such as dashboard displays, infotainment systems, and rear-view camera displays.
- Consumer electronics: The display can be used in various consumer electronics products, such as digital photo frames, MP3 players, and portable media players.
Circuit:
For this example you will only need to plug the LCD shield on the Arduino UNO
Library:
To install the libraries needed on the Arduino IDE, you need to follow these steps:
- Open the Arduino IDE
- Go to Sketch > Include Library > Manage Libraries
- Search for "Adafruit GFX Library" and install it.
- Search for "Adafruit TFTLCD Library" and install it.
- Search for "Adafruit Touch Screen" and install it.
Once the libraries are installed, you can now use the code without any issues. You should be able to compile and upload the code to your Arduino board.
Code:
This code is for an Arduino program that uses the TouchScreen and Adafruit graphics libraries to interface with a TFT LCD display. It initializes the display and sets various text and color settings, and then in the loop, it reads data from the touch screen and maps the touch coordinates to the display. It also includes some logic for displaying a "touch me" message and detecting button presses on the touch screen.
#include "TouchScreen.h" #include "Adafruit_GFX.h" // Core graphics library #include "Adafruit_TFTLCD.h" // Hardware-specific library // The control pins for the LCD can be assigned to any digital or // analog pins...but we'll use the analog pins as this allows us to // double up the pins with the touch screen (see the TFT paint example). #define LCD_CS A3 // Chip Select goes to Analog 3 #define LCD_CD A2 // Command/Data goes to Analog 2 #define LCD_WR A1 // LCD Write goes to Analog 1 #define LCD_RD A0 // LCD Read goes to Analog 0 #define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin // Pins for the LCD Shield #define YP A3 // must be analog #define XM A2 // must be analog #define YM 9 // digital or analog pin #define XP 8 // digital or analog pin #define MINPRESSURE 1 #define MAXPRESSURE 1000 // Calibration mins and max for raw data when touching edges of screen #define TS_MINX 210 #define TS_MINY 210 #define TS_MAXX 915 #define TS_MAXY 910 // Assign human-readable names to some common 16-bit color values: #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF const char* touchMeStr = "Touch Me / Press Button"; Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET); TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); int touchCnt = 0; int buttonState = 0; long int timeCnt; char drawChars[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'}; const int SCREEN_TIMEOUT = 10000; void setup() { // put your setup code here, to run once: tft.reset(); uint16_t identifier = tft.readID(); tft.begin(identifier); tft.fillScreen(BLACK); tft.setRotation(1); tft.setCursor(30,100); tft.setTextColor(RED); tft.setTextSize(2); tft.println("LCD driver chip: "); tft.setCursor(100, 150); tft.setTextColor(BLUE); tft.println(identifier, HEX); delay(3000); tft.fillScreen(BLACK); tft.setTextColor(YELLOW); tft.setCursor(0, 0); tft.println(touchMeStr); timeCnt = millis(); } void loop() { // put your main code here, to run repeatedly: // a point object holds x y and z coordinates TSPoint p = ts.getPoint(); pinMode(XM, OUTPUT); pinMode(YP, OUTPUT); if (millis() > (timeCnt + SCREEN_TIMEOUT)) { RunScreenSaver(); } else { drawButtons(); } // we have some minimum pressure we consider 'valid' // pressure of 0 means no pressing if (p.z > MINPRESSURE && p.z < MAXPRESSURE) { // reset the screen tft.fillScreen(BLACK); tft.setCursor(0, 0); tft.setTextSize(2); tft.println(touchMeStr); long colorPressure = (p.z * 65535) / 1000; //color changes dependent on pressure colorPressure = YELLOW; // just to make it easier to see when testing if (touchCnt == 10) { touchCnt = 0; } // May need to adjust if cordinates are being reversed due to screen rotation int YY = tft.height() - (map(p.x, TS_MINX, TS_MAXX, 0, tft.height())); int XX = tft.width() - (map(p.y, TS_MINY, TS_MAXY, 0, tft.width())); // determine if a button has been pressed if (XX > 295 && YY < 30) // first button region 30 up buttonState = 0; if ((XX >= 295 && YY >=30) && (XX >= 295 && YY < 60)) // second button region 30 thru 59 buttonState = 1; if ((XX >= 295 && YY >=60) && (XX >= 295 && YY < 100)) // second button region 60 thru 99 buttonState = 2; if ((XX > 295 && YY >=100) && (XX >= 295 && YY < 120)) // second button region 100 thru 119 buttonState = 3; if ((XX > 295 && YY >= 120) && (XX >= 295 && YY < 155)) // second button region 120 thru 154 buttonState = 4; if ((XX >= 295 && YY >= 155) && (XX >= 295 && YY < 200)) // second button region 155 thru 200 buttonState = 5; // button pressed switch (buttonState) { case 0: tft.fillCircle(305, 20, 10, RED); tft.drawCircle(305, 20, 10, GREEN); tft.drawCircle(XX, YY, p.z / 10, colorPressure); break; case 1: tft.fillTriangle(295, 60, 305, 40, 315, 60, RED); tft.drawTriangle(XX, YY, XX + 50, YY + 50, YY - 50, XX - 50, colorPressure); break; case 2: tft.fillRect(295, 75, 20, 15, RED); tft.drawRect(XX, YY, 100, 50, colorPressure); break; case 3: tft.drawCircle(308, 110, 10, RED); tft.drawCircle(299, 110, 10, RED); DrawDesign(XX, YY, 3, 25); break; case 4: tft.drawTriangle(295, 155, 305, 125, 315, 140, RED); tft.drawTriangle(300, 155, 310, 125, 320, 140, RED); TriangleDesign(XX, YY, 5); break; case 5: tft.drawChar(295, 160, 'a', RED, RED, 3); tft.drawChar(XX, YY, drawChars[touchCnt], colorPressure, colorPressure, 6); break; } // Prints out the raw and transposed data which is useful for troubleshooting tft.setTextSize(1); tft.setTextColor(colorPressure); // converts the pressure reading to a color tft.print("Raw X = "); tft.print(p.x); tft.print(" RAW Y = "); tft.println(p.y); tft.print(" Pressure = "); tft.println(p.z); tft.print("ScreenX: "); tft.println(XX); tft.print("ScreenY: "); tft.println(YY); tft.print("LCD Driver: "); tft.println(tft.readID(), HEX); touchCnt = touchCnt + 1; timeCnt = millis(); } } void drawButtons() { // Setup Buttons // circle button unpressed if (buttonState == 0) tft.fillCircle(305, 20, 10, RED); else tft.fillCircle(305, 20, 10, GREEN); // triangle button if (buttonState == 1) { tft.fillTriangle(295, 60, 305, 40, 315, 60, RED); } else { tft.fillTriangle(295, 60, 305, 40, 315, 60, GREEN); } // rectangle button if (buttonState == 2) { tft.fillRect(295, 75, 20, 15, RED); } else { tft.fillRect(295, 75, 20, 15, GREEN); } // circle button if (buttonState == 3) { tft.drawCircle(308, 110, 10, RED); tft.drawCircle(299, 110, 10, RED); } else { tft.drawCircle(308, 110, 10, GREEN); tft.drawCircle(299, 110, 10, GREEN); } // triangle button if (buttonState == 4) { tft.drawTriangle(295, 155, 305, 125, 315, 140, RED); tft.drawTriangle(300, 155, 310, 125, 320, 140, RED); } else { tft.drawTriangle(295, 155, 305, 125, 315, 140, GREEN); tft.drawTriangle(300, 155, 310, 125, 320, 140, GREEN); } // character draw button if (buttonState == 5) tft.drawChar(295, 160, 'a', RED, RED, 3); else tft.drawChar(295, 160, 'a', GREEN, GREEN, 3); } void RunScreenSaver() { randomSeed(millis() / 100); int x = random(20, 300); int y = random(20, 220); tft.fillScreen(BLACK); tft.setCursor(x - 50, y + 50); //tft.setTextSize(x / 100); tft.setTextSize(1); tft.print("myTFT Screen Saver"); delay(1000); } void TriangleDesign(int XX, int YY, int mp) { for (int i=0; i<5; i++) { tft.drawTriangle(XX, YY, XX + (mp * i), YY + (mp * i), YY - (mp * i), XX - (mp * i), RED); } } void DrawDesign(int XX, int YY, int mp, int rad) { for (int i=0; i<5; i++) { tft.drawCircle(XX + (i * mp), YY - (i * mp), rad, RED); tft.drawCircle(XX + (i * mp), YY - (i * mp), rad, GREEN); tft.drawCircle(XX + (i * mp), YY - (i * mp), rad, BLUE); tft.drawCircle(XX + (i * mp), YY - (i * mp), rad, YELLOW); } } void CircleMove(int speed) { for (int i = 0; i <320; i++) { tft.drawCircle(i + speed, 120, 30, WHITE); tft.fillScreen(BLACK); } }
This is an Arduino sketch for using the Adafruit TFTLCD with the Adafruit Touch Screen Shield. The code initializes the TFTLCD and touch screen and then sets up a text message "Touch Me / Press Button" on the screen. The code continuously updates the screen by calling the drawButtons
function and checking the touch screen for input. When the touch screen is pressed, the code maps the x and y touch coordinates to the corresponding coordinates on the TFTLCD and updates the screen with new information. If there is no touch input within the time specified by the SCREEN_TIMEOUT
constant, the screen saver, RunScreenSaver
, will be run.
Technical Details:
- 2.8 inch LCD TFT display
- Bright, 4 white-LED backlight
- Colorful, 18-bit 262,000 different shades
- The 4-wire resistive touchscreen is 240 x 320 pixels with individual pixel control
- No wiring, no soldering.
- Simply plug it in and load the library
- On-board 3.3V 300mA LDO regulator
- 5V compatible, use with 3.3V or 5V logic
- Support 2GB micro SD TF card
- Size: 7.8 x 5.3cm
Resources:
Comparisons:
The LCD TFT 2.8-inch Touch Display Module Geekcreit 320X240 and the LCD 2.8 Nextion Touch TFT Serial Display Panel Module are similar in terms of screen size, resolution, and touch capabilities. However, there may be differences in terms of the quality of the display, the materials used in the construction, and the functionality of the module. One key difference is that the Nextion modules typically have a built-in processor, which allows them to display graphics, text, and other elements directly on the screen, without the need for an external microcontroller. The Nextion modules also typically have a more user-friendly interface, making it easier to design and create custom graphical interfaces.
The Geekcreit module, on the other hand, maybe more suitable for use in projects where the user has more control over the display and wants to write their own code to display custom graphics or text. It's important to carefully consider the specific requirements of your project before choosing between these two modules. Both have their strengths and weaknesses, and the best choice will depend on the specific needs and goals of your project.