12.07.2015 Views

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ATmega32A</strong>put will be continuously low and if set equal to MAX the output will be continuously high for noninvertedPWM mode. For inverted PWM the output will have the opposite logic values.At the very start of period 2 in Figure 14-7 OCn has a transition from high to low even thoughthere is no Compare Match. The point of this transition is to guarantee symmetry around BOT-TOM. There are two cases that give a transition without Compare Match:• OCR0A changes its value from MAX, like in Figure 14-7. When the OCR0A value is MAX theOCn pin value is the same as the result of a down-counting Compare Match. To ensuresymmetry around BOTTOM the OCn value at MAX must correspond to the result of an upcountingCompare Match.• The timer starts counting from a value higher than the one in OCR0A, and for that reasonmisses the Compare Match and hence the OCn change that would have happened on theway up.14.8 Timer/Counter Timing DiagramsThe Timer/Counter is a synchronous design and the timer clock (clk T0 ) is therefore shown as aclock enable signal in the following figures. The figures include information on when InterruptFlags are set. Figure 14-8 contains timing data for basic Timer/Counter operation. The figureshows the count sequence close to the MAX value in all modes other than phase correct PWMmode.Figure 14-8.Timer/Counter Timing Diagram, no Prescalingclk I/Oclk Tn(clk I/O/1)TCNTn MAX - 1 MAX BOTTOM BOTTOM + 1TOVnFigure 14-9 shows the same timing data, but with the prescaler enabled.8155C–AVR–02/1182

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!