28123 Parallax Inc, 28123 Datasheet - Page 84

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
ACTIVITY #2: READING A PUSHBUTTON WITH THE BASIC STAMP
In this activity, you will connect a pushbutton circuit to the BASIC Stamp and display
whether or not the pushbutton is pressed. You will do this by writing a PBASIC program
that checks the state of the pushbutton and displays it in the Debug Terminal.
Parts for a Pushbutton Circuit
(1) Pushbutton - normally open
(1) Resistor – 220 Ω (red-red-brown)
(1) Resistor – 10 kΩ (brown-black-orange)
(2) Jumper wires
Building a Pushbutton Circuit for the BASIC Stamp
Figure 3-6 shows a pushbutton circuit that is connected to BASIC Stamp I/O pin P3.
LED
Can you really do that with the LED? Up until now, the LED’s cathode has always been
connected to Vss.
connected to Vdd. People often ask if this breaks any circuit rules, and the answer is no.
The electrical pressure supplied by Vdd and Vss is 5 volts. The diode will always use 1.6
volts, and the resistor will always use 3.4 volts, regardless of their order.
Build the circuit shown in Figure 3-6.
Vdd
Vss
470
1, 4
2, 3
Now, the LED is in a different place in the circuit, with its anode
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
X2
X3
Vdd
Vin
Vss
+
Figure 3-5
LED that Gets
Shorted by
Pushbutton

Related parts for 28123