2.2" TFT LCD: TFT01-2.2

From ElecFreaks
Jump to: navigation, search

Introduction

TFT LCD module has always been one of the hot products in DIY industry and LCD is basically the necessary products during all projects. This 2.2-inch TFT LCD integrated features of compact, high resolution, supporting TFT01 LCD Shield / TFT01 Mega Shield , and it can be directly used with Arduino


  • TFT01_2.2 is a 2.2"TFT LCD Screen Module , 40pins interface , not just a LCD break but include SD card.
  • VCC 3.3V and Backlight LED 3.3V
  • The LCD in the TFT01 is S6D0164 . It’s 176*220(resolution), the contrast is also very suitable.
  • t’s a support 8bit data interface , easy to drive by many MCU like Arduino ,STM32 ,AVR and 8051.
  • The TFT01_2.2 layout a 40 pins interface for your project , the interface include LCD bus, SD card bus.
  • And we have TFT01 Shield and TFT01 MEGA shield, you can directly plug the TFT01 LCD module in the shield and stand on the Arduino board.


Model:TFT01--2.2

2.2 A.jpg 2.2 B.jpg 2.2 C.JPG

Parameter

  • Display Size:2.2
  • Display Resolution:176 * 220
  • Display Interface:Parallel 8 Bit
  • Display Controller :S6D0164
  • Expand:SD Card Socket
  • Board Size:65 x 50mm
  • Weight:50.00g

Application Ideas

  • Digital Photo Frame (DPF)
  • Video terminals
  • Instrumentation
  • GPS
  • Game consoles
  • Video phones and Portable VCD, DVD

Cautions

  • 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.

TFT01 Family

NewTFT2.4-04-LGR.jpg

Mechanic Dimensions

New Version

New version independent backlight LED-A, PWM supply or 5V supply.

2.2 D.JPG

Usage

Programming

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 .


Pant Code

#define LCD_RS   38         
#define LCD_WR   39     
#define LCD_CS   40       
#define LCD_REST 41
 
 
void Lcd_Writ_Bus(char VH,char VL)
{
  digitalWrite(LCD_CS,LOW); 
  
  PORTA = VH;
  PORTC = VL;
  digitalWrite(LCD_WR,LOW);
  digitalWrite(LCD_WR,HIGH);
  
  digitalWrite(LCD_CS,HIGH);  
}
 
 
void Lcd_Write_Com(int data)  
{   
  digitalWrite(LCD_RS,LOW);
  Lcd_Writ_Bus(data>>8,data);
}
 
void Lcd_Write_Data(int data)
{
  digitalWrite(LCD_RS,HIGH);
  Lcd_Writ_Bus(data>>8,data);
}
 
 
void Address_set(unsigned int x1,unsigned int y1,unsigned int x2,unsigned int y2)
{	
      
        Lcd_Write_Com(0x0037);Lcd_Write_Data(x1); // windows address 
	Lcd_Write_Com(0x0036);Lcd_Write_Data(x2);
	Lcd_Write_Com(0x0039);Lcd_Write_Data(y1);    
	Lcd_Write_Com(0x0038);Lcd_Write_Data(y2);	
	Lcd_Write_Com(0x0020); 	//HS
	Lcd_Write_Data(x1); 		 
	Lcd_Write_Com(0x0021);  //VS
	Lcd_Write_Data(y1); 	 
	Lcd_Write_Com(0x0022);  // write ram					 
}
 
