CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ6V0UD
204
(3) 16-bit capture/compare register n1 (CR01, CR11)
This is a 16-bit register that can be used as a capture register and a compare register. Whether it is used as a
capture register or compare register is specified by the CRCn2 bit of the CRCn register.
(a) When using CRn1 as compare register
The value set to CRn1 is always compared with the count value of TMn. When the values of the two match,
an interrupt request (INTTMn1) is generated.
(b) When using CRn1 as capture register
The valid edge of the TIn1 pin can be selected as a capture trigger. The valid edge of TIn1 is specified by
the PRMn0 register.
When the capture trigger is specified as the valid edge of TIn0, the relationship between the TIn0 valid edge
and the CRn1 capture trigger is as follows.
Table 7-4. TIn0 Pin Valid Edge and CRn1 Capture Trigger
ESn01
ESn00
TIn0 Pin Valid Edge
CRn1 Capture Trigger
0
0
Falling edge
Falling edge
0
1
Rising Edge
Rising Edge
1
0
Setting prohibited
Setting prohibited
1
1
Both rising and falling
edges
Both rising and falling
edges
Remark
n = 0, 1
CRn1 is set by using a 16-bit memory manipulation instruction. These registers can only be read by a 16-bit
memory manipulation instruction when used as capture registers.
RESET input clears CRn1 to 0000H.
Caution
Set CRn1 to a value other than 0000H in the clear & start mode entered upon a match
between TMn and CRn0. In the free-running mode or the clear & start mode entered upon
the TIn0 valid edge, however, an interrupt request (INTTMn1) is generated after an overflow
(FFFFH) when CRn1 is set to 0000H.
Содержание V850/SB1
Страница 2: ...User s Manual U13850EJ6V0UD 2 MEMO ...