mcufriend 2.4 TFT LCD Shield Lib
Dependents: Nucleo_LCD_mcufriend_test
Fork of 24_TFT_STMNUCLEO by
mcufriend 2.4" TFT LCD Shield
Import program
00001 #include "mbed.h" 00002 #include "ili9328.h" 00003 00004 // prepare the data bus for writing commands and pixel data 00005 BusOut dataBus( D8, D9, D2, D3, D4, D5, D6, D7 ); // 8 pins 00006 // create the lcd instance 00007 ILI9328_LCD lcd( A3, A4, A2,A1, &dataBus, NC, A0); // control pins and data bus 00008 //ILI9328_LCD( CS, RESET, RS, WR, BusOut* DATA_PORT, PinName BL = NC, RD ); 00009 00010 int main() 00011 { 00012 int ii,height,width; 00013 00014 height = lcd.GetHeight(); 00015 width = lcd.GetWidth(); 00016 // initialize display - place it in standard portrait mode and set background to black and 00017 // foreground to white color. 00018 lcd.Initialize(); 00019 00020 // print something on the screen 00021 lcd.Print( "Hello, World!", CENTER, 50); // align text to center horizontally and use starndard colors 00022 00023 wait(2); 00024 00025 lcd.ClearScreen(); 00026 00027 for(ii=0;ii<width;ii++) 00028 { 00029 lcd.DrawLine(0, 0, height, ii,COLOR_GREEN); 00030 ii = ii+10; 00031 } 00032 wait(2); 00033 00034 lcd.DrawCircle(height/4, width/4, 20, COLOR_GREEN); 00035 wait(2); 00036 00037 lcd.FillCircle(height/2, width/2, 50, COLOR_GREEN); 00038 wait(2); 00039 00040 lcd.FillTriangle(height/4, width/4,(height/4)+20, (width/4)+40,(height/4)-20, (width/4)+40, COLOR_RED); 00041 00042 while ( 1 ) { } 00043 }
HW information about the mcufriend LCD Shield
History
first commit
2016-11-09, by rlanghbv [Wed, 09 Nov 2016 09:33:04 +0000] rev 30
first commit
This is a modified Library to work with the ST Nucleo and the Cheap Red PCB 2.4" TFT displays from china.
2014-06-30, by cdtsilva [Mon, 30 Jun 2014 17:29:42 +0000] rev 29
This is a modified Library to work with the ST Nucleo and the Cheap Red PCB 2.4" TFT displays from china.
; No modifications required, just plug the shield into the arduino header.
Change 8 bit for TFTLCD library by Todor Todorov
2014-04-06, by ThihaElectronics [Sun, 06 Apr 2014 15:07:50 +0000] rev 28
Change 8 bit for TFTLCD library by Todor Todorov
- fix sleep/wakeup of ILI9328 driver
2013-07-22, by ttodorov [Mon, 22 Jul 2013 01:48:06 +0000] rev 27
- fix sleep/wakeup of ILI9328 driver
- fixed 18bit color depth (262k colors available)
2013-06-16, by ttodorov [Sun, 16 Jun 2013 03:36:07 +0000] rev 26
- fixed 18bit color depth (262k colors available)
- finish porting ILI9325/8 driver: screen rotation
2013-06-16, by ttodorov [Sun, 16 Jun 2013 02:53:06 +0000] rev 25
- finish porting ILI9325/8 driver: screen rotation
- ported ILI9328 (actually ILI9325D) driver from UTFT; still need to fix screen rotation.
2013-06-15, by ttodorov [Sat, 15 Jun 2013 05:34:53 +0000] rev 24
- ported ILI9328 (actually ILI9325D) driver from UTFT; still need to fix screen rotation.
- ILI9328 driver not working yet
2013-06-13, by ttodorov [Thu, 13 Jun 2013 03:47:51 +0000] rev 23
- ILI9328 driver not working yet
- added PWM backlight control
2013-01-26, by ttodorov [Sat, 26 Jan 2013 04:36:46 +0000] rev 22
- added PWM backlight control
- replaced old fonts with the better Terminus font in 8x12 and 16x28 sizes
2013-01-26, by ttodorov [Sat, 26 Jan 2013 02:55:46 +0000] rev 21
- replaced old fonts with the better Terminus font in 8x12 and 16x28 sizes