AT90USBxxx Audio Microphone demonstration
Use of this program is subject to Atmel's End User License Agreement.
Please read file LICENSE.TXT for copyright notice.
This embedded application source code illustrates how to implement a basic audio microphone application with the AT90USBxxx controller.
The demonstration enumerates as a standard USB audio microphone, and can be used to record sample sound loaded in the on-chip flash memory (press joystick select position to be able to record the build in raw file) or a direct sound stream from the STK525 microphone. !! New !! This firmware version also allows to send a sound stream from an external analog source (PF3/ADC3, that is free on STK525), if the Joystick DOWN position is pushed.
By default the sample code is delivered configured for STK525, but this sample application can be configured for both STK525 or AT90USBKey hardware, see TARGET_BOARD define value in config.h file. When the AT90USBKey is used as target hardware, only the build in sound sample mode is available (the AT90USBKey does not provide a microphone interface).
This source code is usable with the following compilers:
- IAR Embedded Workbench (5.11A and higher)
- AVRGCC (WinAVR 20071221 and higher).
Support for other compilers may required modifications or attention for:
- compiler.h file
- special registers declaration file
- interrupt subroutines declarations
As illustrated in the figure bellow, the application entry point is located is the main.c file. The main function first performs the initialization of a scheduler module and then runs it in an infinite loop. The scheduler is a simple infinite loop calling all its tasks defined in the conf_scheduler.h file. No real time schedule is performed, when a task ends, the scheduler calls the next task defined in the configuration file (conf_scheduler.h).
The sample dual role application is based on two different tasks:
- The usb_task (usb_task.c associated source file), is the task performing the USB low level enumeration process in device mode.
- The audio task performs the USB isochronous endpoint data streaming. Regarding the joystick "select" state, the audio data source is either a built in sample raw file, or the direct live stream from either the microphone or an external source connected on a free ADC channel, here ADC3 (PF3).
Generated on Fri Oct 31 15:31:40 2008 for ATMEL by
1.5.3