×
单片机 > 单片机程序设计 > 详情

BASCOM-AVR利用AVR-DOS库读写SD卡

发布时间:2024-05-19 发布时间:
|

试验了用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 ([ ])
·NameAs
·ChDir])
·MkDir])
·RmDir])
File create, open, read, write, close:
·FreeFile
·Open ForInput/Output/Append/Binary as #
·Close
·Flush []
·Print #,Variable1; Variable2; …
·Write #,Variable1, Variable2, …
·Input #,Variable1, Variable2, …
·Line Input #,StringVariable
·Get #, [,]
·Put #, [,]
·Seek #[,]
Infos about opened files:
·EOF (#)
·LOC (#)
·LOF (#)
·FileAttr (#)
Others:
·Bload ,
·Bsave ,,


『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
ARM 汇编的必知必会