94
Demonstration Source Code
•
Quartus Project directory: C5G_SD_MUSIC
•
Nios II Eclipse:
C5G_SD_MUSIC\Software
Nios II Project Compilation
Before you attempt to compile the reference design under Nios II Eclipse, make sure the project is
cleaned first by clicking ‘Clean’ from the ‘Project’ menu of Nios II Eclipse.
Demonstration Batch File
Demo Batch File Folder:
C5G_SD_MUSIC\demo_batch
The demo batch file includes following files:
•
Batch File for USB-Blaster : C5G_SD_MUSIC.bat, C5G_SD_MUSIC.sh
•
FPGA Configure File :C5G_SD_MUSIC
.sof
•
Nios II Program: C5G_SD_MUSIC
.elf
Demonstration Setup
•
Format your Micro SD Card into FAT16/FAT32 format
•
Place the wave files to the root directory of the Micro 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.
•
Connect a headset or speaker to the C5G board and you should be able to hear the music played
from the Micro SD Card
•
Insert the Micro SD card into the sd socket on C5G borad.
•
Make sure Quartus II and Nios II are installed on your PC.
•
Power on the C5G board.
•
Connect USB Blaster to the C5G board and install USB Blaster driver if necessary.
•
Execute the demo batch file “
C5G_SD_MUSIC
.bat” under the batch file folder
C5G_SD_MUSIC
\demo_batch.
•
Press KEY3 on the C5G board to play the next music file stored in the SD Card and press
KEY0 to play last song.
•
Press KEY2 and KEY1 to increase and decrease the output music volume respectively.
•
Use Switch0 to play music in repeat mode or sequence mode.