Operations Of 8-Bit Timer/Event Counter 50; Operation As Interval Timer - NEC 78K0/KB1+ Preliminary User's Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

7.4 Operations of 8-Bit Timer/Event Counter 50

7.4.1 Operation as interval timer

8-bit timer/event counter 50 operates as an interval timer that generates interrupt requests repeatedly at intervals
of the count value preset to 8-bit timer compare register 50 (CR50).
When the count value of 8-bit timer counter 50 (TM50) matches the value set to CR50, counting continues with the
TM50 value cleared to 0 and an interrupt request signal (INTTM50) is generated.
The count clock of TM50 can be selected with bits 0 to 2 (TCL500 to TCL502) of timer clock selection register 50
(TCL50).
Setting
<1> Set the registers.
• TCL50:
Select the count clock.
• CR50:
Compare value
• TMC50:
Stop the count operation, select clear & start mode entered on a match of TM50 and CR50.
(TMC50 = 0000×××0B × = Don't care)
<2> After TCE50 = 1 is set, the count operation starts.
<3> If the values of TM50 and CR50 match, INTTM50 is generated (TM50 is cleared to 00H).
<4> INTTM50 is generated repeatedly at the same interval.
Set TCE50 to 0 to stop the count operation.
Caution Do not write other values to CR50 during operation.
Count clock
TM50 count value
00H
Count start
CR50
TCE50
INTTM50
Remark Interval time = (N + 1) × t
N = 00H to FFH
148
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 50
Figure 7-7. Interval Timer Operation Timing (1/2)
(a) Basic operation
t
01H
N
00H
Clear
N
N
Interrupt acknowledged
Preliminary User's Manual U16846EJ1V0UD
01H
N
00H
Clear
N
Interrupt acknowledged
Interval time
01H
N
N
Interval time

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ypd78f0101hYpd78f0102hYpd78f0103h

Table of Contents