
C165UTAH
Interrupt and Trap Functions
Data Sheet
114
2001-02-23
The PEC transfer counter allows to service a specified number of requests by the
respective PEC channel, and then (when COUNT reaches 00
H
) activate the interrupt
service routine, which is associated with the priority level. After each PEC transfer the
COUNT field is decremented and the request flag is cleared to indicate that the request
has been serviced.
Continuous transfers
are selected by the value FF
H
in bit field COUNT. In this case
COUNT is not modified and the respective PEC channel services any request until it is
disabled again.
When COUNT is decremented from 01
H
to 00
H
after a transfer, the request flag is not
cleared, which generates another request from the same source. When COUNT already
contains the value 00
H
, the respective PEC channel remains idle and the associated
interrupt service routine is activated instead. This allows to choose, if a level 15 or 14
request is to be serviced by the PEC or by the interrupt service routine.
Note:
PEC transfers are only executed, if their priority level is higher than the CPU level,
ie. only PEC channels 7...4 are processed, while the CPU executes on level 14.
All interrupt request sources that are enabled and programmed for PEC service
should use different channels. Otherwise only one transfer will be performed for
all simultaneous requests. When COUNT is decremented to 00
H
, and the CPU is
to be interrupted, an incorrect interrupt vector will be generated.
The source and destination pointers
specifiy the locations between which the data is
to be moved. A pair of pointers (SRCPx and DSTPx) is associated with each of the 8
PEC channels. These pointers do not reside in specific SFRs, but are mapped into the
internal RAM of the C165UTAH just below the bit-addressable area (see figure below).