LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read/write SD memory card with NI-8451 using SPI communication

Hi all,
here I explain my problem:
I have an instrument using a SD memory card and an external SPI connection.
I have to check if the connection bethween SD card and the external SPI connector is working.
In order to do this check, I have to write something on the SD memory card and then read it and check if readed and written data are the same.
I have to use a NI-8451 device in SPI protocol mode but LabVIEW drivers allow me only to init, read and write bytes on the SPI protocol.
Where could I find LabVIEW VIs implementing the SPI communication protocol for SD memory card read / write ?
Does anybody can help me ?
 
Thanks.
Dordon73
0 Kudos
Message 1 of 4
(3,778 Views)
On Jan 23, 3:40 am, dordon73 <x...@no.email> wrote:
> Hi all,
> here I explain my problem:
> I have an instrument using a SD memory card and&nbsp;an external SPI connection.
> I have to check if the connection bethween SD card and the external SPI connector is working.
> In order to do this check, I have to&nbsp;write something&nbsp;on&nbsp;the SD memory card and then read it and check if readed and written data are the same.
> I have to use a NI-8451 device in SPI protocol mode but LabVIEW drivers allow me only to init, read and write bytes on the SPI protocol.
> Where could I find LabVIEW VIs&nbsp;implementing the SPI communication protocol for SD memory card read / write ?
> Does anybody can help me ?
> &nbsp;
> Thanks.
> Dordon73

Dordon73,

SPI bus is not a standard. You just send a certain number of bytes
and receive the same number of bytes.

You need to know how to use the SD protocol. I haven't looked into
that. But when you find it, it should tell you what commands/data to
send and what data will be received.

Chuck
0 Kudos
Message 2 of 4
(3,763 Views)

Dordon73,

SPI bus is not a standard. You just send a certain number of bytes
and receive the same number of bytes.

You need to know how to use the SD protocol. I haven't looked into
that. But when you find it, it should tell you what commands/data to
send and what data will be received.

Chuck

 

Hello Chuck,

yes, I know this and I also found on internet some documents concerning the SD memory card communication protocol on SPI connection.  But it looks not so easy and quick to implement (I fould some documents but with just a description of the SPI protocol of SD memories) and my hope was to find something still implemented.

Even if nothing is implemented in LabVIEW, also something in C or Visual Basic could be useful.  Can you help me in some way ?

Thanks for your answer.

Dordon73

0 Kudos
Message 3 of 4
(3,755 Views)
On Jan 24, 2:10 am, dordon73 <x...@no.email> wrote:
> Dordon73,SPI bus is not a standard. You just send a certain number of bytesand receive the same number of bytes.You need to know how to use the SD protocol. I haven't looked intothat. But when you find it, it should tell you what commands/data tosend and what data will be received.Chuck
> &nbsp;
> Hello Chuck,
> yes, I know this and I also found on internet some documents concerning the SD memory card communication protocol on SPI connection.&nbsp; But it looks not so easy and quick to implement (I fould some documents but with just a description of the SPI protocol of SD memories)&nbsp;and my hope was to find something still implemented.
> Even if nothing is implemented in LabVIEW, also something in C or Visual Basic could be useful.&nbsp; Can you help me in some way ?
> Thanks for your answer.
> Dordon73

Dordon73,
a quick Google search gave me http://www.k9spud.com/sdcard/ which has
c source code for simple read of one sector. (Firmware Source Code on
the right side of the screen.)

Good luck. If you get it working, post something in the NI forums so
others can benefit.
0 Kudos
Message 4 of 4
(3,737 Views)