PWM signal can be constructed in many ways, not only use an analog method using op-amp but also use a digital method. With each change in PWM analog method is very smooth, while the digital method of any changes influenced by the resolution of the PWM PWM itself. Suppose the digital PWM PWM 8-bit means it has a resolution of 28 = 256, mean value of the PWM output has a 256 variation, variation ranging from 0-255 that represents the duty cycle 0-100% of the PWM output.
PWM in the AVR microcontroller generated by timer, on ATmega 8535 AVR microcontroller, ATmega32 Atmega16 and has three pieces in which the second timer 8-bit timer and a timer 16 bits.
PWM signal generation process on the AVR microcontroller follows:
We see in the picture above there are some parameters, In every PWM on AVR microcontroller has the following parameters:
Resolution:
resolution is the amount of variation changes the value in the PWM. Suppose an 8-bit PWM resolution PWM has a variation of mean value changes as much as 28 = 256 variations ranging from 0-255 value changes, when we give the value exceeds the limit of resolution, it will be overflow mean value is taken from a number of bits are provided and who taken starting from the lowest bit (LSB). Most of microcontrollers uses 8-bit timer with 8 bit resolution. In the picture above described PWM resolution originated from the base of the triangle and ending at the tip of the triangle.
Compare:
compare is a comparison value. This value is used as reference What is the duty cycle of the PWM. Compare the value varies in accordance with a resolution of the PWM. In the above picture compare value is marked with a red line, where its position among the basic triangle and the tip of the triangle.
Clear:
Clear comparator used for the determination of whether the comparator inverting or non-inverting. We see the picture above the triangle and the red line. Microcontroller will membadingkan second position, suppose that when we set the PWM on Down’s clear, it means that when the triangle is below the red line (compare), then the PWM will issue a logic 0. And vice versa if the triangle is above the red line (compare), then the PWM will issue a logic 1. So that the width is determined by the narrowness of the logic one compare the position, the narrowness of the logic of a sheet that is the PWM output value, and this incident happened in the harmonic constant. Therefore compare the value is used as the value of PWM duty cycle. Clear Up is the opposite (inverse) from Clear Down on the output logic. To more clearly please see the following picture:
Keyword :
microcontroller ,signal ,voltage ,pwm signal ,project ,how to ,frequency ,duty cycle ,circuit ,winavr ,tutorial ,search ,pwm signals ,pwm output ,program memory ,prescaler ,waveform ,software ,sine wave ,signals ,signal generator ,servo motor ,registers ,pwm controller ,pulse width modulation ,processor ,peripheral ,microcontrollers ,memory ,lookup table ,interfacing ,family ,design ,controller ,avr-gcc ,avr studio ,avr microcontroller ,atmega ,application.