void Lcd_Init(void)
{
       digitalWrite(LCD_REST,HIGH);
       delay(5); 
       digitalWrite(LCD_REST,LOW);
       delay(15);
       digitalWrite(LCD_REST,HIGH);
       delay(15);
       
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x001A);
     Lcd_Write_Com(0x0012);Lcd_Write_Data(0x3121);
     Lcd_Write_Com(0x0013);Lcd_Write_Data(0x006C);
     Lcd_Write_Com(0x0014);Lcd_Write_Data(0x4249);
     Lcd_Write_Com(0x0010);Lcd_Write_Data(0x0800);
     delay(10);
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x011A);
     delay(10);
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x031A);
     delay(10);
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x071A);
     delay(10);
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x0F1A);
     delay(20);
     Lcd_Write_Com(0x0011);Lcd_Write_Data(0x0F3A);
     delay(30);
     /*Initialization set sequence*/
     Lcd_Write_Com(0x0001);Lcd_Write_Data(0x011C);
     Lcd_Write_Com(0x0002);Lcd_Write_Data(0x0100);
     Lcd_Write_Com(0x0003);Lcd_Write_Data(0x1030);
     Lcd_Write_Com(0x0007);Lcd_Write_Data(0x0000);
     Lcd_Write_Com(0x0008);Lcd_Write_Data(0x0808);
     Lcd_Write_Com(0x000B);Lcd_Write_Data(0x1100);
     Lcd_Write_Com(0x000C);Lcd_Write_Data(0x0000);
     Lcd_Write_Com(0x000F);Lcd_Write_Data(0x1401);
     Lcd_Write_Com(0x0015);Lcd_Write_Data(0x0000);
     Lcd_Write_Com(0x0020);Lcd_Write_Data(0x0000);//RAM Address Register AD7-AD0
     Lcd_Write_Com(0x0021);Lcd_Write_Data(0x0000);//RAM Address Register AD15-AD8

     Lcd_Write_Com(0x0038);Lcd_Write_Data(0x00DB);
     Lcd_Write_Com(0x0039);Lcd_Write_Data(0x0000);
     Lcd_Write_Com(0x0050);Lcd_Write_Data(0x0001);//Gamma
     Lcd_Write_Com(0x0051);Lcd_Write_Data(0x020B);
     Lcd_Write_Com(0x0052);Lcd_Write_Data(0x0805);
     Lcd_Write_Com(0x0053);Lcd_Write_Data(0x0404);
     Lcd_Write_Com(0x0054);Lcd_Write_Data(0x0C0C);
     Lcd_Write_Com(0x0055);Lcd_Write_Data(0x000C);
     Lcd_Write_Com(0x0056);Lcd_Write_Data(0x0101);
     Lcd_Write_Com(0x0057);Lcd_Write_Data(0x0400);
     Lcd_Write_Com(0x0058);Lcd_Write_Data(0x1108);
     Lcd_Write_Com(0x0059);Lcd_Write_Data(0x050C);
     
     Lcd_Write_Com(0x0036);Lcd_Write_Data(0x00AF);//H end
     Lcd_Write_Com(0x0037);Lcd_Write_Data(0x0000);//H start
     Lcd_Write_Com(0x0038);Lcd_Write_Data(0x00DB);//V end
     Lcd_Write_Com(0x0039);Lcd_Write_Data(0x0000);//V start
     
     Lcd_Write_Com(0x000F);Lcd_Write_Data(0x0B01);
     Lcd_Write_Com(0x0007);Lcd_Write_Data(0x0016);
     delay(2);
     Lcd_Write_Com(0x0007);Lcd_Write_Data(0x0017);
     Lcd_Write_Com(0x0022);
     delay(10);
 
}
 
void Pant(char VH)
{
  int i,j;
  Address_set(0,0,175,219);
  for(i=0;i<176;i++)
  {
    for (j=0;j<220;j++)
    {
      Lcd_Write_Data(VH);
    }
  }
}
 
void setup()
{
  for(int p=22;p<42;p++)
  {
    pinMode(p,OUTPUT);
  }
  Lcd_Init();          
}
 
void loop()
{
  Pant(0xffff);
  Pant(0xff00);
  Pant(0x0000);

}

Example

The projects and application examples.

Bill of Materials (BOM) /parts list

All the components used to produce the product.

FAQ

Please list your question here:

Support

If you have questions or other better design ideas,

Version Tracker

Revision Descriptions Release
v1.0 Initial public release date

Bug Tracker

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

products.

Additional Idea

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.

Resources

How to buy

Click here to buy:http://www.elecfreaks.com/store/22-tft-lcd-tft0122-p-673.html

See Also

Other related products and resources.

Licensing

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.

External Links

Links to external webpages which provide more application ideas, documents/datasheet or software libraries