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.
| Feature | PIC16F COG | PIC16F/PIC18F CWG | PIC32CM WEX |
|---|---|---|---|
| Peripheral Type |
Complementary Output Generator (COG) Complementary Waveform Generator (CWG) | Complementary Waveform Generator (CWG) | Waveform Extension (WEX) |
| Complementary Outputs | Supported | Supported | Supported |
| Output Distribution | Steering modes (Synchronous/Asynchronous) | Steering modes (Synchronous/Asynchronous) | Output Matrix (OTMX) with multiple routing modes |
| Dead-Time Insertion | Dual 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 logic | Handled through mode selection or direction change logic | Waveform swap option with double buffer support |
| Pattern Generation | Relies on steering mode for static levels | Limited to manual output overrides | Double-buffered Dithering support |
| Dithering | N/A | N/A | Supported |
| Port Override/Disable | PPS routing | PPS routing | N/A |
| Fault Protection | Auto-shutdown
Auto-restart | Auto-shutdown
Auto-restart | Fault protection for safe and deterministic shutdown |
| PWM Resolution | Moderate (typically 10–12 bits) | Moderate (typically 10 bits) | High (up to 16 bits or more) |
