BASIC stamp manual v2.2
LCDOUT – BASIC Stamp Command Reference
Page 264 • BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com
The LCDOUT command is used to send one instruction followed by at
least one data byte to the LCD. The data that is output is written to the
LCD's Character Generator RAM or Display Data RAM. The following is
an example of the LCDOUT command:
LCDOUT 0, 1, ["Hello World!"]
The above code will clear the LCD screen and then send "Hello World!" to
the screen. The first argument (0) is the starting I/O pin number and the
second argument (1) is the LCD's instruction for Clear Screen.
The LCDOUT command actually uses more than just the I/O pin specified
by the Pin argument. The LCDOUT command requires seven I/O pins.
This is because the standard LCD displays have a parallel interface, rather
than a serial one. The Pin argument can be the numbers 0, 1, 8 or 9 and
will result in the use of the I/O pins shown in Table 5.49. Please refer to
the LCDCMD command description for information on properly wiring
the LCD display.
When the LCD is first powered-up, it defaults to an 8-bit interface and
must be properly configured for a 4-bit buss before sending commands
like the one shown above. This process is known as initializing the LCD
and is the first thing your program should do upon starting up. Please
refer to the LCDCMD command description for information on properly
initializing the LCD display.
The LCDOUT command's OutputData argument is exactly like that of the
DEBUG and SEROUT command's OutputData argument. This means data
can be sent as literal text, ASCII character values, repetitive values,
decimal, hexadecimal and binary translations and string data as in the
examples below.
value VAR Byte
value = 65
LCDOUT 0, 0, [value] ' send "A"
LCDOUT 0, 0, [REP value\5] ' send "AAAAA"
LCDOUT 0, 0, [DEC value] ' send "6" and "5"
LCDOUT 0, 0, [HEX value] ' send "4" and "1"
LCDOUT 0, 0, [BIN value] ' send "1000001"
A
SIMPLE LCDOUT EXAMPLE.
T
WO VERY IMPORTANT STEPS:
1)
WIRING THE BASIC STAMP TO AN LCD.
2)
INITIALIZING THE LCD.
S
ENDING AND FORMATTING DATA.