Introduction

Author: Srinivasa KR, Microchip Technology Inc.

The Digital-to-Analog Converter (DAC) converts a digital signal into an analog signal. The DAC module in the 8-bit PIC® microcontrollers offers flexible input source selection, provision of routing output to other peripherals, such as an Analog Comparator (AC) and Analog-to-Digital Converter (ADC), and configurable register sets.

This makes the DAC a flexible module suitable for numerous applications, such as:
  • Signal Generation
  • Reference Voltage Generation
  • Converting Digital Output of Encoders to Analog Signals, etc.

This technical brief provides insight into the 5-bit DAC peripheral. Along with the working principle of the module, the technical brief describes the configurations of the DAC based on requirements and performance parameters of the module. This document also discusses the possible functional configurations of the DAC module, code examples, and code generation for DAC using the MPLAB® Code Configurator (MCC).