28128 Parallax Inc, 28128 Datasheet - Page 65
28128
Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet
1.28129.pdf
(176 pages)
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
- Current page: 65 of 176
- Download datasheet (3Mb)
So, now we know to multiply by 5 and divide by 255 for a 5 volt scale with 256 levels.
We can calculate the voltage from Figure 3-6 where the ADC0831’s output is 10100101
= 165. The measured voltage is:
To calculate and display this voltage using the BASIC Stamp, we’ll add some code to
both the
expressed in PBASIC code. Here is an example of some code that could reasonably be
expected to work.
This PBASIC calculation looks like it will give us the output we want, but it won’t. It’s
instructive to try it this way and see what happens. Modify the
subroutines in Program Listing 3.1 as follows:
We calculated that 165 would lead to a measured voltage of 3.24 volts. The 003 volts
shown in Figure 3-7 is only accurate to the nearest volt! What happened?
v = 5 * adcBits / 255
Calc_Volts:
RETURN
Display:
RETURN
Voltage
Calc_Volts
v = 5 * adcBits / 255
DEBUG HOME
DEBUG "8-bit binary value:
DEBUG CR, CR, "Decimal value:
DEBUG CR, CR, "DVM Reading:
=
5
×
255
165
and
=
Display
3.24
Volts
subroutines. First, the voltage equation needs to be
rounded
", BIN8 adcBits
to
", DEC3 v, " Volts"
two
", DEC3 adcBits
decimal
places
Calc_Volts
.
'
'
and
new line
new line
Display
Related parts for 28128
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: