28122 Parallax Inc, 28122 Datasheet - Page 57

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
Turning the LED On/Off with a Program
The example program makes the LED blink on and off one time per second.
introduces several new programming techniques at once. After running it, you will
experiment with different parts of the program to better understand how it works.
Example Program: LedOnOff.bs2
'What's a Microcontroller - LedOnOff.bs2
'Turn an LED on and off.
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "The LED connected to Pin 14 is blinking!"
P14
Enter the LedOnOff.bs2 code into the BASIC Stamp Editor.
Reconnect power to your Board of Education or HomeWork Board.
Run the program.
Verify that the LED flashes on and off once per second.
Disconnect power when you are done with the program.
Resistors are essential. Always remember to use a resistor. Without it, too much current
will flow through the circuit, and it could damage any number of parts in your circuit, BASIC
Stamp, or Board of Education or HomeWork Board.
470
Vss
LED
Repeat 1 time per second indefinitely.
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
X2
X3
Vdd
Vin
+
Vss
Figure 2-11
BASIC Stamp
Controlled LED
Circuit
The LED circuit’s
input is now
connected to a
BASIC Stamp I/O
pin instead of Vdd
or Vss.
It

Related parts for 28122