1.34.3 Digital-to-Analog Converter Controller (DACC)

The Digital-to-Analog Converter Controller (DACC) peripheral provides the following features:

  • Up to two single-ended analog outputs or one differential analog output

  • 12-bit resolution

  • Free-running mode, Max speed mode, Trigger mode or Interpolation mode

  • Provides a Bypass mode which minimizes power consumption in case of a limited sampling rate conversion

Using The Library

The DACC peripheral library provides an interface for the conversion of digital values to analog voltage.

The DAC can operate in free-running mode, where a write to the conversion-data register initiates an update on the analog output, or in triggered mode, where updates are initiated by a rising edge on an \internal or external synchronization signal.

The user must ensure that new data is not written to the DAC before the last conversion is complete as illustrated below.

/* Write new data if DAC is ready */
 if (DACCx_IsReady(DACC_CHANNEL_0))
 {
    DACCx_DataWrite (DACC_CHANNEL_1, 0xff)
 }

Library Interface

Digital-to-Analog Converter Controller peripheral library provides the following interfaces:

Functions

Name Description
DACC_Initialize Initializes DACC module of the device
DACC_IsReady Returns the status of readiness of Channel x of DACC module for new conversion request
DACC_DataWrite Converts a Digital data to Analog value

Data types and constants

Name Type Description
DACC_CHANNEL_NUM Enum Identifies the Channel index of DACC module