28122 Parallax Inc, 28122 Datasheet - Page 155

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
LOOP UNTIL IN7 = 0
DEBUG CR, CR, CR, "The RC decay time was ",
END
How PolledRcTimer.bs2 Works
Two variables are declared. The
the capacitor to discharge through R
while the capacitor is charging.
The command
successive measurements.
“Capacitor charging…”
down while the capacitor is charging. As the capacitor charges, the voltage across its
terminals increases toward anywhere between 2.5 and 4.9 V (depending on the value of
R
A message announces when the decay starts getting polled.
In order to let the capacitor discharge itself through the R
from
sense high or low signals. As soon as the I/O pin releases the circuit, the capacitor
i
).
DEBUG ? IN7
DEBUG DEC5 timeCounter, CR, CRSRUP, CRSRUP
HIGH
DEC timeCounter, CR,
"tenths of a second.", CR, CR
timeCounter
counter
DEBUG CLS
HIGH 7
DEBUG "Capacitor Charging...", CR
FOR counter = 5 TO 0
NEXT
DEBUG CR, CR, "Measure decay time now!", CR, CR
PAUSE 1000
DEBUG DEC2 counter, CR, CRSRUP
to
INPUT
DEBUG CLS
. As an input, the I/O pin, has no effect on the circuit, but it can
clears the Debug Terminal so that it doesn’t get cluttered with
VAR
VAR
HIGH 7
message is displayed. After that, a
timeCounter
sets P7 high and starts charging the capacitor, then a
Word
Nib
i
.
The
counter
variable is used to track how long it takes
variable is used to count down
i
resistor, the I/O pin is changed
FOR…NEXT
loop counts

Related parts for 28122