TFT LCD module has always been one of the hot products in DIY industry and LCD is basically the necessary products during all projects, at the same time, serial port modules are also the popular ones, because it takes few IO and the usage is simple. This section of the 2.2S-inch TFT LCD serial SPI integrated features of compact, SPI interface, fully compatible with popular LCD5110, interface cable sequence, and will replace the increasingly reducing LCD5110.
- TFT01_2.2 SP is a 2.2 "SPI TFT LCD Screen Module, 10pins interface, compatible LCD5110 interface. Not just a LCD break but include SD card (2GB),
- The LCD in the TFT01 is ILI9341. It's a 240 * 320 (resolution), 2.2S inch TFT LCD screen.The LCD has a wide viewing angle, the contrast is also very suitable.
- The display interface is serial, it just needs 5 wires (CS, RS, SCL, SDA, RST) for controlling.
- Replace LCD5110, Support direct plug in ElecFreaks Joystick shield, EFCom, Key Pad Shield etc
- SDcard use hardware SPI interface (CS / MOSI / MISO / SCK), Not solder pins.
- SDO: Serial clock output
- LED: 3.4V Power Supply pin
- SCL: Serial clock input
- SDA / SDI: Serial data input
- DC: Data / Command selection
- RST: Reset, Low level active
- CS: Chip Selection, Low level active
- GND: Ground
- VDD33: 3.3V Power Supply pin
- Digital Photo Frame （DPF）
- Video terminals
- Game consoles
- Video phones and Portable VCD, DVD
- The I/O of the Panel is 3.3v voltage , so you had better not to directly connect it to the 5v voltage I/O .We suggest using the 30K and 20K resistor to reduce voltage.
New version independent backlight LED-A, PWM supply or 5V supply.
Includes important code snippet.
Download the below code. You could direct used TFT-01 Mega Shield v1.2(Recommand),which for Mega1280 or Mega2560 and there are enough IO for Touch and SD card function .
The LCD connection is the same as Nokia LCD5110 and is a鈥? Bit Pant Demo鈥?
Just for ElecFreaks TFT01-2.2SP, which use SPI serial port and 240x320 pixel.
The driver is ILI9341.
#define LCD_WR 9 //SCL
#define LCD_RS 10 //SDA
#define LCD_DC 11 //A0
#define LCD_REST 12 //RESET
#define LCD_CS 13 //CSE
volatile uint8_t *P_SCK, *P_MOSI, *P_DC, *P_RST, *P_CS;
volatile uint8_t B_SCK, B_MOSI, B_DC, B_RST, B_CS;
void LCD_Writ_Bus(char data)
*P_CS &= ~B_CS;
for (unsigned char c=0; c<8; c++)
if (data & 0x80)
*P_MOSI |= B_MOSI;
*P_MOSI &= ~B_MOSI;
data = data<<1;
*P_SCK &= ~B_SCK;
*P_SCK |= B_SCK;
*P_CS |= B_CS;
void LCD_Write_COM(char VL)
void LCD_Write_DATA(char VL)
void Address_set(unsigned int x1,unsigned int y1,unsigned int x2,unsigned int y2)
P_SCK = portOutputRegister(digitalPinToPort(LCD_WR));
B_SCK = digitalPinToBitMask(LCD_WR);
P_MOSI = portOutputRegister(digitalPinToPort(LCD_RS));
B_MOSI = digitalPinToBitMask(LCD_RS);
P_DC = portOutputRegister(digitalPinToPort(LCD_DC));
B_DC = digitalPinToBitMask(LCD_DC);
P_RST = portOutputRegister(digitalPinToPort(LCD_REST));
B_RST = digitalPinToBitMask(LCD_REST);
P_CS = portOutputRegister(digitalPinToPort(LCD_CS));
B_CS = digitalPinToBitMask(LCD_CS);
*P_RST &= ~B_RST;
*P_RST |= B_RST;
LCD_Write_COM(0xC0); //Power control
LCD_Write_COM(0xC1); //Power control
LCD_Write_COM(0xC5); //VCM control
LCD_Write_COM(0xC7); //VCM control2
LCD_Write_COM(0x36); // Memory Access Control
LCD_Write_DATA(0x48); //C8 //48 68绔栧睆//28 E8 妯睆
LCD_Write_COM(0xB6); // Display Function Control
LCD_Write_COM(0xF2); // 3Gamma Function Disable
LCD_Write_COM(0x26); //Gamma curve selected
LCD_Write_COM(0xE0); //Set Gamma
LCD_Write_COM(0XE1); //Set Gamma
LCD_Write_COM(0x11); //Exit Sleep
LCD_Write_COM(0x29); //Display on
void Pant(char VL)
unsigned char p;
The projects and application examples.
Bill of Materials (BOM) /parts list
All the components used to produce the product.
Please list your question here:
If you have questions or other better design ideas,
|| Initial public release
Bug Tracker is the place you can publish any bugs you think you might have found during use. Please write down what you have to say, your answers will help us improve our
The Additional Idea is the place to write your project ideas about this product, or other usages you've found. Or you can write them on Projects page.
How to buy
Click here to buy:http://www.elecfreaks.com/store/22Â’-tft-lcd-tft0122sp-p-672.html
Other related products and resources.
This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are
licensed under GPL/LGPL, see source code files for details.
Links to external webpages which provide more application ideas, documents/datasheet or software libraries