28029 Parallax Inc, 28029 Datasheet - Page 289

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
The
it on the LCD with a bar graph display.
Def_Cust_Char
activity. The
The first step in the
is first clamped to 80 or less. Next, the
characters that have to be printed, which is 1/5 of the
variable has to be set equal to three, since Custom Character 3 stores the black character.
If
be printed, and a
Remember, this subroutine depends on two variables:
of
loop's
increases by 1, which causes the
notch to the right each time it is called, thereby filling black characters from left to right.
charCnt
charCnt
1. Fill any black characters from left to right. For example, if the
2. Continuing with the example, the sixth LCD character will have three vertical
3. All characters not needed to represent the value on the bar graph have to be
Bar_Graph
index
set to 28, five LCD characters (with 5 vertical black lines each) have to be
blackened.
lines. Remember, Custom Character 2 is used to display one of five character
definitions shown in Figure 7-2. The number of black columns in the character is
the remainder is the remainder of
from a
to 2 and the
rows in the character. After the character is redefined, it can then be printed.
cleared with the space " " character. In this
clearing everything between the right of the sixth character and the 15th
character. While this only absolutely necessary the previous
than the current
' -----[ Subroutine - Bar_Graph ]-----------------------------------
Bar_Graph:
' Fill from left with black bars
value = value MAX 80
is larger than 0, it means there will be some all-black characters that have to
was set before the
Bar_Graph
variable. Each time through the
LOOKUP
subroutine takes whatever is stored in the
and
FOR
Bar_Graph
Disp_Cust_Char
Def_Horiz_Bar_Char
...
table and copies it to the
value
NEXT
subroutine consists of three major steps:
, the program does it every time through the loop.
FOR
loop repeatedly calls the
subroutine is to fill black characters. The
Disp_Cust_Char
...
NEXT
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 277
subroutines that were introduced in the previous
charCnt
loop, and the cursor variable is the
value // 5
subroutine copies this bit pattern to all 8
' Limit value - 0 to 80
dotLine
FOR
This subroutine relies on both the
variable stores the number of black
subroutine to place the cursor one
...
value = 28
cursor
NEXT
. This result selects a bit pattern
value
variable. Then
value
Disp_Cust_Char
loop, the
and
variable. The
variable and represents
custChar
example, that means
value
value
cursor
custChar
value
. The value
subroutine.
FOR
variable is
custChar
is smaller
variable
variable
...
NEXT
is set

Related parts for 28029