Ready to do a little wiring? Almost any Adafruit CircuitPython board will connect to the MicroSD Breakout Board using SPI. The following is an example using the Itsy BItsy M4 express.
- Board 3V to breakout 3V via supply rail
- Board GND to breakout GND via supply rail
- Board MI (or MISO) to breakout SO
- Board MO (or MOSI) to breakout SI
- Board SCK to breakout CLK
- Board D10 to breakout CS
The example below uses D10, but you can use any available digital pin instead. Change the mount_sd.py code below to use the pin you selected instead of board.D10
.
The ItsyBitsy and the MicroSD breakout are a great way to have SD card storage in a small footprint, but these instructions will work with just about any Adafruit Feather too. Just follow the fritzing diagram and then put the following in mount_sd.py:
import board import busio import sdcardio import storage spi = board.SPI() cs = board.D10 # Use the pin you wired to the breakout CS sdcard = sdcardio.SDCard(spi, cs) vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd")
The default communication rate is 8MHz, which works with most SD cards. A higher or lower rate can be supplied with sdcardio.SDCard(spi, cs, baudrate=...)
but the limitation depends on
- the specific microcontroller's SPI interface
- the specific SD card's operating characteristics
- the wiring, especially if a breadboard or jumper wires are involved



Page last edited March 08, 2024
Text editor powered by tinymce.