arduino标准库翻译-sd

SD Library

The SD library allows for reading from and writing to SD cards, e.g. on the Arduino Ethernet Shield. It is built on sdfatlib by William Greiman. The library supports FAT16 and FAT32 file systems on standard SD cards and SDHC cards. It uses short 8.3 names for files. The file names passed to the SD library functions can include paths separated by forward-slashes, /, e.g. "directory/filename.txt". Because the working directory is always the root of the SD card, a name refers to the same file whether or not it includes a leading slash (e.g. "/file.txt" is equivalent to "file.txt"). As of version 1.0, the library supports opening multiple files.

The communication between the microcontroller and the SD card uses SPI, which takes place on digital pins 11, 12, and 13 (on most Arduino boards) or 50, 51, and 52 (Arduino Mega). Additionally, another pin must be used to select the SD card. This can be the hardware SS pin - pin 10 (on most Arduino boards) or pin 53 (on the Mega) - or another pin specified in the call to SD.begin(). Note that even if you don't use the hardware SS pin, it must be left as an output or the SD library won't work.

SD标准库支持SD卡的读写。这一标准库依赖于WILLIAM GREIMAN的sdfatlib实现。标准库支持FAT16和FAT32两种文件系统在标准SD卡和SDHC卡上。它使用短8.3标准给文件命名。这一传给SD标准库中函数的文件名包含了被/所分割的文件路径。因为工作目录通常就是SD卡的根目录,根目录指向同一个文件无论它是否包含一个/。在1.0版本中,该标准库支持多个文件的打开。在微控制器和SD卡之间的交流使用SPI,SPI代替了大多数ARDUINO开发板上的11,12,13号接口以及MEGA版上的50,51,52号接口。不仅如此,其他的PIN接口也必须用于选择SD卡。它可能是硬件SS PIN(PIN 10)或者是pin53 或者其他的用于调用SD.begin()的PIN接口。注意,即使你不使用硬件ss pin,它也一定留下成为输出,否则sd library不会工作

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值