CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ4V0UM
178
(3) 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 bit 2 (CRCn2) 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.
The value of this register is undefined after the RESET signal is input.
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 TIn1 valid edge clear mode,
however, an interrupt request (INTTMn1) is generated after an overflow (FFFFH) when
0000H is set to CRn1.
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...