
278
CHAPTER 12 MULTIFUNCTIONAL TIMERS
Table 12.3-3 Functions of Bits for Compare Control Register (Upper) (OCS1, OCS3, and OCS5)
Bit name
Function
bit15
bit14
bit13
-:
Undefined bit
When these bits are read, the values read from them are undefined.
The values set here do not affect operation.
bit12
CMOD:
Pin output level inversion
mode setting bit
This bit is used to set the inversion mode of the pin output level upon
a match between the ch0/ch1 value of the compare register (OCCP)
and the counter value of the 16-bit free-running timer.
If this bit is "0", the RT0 pin corresponding to the compare register
(OCCP) ch0 and compare register (OCCP) ch1 inverts the output
level at the compare register (OCCP) value of each channel.
If this bit is "1", the RT00 pin corresponding to the compare register
(OCCP) ch0 inverts the output level at the compare register (OCCP)
value of ch0, the RT01 pin corresponding to the compare register
(OCCP) ch1 inverts the output level at the compare register (OCCP)
value of ch0/ch1.
If the compare register (OCCP) ch0 value and the compare register
(OCCP) ch1 value are the same, operation will be the same as when
only one compare register is used.
bit11
bit10
OTE1 (corresponding to ch1),
OTE0 (corresponding to ch0):
Pin output enable bit
These bits are used to enable output compare pin output.
If this bit is "0", the pin corresponding to each channel operates as an
I/O port.
If this bit is "1", the pin corresponding to each channel operates as an
output compare output pin.
Note:
To use a dead-time timer in the waveform generation block, the
operation mode setting bit (TMD2) of the 8-bit timer control
register (DTCR) needs to be set to "1".
bit9
bit8
OTD1 (corresponding to ch1),
OTD0 (corresponding to ch0):
Pin output level setting bit
These bits are used to set the pin output level of output compare.
If this bit is "0", the output compare pin output is set to "0".
If this bit is "1", the output compare pin output is set to "1".
Before making a setting, stop the output compare operation.
When these bits are read, the pin output values of output compare
are read.