English
Language : 

DE2-115 Datasheet, PDF (92/116 Pages) Altera Corporation – The DE2-115 package contains all components needed to use the DE2-115 board in conjunction with a computer that runs the Microsoft Windows OS.
Main
System
Call
SEG7
I2C
Audio
IR
Receiver
WAVE Lib
FAT16/FAT32
SD 4-bit Mode
Nios HAL
Figure 6-14 Software Stack of the SD music player demonstration
The audio chip should be configured before sending audio signal to the audio chip. The main
program uses I2C protocol to configure the audio chip working in master mode; the audio output
interface working in I2S 16-bits per channel and with sampling rate according to the wave file
contents. In audio playing loop, the main program reads 512-byte audio data from the SD Card, and
then writes the data to DAC FIFO in the Audio Controller. Before writing the data to the FIFO, the
program will verify if the FIFO is full. The design also mixes the audio signal from the
microphone-in and line-in for the Karaoke-style effects by enabling the BYPASS and SITETONE
functions in the audio chip.
Finally, users can obtain the status of the SD music player from the 16x2 LCD module, the
7-segment display, and the LEDs. The top and bottom row of the LCD module will display the file
name of the music that is played on the DE2-115 board and the value of music volume, respectively.
The 7-segment displays will show the elapsed time of the playing music file. The LED will indicate
the audio signal strength.
„ Demonstration Setup, File Locations, and Instructions
• Project directory: DE2_115_SD_Card_Audio_Player
• Bit stream used: DE2_115_SD_Card_Audio_Player.sof
• Nios II Workspace: DE2_115_SD_Card_Audio_Player\Software
• Format your SD Card into FAT16/FAT32 format
• Place the wave files to the root directory of the SD Card. The provided wave files must have a
sample rate of either 96K, 48K, 44.1K, 32K, or 8K. In addition, the wave files must be stereo
and 16 bits per channel.
• Load the bitstream into the FPGA on the DE2-115 board(note*1)
• Run the Nios II Software under the workspace
DE2_115_SD_Card_Audio_Player\Software(note*1)
91