Parallax BASIC Stamp 2e Programming Manual page 174

Table of Contents

Advertisement

LCDOUT - BASIC Stamp Command Reference
LCD's Character RAM or Display RAM. The following is an example of
the LCDOUT command:
LCDOUT 1, 1, ["Hello World!"]
The above code will clear the LCD screen and then send "Hello World!" to
the screen. The first argument (1) is the starting I/O pin number and the
second argument (also 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.32. Please refer to
the LCDCMD command description for information on properly wiring
the LCD display.
When the LCD is first powered-up, it will be in an unknown state and
must be properly configured 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 1, 0, [Value]
LCDOUT 1, 0, [REP Value\5]
LCDOUT 1, 0, [DEC Value]
LCDOUT 1, 0, [HEX Value]
LCDOUT 1, 0, [BIN Value]
Tables 5.33 and 5.34 list all the available conversion formatters and special
formatters available to the LCDOUT command.
SEROUT commands for additional information and examples of their use.
Page 172 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
'send the ASCII value for "A"
'send the ASCII value for "A" five time, ie: "AAAAA"
'send two characters, "6" and "5"
'send two characters, "4" and "1"
'send seven characters, "1000001"
See the DEBUG and
T
WO VERY IMPORTANT STEPS
1) W
BS2
IRING THE
P TO AN
2)
LCD.
INITIALIZING THE
S
ENDING AND FORMATTING DATA
:
LCD.
.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Table of Contents