28129 Parallax Inc, 28129 Datasheet - Page 71
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: 71 of 176
- Download datasheet (3Mb)
This process could be repeated over and over again to get the digit in the ten-thousandth’s
place, the hundred-thousandth’s place, and so on.
Once the digit in the thousandth’s place is known, the rules for rounding apply as
follows:
Since the value
add 1 to the hundredth’s place. It turns out to be a decision on whether or not to add 1 to
v2
Since the value in the ones place is stored in a different value, we need to check and see if
adding one to the hundredth’s place increments that value. Without this code, 3.996
would round to 3.00 instead of 4.00.
Save this code, and if possible, leave the circuit as it is because we can use this DVM to
take measurements on the circuit we build in Chapter #4.
Resolution
The BASIC Stamp is now programmed to accurately calculate the voltage associated
with the ADC0831's binary output, and the calculation is accurate to the hundredth’s
decimal place. Although sources of calculation error have been eliminated, there is
another source of error that caused by the resolution limitation of the A/D converter.
The A/D converter chip we are using is capable of 256 binary values. This means that
each measured voltage gets rounded to one of 256 discrete values. The step size is the
as shown below.
•
•
•
If the digit in the thousandth’s decimal place is less than 5, don’t add 1 to the
hundredth’s decimal place.
If the digit in the thousandth’s decimal place is equal or more than 5, add 1 to the
hundredth’s decimal place.
In either case, truncate everything after the hundredth’s place.
IF (v3 >= 5) THEN v2 = v2 + 1
IF (v2 >= 100) THEN
ENDIF
v = v + 1
v2 = 0
v2
is already truncated, we just need code for deciding whether or not to
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: