Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TFTLCD_8bit mbed
main.cpp
- Committer:
 - ThihaElectronics
 - Date:
 - 2014-04-06
 - Revision:
 - 0:968ea69b9984
 - Child:
 - 1:e12f20dc9493
 
File content as of revision 0:968ea69b9984:
#include "mbed.h"
#include "ili9325.h"
// prepare the data bus for writing commands and pixel data
//BusOut dataBus( p30, p29, p28, p27, p26, p25, p24, p23, p22, p21, p20, p19, p18, p17, p16, p15 ); // 16 pins
BusOut dataBus( PTA13, PTD5, PTD4, PTA12, PTA4, PTA5, PTC8, PTC9 ); // 16 pins
// create the lcd instance
ILI9328_LCD lcd( PTB3, PTC2, PTB2, PTB1, &dataBus, NC, PTB0); // control pins and data bus
//CS, RESET, RS, WR
int main()
{
    // initialize display - place it in standard portrait mode and set background to black and
    //                      foreground to white color.
    lcd.Initialize();
    // set current font to the smallest 8x12 pixels font.
//    lcd.SetFont( Font8x12 );
    // print something on the screen
    lcd.Print( "Hello, World!", CENTER, 300, -2, -2 ); // align text to center horizontally and use starndard colors
    while ( 1 ) { }
}