28129 Parallax Inc, 28129 Datasheet - Page 65
28129
Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet
1.28129.pdf
(176 pages)
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
- 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 28129
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: