Table 5.32: LCDOUT Quick Facts.
A
LCDOUT
SIMPLE
EXAMPLE
5: BASIC Stamp Command Reference – LCDOUT
LCDOUT
2
LCDOUT Pin, Command, [OutputData]
p
Function
Send data to an LCD display.
• Pin is a variable/constant/expression (0 – 1 or 8 – 9) that specifies
which I/O pins to use. The LCD requires, at most, seven I/O pins to
operate. The Pin argument serves a double purpose; specifying the
first pin and, indirectly, the group of other required pins.
explanation below. All I/O pins will be set to output mode initially
and the upper I/O pins (4 – 7 or 12 – 15) will be set to input mode by
the end of the LCDIN command.
• Command is a variable/constant/expression (0 – 255) indicating an
LCD command to send.
• OutputData is a list of variables, constants, expressions and formatters
that tells LCDOUT how to format outgoing data. LCDOUT can
transmit individual or repeating bytes, convert values into decimal,
hex or binary text representations, or transmit strings of bytes from
variable arrays. These actions can be combined in any order in the
OutputData list.
Quick Facts
Values for Pin
I/O pin
arrangement
when Pin is
0 or 1
I/O pin
arrangement
when Pin is
8 or 9
Special notes
Explanation
The three LCD commands (LCDCMD, LCDIN and LCDOUT) allow the
BS2p to interface directly to standard LCD displays that feature a Hitachi
44780 controller (part #HD44780A). This includes many 1 x 16, 2 x 16 and
4 x 20 character LCD displays.
.
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
BS1
BS2
BS2e BS2sx
0 or 1 (depending on pin): LCD Enable (E) pin
2: LCD Read/Write (R/W) pin
3: LCD Register Select (RS) pin
4 – 7: LCD Data Buss (DB4 – DB7, respectively) pins
8 or 9 (depending on pin): LCD Enable (E) pin
10: LCD Read/Write (R/W) pin
11: LCD Register Select (RS) pin
12 – 15: LCD Data Buss (DB4 – DB7, respectively) pins
LCDOUT is designed to use the LCD's 4-bit mode only.
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 171
BS2p
BS2p
0, 1, 8 or 9
See
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?