Test program for 2.2 QVGA TFT with SD-connector. Inexpensive from banggood.com modified CJS 2014 Kl-25Z

Dependencies:   SDFileSystem SPI_TFT_ILI9341 TFT_fonts mbed

Fork of TFT_banggood by Peter Drescher

Files at this revision

API Documentation at this revision

Comitter:
pegcjs
Date:
Thu Jun 11 09:23:37 2015 +0000
Parent:
2:25bfb21253a6
Commit message:
Version published 11june2015

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 21 10:00:17 2014 +0000
+++ b/main.cpp	Thu Jun 11 09:23:37 2015 +0000
@@ -16,19 +16,24 @@
 // the SD-connector is connected to SPI pin 11-13 
 //SDFileSystem sd(p11, p12, p13, p14, "sd"); // mosi,miso,sck,cs
 
-//LocalFileSystem local("local");
 
-extern unsigned char p1[];  // the mbed logo graphic
+
 
 // the display has a backlight switch on board 
 DigitalOut LCD_LED(PTA13);       
+DigitalOut pwr(PTD7);
 
 // the TFT is connected to SPI pin 5-7
 //SPI_TFT_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc for lpc1768
 SPI_TFT_ILI9341 TFT(PTD2, PTD3, PTD1, PTD5, PTD0, PTC12,"TFT"); // mosi, miso, sclk, cs, reset, dc for frdmkl25z
-
+//NB better combination to use a coherent 2x4 block for lcd 
+//   SPI_TFT_ILI9341 TFT(PTD2, PTD3, PTD1, PTA16, PTA17, PTC16,"TFT"); // mosi, miso, sclk, cs, reset, dc for frdmkl25z
+//   DigitalOut LCD_LED(PTC17);  
+//SDFileSystem sd(PTD2, PTD3, PTD1, PTA1, "sd"); // mosi,miso,sck,cs
 int main()
 {
+    pwr=1;
+    wait(0.2);
     while(1){
     int i;
     LCD_LED = 1;            // backlight on