SD CARD INTERFACE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hi Guys,   
Am trying to interface an SD Card to PSOC3.Using the PSOC Creator software.   
The hardware connections are correct.   
   
Am reproducing the same waveform pattern using the SPI Module in the software.Yet the MISO stays low...no response to any of the SPI commands...   
   
Here is my code snippet...   
   
/////////////////////////////////////////////////////////////////////////////////////////////////////////////   
SPIM_1_Start();   
for(i=0;i<10;i++)   
{   
SPIM_1_WriteByte(0Xff); //74 clocks   
}   
Pin_1_Write(0); ////make cs low   
SPIM_1_WriteByte(0X40); ///CMD0   
for(i=0;i<8;i++)   
{   
SPIM_1_WriteByte(0Xff); //64 clocks   
}   
SPIM_1_WriteByte(0X95);   
for(i=0;i<4;i++)   
{   
SPIM_1_WriteByte(0Xff); //8x clocks   
}   
SPIM_1_WriteByte(0Xff); //8 clocks//data out must be here   
Pin_1_Write(1); ////make cs high   
   
/////////////////////////////////////////////////////////////////////////////////////////////////////////////   
   
No clue whats wrong...   
please guide   
0 Likes
0 Replies