BASIC stamp manual v2.2

5: BASIC Stamp Command Reference – LCDIN
BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com Page 257
LCDIN
BS1 BS2 BS2e BS2sx BS2p BS2pe BS2px
LCDIN Pin, Command, [ InputData ]
Function
Receive data from 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. See
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 the
LCD command to send.
InputData is a list of variables and formatters that tells LCDIN what
to do with incoming data. LCDIN can store data in a variable or
array, interpret numeric text (decimal, binary, or hex) and store the
corresponding value in a variable, wait for a fixed or variable
sequence of bytes, or ignore a specified number of bytes. These
actions can be combined in any order in the InputData list.
Quick Facts
Table 5.46: LCDIN Quick Facts.
BS2p, BS2pe, and BS2px
Values for Pin
0, 1, 8 or 9
I/O Pin
Arrangement
when Pin is
0 or 1
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
I/O Pin
Arrangement
when Pin is
8 or 9
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
Special Notes
LCDIN is designed to use the LCD's 4-bit mode only.
Related
Commands
LCDCMD and LCDOUT