5.4.2 Digital-to-Analog Converter (DAC)
The PIC16F, PIC18F and PIC32CM DAC peripherals generate analog voltages from digital values. DAC features, such as high drive capabilities, the ability to route DAC output to other internal analog peripherals (like comparators), and support for real-time analog signal generation. These DACs are suitable for applications, such as waveform generation, audio output and analog control.
Some PIC32CM family of devices have 12-bit DAC controllers with higher speed, dual-channel, and differential output options. Table 5-15 provides a comparison of features between PIC16F, PIC18F and PIC32CM.
| Feature | PIC16F DAC | PIC18F DAC | PIC32CM DAC |
|---|---|---|---|
| Resolution | 5-bit/8-bit/10-bit | 8-bit/10-bit/12-bit | 10-bit 12-bit (16-bit with dithering) |
| Max Conversion Rate | Supports up to 300 ksps | Supports up to 300 ksps |
10-bit: Up to 350 ksps 12-bit: Up to 1 Msps |
| Number of Channels | 1, 2 | 1–3 | 1, 2 |
| Output Range | Rail-to-rail; typically VSS to VDD or VREF+ | GND to selected VREF, VDD, or FVR | GND to selected VREF |
| Trigger Sources | Software, Timers, or Auto-Conversion Triggers from peripherals |
Software Enable bit |
Enable bit Event-driven |
| Internal Routing | Connects to ADC, Comparators, op amps, and FVR | Routes to ADC, Comparators, and op amps | Output can be used by other analog blocks |
| Voltage Reference Options | VDD, FVR | VDD, FVR, external VREF | VDD, external/internal VREF |
| Waveform Generation | Basic (manual update) | Basic (manual update, with auto-trigger) | Advanced (event system, auto-trigger) |
| Event System Integration | N/A | N/A | Supported |
| Low Power Operation | Supported | Supported | Supported (sleepwalking, event system) |
