28029 Parallax Inc, 28029 Datasheet - Page 287

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
' -----[ Subroutine - Def_Horiz_Bar_Char ]------------------------------------
Def_Horiz_Bar_Char:
value = value MAX 80
charCnt = value / 5
custChar = 3
IF charCnt > 0 THEN
ENDIF
' Display Custom Character 2 with a certain number of black columns.
cursor = charCnt
custChar = value // 5
' Choose bit pattern for custom character definition
LOOKUP custChar,
custChar = 2
GOSUB Def_Horiz_Bar_Char
GOSUB Disp_Cust_Char
' Print over everything to the right with spaces.
IF (charCnt + 1) < 15 THEN
ELSEIF value = 80 THEN
ELSEIF charCnt = 14 THEN
ENDIF
RETURN
SEROUT LcdPin, T9600,
FOR index = 0 TO 7
NEXT
RETURN
FOR cursor = 0 TO charCnt - 1
NEXT
FOR cursor = (charCnt + 1) TO 15
NEXT
SEROUT LcdPin, T9600,
SEROUT LcdPin, T9600, [line + 15, " "]
SEROUT LcdPin, T9600, [dotLine]
GOSUB Disp_Cust_Char
SEROUT LcdPin, T9600,
[%00000, %10000, %11000, %11100, %11110],
dotLine
[Define + custChar]
[line + cursor, 3]
[line + cursor, " "]
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 275
' Limit value - 0 to 80
' Number of black bars
' Choose black custom character
' If black bars to print then
' Print charCnt - 1 black bars
' Print the black bar
' Place cursor
' How many 5ths of a bar?
' Set custom character to 2
' Define the custom character
' Display the custom character
' Partial char left of char 15?
' Fill to right with " "
' Special case: value = 80
' Special case: 75 <= value <= 80
' Define custom character
' 7 bytes, define 7 dotted lines
' Send it to the LCD

Related parts for 28029