I am trying to read every sequenced-byte that is located on a txt file in the SD card. I have been reading quite a lot about the SPI and SD libraries, But I have found a lot of different information that makes me feel confused.

  1. Is it really possible to read information byte per byte without buffering by default as usually happens when you use the SD or SDFat? Do you know a Library that makes it really possible?

  2. Also, I found on the SDFile.cpp that is located in the src folder in the SD library, a part that mentions " // no buffering needed if n == 512 or user requests no buffering" How is it possible to request no buffering? I found the unbufferedread() function but I am afraid that this actually reads the number of bytes and not the information on the bytes (Is it possible?).

    Do you know where may I found examples of this kind of low level functions for me to find out How may I use them for the mentioned purpose. Or a library that would make my life easier in order to get the unbufferred read. I want a continuous data sending into a DAC, that's why I am trying no to get the unbufferred in order to make all the data's sent as continuous as possible.

Sorry for making so many questions, I just started to use Arduino a couple of months ago so I am not that familiarized with all the terms.

Thanks for your advise.

  • There are block sides transfers in SD specs. I'm not sure if there are also byte sized transfers. With SDHC and later, data on SD card is addressed in blocks, so you probably won't be able to just read a byte or two without transferring a whole block. I guess I'm saying "check the SD card specs". – domen May 20 '19 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.