28123 Parallax Inc, 28123 Datasheet - Page 88

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
Your Turn – A Pushbutton with a Pull-up Resistor
The circuit you just finished working with has a resistor connected to Vss. This resistor
is called a pull-down resistor because it pulls the voltage at P3 down to Vss (0 volts)
when the button is not pressed. Figure 3-9 shows a pushbutton circuit that uses a pull-up
resistor. This resistor pulls the voltage up to Vdd (5 volts) when the button is not
pressed. The rules are now reversed. When the button is not pressed,
number 1, and when the button is pressed,
P3
220
The 220 Ω resistor is used in the pushbutton example circuits to protect the BASIC Stamp
I/O pin. Although it’s a good practice for prototyping, in most products, this resistor is
replaced with a wire (since wires cost less than resistors).
Modify your circuit as shown in Figure 3-9.
Re-run ReadPushbuttonState.bs2.
Using the Debug Terminal, verify that
and 0 when the button is pressed.
Active-low vs. Active-high: This pushbutton Figure 3-9 is called active-low because it
sends the BASIC Stamp a low signal (Vss) when the button is active (pressed).
pushbutton circuit in Figure 3-6 the main activity is active-high because it sends a high
signal (Vdd) when the button is active (pressed).
Vdd
Vss
10
kΩ
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
X2
X3
Vdd
IN3
Vin
stores the number 0.
IN3
Vss
is 1 when the button is not pressed
Figure 3-9
Modified Pushbutton
Circuit
IN3
stores the
The

Related parts for 28123