Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

A simple 3.2" TFT color LCD module with Touch Panel test project

Status
Not open for further replies.

oldspring

Newbie level 3
Newbie level 3
Joined
Apr 8, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,305
Hello all,

I just found and bought a serial 3.2" TFT LCD module with Touch Panel. Also it came with a micro SD card (All of test source code and images are in it)

I have checked most of the project codes. they look ok.

Now I made a simple touch screen project to show you. It is the simplest and easiest way to build a very nice user interface. I high recommend to use this module for your project or products.

I use Arduino Duemilanove to build this project, you can use any MCU to control it.

Below is my test project information:

MCU:
Arduino Duemilanove (you can find it any where)

JP serial 3.2"TFT LCD Module (It come with TFT LCD and Micro SD Card)
www.jianpingusa.com
www.jianpingusa.com/jp32tftlcd_video.asp

Micro SD card code:
Code:
L@,65535
LC,45,150,1,31,65535,OldSpring Touch Panel.
LC,95,110,1,31,65535,project test.
ZD,8
T3,0
L@,59160
Ld,115,120,90,90,59160
Le,120,125,80,80,59160
Mi,125,130,spring
T2,1,18,10,40,40,face1s,facedn
T2,2,78,10,40,40,face2s,facedn
T2,3,138,10,40,40,face3s,facedn
T2,4,198,10,40,40,face4s,facedn
T2,5,258,10,40,40,face5s,facedn
T2,6,18,60,40,40,face6s,facedn
T2,7,78,60,40,40,face7s,facedn
T2,8,138,60,40,40,face8s,facedn
T2,9,258,60,40,40,face9s,facedn
T2,10,198,60,40,40,faceas,facedn
T2,11,18,110,40,40,facebs,facedn
T2,12,258,110,40,40,face1s,facedn
T4,1
end

Arduino code:
Code:
/*=================================================  =============
 File........JP Serial 3.2" TFT color LCD display module
             A Touch Spring Test code for Arduino
 Purpose.....This test code for JP Serial 3.2" TFT color LCD display module
 Software....Arduino 1.52
 MCU.........Arduino Duemilanove
 Auther......OldSpring
 Website.....WWW.-------.com
 Email.......oldsprings@yahoo.com
 Started.....
 Updated.....
 Note: The module Rx <===> Tx of Arduino 
       The module Tx <===> Rx of Arduino 
=================== Parameter =============================*/
byte Serial_Read;
void setup()
{
  Serial.begin(9600);  
  Serial.setTimeout(50);   	
  delay(1000);
  OldSpring();
}

void delay_m() {
  delay(200);
}
// ================== Touch Spring Function Test =======================
void OldSpring() {
    Serial.write("ZO,spring");   // Run a preprogram file in MMC card 
    Serial.write(13);              // end char
    delay(2000);


}
//=========================== System Loop ==============================
void loop(){
     if (Serial.available() > 0) {
        Serial_Read = Serial.read();
        switch (Serial_Read) {
          case 128:    //Button Index = 1 "1"  
                Serial.write("Mi,125,130,face1");
                Serial.write(13); 
                delay_m();
                break;
          case 129:    //Button Index = 2 "2"
                Serial.write("Mi,125,130,face2");
                Serial.write(13); 
                delay_m();
                break;
          case 130:    //Button Index = 3 "3"
                Serial.write("Mi,125,130,face3");
                Serial.write(13); 
                delay_m();
                break;
          case 131:    //Button Index = 4 "4"
                Serial.write("Mi,125,130,face4");
                Serial.write(13); 
                delay_m();
                break;
          case 132:    //Button Index = 5 "5"
                Serial.write("Mi,125,130,face5");
                Serial.write(13); 
                delay_m();
                break;
          case 133:    //Button Index = 6 '6"
                Serial.write("Mi,125,130,face6");
                Serial.write(13); 
                delay_m();
                break;
          case 134:    //Button Index = 7 "7"
                Serial.write("Mi,125,130,face7");
                Serial.write(13); 
                delay_m();
                break;
          case 135:    //Button Index = 8 "8"
                Serial.write("Mi,125,130,face8");
                Serial.write(13); 
                delay_m();
                break;
          case 136:    //Button Index = 9 "9"
                Serial.write("Mi,125,130,face9");
                Serial.write(13); 
                delay_m();
                break; 
          case 137:    //Button Index = 10 "0"
                Serial.write("Mi,125,130,facea");
                Serial.write(13); 
                delay_m();
                break;
          case 138:    //Button Index = 11 "-"
                Serial.write("Mi,125,130,faceb");
                Serial.write(13); 
                delay_m();
                break;
          case 139:    //Button Index = 12 "*"
                Serial.write("Mi,125,130,face1");
                Serial.write(13); 
                delay_m();
                break; 
          case 140:    //Button Index = 14 "/"
                Serial.write("Mi,125,130,face2");
                Serial.write(13); 
                delay_m();
                break;
          case 141:    //Button Index = 15 "="
                Serial.write("Mi,125,130,facea");
                Serial.write(13); 
                delay_m();
                break;
               }               
}}

Image:







Video:


http://youtu.be/ULyrTEIJZHE

Thanks to Edaboard team and all forume users.
Oldspring
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top