Datasheet

25.5.2. 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 normal 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.
To work with the 10-bit DAC, two registers have to be updated. In order to avoid intermediate value, the
DAC input values which are really converted into analog signal are buffered into unreachable registers. In
normal mode, the update of the shadow register is done when the register DACH is written.
In case DAATE bit is set, the DAC input values will be updated on the trigger event selected through
DATS bits.
In order to avoid wrong DAC input values, the update can only be done after having written respectively
DACL and DACH registers. It is possible to work on 8-bit configuration by only writing the DACH value. In
this case, update is done each trigger event.
In case DAATE bit is cleared, the DAC is in an automatic update mode. Writing the DACH register
automatically update the DAC input values with the DACH and DACL register values.
It means that whatever is the configuration of the DAATE bit, changing the DACL register has no effect on
the DAC output until the DACH register has also been updated. So, to work with 10 bits, DACL must be
written first before DACH. To work with 8-bit configuration, writing DACH allows the update of the DAC.
Name:  DAC
Offset:  0x91
Reset:  0x0
Property:
 
R/W
Bit 15 14 13 12 11 10 9 8
DAC9 DAC8
Access
Reset 0 0
Bit 7 6 5 4 3 2 1 0
DAC7 DAC6 DAC5 DAC4 DAC3 DAC2 DAC1 DAC0
Access
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 – DACn: DAC Value
Atmel ATmega16M1/32M1/64M1 [DATASHEET]
Atmel-8209F-ATmega16M1/32M1/64M1_Datasheet_Complete-10/2016
352