Техническая Спецификация для Atmel Xplained Pro Evaluation Kit ATSAMD20-XPRO ATSAMD20-XPRO
Модели
ATSAMD20-XPRO
544
Atmel | SMART SAM D20 [DATASHEET]
Atmel-42129K–SAM-D20_datasheet–06/2014
30.6
Functional Description
30.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.
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.
30.6.2 Basic Operation
30.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).
the Control B register (CTRLB.REFSEL).
30.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.
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.
DAC will be reset to their initial state, and the DAC will be disabled. Refer to the CTRLA register for details.
30.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.
loads. To minimize power consumption, the output buffer should be enabled only when external output is needed.
30.6.3 Additional Features
30.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
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:
Selection bits in the Control B register (CTRLB.REFSEL). The output voltage from the DAC can be calculated using the
following formula:
30.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.
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.
enabled.
30.6.3.3 Data Buffer
The Data Buffer register (
) and the Data register (
) are linked together to form a two-stage FIFO. The
DAC uses the Start Conversion event to load data from DATABUF into DATA and start a new conversion. The Start
Conversion event is enabled by writing a one to the Start Event Input bit in the Event Control register
(EVCTRL.STARTEI). If a Start Conversion event occurs when DATABUF is empty, an Underrun interrupt request is
generated if the Underrun interrupt is enabled.
Conversion event is enabled by writing a one to the Start Event Input bit in the Event Control register
(EVCTRL.STARTEI). If a Start Conversion event occurs when DATABUF is empty, an Underrun interrupt request is
generated if the Underrun interrupt is enabled.
V
DAC
DATA
0x3FF
----------------- VREF
⋅
=