5.3.2 Advanced Waveform Generators

The PIC16F/PIC18F Complementary Output/Waveform Generator (COG and CWG) peripherals have similar features to the PIC32CM Waveform Extensions for precise and safe waveform control in advanced motor, power, LED control, and similar applications. COG and CWG provide reliable complementary PWM generation for PIC16F/PIC18F applications, with COG offering more advanced features in select PIC16F devices. PIC32CM WEX delivers a comprehensive, event-driven waveform generation system for modern, high-performance embedded designs. Table 5-12 provides a comparison of features between PIC16F, PIC18F and PIC32CM.

Table 5-12. PIC16F, PIC18F and PIC32CM—COG, WEC, and WEX Features
FeaturePIC16F COGPIC16F/PIC18F CWG PIC32CM WEX
Peripheral Type

Complementary Output Generator (COG)

Complementary Waveform Generator (CWG)

Complementary Waveform Generator (CWG)Waveform Extension (WEX)
Complementary OutputsSupportedSupportedSupported
Output DistributionSteering modes (Synchronous/Asynchronous)Steering modes (Synchronous/Asynchronous)Output Matrix (OTMX) with multiple routing modes
Dead-Time InsertionDual independent 6-bit rising and falling timers

Double-buffered

Dual independent 6-bit rising and falling timers

Double-buffered

Four DTI units Common register 8-bit resolution Double-buffered
Swap Functionality Handled through mode selection or direction change logicHandled through mode selection or direction change logicWaveform swap option with double buffer support
Pattern Generation Relies on steering mode for static levelsLimited to manual output overridesDouble-buffered Dithering support
Dithering N/AN/ASupported
Port Override/Disable PPS routingPPS routingN/A
Fault ProtectionAuto-shutdown

Auto-restart

Auto-shutdown

Auto-restart

Fault protection for safe and deterministic shutdown
PWM ResolutionModerate (typically 10–12 bits)Moderate (typically 10 bits)High (up to 16 bits or more)