Kentaro Sekimoto / Mbed 2 deprecated GR-PEACH_TFTLCD_8bit

Dependencies:   TFTLCD_8bit mbed-src mbed

Committer:
ThihaElectronics
Date:
Mon Apr 07 16:53:59 2014 +0000
Revision:
2:bfdbc88d37bf
Parent:
1:e12f20dc9493
Child:
3:86f4425affe5
update on 08/04/2014

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ThihaElectronics 0:968ea69b9984 1 #include "mbed.h"
ThihaElectronics 0:968ea69b9984 2 #include "ili9325.h"
ThihaElectronics 0:968ea69b9984 3
ThihaElectronics 0:968ea69b9984 4 // prepare the data bus for writing commands and pixel data
ThihaElectronics 0:968ea69b9984 5 //BusOut dataBus( p30, p29, p28, p27, p26, p25, p24, p23, p22, p21, p20, p19, p18, p17, p16, p15 ); // 16 pins
ThihaElectronics 0:968ea69b9984 6 BusOut dataBus( PTA13, PTD5, PTD4, PTA12, PTA4, PTA5, PTC8, PTC9 ); // 16 pins
ThihaElectronics 0:968ea69b9984 7 // create the lcd instance
ThihaElectronics 2:bfdbc88d37bf 8 ILI9325_LCD lcd( PTB3, PTC2, PTB2, PTB1, &dataBus, NC, PTB0); // control pins and data bus
ThihaElectronics 0:968ea69b9984 9 //CS, RESET, RS, WR
ThihaElectronics 0:968ea69b9984 10 int main()
ThihaElectronics 0:968ea69b9984 11 {
ThihaElectronics 0:968ea69b9984 12 // initialize display - place it in standard portrait mode and set background to black and
ThihaElectronics 0:968ea69b9984 13 // foreground to white color.
ThihaElectronics 0:968ea69b9984 14 lcd.Initialize();
ThihaElectronics 2:bfdbc88d37bf 15
ThihaElectronics 2:bfdbc88d37bf 16 lcd.FillScreen(COLOR_GREEN);
ThihaElectronics 0:968ea69b9984 17 // set current font to the smallest 8x12 pixels font.
ThihaElectronics 0:968ea69b9984 18 // lcd.SetFont( Font8x12 );
ThihaElectronics 0:968ea69b9984 19 // print something on the screen
ThihaElectronics 2:bfdbc88d37bf 20 lcd.Print( "Thiha Electronics", CENTER, CENTER, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
ThihaElectronics 2:bfdbc88d37bf 21
ThihaElectronics 2:bfdbc88d37bf 22 lcd.Print( "Using KL25Z on mbed", CENTER, 300, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
ThihaElectronics 2:bfdbc88d37bf 23
ThihaElectronics 2:bfdbc88d37bf 24 lcd.Print( "Code @ users/", CENTER, 600, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
ThihaElectronics 2:bfdbc88d37bf 25
ThihaElectronics 2:bfdbc88d37bf 26 lcd.Print( "/ThihaElectronics/", CENTER, 900, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
ThihaElectronics 2:bfdbc88d37bf 27
ThihaElectronics 2:bfdbc88d37bf 28 lcd.Print( "KL25Z_ILI9325/", CENTER, 1200, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
ThihaElectronics 0:968ea69b9984 29
ThihaElectronics 0:968ea69b9984 30 while ( 1 ) { }
ThihaElectronics 0:968ea69b9984 31 }