This simple example shows how to use the Timer Counter (TC) to generate single slope PWM.
The XMEGA TC driver can be found here.
All AVR XMEGA devices with an tc can be used.
The example uses and configures two TC modules.
Each time the 50ms overflow interrupt of TIMER_EXAMPLE is executed the TIMER_PORT_LED single slope PWM duty cycle is changed so that it result visible on LEDO light intensity.
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Microchip.