8-Bit Timer/Event Counter Operations; 8-Bit Interval Timer Operation - NEC mPD780065 Series Preliminary User's Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

7.4 8-Bit Timer/Event Counter Operations

7.4.1 8-bit interval timer operation

The 8-bit timer/event counters operate as interval timers which generate interrupt requests repeatedly at intervals
of the count value preset to 8-bit compare register 5n (CR5n).
When the count values of 8-bit counter 5n (TM5n) match the values set to CR5n, counting continues with the TM5n
values cleared to 0 and the interrupt request signals (INTTM5n) are generated.
The count clock of TM5n can be selected with bits 0 to 2 (TCL5n0 to TCL5n2) of timer clock select register 5n
(TCL5n).
See 7.5 8-bit Timer/Event Counter Caution (2) Operation after compare register change during timer count
operation about the operation when the compare register value is changed during timer count operation.
[Setting]
<1> Set the registers.
• TCL5n: Select count clock.
• CR5n:
Compare value
• TMC5n: Clear and Start mode by match of TM5n and CR5n.
(TMC5n = 0000×××0B × = don't care)
<2> After TCE5n = 1 is set, count operation starts.
<3> If the values of TM5n and CR5n match, the timer output flip-flop inverts. Also, INTTM5n is generated and
TM5n is cleared to 00H.
<4> INTTM5n generates repeatedly at the same interval.
Set TCE5n to 0 to stop count operation.
Remark n = 0, 1
142
CHAPTER 7 8-BIT TIMER/EVENT COUNTER
Preliminary User's Manual U13420EJ2V0UM00

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780065Mpd78f0066

Table of Contents