找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2116|回复: 0
打印 上一主题 下一主题
收起左侧

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

[复制链接]
跳转到指定楼层
楼主
ID:696930 发表于 2020-9-14 11:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
试验了用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 (<Partition#>)
·  DiskSize
·  DiskFree
·  Kill <FileName>
·  Dir ([ <FileName>])
·  FileLen ([ <FileName> ])
·  FileDateTime ([ <FileName>])
·  FileDate ([ <FileName>])
·  FileTime ([ <FileName>])
·  GetAttr ([ <FileName>])   
·  Name<OldFileName>As <NewFileName>   
·  ChDir<PathName>])   
·  MkDir<PathName>])   
·  RmDir<PathName>])   
  File create, open, read, write, close:
           ·  FreeFile
·  Open <FileName> ForInput/Output/Append/Binary as #<File#>
·  Close <File#>
·  Flush [<File#>]
·  Print #<File#>,Variable1; Variable2; …
·  Write #<File#>,Variable1, Variable2, …
·  Input #<File#>,Variable1, Variable2, …
·  Line Input #<File#>,StringVariable
·  Get #<File#>,<Variable> [,<Position>]
·  Put #<File#>,<Variable> [,<Position>]
·  Seek #<File#>[,<New Position>]
  Infos about opened files:
            ·  EOF (#<File#>)
·  LOC (#<File#>)
·  LOF (#<File#>)
·  FileAttr (#<File#>)
  Others:
            ·  Bload <FileName>,<SRAM-Address>
·  Bsave <FileName>,<SRAM-Address>, <Length>

CONFIG_AVR-DOS.zip

3.23 KB, 下载次数: 3, 下载积分: 黑币 -5

Config_MMC.zip

1.61 KB, 下载次数: 3, 下载积分: 黑币 -5

SD-M32.zip

1.21 KB, 下载次数: 4, 下载积分: 黑币 -5

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表