Main Site Documentation

Connecting SD Card to Cerb40


#1

I am working on connecting a sparkfun micro SD breakout board to a Cerb40. I am using the following https://www.sparkfun.com/products/544, can anyone help with the connections between the Cerb40 and the SD card.

Matt


#2

Looking into the documentation and some web links I found the following

  1. SPI is socket type S (See wiring guide http://wiki.tinyclr.com/index.php?title=Gadgeteer_Sockets for pins)

  2. The following is the pin connections converted by name (example here http://mbed.org/cookbook/SD-Card-File-System)

CS --> CS
DI --> Mosi
SCK --> Sck
DO - MISO

So when wiring to a gadgeteer socket it goes

CS – > Pin 6
DI --> Pin 7
SCK – > Pin 9
DO --> Pin 8

VCC is power and needs to be 3.3v
VCC --> Pin 1
GND --> Pin10

Double check using the links above but I think thats right. Good luck :o)

Paul


#3

Welcome Matt to the forum.

Remember that the sd module you have won’t be compatible with anything in the firmware today, you won’t be able to use it without writing a lot of code. Netmf uses native capabilities of the processors and 4-bit interfaces, so you have some work in front of you… I’d spend the $7 and order one from ghi if I was you.


#4

Whoops I forgot that , oh well at least he can see the conversions in the names :oP


#5

I’ve ordered a GHI Micro SD card module. I’ve got the pinout for the connector so ill give that a go. Ill let you know how I get on.

Thanks for the advice and info!

Matt


#6

SD cards can be used in 4-bit mode or SPI mode. The breakout from Sparkfun assumes that you’re only going to use SPI mode, but GHI’s firmware uses 4-bit mode. Most of the SD breakouts available are SPI-specific breakouts, because most hobbyist MCUs don’t support 4-bit mode (AVRs, for example).

There ARE 4-bit breakouts available*, but generally you can’t beat GHI’s price, by much if at all. Unless the Gadgeteer connector is going to be a problem specifically, I’d recommend one of theirs.

I don’t see why a dedicated person couldn’t add SPI support for SD cards to a given NETMF firmware, but there’s no good reason to do that on Cerb40, as the 4-bit interface is much faster. If you wanted to build your own firmware, the Netduino supports SPI-mode SD cards, so you could look there for the code.

*For example: http://www.ebay.com/itm/MicroSD-Micro-SD-MSD-Card-Breakout-Board-/120942817881?pt=US_Audio_Cables_Adapters&hash=item1c28c0f259


#7

I purchased the GHI micro SD card http://www.ghielectronics.com/catalog/product/359 and have butchered the gadgeteer cable so that I could attach it to the cerb40. Once I connected the cables it was pretty straight forward, am now reading and writing from the micro sd card using a class I had previously written.

I have also tested the following since and they work fine.

and

http://www.robotshop.com/eu/productinfo.aspx?pc=RB-Cyt-103&lang=en-US

both of which only required me to solder some hook ups on.

Matt


#8

Another option is to use one of the extender boards (to avoid “butchering” a cable) :wink:


#9

Whoa, wait a second. Are you reading and writing to the SD card using the single bit SPI? Is this a managed class using the SPI class and doesn’t use the GHI SD card API?

-Valkyrie-MT


#10

Both of those boards he linked expose the full 4-bit SD interface.