Specifications
A/O
WITH
AUTO-INCREMENTING
The
following
BASIC
program:
SETS
THE
BOARD
TO
THE
AUTO-INCREMENT
MODE.
STARTING
WITH
CHANNEL
0
AND
ENDING
WITH
CHANNEL
g.
IT
THEN
PERFORMS
CONTINUOUS
CONVERSIONS.
PRINTING
10
VALUES
IN
EACH
ROW
SO
CHANNEL
0
IS
IN
THE
FIRST
COLUMN.
CHANNEL
I
IN
THE
SECOND.
ETC.
The
switches
on
the daughter
board
are
set
to the
last
channel
to
be
converted in the increment sequence.
In
this
case a 9 (00001001).
lines
20
and
30
set
the
channel
select
address
on
the
board
to 255,
which
is
necessary since in the auto-incrementing
mode
this
address
is
automatically incremented before
each
conversion,
making
the
first
channel
converted
channel
O.
The
start
conversion in
line
30
;s
needed
since the
specified
channel
number
is
not acutal'y loaded into
this
register
until a conversion
is
performed.
line
40
sets
the
register
which
holds the starting
channel
in the auto increment sequence to
0;
therefore,
after
converting
channel
9. the next
channel
converted
will
be
O.
65
BASIC:
10
OUT(16)=04
20
OUT(18)=255
30
OUT(20)=00
40
OUT(18)=00
50
OUT(l6)=00
60
FOR
x=o
TO
9
70
OUT(20)=00
80
IF
IN(16)/12B=0
GOTO
80
90
A=IN(lB)
100
B=IN(20)
110
PRINTI%.A.B.
120
NEXT
X
130
PRINT
140
GOTO
60
Load
Enable
Set
Channel
Number
to
255
Start Conversion
Set
Channel
Number
to 0
Enable
Auto
Incrementing
9
is
the Last
Channel
to
be
Converted
Start Conversion
Wait
for
llDONE"
bi
t.
INPUT
Lo
Byte
INPUT
Hi
Byte
PRINT
Values
in
Hex
End
of
Row
Go
Back
and
Repeat
Process
Note:
Line
80
makes
special
use
of
INTEGER
BASIC
to
isolate
Bit 7
of
the input byte.