39.5.1 Initialization
The following steps are necessary to operate the DAC:
- The reference voltage fixed to VDDA.
- Configure the usage of the DAC
output:
- Configure an internal peripheral to use the DAC output. Refer to the documentation of the respective peripherals.
- Enable the output to a pin
by writing a ‘
1
’ to the Output Buffer Enable (OUTEN) bit. The Port peripheral needs to disable the input for the DAC pin.
- Write an initial digital value to the Data (DACCODE.DATA) register.
- Enable the DAC by writing a ‘
1
’ to the ENABLE bit in the Control A (DACCON.EN) register.