Instructions
328Libraries
© 2013 Conrad Electronic
5.21.1 FAT Support
FAT Specification
FAT support: FAT12, FAT16 and FAT32.
Open files: Unlimited, depending on available memory.
File size: Dependent from FAT Type (up to 4G bytes).
Volume size: Dependent from FAT Type (up to 2T bytes at 512 bytes/sector)
Cluster size: Dependent from FAT Type (up to 64K bytes at 512 bytes/sector)
Sector size: Dependent from FAT Type (up to 4K bytes)
The SD card functions support no long file names (LFN) under FAT. Firstly, the long file names
have expanded RAM and flash memory requirements, since they are based on Unicode, secondly,
the company Microsoft (TM) holds a patent on the use of LFN. The file or directory name must there-
fore have the 8.3 format.
5.21.2 SDC Return Values
All SDC Functions return a status Byte that describes the success of the SDC operation.
Error
Value
Description
FR_OK
0
operation successful
FR_DISK_ERR
1
physical access failed
FR_INT_ERR
2
wrong FAT structure or internal error
FR_NOT_READY
3
no disk available
FR_NO_FILE
4
file not found
FR_NO_PATH
5
path not correct
FR_INVALID_NAME
6
invalid file name
FR_DENIED
7
file access denied
FR_EXIST
8
file already exists
FR_INVALID_OBJECT
9
file not opened with SDC_FOpen
FR_WRITE_PROTECTED
10
disk write protected
FR_INVALID_DRIVE
11
drive number invalid
FR_NOT_ENABLED
12
logical drive not mounted
FR_NO_FILESYSTEM
13
no FAT table found on disk
FR_MKFS_ABORTED
14
not possible, since mkfs not available
FR_TIMEOUT
15
device is not answering
5.21.3 SDC_FClose
SDCard Functions
Syntax
byte SDC_FClose(byte fil_ramaddr[]);
Sub SDC_FClose(ByRef fil_ramaddr As Byte) As Byte