
80C196KB USER’S GUIDE
SOFTWARE TIMERS
The HSO can be programmed to generate interrupts at
preset times. Up to four such ‘‘Software Timers’’ can be
in operation at a time. As each preprogrammed time is
reached, the HSO unit sets a Software Timer Flag. If
the interrupt bit in the HSO command register was set
then a Software Timer Interrupt will also be generated.
The interrupt service routine can then examine I/O
Status register 1 (IOS1) to determine which software
timer expired and caused the interrupt. When the HSO
resets Timer2 or starts an A/D conversion, it can also
be programmed to generate a software timer interrupt.
If more than one software timer interrupt occurs in the
same time frame, multiple status bits will be set. Each
read or test of any bit in IOS1 (see Figure 9-5) will clear
bits 0 through 5. Be certain to save the byte before
testing it unless you are only concerned with 1 bit. See
also Section 11.5.
9.2 HSO CAM
A block diagram of the HSO unit is shown in Figure 9-
3. The Content Addressable Memory (CAM) file is the
center of control. One CAM register is compared with
the timer values every state time, taking 8 state times to
compare all CAM registers with the timers. This de-
fines the time resolution of the HSO to be 8 state times
(1.33 microseconds at an oscillator frequency of 12
MHz).
Each CAM register is 24 bits wide. Sixteen bits specify
the time at which the action is to be carried out, one bit
for the lock bit and 7 bits specify both the nature of the
action and whether Timer1 or Timer2 is the reference.
The format of the command to the HSO unit is shown
in Figure 9-1. Note that bit 5 is ignored for command
channels 8 through 0FH.
To enter a command into the CAM file, write the 8-bit
‘‘Command Tag’’ into location 0006H followed by the
time the action is to be carried out into word address
0004H. The typical code would be:
LDB HSO COMMAND,
#
what to do
ADD HSO TIME,Timer1,
#
when to do it
270651 – 24
HIGH SPEED OUTPUT CONTROLS
6 PINS
4 SOFTWARE TIMERS
2 INTERRUPTS
INITIATE A/D CONVERSION
RESET TIMER2
Figure 9-3. High Speed Output Unit
42
数控原理与维修
http://www.agreenleaf.cn
Содержание 80C196KB Series
Страница 1: ...November 1990 80C196KB User s Guide Order Number 270651 003 http www agreenleaf cn...
Страница 59: ...80C196KB USER S GUIDE Figure 11 7 Ideal A D Characteristic 270651 37 55 http www agreenleaf cn...
Страница 60: ...80C196KB USER S GUIDE Figure 11 8 Actual and Ideal Characteristics 270651 38 56 http www agreenleaf cn...
Страница 61: ...80C196KB USER S GUIDE Figure 11 9 Terminal Based Characteristic 270651 39 57 http www agreenleaf cn...
Страница 70: ...80C196KB USER S GUIDE Figure 13 5 Reset Sequence 80C196KB Reset Sequence 270651 45 66 http www agreenleaf cn...
Страница 83: ...80C196KB USER S GUIDE 270651 80 Figure 15 14 AC Timing Diagrams 79 http www agreenleaf cn...
Страница 84: ...80C196KB USER S GUIDE 270651 81 270651 84 Figure 15 14 AC Timing Diagrams Continued 80 http www agreenleaf cn...