05.06.2015 Views

DE2-115: User Manual

DE2-115: User Manual

DE2-115: User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: execute <strong>DE2</strong>_<strong>115</strong>_NIOS_DEVICE_LED\demo_batch\nios_device_led.bat will<br />

download .sof and .elf files.<br />

Figure 6-6 illustrates the setup for this demonstration.<br />

Figure 6-6 Setup for the USB device demonstration<br />

6.5 A Karaoke Machine<br />

This demonstration uses the microphone-in, line-in, and line-out ports on the <strong>DE2</strong>-<strong>115</strong> board to<br />

create a Karaoke Machine application. The Wolfson WM8731 audio CODEC is configured in the<br />

master mode, with which the audio CODEC generates AD/DA serial bit clock (BCK) and the<br />

left/right channel clock (LRCK) automatically. As indicated in Figure 6-7, the I2C interface is used<br />

to configure the Audio CODEC. The sample rate and gain of the CODEC are set in this manner, and<br />

the data input from the line-in port is then mixed with the microphone-in port and the result is sent<br />

to the line-out port.<br />

For this demonstration the sample rate is set to 48kHz. Pressing the pushbutton KEY0 reconfigures<br />

the gain of the audio CODEC via I2C bus, cycling within ten predefined gain values (volume levels)<br />

provided by the device.<br />

84

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!