Microchip® Advanced Software Framework

SAM DAC Sound Player Application

Overview:

Introduction

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

A timer is used to guarantee the DAC conversions are performed at the correct sample rate, using the Event System module of the device to link the periodic timer output events to the DAC module to trigger new sample conversions.

This application has been tested on following boards:

  • SAM D20/D21/L21/C21 Xplained Pro

Hardware Setup

The device's DAC channel output should be connected to an audio amplifier, speaker, oscilloscope or other similar monitoring equipment so that the generated waveform can be monitored.

Usage

On startup the device hardware will be configured, and the example will enter an infinite loop. Each time the board button is pressed, the embedded waveform will be output through the DAC and the board LED will be toggled

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.