Dac And Adc Configuration; U-Series Adc; Hid Example - XMOS xCORE-200 Multi-channel Audio board Design Manual

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide
When changing sample frequency, the
both the DAC and ADC into reset by setting P4C[0] and P4C[1] low. It selects the
required master clock and keeps both the DAC and ADC in reset for 1ms to allow
the clocks to stabilize. The DAC and ADC are brought out of reset by setting P4C[0]
and P4C[1] back high.
6.4.2 DAC and ADC Configuration
The board is equipped with a single stereo audio DAC (Cirrus Logic CS4392) and a
single stereo ADC (Cirrus Logic 5340) giving 2 channels of input and 2 channels of
output.
Configuration of the DAC takes place using I2C. The design uses the open source
I2C component sc_i2c
set into slave mode via its configuration pins on the board.

6.4.3 U-Series ADC

The codebase includes code exampling how the ADC built into the U-Series device
can be used. Once setup a pin is used to cause the ADC to sample, this sample is
then sent via a channel to the xCORE device.
On the multi-function audio board the ADC is clocked via the same pin as the I2S
LR clock. Since this means that a ADC sample is received every audio sample the
ADC is setup and it's data received in the audio driver core ( audio.xc ).
The ADC inputs for the U8 device are simply pinned out to test point headers. As
such there is no example functionality attached to the ADC data.

6.4.4 HID Example

The codebase includes an example of a HID controls implementation using the two
buttons and switch on the multi-function audio board.
This example code is enabled if HID_CONTROLS are all defined as 1 . When this define
is enabled a call to the function Vendor_ReadHIDButtons() is enabled and must be
implemented. Failing to do so will result in a build error.
The example Vendor_ReadHIDButtons() firstly reads the state of the buttons and
switch. These inputs are all connected to the same 4-bit port. Since the buttons
are active low and the HID report is active high the value read is inverted. Some
bitwise operations are then used to exact the individual states of the buttons and
switch.
If the switch input is low (i.e. high when inverted) then the button states are shifted
up into the position required perform volume up and down and written into the
hidData[] array:
28
http://www.github.com/xcore/sc_i2c
XM0088546.1
AudioHwConfig()
28
No configuration of the ADC is required in software, it is
75/110
function first puts the

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents