Go Down

Topic: SD Libraries (Read 1 time) previous topic - next topic


this looks promissing, thanks


thanks for your help Grag38. After looking at Sd2Card.ccp I figured out it is doing this:

1.Sets I/Os for card, MISO, MOSI, SCK, and chip SelectPin
2.Set CS high write 80 bit logic high MOSI (10 bytes 0xFF)
3.Set CS low
4.write CMD0
5.look for idle response R1 (0000_0001 8'b)
6.write CMD8 with argument 0x1AA
7.read last byte of the R7 response
8.if the last byte is 0xAA the card is SD_CARD_TYPE_SD2 (in our case it is)
9.Issue Acmd41 by first sending Cmd55
10.read last byte of the R7 response for both comands

This agrees with the SD physical layer spec document so that's great.

My next question is when the datalogger program executes the line:

File dataFile = SD.open("datalog.txt", FILE_WRITE);

I want to figure out what is going on in that level of detail. Which library or libraries should I look at to figure out how the text file is created, how the file name is assigned etc.


Go Up