Purpose
This example uses the Synchronous Serial Controller (SSC) of SAM devices to output an audio stream through the on-board WM8904 CODEC.
Requirements
This example can be used with SAM Xplained board kits with the on-board WM8904 CODEC.
Description
This program plays sound from PC via Line-In. The audio stream is sent through the SSC interface connected to the on-board WM8904, enabling the sound to be audible using a pair of headphones.
The code can be roughly broken down as follows:
- Enable the clock.
- Initialize and configure the Codec.
- Configure and enable the SSC.
- Configure and enable the XDMA.
Usage
- Build the program and download it into the Xplained board.
- On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
- 115200 baud rate
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- Start the application.
- In the terminal window, the following text should appear:
-- WM8904 example xxx --
-- SAMxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --