27297 Parallax Inc, 27297 Datasheet - Page 95

KIT STAMPWORKS WITH BS2-IC

27297

Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet

Specifications of 27297

Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
27297SQ
Manufacturer:
NS
Quantity:
4
' -----[ Subroutines ]-----------------------------------------------------
LCD_Cmd:
LCD_Out:
Behind the Scenes
In this program, the LCD is initialized for multi-line mode (note the additional lines
after entering 4-bit mode). This will allow both lines of the LCD module to display
information.
downloaded to the LCD.
The LCD has room for eight, user-definable customer characters. The data is stored
for these characters in an area called CGRAM and must be downloaded to the LCD
after power-up and initialization (CGRAM is volatile, so custom character definitions
are lost when power is removed from the LCD). Each custom character requires eight
bytes, the first byte being the top line of the character, the last byte being the
bottom line of the character. The eighth byte is usually $00 as this is where the
cursor is positioned when under the character.
NEXT
PAUSE 2000
GOTO Main
LOW RS
LcdBus = char.HIGHNIB
PULSOUT E, 3
LcdBus = char.LOWNIB
PULSOUT E, 3
HIGH RS
RETURN
FOR idx2 = 0 TO 4
NEXT
char = LcdLine2 + idx1
GOSUB LCD_Cmd
LOOKUP idx2, [0, 1, 2, 1, newChar], char
GOSUB LCD_Out
PAUSE 100
With the display initialized, custom character definitions are
' 5 characters in
' set new DDRAM address
' move cursor position
' get animation "frame"
' write "frame"
' animation delay
' do it all over
' enter command mode
' output high nibble
' strobe the Enable line
' output low nibble
' return to character mode
cycle

Related parts for 27297