>> I'm still stuck in my SD card issue (any
> way to get device ID through SPI btw ?).
Try this code below:
procedure sd_read_csd_cid(byte in command) is
sd_chip_select = low -- enable the sd card
var byte response,data, step
send_command(command,0,response)
-- wait till ready
while spi_master != 0xFE loop -- wait till data is ready to
read
end loop
-- get data
for 16 using step loop
data = spi_master
print_byte_hex(serial_data, data)
serial_data = " "
end loop
-- get crc
data = spi_master
data = spi_master
sd_chip_select = high -- enable the sd card
end procedure
sd_read_csd_cid(SD_SEND_CSD)
print_crlf(serial_data)
sd_read_csd_cid(SD_SEND_CID)
The data I got is as follows:
00 5E 00 32 1F 59 83 D2 ED B7 3F 8F 96 40 00
7D
28 42 45 53 4D 49 20 20 10 C0 01 BA 70 00 5B 3D
I didn't read about this data too much, but I do see that byte 4
should always be either 32 or 5A. In my case it is 32.
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.