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: DmTouch_UniGraphic UniGraphic mbed
Fork of DisplayModule24_demo by
Diff: main.cpp
- Revision:
- 7:1dbfaba27e99
- Parent:
- 6:6b6e93790b4c
- Child:
- 8:9484e01decd9
diff -r 6b6e93790b4c -r 1dbfaba27e99 main.cpp
--- a/main.cpp Tue Jan 12 07:37:55 2016 +0000
+++ b/main.cpp Wed Jan 13 23:56:43 2016 +0000
@@ -1,7 +1,7 @@
#include "stdio.h"
#include "mbed.h"
#include "string"
-#include "ILI9341.h"
+#include "ILI932x.h"
#include "Arial12x12.h"
#include "Arial24x23.h"
@@ -9,50 +9,34 @@
Serial pc(USBTX, USBRX);
-/* Configure the Adafruit ILI9341 2.4" display for 8-bit bus communication
+/* Configure the DisplayModule ILI9325 2.4" display for 8-bit bus communication
mbed pin display pin
-------- -----------
- p5 CS (3)
- p6 RST (7)
- p7 C/D (4)
- p8 WR (5)
- p9 RD (6)
+ p15 CS (L15)
+ p17 RST (L17)
+ p16 RS (L4)
+ p14 WR (L5)
+ p20 RD (L6)
- p23 d0 (13)
- p24 d1 (14)
- p25 d2 (15)
- p26 d3 (16)
- p27 d4 (17)
- p28 d5 (18)
- p29 d6 (19)
- p30 d7 (20)
+ p30 DB8 (L7)
+ p29 DB9 (L8)
+ p28 DB10 (L9)
+ p27 DB11 (L10)
+ p26 DB12 (L11)
+ p25 DB13 (L12)
+ p24 DB14 (L13)
+ p23 DB15 (L14)
- p1 GND (1)
- p40 Vin (2)
+ p1 GND (L1)
+ p40 Vin (L2)
*/
-PinName dataBus[]= {p23, p24, p25, p26, p27, p28, p29, p30};
-ILI9341 myLCD(BUS_8, dataBus, p5, p6, p7, p8, p9, "myLCD", 240, 320); // Bus 8 bit, bus pin array, CS, RST, DC, WR, RD, name, xpixels, ypixels
-
-/* Configure the Adafruit ILI9341 2.4" display for SPI communication
-
- mbed pin display pin
- -------- -----------
- p5 mosi
- p6 miso
- p7 sck
- p8 cs
- p9 reset
- NC dc NC = a defined name for no connection (not required for this mode but included for consistency)
-*/
-//ILI9341 myLCD(SPI_16, 12000000, p5, p6, p7, p8, p9, NC, "myLCD", 240, 320); // SPI 16bit, 12 MHz, mosi, miso, sck, cs, reset, dc
-
-Timer t;
-
-unsigned short backgroundcolor=Black;
-unsigned short foregroundcolor=White;
+PinName dataBus[]= {p30, p29, p28, p27, p26, p25, p24, p23};
+ILI932x myLCD(BUS_8, dataBus, p15, p17, p16, p14, p20, "myLCD", 240, 320); // Bus 8 bit, bus pin array, CS, RST, DC, WR, RD, name, xpixels, ypixels
char orient=3;
+int x,y;
+
int main()
{
myLCD.set_orientation(orient);
