Hi Matt,

Ok this is weird...

I got 0000000000 on my std capacity card. And FFFFFF00 on my high capacity
card on the first call, then 0000000000 on other calls (it was in a forever
loop btw). More weird, when I switch off/on the PIC, I now only
have 0000000000, even on first call...

Now, on another PIC. Using my very first Bee, not the exact same hardware,
but I wrote minix libs on this one, so I know it's working. SDHC (4GB):
0000000000. Std cap (1GB): 08FFFFFFFF. Mmmh.... This one seems to work ? I
tried my known-to-work sample, and... it works ! SDHC won't, but that's
another issue.

So... something is wrong on my hardware on my last bee, something that has
changed since it used to work. I'll try SPI pins asap.

At least, we seem to have few procs in order to test if SD card is
supported or not, right ?

thanks again !
Seb

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

> ok, here's another one to try (after init like the others)... You
> should get 04FFFFFFFF on your standard capacity card. Bit 2 of the
> first byte should be set as it is on mine 0b00000100.
>
> High capacity cards should return something else, although 2 high
> capacity cards I have tried are not giving me what I am expecting. I
> get 0000000000 on my high capacity, but should get something like
> 010001AA00
>
>
> procedure sd_read_if_cond() is
>    sd_chip_select = low   -- enable the sd card
>
>   var byte response
>    send_command(SD_SEND_IF_COND, 0x1AA, response)
>   print_byte_hex(serial_data,response)
>
>   print_byte_hex(serial_data,spi_master)        -- Get a responce
> from the card after each command
>   print_byte_hex(serial_data,spi_master)        -- Get a responce
> from the card after each command
>   print_byte_hex(serial_data,spi_master)        -- Get a responce
> from the card after each command
>   print_byte_hex(serial_data,spi_master)        -- Get a responce
> from the card after each command
>
>   spi_master = 0xFF            -- send 8 clock pulses
>
>   sd_chip_select = high   -- enable the sd card
> end procedure
>
> sd_read_if_cond()
>
> --
> 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