|
Intro to Physical Computing Syllabus code, circuits, & construction
|
The BASIC Stamp |
|||
|
The BASIC Stamp is a micro controller, a small and very simple computer. Like any computer, it needs input devices and output devices, and power. The various pins on the BASIC stamp chip are where we attach these. These notes assume the user is using the BASIC Stamp 2, which has 16 input/output pins. Below is the diagram for the Stamp 2:
(The bottom of the stamp is the part with the big chip with many legs) PWR - Input power, 5-12V DC Electronic chips, or integrated circuits (IC's) like the stamp generally have their pins numbered in a U-shape, starting at the top left, moving down, and ending at the top right. So in the above diagram, the TX pin is pin 1, and the PWR pin is pin 24. This gets confusing when you start talking about the I/O pins (e.g. I/O pin 0 is actually physical pin 5). So make sure you are clear on which pin is which before you start wiring. Each of the input/output pins (P0 through P15) can be used as either an input or an output. As an input, a pin waits for voltage from an outside source. As an output, a pin generates voltage. As with any computer, input and output is binary, a series of 1's and 0's. Think of each as a switch: if an output is ON, it's sending a 1. if it's OFF, it's sending a 0. Likewise, if an input is getting voltage, it's ON, or receiving a 1, and when it's not getting voltage, it's OFF, or receiving a 0. The stamp operates on 5 volts direct current power (5V DC). So 5V of input is a 1, and less than that is 0. On the output side, a 1 is 5 volts, and a 0 is 0 volts. Using the stamp is very simple. First, you wire a power supply to it . Then, you attach input devices and output devices. Then you program it. Powering the stampThe stamp requires between 5 and 12 volts DC, wired to the power (PWR) and ground (GND) pins (physical pins 24 and 23; see diagram above). When properly powered, the stamp contains a power regulator that will produce 5V from the +5V pin (physical pin 21; see diagram). You can use this 5V as a source for various devices that you wire to the stamp. It doesn't produce a lot of current, however, so some devices may need to be powered separately. Generally, switches, LED's, transistors, and relays can be powered from this source without any problem; other devices, like motors, need a separate power source.
|
||||