28129 Parallax Inc, 28129 Datasheet - Page 69

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
All that remains to be done is to correct the rounding error in the hundredth’s place. This
rounding problem can be corrected by adding the segment of code shown below to the
Calc_Volts
Calc_Volts:
RETURN
v = 5 * adcBits / 255
r = 5 * adcBits // 255
v2 = 100 * r / 255
v3 = 100 * r // 255
v3 = 10 * v3 / 255
IF (v3 >= 5) THEN v2 = v2 + 1
IF (v2 >= 100) THEN
ENDIF
subroutine.
v = v + 1
v2 = 0
'
'
'
'
'
'
'
new line
new line
new line
new line
new line
new line
new line
Figure 3-8
Debug
Terminal
Output for
Program
Listing 3.1,
Revision 3.

Related parts for 28129