Anonymous
Not applicable
Mar 29, 2010
02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2010
02:56 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
Labels
- Labels:
-
PSoC 3
0 Replies