Micro SD cards and microcontrollers go together like micro-peanutbutter-and-jelly: SD cards are inexpensive, durable, easy to find at any shop, come in many sizes and can plug into any computer using a common SD card reader. That makes them perfect for microcontroller storage and retrieval - whether it's images, fonts, GIFs, audio files, or sensor logs.

Wiring up SD cards when you're starting out is super easy - you just pick up one of Adafruit's SPI-to-SD breakout boards, wire it to an SPI port and a chip select pin and with a little library work you're reading and writing files. That's all good and great but you may eventually find that your SD card project is a little...slow. Even with fast SPI ports, there's only one data pin, which can make it hard to stream large files fast.

If you've hit that limit, this new breakout is designed to help. Unlike previous adapters, it is not fixed for SPI usage, and can be used with SDIO hardware support. SDIO is a multi-pin data protocol (up to 4 data pins at once!) SDIO also tends to be able to be clocked faster than SPI. Of course, your speeds will vary depending on what microcontroller you hook it up to. When we used SDIO instead of SPI on CircuitPython with the SAMD51 Grand Central, we got a speed increase of about 200% when reading data off the card

You will need to verify that your microcontroller has SDIO support and you have SDIO firmware/library support as well. SDIO is usually available on higher end chips, and you may need to use some specific pins. You can still use this for SPI mode, but it does not have level shifters, so it's not for use with 5V microcontrollers.

For use with 3V power and logic microcontrollers only! The SDIO pins are bi-directional, and we've never seen a 5V microcontroller with SDIO, so there's no level shifting or power regulator.

The breakout comes with a bit of header so you can use in a breadboard. It doesn't come with the micro SD card itself!

Secure Digital, or SD, cards and tiny microSD cards are an inexpensive and ubiquituous means of adding lots of storage to devices. For a few dollars you can have gigabytes of storage at your fingertips (smaller than your fingertips actually!). With CircuitPython boards you typically have a very limited amount of flash memory to store code and data.

Wouldn't it be nice if you could connect a microSD card to a Python board and expand its storage?  It turns you can use microSD cards with CircuitPython! In fact some boards like the Metro M4 Grand Central come with microSD card support built-in, and for other boards like the Feather M4 Express family they can easily be connected to a microSD card that expands their storage.

WIth the Adafruit MicroSD SPI or SDIO Card Breakout Board, you can add an SD card to your project using the common SPI interface or the higher performance SDIO interface.

This guide also shows how to use a microSD card to store files for a CircuitPython board. Specifically using  a microSD card with CircuitPython boards like Feather M0 Adalogger, Grand Central M4, ItsyBitsy M4, and others will be covered in this guide. You'll learn how to connect a microSD card to the board and mount it as a new filesystem that store code & data.

Starting with CircuitPython 6, there are two new modules to improve the performance of SD cards using SDIO.

This guide was first published on Jul 31, 2020. It was last updated on Jun 21, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.