5: BASIC Stamp Command Reference – LCDCMD
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 159
LCDCMD
BS1 BS2 BS2e BS2sx
BS2p
LCDCMD
Pin, Command
Function
Send a command 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. See
explanation below. All I/O pins will be set to output mode.
•
Command
is a variable/constant/expression (0 – 255) indicating the
LCD command to send.
Quick Facts
BS2p
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
LCDCMD is designed to use the LCD's 4-bit mode only.
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 Hitachi 44780 LCD controller supports a number of special
instructions for initializing the display, moving the cursor, changing the
default layout, etc. The LCDCMD command is used to send one of these
instructions to the LCD. It is most commonly used to initialize the display
upon a power-up or reset condition.
The following is an example of the LCDCMD command:
LCDCMD 1, 24
Table 5.26: LCDCMD Quick Facts.
p
2
A
SIMPLE
LCDCMD
EXAMPLE
.
Содержание BASIC Stamp 2e
Страница 1: ...BASIC Stamp Programming Manual Version 2 0c...
Страница 30: ...Introduction to the BASIC Stamps Page 28 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 90: ...BUTTON BASIC Stamp Command Reference Page 88 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 118: ...END BASIC Stamp Command Reference Page 116 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 128: ...FREQOUT BASIC Stamp Command Reference Page 126 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 196: ...NAP BASIC Stamp Command Reference Page 194 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 206: ...OWIN BASIC Stamp Command Reference Page 204 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 214: ...OWOUT BASIC Stamp Command Reference Page 212 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 216: ...PAUSE BASIC Stamp Command Reference Page 214 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 226: ...POLLMODE BASIC Stamp Command Reference Page 224 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 232: ...POLLOUT BASIC Stamp Command Reference Page 230 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 236: ...POLLRUN BASIC Stamp Command Reference Page 234 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 240: ...POLLWAIT BASIC Stamp Command Reference Page 238 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 262: ...RCTIME BASIC Stamp Command Reference Page 260 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 274: ...RUN BASIC Stamp Command Reference Page 272 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 310: ...SEROUT BASIC Stamp Command Reference Page 308 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 324: ...STOP BASIC Stamp Command Reference Page 322 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...