Interfacing GLCD With LPC2148 ARM: Arm How-To Guide
Interfacing GLCD With LPC2148 ARM: Arm How-To Guide
Interfacing GLCD With LPC2148 ARM: Arm How-To Guide
L Send Instruction
L
H Data Write (From Input Register to DDRAM)
Table1
Input Register:
Output Register:
1. LCD Initialization
2. Page Selection
4. Data Display
1. LCD Initialization
0 0 1 1 1 1 1 D
LCD)
d) EN=1
e) Delay
2. Page selection
1 0 1 1 1 X3 X2 X1
d) EN=1
e) Delay
3. Column selection
0 1 Y5 Y4 Y3 Y2 Y1 Y0
c) EN=1
d) Delay
& CS2=1)
d) EN=1
e) Delay
CS1 P1.18
JP7
CONTROL L LINES
DB2 P0.18
DB3 P0.19
DB4 P0.20
DB5 P0.21
DB6 P0.22
DB7 P0.23
P0.31
P0.30
P0.29
P0.28
P0.25
P1.16
P1.17
P1.23
P1.24
P1.25
P1.26
P1.27
P1.28
P1.29
P1.30
D+
+3.3V +5V
D-
LCD/GLCD
1 R31 10K
1 2 1 3
2 3
11
10
63
51
43
23
17
15
14
13
16
12
32
28
24
64
60
56
52
20
7
9
U5 3
2
J11
D+
D-
P0.31
P0.30
P0.29
P0.28
P0.25
P1.16
P1.17
P1.24
P1.25
P1.26
P1.27
P1.28
P1.29
P1.30
P1.31
VDD1
VDD2
VDD3
VDDA
VREF
J13
6
18 VSS1 8 CS1 1
25 VSS2 P1.18 4 CS2 2
42 VSS3 P1.19 3
50 VSS4 4
59 VSS5 +5V 5
VSSA 48 RS 6
P1.20 44 R/W 7 24
P1.21 40 EN 8
49 P1.22 46 D0 9 23
VBAT VBAT P0.16 47 10
LPC2148 D1
57 P0.17 53 D2 11 22
RST RESET P0.18 54 12
D3
P0.19 55 D4 13 21
3 P0.20 1 D5 14
RTXC1 RTXC1 P0.21 2 15
D6
5 P0.22 58 D7 16
RTXC2 RTXC2 P0.23 36 17
RST
P1.23 18
19
+5V 20
R36 10E
XTAL2
XTAL1
P0.15
P0.14
P0.13
P0.12
P0.11
P0.10
P0.9
P0.8
P0.7
P0.6
P0.5
P0.4
P0.3
P0.2
P0.1
P0.0
GLCD
61
62
45
41
39
38
37
35
34
33
31
30
29
27
26
22
21
19
12MHz
P0.15
P0.14
P0.13
P0.12
P0.11
P0.10
P0.9
P0.8
P0.7
P0.6
P0.5
P0.4
P0.3
P0.2
P0.1
P0.0
C14 X5 C15
22pf 22pf
Source Code
#include <lpc214x.h>
#include "Glcd.h"
#include "bmp_maska.h"
#include "Utility.h"
PINSEL0 = 0;
PINSEL1 = 0;
PINSEL2 &= 0x0000000C;
PINSEL2 |= 0x00000030;
DelayProc(0.2 * CCLOCK);
IODIR0 = 0;
Glcd_Image( maska_bmp );
DelayProc(2.0 * CCLOCK);
Glcd_Fill(0x00);
someText = "BIG:ONE";
DelayProc(1.0 * CCLOCK);
}
}
To compile the above C code you need the KEIL
software. They must be properly set up and a project with
correct settings must be created in order to compile the
code. To compile the above code, the C file must be added
to the project.