18.4 Operations
18.4 Operations
(1) Summary of Operation
This block is a multi-function timer based on a 16-bit up-count timer and incorporating a count input pin and
8-bit input divider. The block has two main functions: a timer function and a pulse width count
Two types of count clock can be selected for either function. The following describes the basic functions
and operation of each of these functions.
(a) Timer Function
This function is an up-count timer which can be selected to operate in reload or single-shot mode.
Once started, the timer counts on each count clock.
An interrupt request can be generated when an overflow from FFFF
When an overflow occurs:
•
Single-shot mode: ............. The count stops.
•
Reload mode:.................... The timer is reloaded with the contents of the reload register and the
Timer count value
FFFF
H
0000
H
Timer start
Timer count value
FFFF
H
PWCR
write
value
Reload⇒
0000
H
Write to PWCR
OVIR
flag set
POUT bit
Does not toggle when restarted when starting from "L"
(unless this occurs at the same time as an overflow)
252
Chapter 18: Pulse Width Counter (PWC) Timer
count restarts.
Overflow
OVIR flag set, timer stop
Figure 18.4a Timer Operation (Single-Shot Mode)
Overflow
Overflow
Reload
Timer start
⇓
⇓
Figure 18.4b Timer Operation (Reload Mode)
(The solid line is the timer count value.)
Write to PWCR
⇓
Timer start
Overflow
Reload
Reload
Reload
Timer start
⇓
⇓
to 0000
occurs.
H
H
Overflow
(Restart is disabled.)
OVIR flag set, timer stop
(The solid line is the timer count value.)
Overflow
Reload
⇓
MB90580 Series
function.
Time
Overflow
Reload
Timer stop
Time
⇓