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

PSoC™ Creator & Designer Forum Discussions

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
3 Replies
Anonymous
Not applicable
        I have not work with sd cards, but im interested... I just know that some sd cards doesnt support SPI mode, have you check this? If you have some sucess let us know.   
   
Thanks,   
Victor Andres   
0 Likes
Anonymous
Not applicable

Hi MDM .. Did u able to find out the issue with the sd card interface. I am new to PSoC and I am als o facing the same issue with the interface.

0 Likes
Anonymous
Not applicable

Hi,

   

 

   

The SPI component in PSoC Creator has Slave Select Pin. This can be used to assert the Slave when Data is being written to it or when Data is read from it.

   

The MISO pin of SPI component should be unsynchronized. This can be done by unchecking the 'Input Synchronized' for the MISO pin of the SPI master.

   

Let us know if this helped in getting the SPI communication to work.

   

 

   

Regards,

   

dasg

0 Likes