Hi Matt,

Thanks a lot for this! I tried quicky this, code gets stuck within the
"while spi_master != 0xFE loop", spi_master being 0x00 in my case.
Tried with std SD and SDHC, same results btw. I'm doomed :)

cheers,
Seb



2011/11/15 mattschinkel <[email protected]>

> 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.
>
>


-- 
Sébastien Lelong

-- 
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.

Reply via email to