Table 5.28: All LCD Commands (for
advanced users). These are
supported by LCDs with the Hitachi
44780 controller.
Figure 5.13: LCD Character
Positions. NOTE: Many 1 x 16
displays conform to the position
numbers shown on Line 1 of the
2 x 16 display.
5: BASIC Stamp Command Reference – LCDCMD
7
Clear Display
0
0
Home Display
Entry Mode
0
0
Display/Cursor
Scroll Display /
0
Shift Cursor
0
Function Set
Move To CRAM
0
Address
Move To DRAM
1
Address
On a standard 2 x 16 character display, the following command would
move the cursor to the third column of the second line:
LCDCMD 1, 128 + 66
Line 1:
0
Line 2:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
Line 1:
0
Line 2:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
Line 3:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Line 4:
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
*Assuming the display is in the home position.
Command Code (in binary)
6
5
4
3
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
D
0
0
1
C
M
0
1
B
L
F
1
A
A
A
A
A
A
A
A
A
2 x 16 Display
On-screen positions*
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15
4 x 20 Display
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 163
Description
1
0
Clear entire display and move
0
1
cursor home (address 0).
Move cursor home and return
1
0
display to home position.
Sets cursor direction (M: 0=left,
M
S
1=right) and display scrolling (S:
0=no scroll, 1=scroll)
Sets display on/off (D), underline
U
B
cursor (U) and blinking block
cursor (B). (0=off, 1=on)
Shifts display or cursor (C:
0
0
0=cursor, 1=display) left or right
(M: 0=left, 1=right).
Sets buss size (B: 0=4-bits,
1=8-bits), number of lines (L:
0
0
0=1-line, 1=2-lines) and font size
(F: 0=5x8, 1=5x10)
Move pointer to character RAM
A
A
location specified by address (A)
Move cursor to display RAM
A
A
location specified by address (A)
Off-screen positions*
...
16
39
...
80
103
16 17 18 19
80 81
82
83
36 37 38 39
100101 102103
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?