ptjw
Junior Member level 3

hello all,
i am to configure a spartan 3A to interface with a SD card reader in SPI mode using MOSI, MISO, CS and CLK.
i have written code in VHDL to implement this, but cannot verify whether it works until the actual hardware is here (which is still a few weeks away).
i currently have a few simple questions:
lets say i have a txt file in the SD card called abc.txt with the text 'abc' inside. i know that to access a block of data (512 bytes) from a SD card in SPI mode i would have to send CMD 17 (read block) to the SD card. i know that CMD17 requires an address argument to be sent to the SD card, specifying where on the card do i want the data...so how do i find the address of the txt file?
i used winhex and opened a SDcard connected to my computer, i created the abc.txt file with the text 'abc'. from what i can see from winhex, does it mean that the address i have to specify is 0422EE00?
also, would the reply from the SDcard be (plain and simply) 'abc' in binary form? eg: 61h 62h 63h -> 01100001 01100010 01100011
thats all the questions i have for now, would appreciate any help! :grin:
i am to configure a spartan 3A to interface with a SD card reader in SPI mode using MOSI, MISO, CS and CLK.
i have written code in VHDL to implement this, but cannot verify whether it works until the actual hardware is here (which is still a few weeks away).
i currently have a few simple questions:
lets say i have a txt file in the SD card called abc.txt with the text 'abc' inside. i know that to access a block of data (512 bytes) from a SD card in SPI mode i would have to send CMD 17 (read block) to the SD card. i know that CMD17 requires an address argument to be sent to the SD card, specifying where on the card do i want the data...so how do i find the address of the txt file?

i used winhex and opened a SDcard connected to my computer, i created the abc.txt file with the text 'abc'. from what i can see from winhex, does it mean that the address i have to specify is 0422EE00?
also, would the reply from the SDcard be (plain and simply) 'abc' in binary form? eg: 61h 62h 63h -> 01100001 01100010 01100011
thats all the questions i have for now, would appreciate any help! :grin: