Connect with us

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

Discussion in 'General Electronics Discussion' started by OldSpring, Sep 25, 2013.

Scroll to continue with content
  1. OldSpring

    OldSpring

    4
    0
    Mar 8, 2010
    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:
    [email protected],65535
    LC,45,150,1,31,65535,OldSpring Touch Panel.
    LC,95,110,1,31,65535,project test.
    ZD,8
    T3,0
    [email protected],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 protected]
     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;
                   }               
    }}  
    
    
    
    
    
    [​IMG]

    [​IMG]

    [​IMG]





    Thanks to Electronics Point team and all forume users.
    Oldspring
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-