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.

Table 5-15. PIC16F, PIC18F and PIC32CM DAC Features
FeaturePIC16F DACPIC18F DACPIC32CM DAC
Resolution5-bit/8-bit/10-bit8-bit/10-bit/12-bit10-bit

12-bit (16-bit with dithering)

Max Conversion Rate Supports up to 300 kspsSupports up to 300 ksps

10-bit: Up to 350 ksps

12-bit: Up to 1 Msps

Number of Channels1, 21–3 1, 2
Output Range Rail-to-rail; typically VSS to VDD or VREF+GND to selected VREF, VDD, or FVRGND to selected VREF
Trigger SourcesSoftware, Timers, or Auto-Conversion Triggers from peripherals

Software

Enable bit

Enable bit

Event-driven

Internal RoutingConnects to ADC, Comparators, op amps, and FVRRoutes to ADC, Comparators, and op ampsOutput can be used by other analog blocks
Voltage Reference OptionsVDD, FVRVDD, FVR, external VREFVDD, external/internal VREF
Waveform GenerationBasic (manual update)Basic (manual update, with auto-trigger)Advanced (event system, auto-trigger)
Event System IntegrationN/AN/ASupported
Low Power OperationSupportedSupportedSupported (sleepwalking, event system)