28128 Parallax Inc, 28128 Datasheet - Page 34

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
So how do you count from decimal-0 to decimal-3 using the binary pushbuttons? The
two-bit binary equivalent of decimal-0 is 00. When you don’t press either of the
pushbuttons, the decimal output is 0 in the Debug Terminal. When you press the right
button, you get 01, which has a decimal equivalent of 1. When you press the left button,
you get 10, which has a decimal equivalent of 2. When you press both pushbuttons, you
get 11, which has a decimal equivalent of 3.
About the Code
As with the program of the previous chapter, the first lines start with an apostrophe, so
they are comments and compiler directives, and the BASIC Stamp ignores them.
' Basic Analog and Digital - PL2_1R0.bs2
' Program Listing 2.1 Revision 0.
' {$STAMP BS2}
' {$PBASIC 2.5}
Figure 2-4
Debug Terminal
Output for Program
Listing 2.1

Related parts for 28128