NEC V850/SA1 mPD703015 Preliminary User's Manual page 149

32-/16-bit single-chip microcontrollers
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
coincide, an interrupt request (INTTMn1) is generated.
(b) When using CRn1 as capture register
The valid edge of the TIn0 pin can be selected as a capture trigger. The valid edge of TIn0 is specified by
using the PRMn register.
CRn1 is set by using a 16-bit memory manipulation instruction.
The value of this register is undefined when the RESET signal is input.
Caution Set CRn1 to a value other than 0000H. 1-pulse-count operation is disabled when used as an
event counter. However, if CRn1 is set to 0000H in free-running mode or in clear mode using the
TIn1 valid edge, an interrupt request (TNTTMn1) is generated after an overflow (FFFFH).
CHAPTER 7
TIMER/COUNTER FUNCTION
149

Advertisement

Table of Contents
loading

Table of Contents