27220 Parallax Inc, 27220 Datasheet - Page 78

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
Program: SW21-EX10-Clock.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
'
' This program takes an external 1 Hz signal from the pulse generator and
' synthesizes a simple clock/timer. This code will run, unmodified, on and
' BS2-family module.
' -----[ I/O Definitions ]-------------------------------------------------
Segs
Digs
Tic
' -----[ Constants ]-------------------------------------------------------
Blank
DecPnt
IsHigh
IsLow
' -----[ Variables ]-------------------------------------------------------
nTic
oTic
xTic
secs
time
theDig
' -----[ EEPROM Data ]-----------------------------------------------------
'
'
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
VAR
VAR
PIN
CON
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
VAR
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
OUTL
OUTC
15
%00000000
%10000000
1
0
Bit
Bit
Bit
Word
Word
Nib
%00111111
%00000110
%01011011
%01001111
%01100110
%01101101
%01111101
%00000111
.GFEDCBA
--------
' Segments on P0 - P7
' Digit control pins
' 1 Hz input
' all segments off
' decimal point on
' new tic input
' old tic value
' change (1 when 0 -> 1)
' seconds
' formatted time
' current display digit
' digit patterns

Related parts for 27220