Specifications
PROGRAMMING
THE
S-lOO
A02l2
BOARn
There
are
16
I/O
ports (or
memory
locations,
depending
on
the
board
configuration) involved in
communicating
with the
A/D.
For
8
bit
systems,
these
are configured to provide
eight
possible
READ
and
WRITE
operations with
two
possible interchangeable locations
for
each
READ
and
WRITE.
The
READ
and
WRITE
Register assignments
are given following
this
section.
The
generalized algorithm for
sampling
an
AID
input
is:
1)
Set
Command
Port (Write Port 0 or
1)
to desired options
(gain
select;
auto sequence or load enable; external strobe
enable; interrupt enable for timer
1,2,
A/D
overrun or
AID
done;
and
WAIT
function enable).
2)
Set multiplexer address to desired input
line
(0
through
256). Write port 2 or 3 .
3)
Start
conversion. Output (or
store)
anything to
this
port. (Write port 4 or 5).
4)
Read
status
of
A/D.
This
is
bit
7 of
READ
port 0 or
1.
It
is
designated
A/D
DONE
and
will
become
1
when
the conver-
sion
is
complete.
5)
Read
low
B
bits
of
A/O
from
Read
port 2 or
3.
6)
Read
high
B
bits
of
A/O
from
Read
port 4 or
5.
The
timer
can
be
controlled as follows:
To
write to the
Data
Port of the
AM9513
timer,
use
WRITE
REGISTER
C or
O.
To
write to the
Command
Port
of
the
AM9513
timer.
use
WRITE
REGISTER
E or
F.
To
read
from
the
Data
Port of the
AM9513
timer,
use
READ
REGISTER
C or
O.
To
read
from
the
Command
Port of the
AM9513
timer,
use
READ
REGISTER
E or
F.
To
clear
timer flop 1, write to
WRITE
REGISTER
6 or
7.
To
clear
timer flop
2,
write to
WRITE
REGISTER
B or
g.
The
other function controlled
through
software
is
as
follows:
To
clear
the overrun flop, write to
WRITE
REGISTER
A or
B.
The
Register Assignments are given
on
the next
two
pages.
55