111
7734Q–AVR–02/12
AT90PWM81/161
12.7
Enhanced Resolution
Lamp Ballast applications need an enhanced resolution down to 50Hz. The method to improve
the normal resolution is based on Flank Width Modulation (also called Fractional Divider).
Cycles are grouped into frames of 16 cycles. Cycles are modulated by a sequence given by the
fractional divider number. The resulting output frequency is the average of the frequencies in the
frame. The fractional divider (d) is given by OCRnRB[15:12].
The PSC output period is directly equal to the PSCOUTn0 On Time + Dead Time (OT0+DT0)
and PSCOUTn1 On Time + Dead Time (OT1+DT1) values. These values are 12 bits numbers.
The frequency adjustment can only be done in steps like the dedicated counters. The step width
is defined as the frequency difference between two neighboring PSC frequencies.
It is possible to apply the Flank Width Modulation (FWM) on RB, RB+RA, SB, SB+SA. The
selection is done bit the bits PBFMn0 and PBFMn.
According to the ramp mode and the enhanced resolution mode (defined by PBFMn1:0), the fre-
quency difference Df can take three different values:
with k is the number of CLK
PSC period in a PSC cycle and is given by the following formula:
with f
OP is the output operating frequency.
Example, in normal mode, with maximum operating frequency 160kHz and f
PLL = 64Mhz, k
equals 400. The resulting resolution is Delta F equals 64MHz / 400 / 401 = 400Hz.
In enhanced mode, the output frequency is the average of the frame formed by the 16 consecu-
tive cycles.
f
b1 and fb2 are two neighboring base frequencies.
Δf
0
=
Δf1
f1 f2
–
fPSC
k
----------
fPSC
k 1
+
------------
–
fPSC
1
kk 1
+
()
-------------------
×
==
=
Δf2
f1 f2
–
fPSC
k
----------
fPSC
k 2
+
------------
–
fPSC
2
kk 2
+
()
-------------------
×
==
=
k
fPSC
fOP
----------
=
fAVERAGE
16 d
–
16
--------------- f
b1
×
d
16
------ f
b2
×
+
=