Rainbow-electronics ATtiny43U Instrukcja Użytkownika Strona 91

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 182
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 90
91
8048B–AVR–03/09
Table 12-3 on page 91 shows the COMnA[1:0] bit functionality when the WGMn[1:0] bits are set
to fast PWM mode.
Note: 1. A special case occurs when OCRnA equals TOP and COMnA1 is set. In this case, the Com-
pare Match is ignored, but the set or clear is done at TOP. See “Fast PWM Mode” on page 85
for more details.
Table 12-4 on page 91 shows the COMnA[1:0] bit functionality when the WGMn[2:0] bits are set
to phase correct PWM mode.
Note: 1. A special case occurs when OCRnA equals TOP and COMnA1 is set. In this case, the Com-
pare Match is ignored, but the set or clear is done at TOP. See “Phase Correct PWM Mode” on
page 87 for more details.
Bits 5:4 – COMnB[1:0]: Compare Match Output B Mode
These bits control the Output Compare pin (OCnB) behavior. If one or both of the COMnB1:0
bits are set, the OCnB output overrides the normal port functionality of the I/O pin it is connected
to. However, note that the Data Direction Register (DDR) bit corresponding to the OCnB pin
must be set in order to enable the output driver.
When OCnB is connected to the pin, the function of the COMnB[1:0] bits depends on the
WGMn[2:0] bit setting. Table 12-5 on page 91 shows the COMnB[1:0] bit functionality when the
WGMn[2:0] bits are set to a normal or CTC mode (non-PWM).
Table 12-3. Compare Output Mode, Fast PWM Mode
(1)
COMnA1 COMnA0 Description
0 0 Normal port operation, OCnA disconnected.
01
WGMn2 = 0: Normal Port Operation, OCnA Disconnected.
WGMn2 = 1: Toggle OCnA on Compare Match.
1 0 Clear OCnA on Compare Match, set OCnA at TOP
1 1 Set OCnA on Compare Match, clear OCnA at TOP
Table 12-4. Compare Output Mode, Phase Correct PWM Mode
(1)
COMnA1 COMnA0 Description
0 0 Normal port operation, OCnA disconnected.
01
WGMn2 = 0: Normal Port Operation, OCnA Disconnected.
WGMn2 = 1: Toggle OCnA on Compare Match.
10
Clear OCnA on Compare Match when up-counting. Set OCnA on
Compare Match when down-counting.
11
Set OCnA on Compare Match when up-counting. Clear OCnA on
Compare Match when down-counting.
Table 12-5. Compare Output Mode, non-PWM Mode
COMnB1 COMnB0 Description
0 0 Normal port operation, OCnB disconnected.
0 1 Toggle OCnB on Compare Match
1 0 Clear OCnB on Compare Match
1 1 Set OCnB on Compare Match
Przeglądanie stron 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 181 182

Komentarze do niniejszej Instrukcji

Brak uwag