91
•
Press KEY3 of the C5G board to start reading SD Card.
•
The program will display SD Card information, as shown in
Figure 6-19 Running result of SD_CARD demo on C5G board
6
6
.
.
7
7
S
S
D
D
C
C
a
a
r
r
d
d
m
m
u
u
s
s
i
i
c
c
p
p
l
l
a
a
y
y
e
e
r
r
d
d
e
e
m
m
o
o
n
n
s
s
t
t
r
r
a
a
t
t
i
i
o
o
n
n
Many commercial media/audio players use a large external storage device, such as an SD Card or
CF card, to store music or video files. Such players may also include high-quality DAC devices so
that good audio quality can be produced. The C5G board provides the hardware and software
needed for Micro SD Card access and professional audio performance so that it is possible to design
advanced multimedia products using the C5G board.
In this demonstration we show how to implement an SD Card Music Player on the C5G board, in
which the music files are stored in an SD Card and the board can play the music files via its
CD-quality audio DAC circuits. We use the Nios II processor to read the music data stored in the
SD Card and use the Analog Devices SSM2603 audio CODEC to play the music.
shows the hardware block diagram of this demonstration. The system requires a 50
MHz clock provided from the board. The PLL generates a 100MHz clock for Nios II processor and
the other controllers except for the audio controller. The audio chip is controlled by the Audio
Controller which is a user-defined SOPC component. This audio controller needs an input clock of
18.432 MHz. In this design, the clock is provided by the PLL block. The audio controller requires
the audio chip working in master mode, so the serial bit (BCK) and the left/right channel clock
(LRCK) are provided by the audio chip. Two PIO pins are connected to the I2C bus. The I2C
protocol is implemented by software. Four PIO pins are connected to the SD Card socket. SD 4-Bit
Mode is used to access the SD Card and is implemented by software. All of the other SOPC
components in the block diagram are SOPC Builder built-in components. The PIO pins are also