Рет қаралды 30,243
SD cards are popular ways to store data that can be transferred between computers and consumer electronics (e.g. digital cameras). They can be found in the tiny microSD format and still store gigabytes of data. SD card protocol supports the faster 4-bit SD mode as well as the 1-bit SPI mode. Some microcontrollers support SD mode for faster transfers, but the SPI mode is simple and popular for low data-rate logging (e.g. sensor data and timestamps).
In this tutorial, we show you how to read and write to an SD card from a Raspberry Pi Pico using MicroPython and C/C++. We will demonstrate the simpler SPI format, as the Pico has a built-in SPI peripheral.
Note that you will need to format your SD card using the FAT32 filesystem on your operating system. Here are some guides to help you do that:
Windows: helpdeskgeek.c...
Mac: havecamerawill...
Linux: linuxize.com/p...
A written tutorial along with all of the code in this video can be found here: www.digikey.co...
The sdcard.py driver for MicroPython can be found here: github.com/mic...
FATFS API documentation for interacting with files in MicroPython can be found here: docs.micropyth...
The third party library for working with SD cards in C/C++ can be found here: github.com/car...
FATFS API documentation for interacting with files in C can be found here: elm-chan.org/fs...
Product Links:
www.digikey.co...
www.digikey.co...
Related Videos:
Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 1: Blink - • Intro to Raspberry Pi ...
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 1: VS Code and Blink - • Intro to Raspberry Pi ...
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 2: Debug with Picoprobe - • Intro to Raspberry Pi ...
Related Project Links:
www.digikey.co...
www.digikey.co...
www.digikey.co...
Maker.io - www.digikey.co...
Digi-Key’s Blog - TheCircuit www.digikey.co...
Connect with Digi-Key on Facebook / digikey.electronics
And follow us on Twitter / digikey