LCDCMD - BASIC Stamp Command Reference
Page 164
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
The number 128 tells the LCD we wish to move the cursor and 66 is the
location number of the desired position. Similarly, sending just 128
(128 + 0) would move the cursor to the first character of the first line (the
upper left character if the display is at the home position).
You may have noticed that the 2 x 16 display has many locations that are
not visible; they are to the right of the edge of the screen. These locations
(16 – 39 and 80 to 103) become important for scrolling operations. For
example, it is possible to move the cursor to location 16, print some text
there and then issue a number of Scroll Left instructions (LCDCMD 1, 24)
to slowly scroll the text onto the display from right to left. If you did so,
the DRAM positions that were on the left of the screen would now be past
the left edge of the screen. For example,
LCDCMD 1, 24
LCDCMD 1, 24
would cause the screen to scroll to the left by two characters. At this point,
the upper-left character in the display would actually be DRAM location 2
and the lower-left character would be DRAM location 66. Locations 0, 1,
64 and 65 would be off the left edge of the LCD and would no longer be
visible. Some interesting effects can be achieved by taking advantage of
this feature.
The 4 x 20 LCD has a strange DRAM map. The upper-right character is
location 19 and the next location, 20, appears as the first character of the
third line. This strange mapping is due to constraints in the LCD
controller and the manufacturers design, and unfortunately makes the
scrolling features virtually useless on the 4 x 20 displays.
Even though the LCD requires many pins to talk to it, only the Enable pin
needs to remain dedicated to the LCD and all the other pins can be
multiplexed (shared) with certain other devices (if wired carefully). In
addition, the I/O pin connected to the LCD's R/W pin is only necessary if
the LCDIN command will be used in the application. If the LCDIN
command will not be used, LCD pin 5 (R/W pin) can be connected to
ground and I/O pin 2 (shown above) may be left disconnected. I/O pin 2
will still be set to output mode for each LCDCMD and LCDOUT
command executed, however.
S
CROLLING THE DISPLAY
.
N
OTES ON
DRAM
MAPPING FOR
4
X
20 LCD
S
.
D
ETAILS ON
LCD
WIRING
.
Содержание 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...