NEC V850/SB1 User Manual page 204

32-bit single-chip microcontroller
Table of Contents

Advertisement

(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.
ESn01
0
0
1
1
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.
204
CHAPTER 7
TIMER/COUNTER FUNCTION
Table 7-4. TIn0 Pin Valid Edge and CRn1 Capture Trigger
ESn00
TIn0 Pin Valid Edge
0
Falling edge
1
Rising Edge
0
Setting prohibited
1
Both rising and falling
edges
User's Manual U13850EJ6V0UD
CRn1 Capture Trigger
Falling edge
Rising Edge
Setting prohibited
Both rising and falling
edges

Advertisement

Table of Contents
loading

This manual is also suitable for:

V850/sb2

Table of Contents