ATXmega16A4 DAC channels not independently

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is my first time using the ATXMega 16A4 DAC in dual channel mode and I'm having issues I solved by changing the TIMCTRL register.

I don't really understand the description of what the function of these two values is and what it is I need to consider when setting them up.

The outputs seemed to have CH0 data on the DAC getting into the CH1 sample and hold so that my waveform was a mixture of the two. Slowing this way down fixed it for me, but I would like to understand what's going on with those values.

Thanks.

official AVR Consultant
www.veruslogic.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In DACx.TIMCTRL, 2 time intervals can be set. The first time is the duration of one conversion. This time has a minimum limit of 1us for single channel conversion and 1.5us for dual channel conversion. Events or update of DACx.CHnDATA are trigger sources for DAC conversions.
There is also a refresh mechanism in dual channel operation, even if there is no event or update as trigger source. After a predefined time (known as refresh interval), a new conversion starts for refresh of sample and hold circuits. The time of these conversions is set by conversion interval and the time between 2 successive conversions is set by refresh time interval. The refresh time interval should not be longer than 30us. See figure 2-2 in AVR1301 for more understanding.

Ozhan KD
Knowledge is POWER