so i want to read bytes from a file really fast . i want to read a byte from the file on the sd card in less than 3us then when i get to read again i must get the next byte in 3us and so on . i can program in assembly and C . so can this be done with the arduino SD lib ? or should i write a new thing from scratch (that would take time , FAT16 with spi is not that simple)
When you read from the SD card, you are usually reading from a buffer. The first read actually fetches data from the card. The next n reads read from the buffer. After the buffer is empty, the next read actually fetches more data.
You can see this by timing reads. The first will take some time. The next 500+ will take next to no time. Then, around 512, a read will take a while. Then 500+ more almost instantaneous reads, then another time consuming read.
You’ll need to experiment to see if the periodic delays significantly impact your program.