ATmega168/Timer1 PWM mode: inverting/non inverting

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According pag. 131 of ATmega168 d/s, by setting

COM1A1/COM1A0 bits=2

(Clear OC1A/OC1B on Compare Match when upcounting.
Set OC1A/OC1B on Compare Match when
downcounting
)

while by setting:

COM1A1/COM1A0 bits=3, (Set OC1A/OC1B on Compare Match when upcounting.
Clear OC1A/OC1B on Compare Match
when downcounting
)

The first option should be result in a inverted wave, while the second option should be result in a "non inverted" wave

Are you agree?

My (HW && SW) Setup: (MyAVR USB Programmer | bread-board | Butterfly | Arduino 10k | ATtiny2313 | ATmega8) && (WinAVR | AVR asm | AVRstudio)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think for noninverting mode the folowing is true:
The greater OCRxx value, the wider the positive pulse.

Thus I can agree.