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.

Table 5-11. AVR® and PIC32CM Timer Features
FeatureAVR® TCxPIC32CM TCx/TCC
Resolution12, 16 or up to 24 bits8, 16 or 32 bits (selectable)
PrescalerProgrammableProgrammable
Capture/Compare ChannelsUp to eightUp 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
BufferingDouble-buffered period/compareDouble-buffered period/compare/capture
Fault ProtectionFault handling, fast stop, overload protectionRecoverable/non-recoverable fault sources
Event SystemIntegrated into all types of clocking, direction, or synchronizationIntegrated 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 ExtensionsTimer/Counter Type E (TCE), TC0/1 (AVR® XMEGA)Timer Counter for Control Applications (TCC)