Steht doch drin ;)
Seite 74 Mega32 Zitat:
The PWM frequency for the output can be calculated by the following
equation:
********************************************************************
f_pwm = f_clkio / N*256
********************************************************************
The N variable represents the prescale factor (1, 8, 64, 256, or
1024).
The extreme values for the OCR0 Register represents special cases when
generating a PWM waveform output in the fast PWM mode. If the OCR0 is
set equal to BOTTOM, the output will be a narrow spike for each MAX+1
timer clock cycle. Setting the OCR0 equal to MAX will result in a
constantly high or low output (depending on the polarity of the output
set by the COM01:0 bits.)
A frequency (with 50% duty cycle) waveform output in fast PWM mode can
be achieved by setting OC0 to toggle its logical level on each compare
match (COM01:0 = 1).
**********************************************************************
The waveform generated will have a maximum frequency of fOC0 =
fclk_I/O/2 when OCR0 is set to zero.
**********************************************************************
This feature is similar to the OC0 toggle in CTC mode, except the
double buffer feature of the output compare unit is enabled in the fast
PWM mode.
Also entweder Du hast eine 8bit PWM mit 78kHz oder eine 1bit PWM, die
dann bei 20MHz 10MHz ausgeben würde, als reines Rechteck ohne
irgendwelche Modulationen.
Verstanden ?
Bye,
Markus