
280
CHAPTER 12 MULTIFUNCTIONAL TIMERS
Table 12.3-4 Functions of Bits for Compare Control Register (Lower) (OCS0, OCS2, and OCS4)
Bit name
Function
bit7
bit6
IOP1 (corresponding to ch1),
IOP0 (corresponding to ch0):
Output compare interrupt
request flag bit
This bit is a flag that requests an interrupt.
If the compare register (OCCP) value and the counter value of the
16-bit free-running timer match, this bit is set to "1".
When this bit is set to "1" while the output compare interrupt enable
bit (IOE1, IOE0) is "1", an interrupt request is output.
If this bit is "0", an interrupt request is cleared.
If this bit is "1", operation is not affected.
A read-modify-write instruction always reads "1" from this bit.
bit5
bit4
IOE1 (corresponding to ch1),
IOE0 (corresponding to ch0):
Output compare interrupt
request enable bit
This bit enables an interrupt request.
When the output compare interrupt request flag bit (IOP1, IOP0) is
set to "1" while this bit is "1", an interrupt request is output.
bit3
bit2
-:
Undefined bit
When these bits are read, the values read from them are undefined.
The values set here do not affect operation.
bit1
bit0
CST1 (corresponding to ch1),
CST0 (corresponding to ch0):
Compare enable bit
This bit enables a compare operation between the compare register
(OCCP) value and the counter value of the 16-bit free-running timer.
Set a value to the compare register (OCCP) before enabling a
compare operation.
If this bit is "1", a compare operation is performed.
Note:
Because the output compare is synchronized with the 16-bit free-
running timer, a compare operation also is stopped when the
counter of the 16-bit free-running timer is stopped (TCCS:
STOP=1).