AT90USBxxx USB Host Audio Sample applicaton

License

Use of this program is subject to Atmel's End User License Agreement.

Please read file LICENSE.TXT for copyright notice.

Description

This embedded application source code illustrates how to implement a simple USB host application with basic Audio microphone support.

To use the application, the SK525 should be configured to be self powered (see STK525 hardware manual).

About the sample application

The application uses host operating mode of the STK525. In host mode, the USB can be connected (with a mini A connector attached to the mini AB STK525 receptacle) to a standard USB Audio microphone device (or another STK525 running device Audio Device application). The USB configuration requires only an ISOCHRONOUS IN PIPE more the default Control endpoint.

Architecture

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 application is based on two different tasks:

arch_full.gif

The Digital-to-Analog converter can be built like user wants (external D/A converter, PWM, R-2R ladder). This demonstration package uses R-2R ladder to avoid synchronisation mismatches between PWM frequency and ouput updating rate. The 8 bits R-2R ladder used is connected on the PORTA. As explained in the "host_audio_task.c" file, the "void DAC_SendPort(U8 data_dac)" function can be adapted to a solution other than R-2R ladder D/A converter.

First the basic schematic of a R-2R ladder. The resistors value can be changed, but still respecting the 1:2 ratio. If this schematic is used, the DAC_OUT label must be defined to PORT_A_RIGHT in "host_audio_task.h" file.

r2r_ladder_right.GIF

And then, another solution that is more easy to implement directly on the EXPAND0 connector of a STK525 board. If this schematic is used, the DAC_OUT label must be defined to PORT_A_CPLX in "host_audio_task.h" file.

r2r_ladder_cplx.GIF

Generated on Fri Oct 31 15:19:18 2008 for ATMEL by  doxygen 1.5.3