LCDIN - BASIC Stamp Command Reference
Page 168
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
The LCDIN command is used to send one instruction and then receive at
least one data byte from the LCD's Character RAM or Display RAM. The
following is an example of the LCDIN command:
Char VAR BYTE
LCDIN 1, 128, [Char]
The above code will read the character value at location 0 of the DRAM.
See the "Character Positioning" section, below, for more information.
The LCDIN command actually uses more than just the I/O pin specified
by the Pin argument. The LCDIN 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.29.
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 LCDIN command's InputData argument is similar to the SERIN
command's InputData argument. This means data can be received as
ASCII character values, decimal, hexadecimal and binary translations and
string data as in the examples below (assume the LCD display has "Value:
3A:101" starting at the first character of the first line on the screen).
Value VAR BYTE(13)
LCDIN 1, 128, [Value] 'receive the ASCII value for "V"
LCDIN 1, 128, [DEC Value] 'receive the number 3.
LCDIN 1, 128, [HEX Value] 'receive the number $3A.
LCDIN 1, 128, [BIN Value] 'receive the number %101.
LCDIN 1, 128, [STR Value\13] 'receive the string "Value: 3A:101"
Tables 5.30 and 5.31 list all the available conversion formatters and special
formatters available to the LCDIN command. See the SERIN command for
additional information and examples of their use.
A
SIMPLE
LCDIN
EXAMPLE
.
T
WO VERY IMPORTANT STEPS
:
1) W
IRING THE
BS2
P TO AN
LCD.
2)
INITIALIZING THE
LCD.
R
ECEIVING FORMATTED DATA
.
Содержание 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...