CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U19014EJ1V0UD
116
(i) When CR000 is used as a compare register
The value set in CR000 is constantly compared with the TM00 count value, and an interrupt request signal
(INTTM000) is generated if they match. The value is held until CR000 is rewritten.
(ii) When CR000 is used as a capture register
The count value of TM00 is captured to CR000 when a capture trigger is input.
As the capture trigger, an edge of a phase reverse to that of the TI000 pin or the valid edge of the TI010 pin
can be selected by using CRC00 or PRM00.
Figure 6-4. Format of 16-Bit Timer Capture/Compare Register 010 (CR010)
CR010
FF15H (CR010)
FF14H (CR010)
Address: FF14H, FF15H (CR010) After reset: 0000H R/W
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
(i) When CR010 is used as a compare register
The value set in CR010 is constantly compared with the TM00 count value, and an interrupt request signal
(INTTM010) is generated if they match.
(ii) When CR010 is used as a capture register
The count value of TM00 is captured to CR010 when a capture trigger is input.
It is possible to select the valid edge of the TI000 pin as the capture trigger. The TI000 pin valid edge is set
by PRM00.
Cautions 1. To use this register as a compare register, set a value other than 0000H to CR000 and
CR010.
2. The valid edge of TI010 and timer output (TO00) cannot be used for the P01 pin at the same
time. Select either of the functions.
3. If clearing of its 3 and 2 (TMC003 and TMC002) of 16-bit timer mode control register 00
(TMC00) to 00 and input of the capture trigger conflict, then the captured data is undefined.
4. To change the mode from the capture mode to the comparison mode, first clear the TMC003
and TMC002 bits to 00, and then change the setting.
A value that has been once captured remains stored in CR000 unless the device is reset. If
the mode has been changed to the comparison mode, be sure to set a comparison value.
5. CR000/CR010 does not perform the capture operation when it is set in the comparison
mode, even if a capture trigger is input to it.
electronic components distributor