ADC SUPER SIX S-100 Technical Manual page 78

Single board computer
Hide thumbs Also See for SUPER SIX S-100:
Table of Contents

Advertisement

Programming
Each
2-80
eTe channel must be pro-
grammed prior to operation. Programming
consists of writing two words to the I/O port
that cqrresponds to the desired channel. The
first word is a control word that selects the
operating mode and other parameters; the
second word is a time constant, which is a
binary data word with a value from I to 256. A
time constant word must be preceded by a
channel control word.
After initialization, channels may be
reprogrammed at any time. If updated control
and time constant words are written to a chan-
nel during the count operation, the count con-
tinues to iero before the new time constant is
loaded into the counter.
If the interrupt on any
2-80
CTC channel is
enabled, the programming procedure should
also include an interrupt vector. Only one vec-
tor is required for all four channels, because
the interrupt logic automatically modifies the
vector for the channel requesting service.
A control word is identified by a 1 in bit O.
A
0
in bit 2 indicates a time constant word is to
foIIow_
Interrupt vectors are always addressed
to Channel
0,
and identified by a
0
in bit
O.
Addr811Sing. During programming, channels
are addre.ed with the channel select pins CS}
and
CS:2.
A
2-bit binary code selects the
tlPP'apriate channel as shown in the following
table.
Channel
CSI
CSo
0
0
°
1
0
I
2
I
°
3
I
1
BeMt.
The CTC has both hardware and soft-
ware resets. The hardware reset terminates all
clown-cot.tnk and disables all CTC interrupts
by resetting the interrupt bits in the control
registers. In addition, the ZC/TO and Interrupt
outputs go inactive, lEO reflects lEI, and
Do-D7 go to the high-impedance state. All
channels must be completely reprogramp1ed
after a hardware reset.
The software reset is controlled by bit 1 in
the channel control word. When a channel
receives a software reset, it stops counting.
When a software reset is used, the other bits in
the ccntrol word also change the contents of
the channel control register. After a software
reset a new time constant word must be written
to the same channel.
If the channel control word has both bits D}
and D2 set to I, the addressed channel stops
operating, pending a new time constant word.
The channel is ready to resume after the new
constant is programmed. In timer mode, if
D3 = 0, operation is triggered automatically
when the time constant word is loaded.
Channel Control Word Programming. The
channel control word is shown in Figure 5. It
sets the modes and parameters described
below.
Interrupt Enable. D7 enables the interrupt, so
that an interrupt output (INT) is generated at
zero count. Interrupts may be programmeo. in
either mode and may be enabled or disabled
at any time.
Operating Mode.
DB
selects either timer or
counter mode.
Prescaler Factor. (Timer Mode Only). Ds
selects factor-either 16 or 256.
Trigger Slope. D4 selects the active edge or
slope of the CLK/TRG input pulses. Note that
reprogramming the CLK/TRG slope during
operation is equivalent to issuing an active
edge. If the trigger slope is changed by a con-
trol word update while a channel is pending
operation in timer mode, the result is the same
as a CLK/TRG pulse and the timer starts.
Similarly, if the channel is in counter mode,
the counter decrements.
1~1~1~1~1~1~1~1~1
lllTOIIIIUl'T
JJ
t
L
C
TROLOR VRCTOR
1 ENABLES INTERRUPT
0
VECTOR
o
DISABLES INTE::
=TAOL WORD
o
SELECTS TIMER MODE
0
III
CONTINUED OPERATION
1 SELECTS COUNTER MODE
1 .. SOFTWARE RESET
~U"V'LUI:"
T. . COIIS1'AIIT
t ""' VALUE OF 251
0 • NO TIME CONSTANT FOLLOWS
o '"
VALUE OF ,.
11 ... TIME CONSTANT FOLLOWS
CLlUTItG .G•• ULRCTION
o
SELECTS
FALlINa EDGE
, SELECTS RtlfNG EDGE
TIMJIt ............
o ..
AUTOMATIC .AIOOEIII WHEN
TIME CONSTANT IS LOADED
1 ... CLKlTIIIQ PULSE STA.RTS TIMEIII
~T1MER
MODE ONLY
Flllllftt 5. Cbcum.l Control Word.
2041·0159

Advertisement

Table of Contents
loading

Table of Contents