Overview Of 8-Bit Pwm Timer; Interval Timer Function (Square Wave Output Function) - Fujitsu Semiconductor Controller MB89950/950A Hardware Manual

F2mc-8l 8-bit microcontroller
Table of Contents

Advertisement

CHAPTER 7 8-BIT PWM TIMER
7.1

Overview of 8-bit PWM Timer

The 8-bit PWM timer can be selected to function as either an interval timer or PWM timer
with 8-bit resolution. The interval timer function counts up in synchronous with PWC
output clock or one of three internal count clocks. Therefore, an 8-bit interval timer time
can be set and the output can be used to generate variable frequency square waves.
I Interval timer function (square wave output function)
The interval timer function generates repeated interrupts at variable time intervals.
Also, as the 8-bit PWM timer can invert the output level of the pin (PWM) each time an interrupt is
generated, the 8-bit PWM timer can output a variable frequency square waves.
• The interval timer can operate with a cycle among 1 and 2
• The count clock can be selected from four different clocks.
Table 7.1-1 "Interval time and square wave output range" lists the range for the interval time and square
wave output.
Table 7.1-1 Interval time and square wave output range
1
2
3
4
t
: Instruction cycle
inst
Reference:
[Calculation example for the interval time and square wave frequency]
In this example, the main clock oscillation frequency (F
(COMR) value is set to "DD
time and the frequency of the square wave output from the PWM pin (where the PWM timer operates
continuously and the value of the COMR register is constant) are calculated as follows.
122
Count clock cycle
1 t
inst
Internal count
4
2
t
inst
clock
6
2
t
inst
2 t
to 2
inst
PWC timer
3
2
t
to 2
inst
output cycle
6
2
t
to 2
inst
(221)", and the count clock cycle is set to 1 t
H
Interval time
= (1 x 4/F
= (4/5 MHz) x (221 + 1)
= 177.6 s
Output frequency = F
CH
= 5 MHz / (8 x (221 + 1))
= 2.8 kHz
8
Interval time
8
1 t
to 2
t
inst
4
12
2
t
to 2
inst
6
14
2
t
to 2
inst
9
17
t
2 t
to 2
inst
inst
11
3
19
t
2
t
to 2
inst
inst
14
6
22
t
2
t
to 2
inst
inst
) x (COMR register value + 1)
CH
/ (1 x 8 x (COMR register value + 1))
times the count clock cycle.
Square wave output (Hz)
1/(2 t
) to 1/(2
inst
inst
5
t
1/(2
t
) to 1/(2
inst
inst
7
t
1/(2
t
to 1/(2
inst
inst
2
t
1/(2
t
) to 1/(2
inst
inst
4
t
1/(2
t
) to 1/(2
inst
inst
7
t
1/(2
t
) to 1/(2
inst
inst
) is 5 MHz, the PWM compare register
CH
. In this case, the interval
inst
9
t
)
inst
13
t
)
inst
15
t
)
inst
18
t
)
inst
20
t
)
inst
23
t
)
inst

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb89950 seriesMb89950a series

Table of Contents