28128 Parallax Inc, 28128 Datasheet - Page 32

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
the wires for the pushbuttons cross relates to the way binary numbers are written, which
will be explained later in this experiment.
Program Listing 2.1 makes the left LED in Figure 2-3 light up when the left pushbutton is
pressed. Likewise, the right LED lights up when the right pushbutton is pressed. The
program also displays the activity of the pushbuttons in the Debug Terminal.
Programming the Project
Here is a more precise description of the program specifications for the pushbuttons and
LEDs.
The Debug Terminal can be used to display what the BASIC Stamp receives at pins P0
and P1.
receives as well as their decimal equivalents in the Debug Terminal.
Let's see how this can be done using PBASIC. Enter the Program Listing 2.1 into the
BASIC Stamp Editor, and save it as PL2_1R0.bs2. This stands for Program Listing 2.1
Revision 0. Make sure the Board of Education has power and the programming cable is
properly connected, then run the program.
When P0 receives a low signal, P5 should send a low signal.
When P0 receives a high signal, P5 should send a high signal.
When P1 receives a low signal, P4 should send a low signal.
When P1 receives a high signal, P4 should send a high signal.
DEBUG
commands are used to display the binary values the BASIC Stamp
Figure 2-3
Breadboard Example
Entering binary numbers on the pushbuttons will
be easiest if you orient the Board of Education
as shown.
Note that the left button is connected to pin P1,
and the right button is connected to P0.

Related parts for 28128