How many hardware PWM pins and ADC on the ATxmega128A1

microcontrollerspecifications

As I mention in another post I am trying to find a microcontroller that can handle a Lynxmotion hexapod. Unfortunately I am stuck with hobby servos so I would like a controller with 18 ADC pins and to generate 18 PWM signals (in hardware as opposed to bit banging). Looking through the datasheet for the ATxmega128A1 it would seem to have what I need but I'm not confident I am interpreting the document correctly.

The way I read it the chip has 8 16-bit timers. Each of 4 of the timers have 4 comparators and each of the other 4 have two for a total of 24 total pins that can generate PWM. It also appears to have 2 ADC with 4 result registers each and 4 way muxing for a total of 32 pins with ADC. The pins for the timers and ADC all appear to be on different ports so there is no clashing amongst them. My question to you is, is this interpretation correct?

Best Answer

A colleague pointed out that each of port A and B only have 8 pins each. This can be seen by referencing Figure 3-1 of the datasheet. Unfortunately it means that there are in fact only 16 pins with ADC, not 32 as I had previously thought. Similarly, since the timers are on ports C, D, E, and F, and also are limited to 8 pins there must only be 16 pins capable of PWM generation.