BASIC stamp manual v2.2

LCDCMD – BASIC Stamp Command Reference
Page 252 BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com
printed on the display (with the LCDOUT command) will appear at the
current cursor's location. Here's another example:
LCDCMD 0, 128 + 64
The above command will move the cursor to the first character position on
the second line (on a 2 x 16 display). 128 is the Move To Display Address
command and 64 is the location number. See the "Character Positioning"
section, below, for more information.
Command
(in decimal)
Description
Do Nothing
0
Don't perform any special operation.
Clear Display
1
Clear the display and move cursor to home position.
Home Display
2
Move cursor and display to home position.
Inc Cursor
6
Set cursor direction to right, without a display shift.
Display Off
8
Turn off display (display data is retained).
Display On
12
Turn on display without cursor (display is restored).
Blinking Cursor
13
Turn on display with blinking cursor.
Underline Cursor
14
Turn on display with underline cursor.
Cursor Left
16
Move cursor left one character.
Cursor Right
20
Move cursor right one character.
Scroll Left
24
Scroll display left one character.
Scroll Right
28
Scroll display right one character.
Move To CGRAM
Address
64 + address Move pointer to character RAM location.
Move To DDRAM
Address
128 + address Move cursor to Display Data RAM location.
Table 5.44: Common LCD
Commands. These are supported
by LCDs with the Hitachi 44780
controller.
While most users will only need the commands shown in Table 5.44
above, Table 5.45 below details all of the instructions supported by the
LCD (for advanced users). Many instructions are multipurpose,
depending on the state of special bits. Clever manipulation of the
instruction bits will allow for powerful control of the LCD.
The last command shown above (Move To DDRAM Address) is used to
move the cursor to a specific position on the LCD. The LCD's DDRAM
(Display Data RAM) is a fixed size with a unique position number for each
character cell. The viewable portion of the DDRAM depends on the LCD's
logical view position (which can be altered with the Scroll Display
command). The default view position is called the Home position; it
means that the display's upper left character corresponds to DDRAM
CHARACTER POSITIONING: MOVING THE
CURSO
R
.
A
NOTE ABOUT ADVANCED LCD
COMMANDS
.