28129 Parallax Inc, 28129 Datasheet - Page 63

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
First, multiply each bit by its power of two from Table 3-1:
Second, add all 8 of the decimal values:
Now we know the binary number 10100101 is equal to the decimal number 165. To
display this conversion, a single
subroutine. Added lines are shown with a " ".
The command
Terminal to display two carriage returns followed by the message in quotes, followed
again by the 3-digit decimal value of
digits, the Debug Terminal will automatically display leading zeros since
specified. For example, the number 7 will display as 007, and the number 85 as 085, etc.
With some careful adjustment of the pot, we can check our work using output sample
shown in Figure 3-6.
128 x 1 = 128
64 x 0 = 0
32 x 1 = 32
16 x 0 = 0
8 x 0 = 0
4 x 1 = 4
2 x 0 = 0
1 x 1 = 1
128 + 0 + 32 + 0 + 0 + 4 + 0 + 1 = 165
Display:
RETURN
DEBUG HOME, "8 bit binary value:
DEBUG CR, CR, "Decimal value:
DEBUG CR, CR, "Decimal value:
DEBUG
adcBits
command can be added to the
. If the actual number only has one or two
", DEC3 adcBits
", BIN8 adcBits
", DEC3 adcBits
tells the Debug
'
new line
DEC3
Display
was

Related parts for 28129