Anonymous
Not applicable
Mar 29, 2010
02:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2010
02:57 AM
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
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
3 Replies
Anonymous
Not applicable
Mar 30, 2010
10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 30, 2010
10:47 PM
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
Thanks,
Victor Andres
Anonymous
Not applicable
Feb 28, 2011
11:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 28, 2011
11:35 PM
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.
Anonymous
Not applicable
Mar 07, 2011
06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 07, 2011
06:26 AM
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