28029 Parallax Inc, 28029 Datasheet - Page 296

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
Page 284 · Smart Sensors and Applications
SEROUT LcdPin, T9600, [LcdOn, LcdCls]
PAUSE 5
' Custom character subroutine values.
custChar = 3
line = Line0
cursor = 7
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
' -----[ Subroutine - Def_Vert_Bar_Char ]-------------------------------------
' Defines a vertical bar graph character based on the value variable
' (0 to 15) and the custChar variable, which selects the Parallax Serial
' LCD's custom characters between 0 and 7.
Def_Vert_Bar_Char:
FOR value = 0 TO 16
NEXT
DEBUG CR, CR
PAUSE 500
' Start define custom character
SEROUT LcdPin, T9600,
' Select a row map for the custom character based on value.
rowMap = %1111111100000000 >> (value & %1111)
' Send 8 bytes, each defining a dotted row in the custom character.
' row is determined by examining a bit in the rowMap variable, and then
' sending %11111 if the bit is 1, or %00000 if the bit is 0.
FOR index = 0 TO 7
NEXT
RETURN
DEBUG ? value
GOSUB Def_Vert_Bar_Char
GOSUB Disp_Cust_Char
PAUSE 50
IF rowMap.LOWBIT(index) = 1 THEN
ELSE
ENDIF
SEROUT LcdPin, T9600, [%11111]
SEROUT LcdPin, T9600, [%00000]
[Define + custChar]
' Initialize LCD
' 5 ms delay for clearing display
' Use Custom Character 3
' Cursor to Line0
' Cursor to 8th character
' Main loop
' value counts 0 to 16
' Display value in Debug Terminal
' Define bar graph character
' Display character on LCD
' Slow down the loop
' Spaces before next sequence
' Delay before next sequence
' Repeat main loop
' Repeat 7 times, index counts
' Examine next bit in rowMap
' If 1, send %11111
' Otherwise, send %00000
' Return from subroutine.
Each

Related parts for 28029