Connecting SD Card to Cerb40

I am working on connecting a sparkfun micro SD breakout board to a Cerb40. I am using the following, can anyone help with the connections between the Cerb40 and the SD card.


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

  1. SPI is socket type S (See wiring guide GHI Electronics – Where Hardware Meets Software for pins)

  2. The following is the pin connections converted by name (example here SD Card File System - Cookbook | Mbed)

DI → Mosi
SCK → Sck

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)


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.

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

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!


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:

I purchased the GHI micro SD card 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.


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


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

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?


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