759
Chapter 37 Output Compare
1.Overview
Chapter 37 Output Compare
1. Overview
Output compare is a feature that compares the value set to the compare register with the count value of the
free-run timer, and reverses the level of the pins when they are equal.
2. Features
• Output wave form: Toggle output 4 channel
• Format: 16 bit compare register + Compare circuit
• Quantity: 4 groups = 8 channels (output compare channels 0/1, 2/3, 4/5, 6/7)
• Compatible timers:Output compare channels 0/1 use free-run timer 2
Output compare channels 2/3 use free-run timer 3
Output compare channels 4/5 use free-run timer 6
Output compare channels 6/7 use free-run timer 7
• Operation on compare match:
• Reversal of pin output value (toggle output)
• Free-run timer clear
• Interrupt generation
• Count precision: 4/F
CLKP
, 16/F
CLKP
, 32/ F
CLKP
, 64/ F
CLKP
(dependent on free-run timer)
• Toggle change width (T): 1 x count precision - 10000
H
x count precision
• Interrupt: Compare-match interrupt
• Others: Setting of initial output level value is possible (“H”/“L”)
Pins not used for OCU output can be used as general-use ports
0
0
1
1
Compare 0
Free-run Timer
Pin 0
Compare 1
Compare Latch
Latch
Pin 1
Compare
Clear
Match
Match
Toggle
Output
T
1
or T(max.)
T
1
T
2
(OCU0 Pin/OCU2 Pin)
(OCU1 Pin/OCU3 Pin)
T
2
T
1
(OCU1/OCU3)
Trigger output 4 channel
PWM Output 2 channel