NEC V850/SB1TM User Manual page 178

32-bit single-chip microcontroller
Table of Contents

Advertisement

(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.
ESn01
0
0
1
1
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.
178
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 U13850EJ4V0UM
CRn1 Capture Trigger
Falling edge
Rising Edge
Setting prohibited
Both rising and falling
edges

Advertisement

Table of Contents
loading

Table of Contents