2.8" TFT LCD Module (LGDP4531) with T/P , SPI Access, support LCD Only driver(Alpha) and *UNSTABLE* (wrong initialize?) .

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mio
Date:
Wed Jun 16 12:10:45 2010 +0000
Parent:
0:0e33d9ea9a2e
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
spilcd_qvga.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jun 16 11:17:27 2010 +0000
+++ b/main.cpp	Wed Jun 16 12:10:45 2010 +0000
@@ -12,6 +12,7 @@
 
 int main() {
     while(1){
-        lcdq.filltest(0x0000);
+        u16 i ;
+        lcdq.filltest(i++);
     }
 }
--- a/spilcd_qvga.h	Wed Jun 16 11:17:27 2010 +0000
+++ b/spilcd_qvga.h	Wed Jun 16 12:10:45 2010 +0000
@@ -1,5 +1,5 @@
 //
-// SPILCD_QVGA -- miolab
+// SPILCD_QVGA -- mio
 // This code is based on http://mbed.org/users/Sim/programs/SPILCDsample
 //
 // 2010/06/16 - Now Supports only "LGDP4531" and screen fill test "filltest()" command only (Alpha level).
@@ -119,7 +119,7 @@
     void init() {
         u16 i ;
         spi.format(8,3); // SPI mode = 3
-        spi.frequency(2000000); //
+        spi.frequency(4000000);
 
         // reset
         reset(1);
@@ -158,12 +158,7 @@
 
             LCD_WR_REG(0x01,0x0100);
             LCD_WR_REG(0x02,0x0300);
-
-#ifdef USE_PORTRAIT
-            LCD_WR_REG(0x03,0x1030);
-#else
             LCD_WR_REG(0x03,0x1038);
-#endif
 
             LCD_WR_REG(0x08,0x0202);
             LCD_WR_REG(0x09,0x0000);