142
4317I–AVR–01/08
AT90PWM2/3/2B/3B
16.7.1
Frequency distribution
The frequency modulation is done by switching two frequencies in a 16 consecutive cycle frame.
These two frequencies are f
b1
and f
b2
where f
b1
is the nearest base frequency above the wanted
frequency and f
b2
is the nearest base frequency below the wanted frequency. The number of f
b1
in the frame is (d-16) and the number of f
b2
is d. The f
b1
and f
b2
frequencies are evenly distrib-
uted in the frame according to a predefined pattern. This pattern can be as given in the following
table or by any other implementation which give an equivallent evenly distribution.
Table 16-5.
Distribution of f
b2
in the modulated frame
While ‘X’ in the table, f
b2
prime to f
b1
in cycle corresponding cycle.
So for each row, a number of fb2 take place of fb1.
Figure 16-12. Resulting Frequency versus d.
Distribution of fb2 in the modulated frame
PWM - cycle
Fraction
al
Divider
(d)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
1
X
2
X
X
3
X
X
X
4
X
X
X
X
5
X
X
X
X
X
6
X
X
X
X
X
X
7
X
X
X
X
X
X
X
8
X
X
X
X
X
X
X
X
9
X
X
X
X
X
X
X
X
X
10
X
X
X
X
X
X
X
X
X
X
11
X
X
X
X
X
X
X
X
X
X
X
12
X
X
X
X
X
X
X
X
X
X
X
X
13
X
X
X
X
X
X
X
X
X
X
X
X
X
14
X
X
X
X
X
X
X
X
X
X
X
X
X
X
15
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
f
b1
f
b2
d: 0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15
f
OP