![NEC V850/SC1 User Manual Download Page 261](http://html.mh-extra.com/html/nec/v850-sc1/v850-sc1_user-manual_248178261.webp)
CHAPTER 8 TIMER/COUNTER FUNCTION
User’s Manual U15109EJ3V0UD
259
(3) Capture/compare register n1 (CR01, CR11, CR71 to CR121)
This is a 16-bit register that can be used as both 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 (n = 0, 1, 7 to 12).
(a) When using CRn1 as compare register
The value set to CRn1 is continually compared with the count value of TMn. When the values of the two
match, an interrupt request (INTTMn1) is generated (n = 0, 1, 7 to 12).
(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
using 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 8-4. Valid Edge of TIn0 Pin and Capture Trigger of CRn1
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, 7 to 12
CRn1 is set using a 16-bit memory manipulation instruction.
When used as a compare register, CRn1 can be read/written, but when used as a capture register, CRn1
can only be read.
RESET input sets these registers to 0000H.
Caution
In the clear & start mode entered on a match between TMn and CRn1, set CRn1 to a value
other than 0000H. In the free-running mode or the TIn0 valid edge clear mode, however, an
interrupt request (INTTMn1) is generated after an overflow (FFFFH) when CRn1 is set to
0000H.