ZERO using timer and DMA to drive DAC

Here is a simple proof of concept of using TCC0 timer to drive DAC from circular DMA buffer.

The sketch uses the PWM timer TCC0 on pin 12 (not used), and then overrides the frequency and duty cycle. A circular buffer of 128 half-words is used by the DMA to fill the DAC on each timer tick. Example can use sawtooth or sine wave in buffer.
Verified with scope.

Great, as always ! Thanks :wink:

Thanks as always for these useful examples. I'm trying to adapt this to use the DMA to copy cc0 each time that the TCC0 MC1 interrupt occurs.