27220 Parallax Inc, 27220 Datasheet - Page 100

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
' -----[ Program Code ]----------------------------------------------------
Main:
NEXT
char = LcdLine2
GOSUB LCD_Cmd
PAUSE 2
FOR idx = 0 TO 15
NEXT
RANDOM rndVal
addr = rndVal.LOWBYTE & $3F
tOut = rndVal.HIGHBYTE
char = LcdCGRam + addr
GOSUB LCD_Cmd
char = tOut
GOSUB LCD_Out
PAUSE 100
char = LcdCGRam + addr
GOSUB LCD_Cmd
GOSUB LCD_In
tIn = char
' display results
char = LcdLine1 + 5
GOSUB LCD_Cmd
temp = addr
width = 2
GOSUB Put_Val
char = LcdLine1 + 13
GOSUB LCD_cmd
temp = tOut
width = 3
GOSUB Put_Val
char = LcdLine2 + 13
GOSUB LCD_Cmd
temp = tIn
width = 3
GOSUB Put_Val
PAUSE 1000
LOOKUP idx, ["ADDR=??
GOSUB LCD_Out
LOOKUP idx, ["
GOSUB LCD_Out
OUT:???"], char
IN:???"], char
' generate random number
' create address (0 to 63)
' create test value
' set CGRAM pointer
' move the value to CGRAM
' reset CGRAM pointer
' read value from LCD
' show address @ L1/C5
' show output @ L1/C13
' show output @ L2/C13

Related parts for 27220