Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Fiche De Données

Codes de produits
ATSAMD21-XPRO
Page de 1018
903
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
Write-protection does not apply for accesses through an external debugger. Refer to 
34.5.9 Analog Connections
Not applicable.
34.6 Functional Description
34.6.1 Principle of Operation
The Digital-to-Analog Converter (DAC) converts the digital value written to the Data register (
) into an analog 
voltage on the DAC output. By default, a conversion is started when new data is written to DATA, and the corresponding 
voltage is available on the DAC output after the conversion time. It is also possible to enable events from the Event 
System to trigger the conversion.
34.6.2 Basic Operation
34.6.2.1  Initialization
Before enabling the DAC, it must be configured by selecting the voltage reference using the Reference Selection bits in 
the Control B register (CTRLB.REFSEL).
34.6.2.2  Enabling, Disabling and Resetting
The DAC is enabled by writing a one to the Enable bit in the Control A register (CTRLA.ENABLE). The DAC is disabled 
by writing a zero to CTRLA.ENABLE.
The DAC is reset by writing a one to the Software Reset bit in the Control A register (CTRLA.SWRST). All registers in the 
DAC will be reset to their initial state, and the DAC will be disabled. Refer to the CTRLA register for details.
34.6.2.3  Enabling the Output Buffer
To enable the DAC output on the V
OUT
 pin, the output driver must be enabled by writing a one to the External Output 
Enable bit in the Control B register (CTRLB.EOEN).
The DAC output buffer provides a high-drive-strength output, and is capable of driving both resistive and capacitive 
loads. To minimize power consumption, the output buffer should be enabled only when external output is needed.
34.6.3 Additional Features
34.6.3.1  Conversion Range
The conversion range is between GND and the selected DAC voltage reference. The default voltage reference is the 
internal 1V (INT1V) reference voltage. The other voltage reference options are the 3.3V analog supply voltage (AV
CC
 = 
VDDANA) and the external voltage reference (VREFP). The voltage reference is selected by writing to the Reference 
Selection bits in the Control B register (CTRLB.REFSEL). The output voltage from the DAC can be calculated using the 
following formula:
34.6.3.2  DAC as an Internal Reference
The DAC output can be internally enabled as input to the analog comparator. This is enabled by writing a one to the 
Internal Output Enable bit in the Control B register (CTRLB.IOEN). It is possible to have the internal and external output 
enabled simultaneously.
The DAC output can also be enabled as input to the Analog-to-Digital Converter. In this case, the output buffer must be 
enabled.
V
DAC
DATA
0x3FF
----------------- VREF
=