Purpose
The Example will help you to get familiar with the USB Framework that is used for rapid development of USB-compliant class drivers such as USB Composite device that integrates a CDC Virtual Serial Port Function and an Audio Speaker Function.
Requirements
This package can be used with SAM V71 Xplained Ultra board that have UDP and SSC.
Windows Driver Update
The composite device is generally supported by Microsoft windows, but some patches are needed for muti-interface functions such as CDC & Audio.
Description
When the board running this program connected to a host (PC for example), with USB cable, host will notice the attachment of a USB device (USB Composite Device) with a USB Virtual COM port(AT91 USB to Serial Converter) and a USB Audio Device.
Usage
- Build the program and download it inside the SAM V71 Xplained Ultra board. Please refer to the Getting Started with SAM V71 Microcontrollers.pdf
- On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- Start the application.
- In the terminal window, the following text should appear:
-- USB CDC + Audio Device Example xxx --
-- SAMxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
- When connecting USB cable to windows, the LED blinks, and the host reports a new USB device attachment (if it's the first time you connect an audio speaker demo board to your host). You can find new "USB Composite Device" and "USB Audio Device" appear in the hardware device list.
- You can play sound in host side through the USB Audio Device, and it can be heard from the earphone connected to the board.
References
- usb_iad_cdc_aud/main.c
- pio: Pin configurations and peripheral configure.
- dacc: DACC interface driver
- adc: ADC interface driver
- usb: USB Framework, CDC, Audio function driver and UDP interface driver
- projects: more detailed information for CDC(Serial) and Audio(Speaker)