C161U
Interrupt and Trap Functions
Preliminary Data Sheet
117
02.2000
PRELIMINARY
PRE
LI
M
INAR
Y
- E
XCE
RP
T
-
7.3
Operation of the PEC Channels
The C161U's Peripheral Event Controller (PEC) provides 8 PEC service channels, which
move a single byte or word. This is the fastest possible interrupt response and in many
cases is sufficient to service the respective peripheral request (eg. serial channels, etc.).
Each channel is controlled by a dedicated PEC Channel Counter/Control register
(PECCx) and a pair of pointers for source (SRCPx) and destination (DSTPx) of the data
transfer.
The PECC registers control the action that is performed by the respective PEC channel.
Note: For the PECCx register description, please also refer to
page 91 of Sub-
Byte/Word Transfer bit BWT controls, if a byte or a word is moved during a PEC service
cycle. This selection controls the transferred data size and the increment step for the
modified pointer.
Increment Control Field INC controls, if one of the PEC pointers is incremented after
the PEC transfer. It is not possible to increment both pointers, however. If the pointers
are not modified (INC=’00’), the respective channel will always move data from the same
source to the same destination.
Note: The reserved combination ‘11’ is changed to ‘10’ by hardware. However, it is not
recommended to use this combination.
The PEC Transfer Count Field COUNT controls the action of a respective PEC channel,
where the content of bit field COUNT at the time the request is activated selects the
action. COUNT may allow a specified number of PEC transfers, unlimited transfers or no
PEC service at all.
The table below summarizes, how the COUNT field itself, the interrupt requests flag IR
and the PEC channel action depends on the previous content of COUNT.
Previous
COUNT
Modified
COUNT
IR after PEC
service
Action of PEC Channel
and Comments
FF
H
FF
H
‘0’
Move a Byte / Word
Continuous transfer mode, ie. COUNT is not modified
FE
H..02H
FD
H..01H
‘0’
Move a Byte / Word and decrement COUNT
01
H
00
H
‘1’
Move a Byte / Word
Leave request flag set, which triggers another request
00
H
00
H
(‘1’)
No action!
Activate interrupt service routine rather than PEC channel.