Operation; Operation As Interval Timer (16 Bits) - NEC V850/SA1 mPD703015 Preliminary User's Manual

32-/16-bit single-chip microcontrollers
Table of Contents

Advertisement

7.2 Operation

7.2.1 Operation as interval timer (16 bits)

Timer 0 operates as an interval timer when the 16-bit timer mode control register n (TMCn) and capture/compare
control register n (CRCn) are set as shown in Figure 7-7.
In this case, timer 0 repeatedly generates an interrupt at the time interval specified by the count value set in
advance to the 16-bit capture/compare register n (CRn0, CRn1).
When the count value of the 16-bit timer register n (TMn) coincides with the set value of CRn0, the value of TMn is
cleared to 0, and the timer continues counting. At the same time, an interrupt request signal (INTTMn0) is generated.
The count clock of the 16-bit timer/event counter can be selected by bits 0 and 1 (PRMn0 and PRMn1) of the
prescaler mode register n (PRMn).
Figure 7-7. Control Register Settings When Timer 0 Operates as Interval Timer
TMCn
0
0
CRCn
0
0
Remark
0/1: When these bits are reset to 0 or set to 1, the other functions can be used along with the interval
timer function. For details, refer to Figures 7-2 and 7-3.
158
CHAPTER 7
TIMER/COUNTER FUNCTION
(a) 16-bit timer mode control register 0, 1 (TMC0, TMC1)
TMCn3
0
0
1
(b) Capture/compare control register 0, 1 (CRC0, CRC1)
0
0
0
TMCn2
TMCn1
OVFn
1
0/1
0
CRCn2
CRCn1
CRCn0
0/1
0/1
0
Clears and starts on
coincidence between
TMn and CRn0.
CRn0 as compare
register

Advertisement

Table of Contents
loading

Table of Contents