DE3 User Manual
69
demonstration we will show how to browse files stored in the root directory of a SD card and how
to read the file contents of a specific file. The SD card is required to be formatted as FAT File
System in advance. Long file name is supported in this demonstration.
Figure 5.11
shows the hardware system block diagram of this demonstration. The system requires a
50 MHz clock provided from the board. The PLL generates a 100 MHz clock for the NIOS II
processor and other controllers. Four PIO pins are connected to the SD card socket. SD 1-bit Mode
is used to access the SD card hardware. The SD 1-bit protocol and FAT File System function are all
implemented by NIOS II software. The software is stored in the on-chip memory.
FPGA
SOPC
PIO
Controller
S
y
st
em
I
n
te
rc
o
n
n
ec
t
F
a
b
r
ic
NIOS II
JTAG
Timer
On-Chip
Memory
PIO
Controller
Button
LED
50MHz
PLL
PIO
Controller
SD Card
Socket
Figure 5.11. Block Diagram of the SD Card Demonstration
Figure 5.12
shows the software stack of this demonstration. The NIOS PIO block provides basic IO
functions to access hardware directly. The functions are provided from NIOS II system and the
function prototype is defined in the header file <io.h>. The SD-CARD block implements SD 1-bit
mode protocol for communication with SD cards. The FAT File System block implements reading
function for FAT16 and FAT 32 file system. Long filename is supported. By calling the exported
FAT functions, users can browse files under the root directory of the SD card. Furthermore, users
Summary of Contents for Altera DE3
Page 1: ...Altera DE3 Board ...
Page 67: ...DE3 User Manual 64 Figure 5 5 Plug USB Devices into DE3 Figure 5 6 Display Device Information ...
Page 75: ...DE3 User Manual 72 Figure 5 14 Display SD Card Information for the SD Card Demonstration ...
Page 79: ...DE3 User Manual 76 Figure 5 19 Parameter Settings in DDR2 Controller ...
Page 114: ...DE3 User Manual 111 Figure D 5 The reported message of the invalid I O pins ...