142
CHAPTER 8 PULSE WIDTH COUNT TIMER (PWC)
8.1
Overview of Pulse Width Count Timer
The pulse width count timer (PWC) can be selected to function as either an interval
timer or the pulse width measurement. The interval timer function counts down in
synchronous with one of three internal count clocks. The pulse width measurement
function measures the width of pulses input to an external pin.
Therefore, the PWC can be used as an input capture by continuously measuring the
pulse width of an external input.
■
Interval timer function
The interval timer function generates repeated interrupts at variable time intervals.
•
The interval timer can operate with a cycle among 1 and 2
8
times the internal count clock cycle.
•
The internal count clock can be selected from three different clocks.
•
Two operating modes are available: reload timer mode (continuous operation) and one-shot mode (one-
time operation).
Table 8.1-1 "Interval time range" lists the available interval time and square wave output ranges.
The following shows an example of the interval time.
For a 5 MHz main clock oscillation (F
CH
), a PWC reload buffer register (RLBR) value of "DD
H
(221)",
and a count clock cycle of one instruction cycle, the interval time and square wave output frequency are
calculated as follows:
Table 8.1-1 Interval time range
Internal count clock cycle
Interval time
Square wave output (Hz)
1 t
inst
1 t
inst
to 2
8
t
inst
1/(2 t
inst
) to 1/(2
9
t
inst
)
4 t
inst
2
2
t
inst
to 2
10
t
inst
1/(2
3
t
inst
) to 1/(2
11
t
inst
)
32 t
inst
2
5
t
inst
to 2
13
t
inst
1/(2
6
t
inst
) to 1/(2
14
t
inst
)
t
inst
: Instruction cycle (divide-by-four main clock oscillation)
Interval time
= (1 x 4/F
CH
) x (RLBR register value)
= (4/5 MHz) x 221
= 176.8 s
RLBR register value of "00
H
" is assumed as 256.
Summary of Contents for MB89950 Series
Page 2: ......
Page 3: ...FUJITSU LIMITED F2MC 8L 8 BIT MICROCONTROLLER MB89950 950A Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 34: ...20 CHAPTER 2 HANDLING DEVICES ...
Page 134: ...120 CHAPTER 6 WATCHDOG TIMER ...
Page 236: ...222 CHAPTER 10 UART ...
Page 276: ...262 CHAPTER 12 LCD CONTROLLER DRIVER ...
Page 310: ...296 APPENDIX ...
Page 311: ...297 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 316: ...302 INDEX ...
Page 318: ......