28029 Parallax Inc, 28029 Datasheet - Page 40

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 28 · Smart Sensors and Applications
Example Program - TestScrollingSubroutine.bs2
' -----[ Title ]--------------------------------------------------------------
' Smart Sensors and Applications - TestScrollingSubroutine.bs2
' Scroll a text message across a four character wide window in the LCD.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ DATA Directives ]----------------------------------------------------
Message1
Message2
Message3
Message4
' -----[ I/O Definitions ]----------------------------------------------------
LcdPin
' -----[ Constants ]----------------------------------------------------------
T9600
LcdCls
LcdCr
LcdOff
LcdOn
Line0
Line1
TimeOn
TimeOff
' -----[ Variables ]----------------------------------------------------------
' Functional variables for Scroll_Message subroutine.
cursorStart
head
tail
pointer
character
Review the code blocks in the Main Routine of the program and predict how
wide the scrolling window will be, what text will be displayed, and how many
characters at a time the message will shift.
Enter, save, and run TestScrollingSubroutine.bs2.
Compare your predictions to what actually occurred and reconcile any
differences.
DATA @ 2, "Message "
DATA
DATA
DATA
PIN
CON
CON
CON
CON
CON
CON
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
"again"
"Larger message, going faster..."
14
84
12
13
21
22
128
148
250
0
Byte
Byte
Byte
Byte
Byte
' BASIC Stamp Directive
' PBASIC Directive
' LCD I/O pin
' True, 8-bits, no parity, 9600
' Form feed -> clear screen
' Carriage return
' Turns display off
' Turns display on
' Line 0, character 0
' Line 1, character 0
' Character on time
' Character fade time
' First character location
' Start of displayed text
' End of displayed text
' EEPROM address pointer
' Stores a character

Related parts for 28029