Purpose
The HID Audio Composite Example will help you to get familiar with the USB Device Port(UDP) and SSC on SAMv7 Microcontrollers. Also it can help you to be familiar with the USB Framework that is used for rapid development of USB-compliant class drivers such as USB Composite HID and Audio classes.
Requirements
This package can be used with SAMV71 Xplained Ultra board that have both 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
The demo simulates a USB device that integrates HID Keyboard and Audio Desktop Speaker function.
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 Human Interface Device 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 HID + 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_hid_aud/main.c
- pio: Pin configurations and peripheral configure.
- ssc: SSC interface driver
- usb: USB Framework, HID, Audio function driver and UDP interface driver
- usbd_framework
- composite
- audio
- projects: more detailed information for HID(Keyboard) and Audio(Speaker)