28029 Parallax Inc, 28029 Datasheet - Page 288

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 276 · Smart Sensors and Applications
' -----[ Subroutines - Disp_Cust_Char ]---------------------------------------
' This subroutine displays a custom character.
' be set to either Line0 or Line1, and the cursor variable can be set
' to a value between 0 and 15.
' LCD's custom characters and should be set to a value between 0 and 7.
Disp_Cust_Char:
How HorizBarGraph.bs2 Works
The LCD's Custom Character 2 is reserved for displaying one of five different custom
character definitions, but Custom Character 3 will always use the same definition, to have
all its pixels black. With this in mind, a code block was added to the Initialization section
that defines the LCD's Custom Character 3 using the
This subroutine makes 8 identical copies of the 5-pixel row stored by the
variable to build the custom character. After that, the line variable is set to place the
cursor on the top row, and the program displays a user prompt to "Enter values (0 to 80)",
followed by a carriage return.
The Main Routine is a
decimal values entered into the Debug Terminal's Transmit windowpane. Then it calls the
Bar_Graph
SEROUT LcdPin, T9600,
RETURN
custChar = 3
dotLine = %11111
GOSUB Def_Horiz_Bar_Char
line = Line0
DEBUG "Enter values (0 to 80)", CR
' -----[ Main Routine ]---------------------------------------------
DO
LOOP
[line + cursor, custChar]
DEBUG ">"
DEBUGIN DEC value
GOSUB Bar_Graph
subroutine.
DO
...
LOOP
that repeatedly displays the
The custChar variable selects one of the
' Main loop
' Value from Transmit windowpane
' Display as bar graph
' Repeat main loop
' Print custom character
' Select Custom Character 3
' Black all pixels in each line
' Character define subroutine
' BarGraph on Line 0.
The line variable can
Def_Horiz_Bar_Char
">"
prompt, and then gets
subroutine.
dotLine

Related parts for 28029