
DE1 User Manual
50
I
#4
K
5
O
#5
L
6
P
#6
:
7
“
+1
Figure 5.3. Usage of the Key
5.3
A Karaoke Machine
This demonstration uses the microphone-in, line-in, and line-out ports on the DE1 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 5.7, 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.
Figure 5.7. Block diagram of the Karaoke Machine demonstration.