Operation Of 8-Bit Timer 1 (Tm1); Basic Operation Of 8-Bit Timer 1 (Tm1) - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

7.2.4 Operation of 8-Bit Timer 1 (TM1)

(1) Basic operation
Eight-bit timer/counter 1 performs count operation by counting up with the count clock specified by the lower
4 bits of prescaler mode register 1 (PRM1).
When the RESET signal is applied, TM1 is cleared to 00H, and count operation stops.
Bit 3 (CE1) of timer control register 1 (TMC1) is used to enable/disable count operation. (The lower 4 bits of
the TMC1 register are used to control the operation of 8-bit timer/counter 1.) When the CE1 bit is set to 1 by
software, TM1 is cleared to 00H by the first count clock pulse, then count-up operation starts.
When the CE1 bit is reset to 0, TM1 is cleared to 00H by the next count clock pulse, then capture operation and
coincide with signal generation stop.
If the CE1 bit is set to 1 when the CE1 bit is already set to 1, TM1 is not cleared, but continues count operation.
If the count clock signal is applied when the value of TM1 is FFH, TM1 is set to 00H. At this time, OVF1 is set.
OVF1 can be cleared only by software. Count operation continues.
Count clock
TM1
0H
CE1
Count starts
CE1←1
(b) When the CE1 bit is set to 1 again after count operation starts
Fig. 7-47 Basic Operation of 8-Bit Timer 1 (TM1)
(a) Count start → count stop → count start
0H
1H
2H
Count clock
TM1
0H
0H
1H
CE1
Count starts
CE1←1
Chapter 7 Timer/Counter Units
0H
0FH 10H
11H
Count stops
CE1←0
2H
3H
4H
5H
6H
Rewriting
CE1←1
0H
1H
Count starts
CE1←1
7
145

Advertisement

Table of Contents
loading

Table of Contents