Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sd card cmd8 invalid response

Status
Not open for further replies.

shari2643

Newbie level 4
Newbie level 4
Joined
Jul 27, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
44
HTML:
COMPILER:     HITECH C18 9.8
CONTROLLER: PIC18F4520
SIMULATION: PROTEUS ISIS
Hi ppl .I am making a data logger for SD,MMC CARD. FOR SD CARD initialization command CMD8(for sd cards v2+) i am getting invalid command response. CMD0 is giving valid response ie 01. I am sending the following command

HTML:
CMD8 = 0x48 0x00 0x00 0x01 OxAA 0x87
HTML:
Response i should be getting is 05 . what i am getting is 04 (As proteus has no SD CARD SO I AM USING MMC CARD IN SIMULATION).Is 04 response ok?
kindly If anyone of you could spare a few moments and give a direction.

Code:
 SS=0;
//CMD8 
	  WriteSPI (0x48);
	  WriteSPI (0x00);
	  WriteSPI (0x00);
          WriteSPI (0x01);
          WriteSPI (0xAA); 
	  WriteSPI (0x87);	
	  ReadSPI();
	  save=ReadSPI();

//RESPONCE OF CMD8 is
				USARTWriteLine(" ");
	       		        USARTWriteString("   THE RESPONCE OF CMD8 IS :");
				USARTWriteInt(save,2);
				USARTWriteString("\r\n");
	 if(save==0x1AA) //IF RESPONSE IS 0xAA
	 {
		USARTWriteString("**SD CARD IS V2 OR HIGHER**");	
     }
	 else // IF RESPONSE IS 1 
	 {
	  	USARTWriteString("**CARD IS MMC OR SD CARD V1 **");
	 }		
	  SS=1;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top