试验了用BASCOM读写SD卡,完全可以把SD卡当作磁盘来操作,与VB/QB语法兼容,编程非常简单。
AVR-DOS介绍
Features:
·Read and writeASCII-Files
·Read and writeBinary-Files
·Drivers available forCompact Flash Cards, Hard disk, MMC, SD etc.
·Completly integrated inBASCOM-AVR Compiler
·QB/VB compatible syntax
·Completly written inAVR-Assembler (fast and compact)
It workswith:
·DOS-FAT16 and FAT32 formatted partitions
·Files in Root directory and sub directories
·Short DOS File names (8.3)
·Sector Size of 512 Bytes(nearly all CF-Cards and HD)
·Linear sector addressing(LBA-Mode). (all newer CF-Cards and HD). C/H/S-Mode of old HD is not supported.
Please note: AVR-DOS is only free for noncommercial use. For commercial use, or when you are interested in ASM-Code andcomplete documentation please check Licensedirectives
Functions:
Hereis a list of all in BASCOM-AVR integrated statements, which uses AVR-DOSfunctionality.
Disk/Directory:
·InitFileSystem (
·DiskSize
·DiskFree
·Kill
·Dir ([
·FileLen ([
·FileDateTime ([
·FileDate ([
·FileTime ([
·GetAttr ([
·Name
·ChDir
·MkDir
·RmDir
File create, open, read, write, close:
·FreeFile
·Open
·Close
·Flush [
·Print #
·Write #
·Input #
·Line Input #
·Get #
·Put #
·Seek #
Infos about opened files:
·EOF (#
·LOC (#
·LOF (#
·FileAttr (#
Others:
·Bload
·Bsave
『本文转载自网络,版权归原作者所有,如有侵权请联系删除』