ADC SUPER SIX S-100 Technical Manual page 79

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

Advertisement

Programming
(Continued)
2041-0160.0161
Trigqer Mode (Timer Mode Only). 03 selects
the trigger mode for timer operation. When 03
is reset to
0,
the timer is triggered automatic-
ally. The time constant word
IS
programmed
during an I/O write operation, which takes one
machine cycle. At the end
01
the write opera-
tion there is a setup delay
01
one clock period.
The timer starts automatically (decrements) on
the rising edge
01
the second clock pulse (T2)
of the machine cycle following the write opera-
tion. Once started, the timer runs contin-
uously. At zero count the timer reloads
automatically and continues counting without
interruption or delay, until stopped by a reset.
When 03 is set to I, the timer is triggered
externally through the CLKlTRG input. The
time constant word is programmed during an
I/O write operation, which takes one machine
cycle. The timer is ready lor operation on the
rising edge
01
the second clock pulse (T 2 ) of
the lollowing machine cycle. Note that the first
timer decrement lollows the active edge of the
CLKlTRG pulse by a delay time
01
one clock
cycle il a minimum setup time to the rising
edge of clock is met. II this minimum is not
met, the delay is extended by another clock
period. Consequently, lor immediate trigger-
ing, the CLK/TRG input must precede T 2 by
one clock cycle plus its minimum setup time. II
the minimum time is not met. the timer will
start on the third clock cycle (T3).
Once started the timer operates contin°
uously, without interruption or delay, until
stopped by a reset.
Time Constant to Follow. A 1 in 02 indicates
that the next word addressed to the selected
channel is a time constant data word lor the
time constant register. The time constant word
may be written at any time.
A
0
in
O
2 indicates no tirr.e constant word is
to lollow. This is ordinarily used when the
channel is already in operation and the new
channel control word is an update. A channel
will not operate without a time constant value.
The only way to write a time constant value is
to write a control word with 02 set.
::;W:J
I
~I ~ :
T~~
L,c,
TC.
fe,
Figure 6. Time Constant Word
Software Reset. Setting 0
1
to I causes a soft-
ware reset. which is described in the Reset
section.
Control Word. Setting
Do
to I identifies the
word as a control word.
Time Constant Programming. Belore a chan-
nel can start counting it must receive a time
constant word from the CPU. During program-
ming or reprogramming. a channel control
word in which bit
2
is set must precede the
time constant word to indicate that the next
word is a time constant. The time constant
word can be any value from I to
256
(Figure
6). Note that
0016
is interpreted as
256.
In timer mode, the time interval is controlled
by three factors:
• The system clock period
(.p)
• The prescaler lactor (P). which multiplies
the interval by either
16
or
256
• The time constant (T). which is programmed
into the time constant register
Consequently, the time interval is the pro-
duct
01
q,
x P x T. The minimum timer resolu-
tion is
16
x.p
(4 p.s with a 4 MHz clock). The
maximu m timer interval is
256
x
.p
x
256 (16.4
ms
with a 4 MHz clock). For longer intervals
timers may be cascaded.
Interrupt Vector Programming. II the
2-80
CTC has one or more interrupts enabled, it
can supply interrupt vectors to the
2-80
CPU.
To do so, the
2-80
CTC must be pre-pro-
grammed with the most-significant five bits
01
the interrupt vector. Programming consists
01
writing a vector word to the I/O port cor-
responding to the
2-80
CTC ChannelO. Note
that Do
01
the vector word is always zero, to
distinguish the vector from a channel control
word. 01 and 02 are not used in programming
the vector word. These bits are supplied by
the interrupt logic to identily the channel
requesting interrupt service with a unique
interrupt vector (Figure 7). Channel 0 has the
highest priority.
1~1~1~1~1~1~1~:~1
v v
=r-
L
0 ... INTERAUPTYECTOR WOAD
sUPP~iEJ
1 "
CONTROL WOAD
BV USER
CHANNEL IDENTIFIER
(AUTOMATICALL'f iNSERTED
IveTCI
o
0
CHANNEL 0
o
1
CHANNEL 1
1 0
CHANNEL 2
1
1
CHANNEL:I
Flgu.. 1. Interrupt Vector Word

Advertisement

Table of Contents
loading

Table of Contents