
5: BASIC Stamp Command Reference – LCDOUT
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 175
row of data for the character 0. The LCDOUT command will write the
first OutputData value (00) to this location, the second OutputData value
(10) to location 1, etc. If we wanted this custom character to affect
character 1, instead of 0, we'd have to adjust value of the "Move To..."
command, ie: 64+8. To affect character 2, we'd use 64+16.
To try the example above, don't forget to execute the LCD initialization
code (shown in the LCDCMD description) first and never forget to move
the cursor back to the screen (as with the last command, above) when
you're done writing the character data to CRAM.
Demo Program (LCDOUT.bsp)
' This program demonstrates initialization and printing on a 2 x 16 character LCD display.
' This is a modified version of the LCDINIT.bsp program.
'{$STAMP BS2p} 'STAMP directive (specifies a BS2p)
'-----Define LCD constants-----
WakeUp CON %00110000 'Wake-up
FourBitMode CON %00100000 'Set to 4-bit mode
TwoLine5x8Font CON %00101000 'Set to 2 display lines, 5x8 font
DisplayOff CON %00001000 'Turn off display, data is retained
DisplayOn CON %00001100 'Turn on display, no cursor
IncCrsr CON %00000110 'Auto-increment cursor, no display shift
ClearDisplay CON %00000001 'Clear the display
MoveCrsr CON %10000000 'Move cursor to position (must add address)
'-----Main Routines-----
Init:
PAUSE 1000
GOSUB InitLCD
Start:
LCDOUT 1, ClearDisplay, ["Hello my friend."]
PAUSE 1000
LCDOUT 1, M64, ["How are you?"]
PAUSE 3000
LCDCMD 1, ClearDisplay
LCDOUT 1, M1, ["I'm doing just"]
LCDOUT 1, M70, ["fine!"]
PAUSE 3000
GOTO Start
'-----Subroutines-----
InitLCD:
LCDCMD 1, WakeUp 'Send wakeup sequence to LCD
PAUSE 10 'These pauses are necessary to meet the LCD specs
LCDCMD 1, WakeUp
PAUSE 1
p
2
Содержание BASIC Stamp 1
Страница 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...