# Motor control with AVR

I am used to work with PICs, but I want to start using AVRs as well. One thing I like in the PICs is the EPWM (enhanced PWM) peripheral, in which you just set a couple of registers, and the PIC will generate all the control signals for a H-Bridge, or Half-Bridge control, including dead-time and push-pull signals.

I want to know if there is something like this in the Atmel MCUs, and it's name, so I might find it on the datasheet and select the proper MCU for my projects.

• I've read about dead time generator in the datasheet for ATtiny45, which is an AVR. So it is worth the effort to check other AVR datasheets or the selection tool on atmel.com – jippie Feb 17 '13 at 17:29

I work mainly with PICs (and ARM) also, but the AVRs have very similar peripherals which will do what you are looking for.

The ATxmega 8-bit series micros have the standard timers and input/output capture/compare peripherals (similar to the PICs CCP). These can be set up for motor driving, with dead time, etc.

To quote from this App note on BLDC motor control:

ATxmega128A1 provides 16-bit timers/counters with :
Four Compare or Capture (CC) Channels in Timer/Counter 0
Two Compare or Capture (CC) Channels in Timer/Counter 1
To generate PWM frequency, this Application Note uses three compare channels