28123 Parallax Inc, 28123 Datasheet - Page 107

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
Project
Solutions
1. Modify ReactionTimer.bs2 so that it is a two player game. Add a second button
Q1. Sending uses the BASIC Stamp I/O pin as an output, whereas receiving uses the
Q2. Normally open means the pushbutton's normal state (not pressed) forms an open
Q3. When pressed, the gap between the terminals is bridged by a conductive metal.
Q4.
Q5.
Q6.
Q7. The
E1. The
E2. Replace
P1. First, a button was added for the second player, wired to Stamp I/O pin P4. The
wired to P4 for the second player.
I/O pin as an input.
circuit.
Current can then flow through the pushbutton.
IN3
it to Vss.
DEBUG ? IN3
IF...THEN...ELSE
Terminal.
PAUSE 250.
¼ s), to
pushbutton state, and does not use the value to make decisions, it does not matter
whether the resistor is a pull-up or a pull-down. The
display the button state either way.
schematic is based on Figure 3-14 on page 90.
DO
LOOP
DO
LOOP
= 1 when pushbutton connects it to Vdd.
DO...LOOP
DEBUG ? IN6
PAUSE 250
HOME
DEBUG ? IN3
PAUSE 1000
PAUSE 1000
IN3
formatter sends the cursor to the top left position in the Debug
To repeat every second, change the
with
sends the value of
in the program repeats every ¼ second because of the command
IN6
and
(1000ms = 1 s).
, to read I/O pin P6. The program only displays the
IF...ELSEIF...ELSE.
IN3
to the Debug Terminal.
IN3
PAUSE 250
= 0 when pushbutton connects
DEBUG
(250ms = 0.25 s =
statement will

Related parts for 28123