Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 27th September 2007, 11:20 AM   (permalink)
Lightbulb sd card reponse...plz help

hi all

Am trying to make my laptop recognize an virtual SD card (sd card adapter connected to the spi of my microcontroller(PSOC controller)). I have seen many projects where in people have integrated the sd card with microcontroller. but i was not able to make out the response that the sd card is sending back.

One of it says expecting R1 but then what is R1 in terms of value.??

i went through the sandisk manual V1.9 which has he details in some of its registers like csd and csr. how ll i be able to emulate this.??

there is a format for R1 and then are things like payload and the crc.do i need to calculate and send it with every response.??

what are the commands that i should expect and what should i reply to make it recognize it as a SD card.

Plz consider this thread...any help regarding this will be greatly appreciated.

thnks a lot brothers...
ranjitneo is offline  
Old 28th September 2007, 04:41 PM   (permalink)
Default

There are two types of responses that the SD card can send, R1 and R2. They are simmilar, but for the most part you only need to worry about R1 (R2 is only returned on a couple of bulk commands I believe).

If you are using the SPI protocol, then you probably won't need to worry about CRCs unless you want to (it can be activated, but is not by default). The SDIO protocol, which is the newer/faster protocol that most commercial devices will use but it is significantly more complex.

Also, there are two specifications for the SD card. They recently (as a couple of years ago) took the complete specification out of public domain, and I suspect that you have the simplified specification. Have a look at the more detailed spec, which you can find here (hosted on my own site):

http://stellarcore.com/mp3_player/Pr...dv2.2final.pdf

Good luck, it can be challenging, but is well worth the effort. If you need more help, let me know what specific problem your having and I'll see if I can help. I have working C source somewhere that I wrote for a PIC18F if you'd like I can dig it out.
Stellarcore is offline  
Old 3rd October 2007, 07:33 AM   (permalink)
Default

hi...

thanks for the reply it was really helpful...

i checked for the data i am getting over the spi..
first i checked for cmd0 that is

cmd_00[] = "0x40,0x00,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x00 ";
(plz correct me if i am wrong)

then if matching then i send the response R1 that is 0x00

then i check for the following

cmd_55[] = "0x77,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00 ";
Acmd_41[] = "0x69,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00 ";
cmd_17[] = "0x51,0x00,0x00,0x01,0xBE";

each time if i get these packets then i send R1 which is 0x00;

then i send the boot packet which is

unsigned char boot_table[] = "0xEB,0x00,0x90,0x50,0x52,0x4F,0x01,0x00,0x00,0x00 ,0x00,0x20,0x00,0x01,0x01,0x00,0x02,0x20,0x00,0x20 ,0x20,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x80,0x29,0x31,0x39,0x38,0x35 ,0x50,0x52,0x4F,0x01,F,A,T,1,6,0xAA,0x55";

but nothing happens after this...i am totally struck...plz help
ranjitneo is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
=>> How To Interface Sd Card With Pic...? <<= chamith20xx Micro Controllers 7 13th July 2007 12:22 AM
Why does this Card Reader Stop at 75%? DigiTan Electronic Projects Design/Ideas/Reviews 0 28th June 2005 08:00 AM
how to start to develop SIM card reader janetsmith2000@yahoo.com Micro Controllers 4 21st June 2005 10:59 AM
smart card door lock amr_karimm Electronic Projects Design/Ideas/Reviews 2 17th April 2004 11:55 PM
smart card.....or Xphone card circuit bogdanfirst General Electronics Chat 4 23rd September 2003 12:14 AM



All times are GMT. The time now is 10:57 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker