28123 Parallax Inc, 28123 Datasheet - Page 159

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
Programming RC-Time Measurements
The BASIC Stamp program to measure the potentiometer’s resistance will do essentially
the same thing that you did by hand in Activity #2. The equivalent of pressing and
holding the pushbutton is a
is the BASIC Stamp module’s way of letting go of the pushbutton and polling until the
capacitor’s voltage gets low enough to pass the threshold voltage of
Example Program: ReadPotWithRcTime.bs2
' What's a Microcontroller - ReadPotWithRcTime.bs2
' Read potentiometer in RC-time circuit using RCTIME command.
' {$STAMP BS2}
' {$PBASIC 2.5}
time VAR Word
DO
LOOP
HIGH 7
PAUSE 100
RCTIME 7, 1, time
DEBUG HOME, "time = ", DEC5 time
Enter and run ReadPotWithRcTime.bs2
Try rotating the potentiometer’s input shaft while monitoring the value of the
time
variable using the Debug Terminal.
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
X2
X3
HIGH
command followed by a
Vin
Vss
Figure 5-12
Wiring Diagram for
Figure 5-11
PAUSE
. The
IN7
RCTIME
(1.4 V).
command

Related parts for 28123