28029 Parallax Inc, 28029 Datasheet - Page 301

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
' -----[ Variables ]----------------------------------------------------------
custChar
index
rowMap
cursor
value
line
' -----[ Initialization ]-----------------------------------------------------
PAUSE 100
SEROUT LcdPin, T9600, [LcdOn, LcdCls]
PAUSE 5
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
' -----[ Subroutines - Bar_Graph_H_V ]---------------------------------------
' Defines and displays two axis bar graph characters based on the value of
' the cursor (0 to 16) and value (1 to 31).
' Horizontal_Placement.
Bar_Graph_H_V:
DEBUG "Enter horizontal",
DEBUGIN DEC cursor
DEBUG "Enter vertical",
DEBUGIN DEC value
GOSUB Bar_Graph_H_V
SEROUT 14, 84, [LcdCls]
PAUSE 5
' Decide whether to display on Line 0 or Line 1.
IF value >= 16 THEN line = Line0 ELSE Line = Line1
GOSUB Def_Vert_Bar_Char
GOSUB Horizontal_Placement
IF value = 16 THEN
value = 1
custChar = 2
CR, "value (0 TO 16)"
CR, "value (1 TO 31)"
VAR
VAR
VAR
VAR
VAR
VAR
Byte
Nib
Byte
Byte
Byte
Byte
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 289
' Initialize LCD
' Call Bar_Graph_H_V
' Custom charcter selector
' Eeprom index variable
' 5-pixel dotted line
' Cursor placement
' Value to be graphed
' Line0 or Line1
' Debounce power supply
' 5 ms delay for clearing display
' Main loop
' Prompt for character offset
' Get character offset
' Prompt user for value
' Get value
' Repeat main loop
Calls Def_Vert_Bar_Char, and
' Clear previous plot
' 5 ms delay for clearing display
' Define custom character
' Special case: value = 16
' Line 0 display

Related parts for 28029