Overview Of 8-Bit Pwm Timer - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

1
7.

Overview of 8-Bit PWM Timer

The 8-bit PWM timer can be selected to function as either an interval timer or a PWM
timer with 8-bit resolution. The interval timer function counts-up in sync with either the
output cycle of the pulse width count timer (PWC) 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. Also, the 8-bit PWM timer can be used as a
D/A converter by connecting the PWM output to a low pass filter.
n 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 (PTO pin) 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.1a lists the range for the interval time and square wave output.
Table 7.1a Interval Time and Square Wave Output Range
t
: Instruction cycle (divide-by-four source oscillation)
inst
PWC output cycle: Timer output bit of the pulse width count timer (PCR2: TO)
Note: Calculation example for the interval time and square wave frequency
In this example, the source oscillation (F
set to "DD
the frequency of the square wave output from the PTO pin (where the PWM timer operates
continuously and the value of the COMR register is constant) are calculated as follows:
138
CHAPTER 7 8-BIT PWM TIMER
Count clock cycle
1
Internal count
2
clock
3
PWC output
4
cycle
(221)", and the count clock cycle is set to 1 t
H
= (1 × 4/F
Interval time
= (4/10 MHz) × (221 + 1)
= 88.8 µ s
/(1 × 8 × (COMR register value +1))
Output frequency = F
C
= 10 MHz/(8 × (221 + 1))
5.6 kHz
Interval time
1 t
1 t
inst
16 t
2
4
inst
64 t
2
6
inst
2 t
to 2
9
t
2 t
inst
inst
2
3
t
to 2
11
t
2
3
inst
inst
2
6
t
to 2
14
t
2
6
inst
inst
) is 10 MHz, the PWM compare register (COMR) value is
C
inst
) × (COMR register value + 1)
C
8
times the count clock cycle.
Square wave output (Hz)
to 2
8
t
1/(2 t
inst
inst
inst
t
to 2
12
t
1/(2
5
t
inst
inst
inst
t
to 2
14
t
1/(2
7
t
inst
inst
to 2
17
t
1/(2
2
t
inst
inst
inst
t
to 2
19
t
1/(2
4
t
inst
inst
t
to 2
22
t
1/(2
7
t
inst
inst
(4/F
). In this case, the interval time and
C
) to 1/(2
9
t
)
inst
) to 1/(2
13
t
)
inst
to 1/(2
15
t
)
inst
inst
) to 1/(2
18
t
)
inst
) to 1/(2
20
t
)
inst
inst
) to 1/(2
23
t
)
inst
inst
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents