Datasheet

78K0/Ix2 CHAPTER 7 16-BIT TIMER/EVENT COUNTER 00
R01UH0010EJ0500 Rev.5.00 277
Feb 28, 2012
7.4.4 Operation in clear & start mode entered by TI000 pin valid edge input
When bits 3 and 2 (TMC003 and TMC002) of 16-bit timer mode control register 00 (TMC00) are set to 10 (clear & start
mode entered by the TI000 pin valid edge input) and the count clock (set by PRM00) is supplied to the timer/event counter,
TM00 starts counting up. When the valid edge of the TI000 pin is detected during the counting operation, TM00 is cleared
to 0000H and starts counting up again. If the valid edge of the TI000 pin is not detected, TM00 overflows and continues
counting.
The valid edge of the TI000 pin is a cause to clear TM00. Starting the counter is not controlled immediately after the
start of the operation.
CR000 and CR010 are used as compare registers and capture registers.
(a) When CR000 and CR010 are used as compare registers
Signals INTTM000 and INTTM010 are generated when the value of TM00 matches the value of CR000 and
CR010.
(b) When CR000 and CR010 are used as capture registers
The count value of TM00 is captured to CR000 and the INTTM000 signal is generated when the valid edge is
input to the TI010 pin (or when the phase reverse to that of the valid edge is input to the TI000 pin).
When the valid edge is input to the TI000 pin, the count value of TM00 is captured to CR010 and the INTTM010
signal is generated. As soon as the count value has been captured, the counter is cleared to 0000H.
Caution Do not set the count clock as the valid edge of the TI000 pin (PRM001 and PRM000 = 11). When
PRM001 and PRM000 = 11, TM00 is cleared.
Remarks 1. For the setting of the I/O pins, refer to 7.3 (6) Port mode register 0 (PM0).
2. For how to enable the INTTM000 signal interrupt, refer to CHAPTER 18 INTERRUPT FUNCTIONS.
(1) Operation in clear & start mode entered by TI000 pin valid edge input
(CR000: compare register, CR010: compare register)
Figure 7-23. Block Diagram of Clear & Start Mode Entered by TI000 Pin Valid Edge Input
(CR000: Compare Register, CR010: Compare Register)
Timer counter
(TM00)
Clear
Output
controller
Note
Edge
detection
Compare register
(CR010)
Match signal
Match signal
Interrupt signal
(INTTM000)
Interrupt signal
(INTTM010)
TI000 pin
Compare register
(CR000)
Operable bits
TMC003, TMC002
Count clock
TO00 output
Note
TO00 pin
Note
Note 78K0/IB2 (30 pins) only