Breakout boards are great. They allow me to explore functions quickly, without to build my custom board. All I need are some wires and, ideally, a bread board.
Here is how I wire the Adafruit Micro SD card breakout board to the NXP FRDM-KL25Z board:
- CD (Card detect) to PTD5.
- CS (Chip select, slave select) to PTD0.
- DI (Data In, MOSI) to PTD2.
- DO (Data Out, MISO) to PTD3.
- CLK (Clock) to PTD1.
- GND (Ground) to GND.
- 3V not connected, as this is the 3.3V regulator output of the breakout board.
- 5V (power supply of the breakout board) to 5V.
The board includes a 3.3V level shifter as SD cards use 3.3V logic levels. With the level shifter and the onboard regulator that board can be used both with 3.3V and 5V microcontroller. With the FRDM-KL25Z which uses 3.3V logic levels, I power the board with 5V:
Below is a high-resolution image with the connections between the FRDM-KL25Z and breakout board:
An example project is available on GitHub here.
The above project can work with any other breakout board, considering the following:
- MicroSD cards do not have a ‘write protection tab,’ so the write protection pin is not needed
Some cards have HIGH active card detection pin, some have LOW active levels. Tha Adafruit one is HIGH active:
This can easily be verified with the example project shell command:
Below is an example session with a terminal connected to the OpenSDA port with 38400 baud:
Breakout boards are great, and while there are many ones available on the market, I mostly use the ones from Adafruit. But if you are using a different SD or microSD card board, the project used in this article easily can be adapted to a different card. I hope this is useful for you too. Happy Breakouting.