LCDIN - BASIC Stamp Command Reference
Page 170
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
Special Formatter
Action
STR ByteArray \L {\E}
Input a character string of length L into an array. If specified, an
end character E causes the string input to end before reaching
length L. Remaining bytes are filled with 0s (zeros).
WAITSTR ByteArray {\L}
Wait for a sequence of bytes matching a string stored in an array
variable, optionally limited to L characters. If the optional L
argument is left off, the end of the array-string must be marked
by a byte containing a zero (0).
SKIP Length
Ignore Length bytes of characters.
Demo Program (LCDIN.bsp)
' This program demonstrates initialization, printing and reading from a 2 x 16 character
' LCD display.
'{$STAMP BS2p} 'STAMP directive (specifies a BS2p)
Char VAR BYTE(16) 'Variable for holding text read from LCD
Init:
LCDCMD 1,48 'Send wakeup sequence to LCD
PAUSE 10 'These pauses are necessary to meet the LCD specs
LCDCMD 1,48
PAUSE 1
LCDCMD 1,48
PAUSE 1
LCDCMD 1,32 'Set buss to 4-bit mode
LCDCMD 1,40 'Set to 2-line mode with 5x8 font
LCDCMD 1,8 'Turn display off
LCDCMD 1,12 'Turn display on with blinking cursor
LCDCMD 1,6 'Set to auto-increment cursor (no display shift)
Start:
LCDOUT 1,1,["Hello!"]
GOSUB ReadLCDScreen
PAUSE 3000
LCDOUT 1,1,["I'm a 2x16 LCD!"]
GOSUB ReadLCDScreen
PAUSE 3000
GOTO Start
ReadLCDScreen:
DEBUG "LCD Now Says: "
LCDIN 1,128,[STR Char\16]
DEBUG STR Char\16,CR,CR
RETURN
Table 5.31: LCDIN Special
Formatters.
p
2
Содержание 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...