# Basic AC97 Project 1.4

## Purpose

This example shows how to use the AC97 controller of AT91 microcontrollers to play and record sound, as well as control the on-board AC97 codec configuration.

## Hardware Requirements

This package can be used with the following Atmel evaluation kits:

- AT91SAM9263-EK
- AT91SAM9RL-EK
- AT91CAP9-DK

## Description

When launched, this program displays a menu on the DBGU, enabling the user to choose between several options:

- Play a pre-loaded WAV file using the AC97 codec output
- Display the WAV file information (sample rate, etc.)
- Record a sample using the AC97 codec microphone input
- Play back the recorded file
- Adjust the playback volume

To be able to play a WAV file, it must first be loaded prior to launching the application. It must be downloaded in external SDRAM, at address 0x20005000; this can be easily done using SAM-BA.

## Usage

1. Build the program and download it inside the evaluation board using SAM-BA. Please refer to the SAM-BA User Guide for more information about this step.
2. Using SAM-BA, download the provided WAV file inside the external SDRAM at offset 0x5000.
3. Plug earphones to the "headphone line out" jack of the evaluation board.
4. Plug a microphone to the "microphone input" jack of the evaluation board.
5. On the computer, open the DBGU port with a terminal application (e.g. HyperTerminal on Microsoft Windows).

- Settings: 115200 bauds, 8 bits, 1 stop bit, no parity, no flow control.

6. Start the application.
7. The application menu should appear as shown below (example for AT91SAM9263):

   > `-- Basic AC97 Project 1.4 --
   > Menu :
   > ------
   > W: Play the WAV file pre-loaded in SDRAM
   > I: Display the information of the WAV file
   > R: Start recording sound
   > +/-: Adjust volume (16)`

   The user can then choose any of the available options to perform the described action.

###### Atmel Corporation ©2008