DE2-70 User Manual
76
USB
Driver
7-SEG
Control
Accumulator
PC
Figure 6.8. The setup for the USB device demonstration.
6.6 A Karaoke Machine
This demonstration uses the microphone-in, line-in, and line-out ports on the DE2-70 board to
create a Karaoke Machine application. The Wolfson WM8731 audio CODEC is configured in the
master mode, where the audio CODEC generates AD/DA serial bit clock (BCK) and the left/right
channel clock (LRCK) automatically. As indicated in Figure 6.9, the I2C interface is used to
configure the Audio CODEC. The sample rate and gain of the CODEC are set in this manner, and
the data input from the line-in port is then mixed with the microphone-in port and the result is sent
to the line-out port.
For this demonstration the sample rate is set to 48 kHz. Pressing the pushbutton KEY0 reconfigures
the gain of the audio CODEC via the I2C bus, cycling through one of the ten predefined gains
(volume levels) provided by the device.