資源簡介
采用51單片機實現(xiàn)SD卡的讀寫操作,源程序以及原理圖
代碼片段和文件信息
#include?“common.h“
#include?“Fat.h“
#include?“Fat32.h“
#include?“DEVICE.H“
#include?“HAL.H“
////////////////////////////////////////
extern?SYS_INFO_BLOCK?xdata?DeviceInfo;
extern?FILE_INFO?xdata?ThisFile;
extern?unsigned?char?xdata?DBUF[];//BUFFER_LENGTH];
unsigned?char?xdata?FATBUF[512];
////////////////////////////////////////
unsigned?long?FirstSectorofCluster(unsigned?int?clusterNum)
{
unsigned?long?temp;
temp=clusterNum-2;
temp=temp*DeviceInfo.BPB_SecPerClus;
temp=temp+DeviceInfo.FirstDataSector;
return?temp;
}
unsigned?int?ThisFatSecNum(unsigned?int?clusterNum)
{
???unsigned?int?temp;
???temp=clusterNum/(DeviceInfo.BPB_BytesPerSec/2);
???temp=temp+DeviceInfo.FatStartSector;
???return?temp;
}
unsigned?int?ThisFatEntOffset(unsigned?int?clusterNum)
{????
return?(clusterNum%(DeviceInfo.BPB_BytesPerSec/2))*2;
}
unsigned?int?GetNextClusterNum(unsigned?int?clusterNum)
{
unsigned?int?FatSecNumFatEntOffset;
FatSecNum=ThisFatSecNum
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.CA....?????88388??2005-03-01?18:22??硬件原理圖\單片機讀寫SD_MMC卡.pdf
????.CA....????????37??2003-05-29?04:28??測試命令\CreatDir
????.CA....????????37??2003-05-29?04:14??測試命令\CreatFile
????.CA....???????101??2003-05-29?05:28??測試命令\CreatLongNameDir
????.CA....???????101??2003-05-29?05:27??測試命令\CreatLongNameFile
????.CA....????????37??2000-01-11?22:12??測試命令\DeleteFile
????.CA....????????37??2000-01-13?16:21??測試命令\DetectDisk
????.CA....????????37??2003-05-29?04:16??測試命令\DownDir
????.CA....????????37??2000-01-11?22:13??測試命令\GetSpace
????.CA....????????37??2000-01-11?22:02??測試命令\ListFile
????.CA....????????37??2003-05-29?04:05??測試命令\OpenFile
????.CA....????????37??2003-05-29?05:27??測試命令\ReadFile
????.CA....????????37??2003-05-29?05:27??測試命令\SetPointer
????.CA....????????37??2003-05-29?04:06??測試命令\UpDir
????.CA....????????37??2003-05-30?20:05??測試命令\UpRootDir
????.CA....????????47??2003-05-29?05:27??測試命令\WriteFile
????.CA....??????6523??2003-12-12?22:09??固件程序C51源代碼\V3.0\AT89X52.H
????.CA....????198899??2008-02-15?12:46??固件程序C51源代碼\V3.0\C51_UsbDisk
????.CA....?????78451??2008-02-15?12:46??固件程序C51源代碼\V3.0\C51_UsbDisk.hex
????.CA....???????162??2008-02-15?12:46??固件程序C51源代碼\V3.0\C51_UsbDisk.lnp
????.CA....????171047??2008-02-15?12:46??固件程序C51源代碼\V3.0\C51_UsbDisk.M51
????.CA....??????4270??2008-02-21?14:09??固件程序C51源代碼\V3.0\C51_UsbDisk.Opt
????.CA....?????????0??2008-02-21?14:09??固件程序C51源代碼\V3.0\C51_UsbDisk.plg
????.CA....??????1915??2006-10-27?00:51??固件程序C51源代碼\V3.0\C51_UsbDisk.Uv2
????.CA....??????4270??2008-02-19?17:08??固件程序C51源代碼\V3.0\C51_UsbDisk_Opt.Bak
????.CA....??????1078??2000-01-14?00:46??固件程序C51源代碼\V3.0\common.h
????.CA....??????3997??2006-01-03?11:41??固件程序C51源代碼\V3.0\DEVICE.C
????.CA....??????2055??2005-02-26?17:41??固件程序C51源代碼\V3.0\DEVICE.H
????.CA....??????7280??2006-10-27?00:20??固件程序C51源代碼\V3.0\DEVICE.LST
????.CA....?????18175??2006-10-27?00:20??固件程序C51源代碼\V3.0\DEVICE.OBJ
............此處省略37個文件信息
- 上一篇:51單片機播放WAV
- 下一篇:51單片機萬用表原理圖PCB
評論
共有 條評論