181
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
(1) Capture/compare register 00 (CR00)
CR00 is a 16-bit register which has the functions of both a capture register and a compare register. Whether
it is used as a capture register or as a compare register is set by bit 0 (CRC00) of capture/compare control
register 0 (CRC0).
When CR00 is used as a compare register, the value set in the CR00 is constantly compared with the 16-
bit timer register (TM0) count value, and an interrupt request (INTTM00) is generated if they match. It can
also be used as the register which holds the interval time when TM0 is set to interval timer operation, and
it can be used as the register which sets the pulse width when TM0 is set to PWM output operation.
When CR00 is used as a capture register, it is possible to select the valid edge of the INTP0/TI00 pin or the
INTP1/TI01 pin as the capture trigger. The INTP0/TI00 or INTP1/TI01 valid edge is set by means of external
interrupt mode register 0 (INTM0).
If CR00 is specified as a capture register and capture trigger is specified to be the valid edge of the INTP0/
TI00 pin, the situation is as shown in the following table.
Table 8-5. INTP0/TI00 Pin Valid Edge and CR00 Capture Trigger Valid Edge
ES11
ES10
INTP0/TI00 Pin Valid Edge
CR00 Capture Trigger Valid Edge
0
0
Falling edge
Rising edge
0
1
Rising edge
Falling edge
1
0
Setting prohibited
1
1
Both rising and falling edges
No capture operation
CR00 is set by a 16-bit memory manipulation instruction.
After RESET input, the value of CR00 is undefined.
Cautions 1. Set the data of PWM (14 bits) to the higher 14 bits of CR00. At this time, clear the lower
2 bits to 00.
2. Set a value other than 0000H to CR00. When the event counter function is used, therefore,
one pulse cannot be counted.
3. If the new value of CR00 is less than the value of the 16-bit timer register (TM0), TM0
continues counting, overflows, and then starts counting again from 0. If the new value
of CR00 is less than the old value, the timer must be restarted after changing the value
of CR00.
(2) Capture/compare register 01 (CR01)
CR01 is a 16-bit register which has the functions of both a capture register and a compare register. Whether
it is used as a capture register or a compare register is set by bit 2 (CRC02) of capture/compare control register
0.
When CR01 is used as a compare register, the value set in the CR01 is constantly compared with the 16-
bit timer register (TM0) count value, and an interrupt request (INTTM01) is generated if they match.
When CR01 is used as a capture register, it is possible to select the valid edge of the INTP0/TI00 pin as the
capture trigger. The INTP0/TI00 valid edge is set by means of external interrupt mode register 0 (INTM0).
CR01 is set with a 16-bit memory manipulation instruction.
After RESET input, the value of CR01 is undefined.
Summary of Contents for PD78052
Page 2: ...2 MEMO ...
Page 8: ...8 MEMO ...
Page 16: ...16 MEMO ...
Page 36: ...36 MEMO ...
Page 158: ...158 MEMO ...
Page 174: ...174 MEMO ...
Page 240: ...240 MEMO ...
Page 260: ...260 MEMO ...
Page 340: ...340 MEMO ...
Page 392: ...392 MEMO ...
Page 438: ...438 MEMO ...
Page 482: ...482 CHAPTER 20 REAL TIME OUTPUT PORT MEMO ...
Page 510: ...510 MEMO ...
Page 524: ...524 MEMO ...
Page 560: ...560 MEMO ...
Page 576: ...576 MEMO ...
Page 598: ...598 MEMO ...
Page 602: ...602 MEMO ...