User manual
DE2 User Manual
65
During operation the Nios II processor will check if the FIFO memory of the Audio DAC Controller
becomes full. If the FIFO is not full, the processor will read a 512-byte sector and send the data to
the FIFO of the Audio DAC Controller via the Avalon bus. The Audio DAC Controller uses a 48
kHz sample rate to send the data and clock signals to the audio CODEC. The design also mixes the
data from microphone-in with line-in for the Karaoke-style effects.
Figure 5.11. Block diagram of the SD music player demonstration.
Demonstration Setup, File Locations, and Instructions
• Project directory: DE2_SD_Card_Audio
• Bit stream used: DE2_SD_Card_Audio.sof
• Nios II Workspace: DE2_SD_Card_Audio
• Format your SD card into FAT16 format
• To play a music file with this demonstration, the file must use the 48KHz sample rate and
16-bit sample resolution WAV format. Copy one or more such WAV files onto the
FAT16-formatted SD Card. Due to a limitation in the software used for this demonstration, it
is necessary to reformat the whole SD Card if any WAV file that has been copied onto the
card needs to be later removed from the SD Card
• Load the bit stream into the FPGA
• Run the Nios II IDE under the workspace DE2_SD_Card_Audio
• Connect a headset or speaker to the DE2 board and you should be able to hear the music
played from the SD Card
Figure 5.12 illustrates the setup for this demonstration.