5.3.1 Timer/Counter (TC)
AVR and PIC32CM timer/counter peripherals are utilized for timing, waveform generation, input capture, and event handling. Both MCUs support multiple timer types with varying features for precise timing and waveform control. Table 5-11 shows a comparison of features between AVR and PIC32CM.
| Feature | AVR® TCx | PIC32CM TCx/TCC |
|---|---|---|
| Resolution | 12, 16 or up to 24 bits | 8, 16 or 32 bits (selectable) |
| Prescaler | Programmable | Programmable |
| Capture/Compare Channels | Up to eight | Up to four |
| PWM Modes |
Single/Dual-Slope Ramp | Single/Dual-Slope |
| Special Modes |
Split mode (16-bit/2) Cascaded (8-bit x2) Ramp modes Numerical Controller Oscillator (NCO) | Circular buffer, multiple output events, error interrupt |
| Buffering | Double-buffered period/compare | Double-buffered period/compare/capture |
| Fault Protection | Fault handling, fast stop, overload protection | Recoverable/non-recoverable fault sources |
| Event System | Integrated into all types of clocking, direction, or synchronization | Integrated for input/output events, synchronization |
| Direct Memory Access (DMA) | Supported (AVR® XMEGA®) | Supported |
| Interrupts |
Overflow Compare match Event-based |
Overflow Compare match Input capture Error Fault |
| Waveform Extensions | Timer/Counter Type E (TCE), TC0/1 (AVR® XMEGA) | Timer Counter for Control Applications (TCC) |
