CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ6V0UD
207
(2) Capture/compare control registers 0, 1 (CRC0, CRC1)
CRCn controls the operation of 16-bit capture/compare register n (CRn0 and CRn1).
CRCn is set by an 8-bit or 1-bit memory manipulation instruction.
RESET input clears CRC0 and CRC1 to 00H.
After reset: 00H R/W
Address: FFFFF20AH, FFFFF21AH
7
6
5
4
3
2
1
0
CRCn
0
0
0
0
0
CRCn2
CRCn1
CRCn0
(n = 0, 1)
CRCn2
Selection of operation mode of CRn1
0
Operates as compare register
1
Operates as capture register
CRCn1
Selection of capture trigger of CRn0
0
Captured at valid edge of TIn1
1
Captured in reverse phase of valid edge of TIn0
CRCn0
Selection of operation mode of CRn0
0
Operates as compare register
1
Operates as capture register
Cautions 1. Before setting CRCn, be sure to stop the timer operation.
2.
When the mode in which the timer is cleared and started on a match between TMn and
CRn0 is selected by 16-bit timer mode control register n (TMCn), do not specify CRn0 as
a capture register.
3.
When both the rising edge and falling edge are specified for the TIn0 valid edge, the
capture operation does not work for the CRn0 register.
4.
For the capture trigger, a pulse longer than twice the count clock selected by prescaler
mode registers 0n, 1n (PRM0n, PRM1n) is required in order that the signals from TIn0
and T2n1 perform the capture operation correctly.
5.
Be sure to set bits 3 to 7 to 0.