254
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
In accordance with the
Table 24-1, these three bits select the interrupt event which will generate the update of the
DAC input values. The update will be generated by the rising edge of the selected interrupt flag whether the inter-
rupt is enabled or not.
Bit 2 – DALA: Digital to Analog Left Adjust
Set this bit to left adjust the DAC input data.
Clear it to right adjust the DAC input data.
The DALA bit affects the configuration of the DAC data registers. Changing this bit affects the DAC output on the
next DACH writing.
Bit 1 – DAOE: Digital to Analog Output Enable bit
Set this bit to output the conversion result on D2A.
Clear it to use the DAC internally.
Bit 0 – DAEN: Digital to Analog Enable bit
Set this bit to enable the DAC.
Clear it to disable the DAC.
24.5.2
DACH and DACL – Digital to Analog Converter input Register
DACH and DACL registers contain the value to be converted into analog voltage.
Writing the DACL register prohibits the update of the input value until DACH has not been written too. So the nor-
mal way to write a 10-bit value in the DAC register is firstly to write DACL the DACH.
In order to work easily with only eight bits, there is the possibility to left adjust the input value. Like this it is sufficient
to write DACH to update the DAC value.
24.5.2.1
DALA = 0
Table 24-1.
DAC auto trigger source selection.
DATS[2:0]
Description
000
Analog Comparator 0
001
Analog Comparator 1
010
External Interrupt Request 0
011
Timer/Counter0 compare Match
100
Timer/Counter0 Overflow
101
Timer/Counter1 compare Match B
110
Timer/Counter1 overflow
111
Timer/Counter1 capture event
Bit
7
654
3
2
1
0
-
DAC9
DAC8
DACH
DAC7
DAC6
DAC5
DAC4
DAC3
DAC2
DAC1
DAC0
DACL
Read/write
R/W
Initial value
0
000
0