![](http://datasheet.mmic.net.cn/370000/UPD780076_datasheet_16740795/UPD780076_147.png)
147
CHAPTER 8 16-BIT TIMER/EVENT COUNTERS 00, 01
User
’
s Manual U14260EJ3V1UD
(3) 16-bit timer capture/compare register 01n (CR01n)
CR01n 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 (CRC02n) of capture/compare control register 0n
(CRC0n).
CR01n is set by a 16-bit memory manipulation instruction.
RESET input clears CR01n to 0000H.
Figure 8-5. Format of 16-Bit Timer Capture/Compare Register 01n (CR01n)
When CR01n is used as a compare register
The value set in CR01n is constantly compared with the 16-bit timer counter 0n (TM0n) count value, and an
interrupt request (INTTM01n) is generated if they match.
When CR01n is used as a capture register
It is possible to select the valid edge of the TI00n pin as the capture trigger. The TI00n valid edge is set by
means of prescaler mode register 0n (PRM0n) (refer to
Table 8-3
).
Table 8-3. CR01n Capture Trigger and Valid Edge of TI00n Pin (CRC02n = 1)
CR01n Capture Trigger
TI00n Pin Valid Edge
ES01n
ES00n
Falling edge
Falling edge
0
0
Rising edge
Rising edge
0
1
Both rising and falling edges
Both rising and falling edges
1
1
Remarks 1.
Setting ES01n, ES00n = 1, 0 is prohibited.
2.
ES01n, ES00n: Bits 5 and 4 of prescaler mode register 0n (PRM0n)
CRC02n:
Bit 2 of capture/compare control register 0n (CRC0n)
3.
n = 0, 1
Cautions 1. If CR01n is set to 0000H, an interrupt request (INTTM01n) is generated when CR01n changes
from 0000H to 0001H following overflow (FFFFH). INTTM01n is generated after the match
between TM0n and CR01n or after the valid edge of the TI00n pin is detected.
2. When CR01n is used as a capture register, read data is undefined if the register read time
and capture trigger input conflict (the capture data itself is the correct value). If count stop
input and capture trigger input conflict, the captured data is undefined.
Remark
n = 0, 1
CR01n
(n = 0, 1)
Symbol
FF0DH (CR010)
FF6BH (CR011)
FF0CH (CR010)
FF6AH (CR011)
Address: FF0CH, FF0DH (CR010), FF6AH, FF6BH (CR011) After reset: 0000H R/W