Rainbow-electronics ATmega8515L Manual do Utilizador Página 86

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 223
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 85
86
ATmega8515(L)
2512A–AVR–04/02
OCR0 and TCNT0 when the counterdecrements.ThePWM frequency for theoutput
when using phase correctPWM can be calculatedbythe following equation:
The N variable represents the prescale factor(1, 8,64, 256, or 1024).
Theextreme valuesfor the OCR0 Registerrepresent specialcaseswhen generating a
PWM waveform output in the phase correctPWM mode. If the OCR0 isset equal to
BOTTOM, the output will be continuously low and ifset equal to MAX the output will be
continuously highfor non-inverted PWM mode. For inverted PWM theoutput will have
theopposite logic values.
Timer/Counter Timing
Diagrams
TheTimer/Counter is a synchronousdesign and thetimerclock (clk
T0
) is therefore
shownas a clock enable signal in the following figures.The figures includeinformation
on when interrupt flags are set. Figure40contains timing data forbasic Timer/Counter
operation. The figure shows the count sequence closetothe MAX value in all modes
other than phase correctPWM mode.
Figure 40. Timer/Counter Timing Diagram, no Prescaling
Figure41shows the same timing data,but with the prescaler enabled.
Figure 41. Timer/Counter Timing Diagram,with Prescaler(f
clk_I/O
/8)
Figure42shows the setting ofOCF0inall modes except CTC mode.
f
OCnPCPWM
f
clk_I/O
N 510
------------------=
clk
Tn
(clk
I/O
/1)
TOVn
clk
I/O
TCNTn MAX - 1 MAX BOTTOM BOTTOM + 1
TOVn
TCNTn
MAX - 1 MAX BOTTOM BOTTOM + 1
clk
I/O
clk
Tn
(clk
I/O
/8)
Vista de página 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 222 223

Comentários a estes Manuais

Sem comentários