16-Bit Timer Register 0 (Tm0) Operation; Basic Operation - NEC uPD784038 Series User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

8.4 16-BIT TIMER REGISTER 0 (TM0) OPERATION

8.4.1 Basic Operation

In the timer/counter 0 count operation, an up-count is performed using the count clock specified by the low-order 4 bits of
prescaler mode register 0 (PRM0).
Count operation enabling/disabling is controlled by bit 3 (CE0) of timer control register 0 (TMC0). When the CE0 bit is set
(to 1) by software, the contents of TM0 are cleared to 0000H on the first count clock, and then the up-count operation is performed.
When the CE0 bit is cleared (to 0), TM0 becomes 0000H immediately, and capture operations and match signal generation
are stopped.
If the CE0 bit is set (to 1) again when it is already set (to 1), TM0 continues the count operation without being cleared.
If the count clock is input when TM0 is FFFFH, TM0 becomes 0000H. In this case, OVF0 bit is set (to 1) and an overflow
signal is sent to the output control circuit. OVF0 bit is cleared by software only. The count operation is continued.
When RESET is input, TM0 is cleared to 0000H, and the count operation is stopped.
198
CHAPTER 8 TIMER/COUNTER 0
User's Manual U11316EJ4V1UD

Advertisement

Table of Contents
loading

Table of Contents