Difference between revisions of "2.8inch Resistive Touch LCD"
From Waveshare Wiki
Line 79: | Line 79: | ||
*After calibrating, now you can try to draw on the touchscreen. | *After calibrating, now you can try to draw on the touchscreen. | ||
For more details, you can refer to the codes | For more details, you can refer to the codes | ||
− | :[[File:2.8inch_Resistive_Touch_LCD-001.png| | + | :[[File:2.8inch_Resistive_Touch_LCD-001.png|500px]] |
===OpenM128=== | ===OpenM128=== | ||
− | + | This example is based on Waveshare [https://www.waveshare.com/openm128-standard.htm OpenM128] | |
− | + | *Connect the LCD to OpenM128 accoding to figures below: | |
{|class="wikitable" style="text-align:center" | {|class="wikitable" style="text-align:center" | ||
!2.8inch Resistive Touch LCD!!OpenM128 | !2.8inch Resistive Touch LCD!!OpenM128 | ||
Line 108: | Line 108: | ||
|TP_IRQ||PE4/IRQ | |TP_IRQ||PE4/IRQ | ||
|} | |} | ||
+ | *Connect ISP prorammer to OpenM128 board and power on it. | ||
+ | *Open project nu Atmel Studio 7.0 software | ||
+ | *Compile and flash code to OpenM128 | ||
+ | :[[File:2.8inch_Resistive_Touch_LCD-003.png|400px]] [[File:2.8inch_Resistive_Touch_LCD-004.jpg|400px]] | ||
+ | ===Open103C=== | ||
+ | This example is based on Waveshare [https://www.waveshare.com/open103c-standard.htm Open103C] | ||
+ | *Connect LCD to Open103C according to figures below | ||
+ | {|class="wikitable" style="text-align:center" | ||
+ | !2.8inch Resistive Touch LCD!!Open103C | ||
+ | |- | ||
+ | |5V||5V | ||
+ | |- | ||
+ | |GND||GND | ||
+ | |- | ||
+ | |MISO||PB14 | ||
+ | |- | ||
+ | |MOSI||PB15 | ||
+ | |- | ||
+ | |SCLK||PB13 | ||
+ | |- | ||
+ | |LCD_CS||PB12 | ||
+ | |- | ||
+ | |LCD_DC||PB8 | ||
+ | |- | ||
+ | |LCD_RST||PB9 | ||
+ | |- | ||
+ | |LCD_BL||PB0 | ||
+ | |- | ||
+ | |TP_CS||PA15 | ||
+ | |- | ||
+ | |TP_IRQ||PB1 | ||
+ | |} | ||
+ | :[[File:2.8inch_Resistive_Touch_LCD-005.png|500px]] | ||
+ | *Connect ST-Link programmer to Open103C and power on it | ||
+ | *Open project, compile and flash codes to Open103C | ||
+ | :[[File:2.8inch_Resistive_Touch_LCD-006.png|500px]] | ||
+ | ===Open16F877A/Open18F4520=== | ||
+ | This example is based on Waveshare Open16F877A/Open18F4520 | ||
+ | *Connect the LCD to Open16F877A/Open18F4520 according to figures below | ||
+ | {|class="wikitable" style="text-align:center" | ||
+ | !2.8inch Resistive Touch LCD!!Open16F877A | ||
+ | |- | ||
+ | |5V||5V | ||
+ | |- | ||
+ | |GND||GND | ||
+ | |- | ||
+ | |MISO||RC4 | ||
+ | |- | ||
+ | |MOSI||RC5 | ||
+ | |- | ||
+ | |SCLK||RC3 | ||
+ | |- | ||
+ | |LCD_CS||RA1 | ||
+ | |- | ||
+ | |LCD_DC||RA2 | ||
+ | |- | ||
+ | |LCD_RST||RD0 | ||
+ | |- | ||
+ | |LCD_BL||3.3V | ||
+ | |- | ||
+ | |TP_CS||RA4 | ||
+ | |- | ||
+ | |TP_IRQ||RA0 | ||
+ | |} | ||
+ | :[[File:2.8inch_Resistive_Touch_LCD-007.png|400px]] | ||
==Resource== | ==Resource== |
Revision as of 03:26, 4 September 2019
| ||
Instruction
This is a multicolor graphic IPS LCD display, 2.8inch diagonal, 320×240 pixels, with resistive touch screen.
Feature
- Onboard touch controller, smoother touch experience than solutions that directly use AD pins for touching
- SPI interface, requires a few pins
- Programmable backlight control, power saving
- Comes with development resources and manual (examples for STM32/AVR/PIC)
Specification
Display Controller | HX8347D |
Touch Controller | XPT2046 |
LCD Type | IPS |
Interface | SPI |
Resolution | 320*240 |
Dimension | 79.9mm x50.8mm |
Display area | 57.6mm x 43.2mm |
Display colors | RGB, 65K colors |
Touch Type | 4-wire resistive |
Power supply | 5V |
Logic level | 3.3V |
Interface
5V | 5V |
GND | Ground |
MISO | Data output of SPI interface (slaver) |
MOSI | Data input of SPI interface (slaver) |
SCLK | Clock pin of SPI interface |
LCD_CS | Chip select pin of LCD |
LCD_DC | Data/Command selection |
LCD_RST | LCD Reset |
LCD_BL | Backlight control |
TP_CS | Chip select pin of Touch |
TP_IRQ | Interrupt pin of Touch |
User Guide
There are several examples provides, demo codes can be downloaded from #Demo codes
OpenX05R-C
This example is based on Waveshare Open405R-C.
- Remove four LED jumpers, then insert the 2.8inch LCD to Open405R-C
- Open the TouchPanel project, which is under the Open405R-C directory. Compile and download it to the development board
- After downloading, press reset button of the OpenX05-C board, you can see that prompt information are printed on LCD:
- Please use the stylus clock the cross on the screen. The cross will always move until the screen adjustment is completed.
- You need to calibrate the touchscreen by touch pen following the prompt.
- After calibrating, now you can try to draw on the touchscreen.
For more details, you can refer to the codes
OpenM128
This example is based on Waveshare OpenM128
- Connect the LCD to OpenM128 accoding to figures below:
2.8inch Resistive Touch LCD | OpenM128 |
---|---|
5V | 5V |
GND | GND |
MISO | PB2/DIN |
MOSI | PB3/DOUT |
SCLK | PB1/CLK |
LCD_CS | PD6/CS |
LCD_DC | PB5/RS |
LCD_RST | PB6/RESET |
LCD_BL | PE5/PWM |
TP_CS | PB4 |
TP_IRQ | PE4/IRQ |
- Connect ISP prorammer to OpenM128 board and power on it.
- Open project nu Atmel Studio 7.0 software
- Compile and flash code to OpenM128
Open103C
This example is based on Waveshare Open103C
- Connect LCD to Open103C according to figures below
2.8inch Resistive Touch LCD | Open103C |
---|---|
5V | 5V |
GND | GND |
MISO | PB14 |
MOSI | PB15 |
SCLK | PB13 |
LCD_CS | PB12 |
LCD_DC | PB8 |
LCD_RST | PB9 |
LCD_BL | PB0 |
TP_CS | PA15 |
TP_IRQ | PB1 |
- Connect ST-Link programmer to Open103C and power on it
- Open project, compile and flash codes to Open103C
Open16F877A/Open18F4520
This example is based on Waveshare Open16F877A/Open18F4520
- Connect the LCD to Open16F877A/Open18F4520 according to figures below
2.8inch Resistive Touch LCD | Open16F877A |
---|---|
5V | 5V |
GND | GND |
MISO | RC4 |
MOSI | RC5 |
SCLK | RC3 |
LCD_CS | RA1 |
LCD_DC | RA2 |
LCD_RST | RD0 |
LCD_BL | 3.3V |
TP_CS | RA4 |
TP_IRQ | RA0 |
Resource
Documents
Demo codes
FAQ
...
Supports
Support
If you require technical support, please go to the Support page and open a ticket.