Clocking And Clock Selection; Codec 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

6.2.1 Clocking and Clock Selection

The actual hardware involved in the clock generation is somewhat different to the
single tile L-Series board. Instead of two separate oscillators and switching logic
a single oscillator with a Phaselink PLL is used to generate fixed 24.576MHz and
22.5792MHz master-clocks.
This makes no change for the selection of master-clock in terms of software
interaction: A single pin is (bit 1 of port 4C) is still used to select between the two
master-clock frequencies.
The advantages of this system are fewer components and a smaller board area.
When changing sample frequency, the CodecConfig() function first puts the CODEC
into reset by setting P4C[2] low. It selects the required master clock and keeps the
CODEC in reset for 1ms to allow the clocks to stabilize. The CODEC is brought out
of reset by setting P4C[2] back high.
6.2.2 CODEC Configuration
The board is equipped with two stereo audio CODECs (Cirrus Logic CS4270) giving
4 channels of input and 4 channels of output. Configuration of these CODECs
takes place using I2C, with both sharing the same I2C bus. The design uses the
open source I2C component sc_i2c

6.2.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 DJ kit 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 code simply writes the ADC value to the global variable g_adcVal for use
elsewhere in the program as required. The ADC code is enabled by defining
SU1_ADC_ENABLE as 1 .

6.2.4 HID Example

The codebase includes an example of a HID volume control implementation based
on ADC data. This code should be considered an example only since an absolute
ADC input does not serve as an ideal input to a relative HID volume control. Buttons
(such as that on the single tile L-Series board) or a Rotary Encoder would be a more
fitting choice of input component.
This code is enabled if HID_CONTROLS , SU1_ADC_ENABLE and ADC_VOL_CONTROL are all
defined as 1 .
27
http://www.github.com/xcore/sc_i2c
XM0088546.1
27
69/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents