Source: https://mokxi.com/parts/microsd
Updated: 2026-11-10

Part

# microSD card module

A real FAT16 card behind SD.h. Watch the files a sketch writes appear, and download them.

See every part

- 6 pins
- 2 settings
- In 2 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The microSD card module in brief

What it is, and every setting the properties panel gives it.

A microSD card module is the small SPI breakout with a card socket, a 3.3 volt regulator and a level shifter, which is why it takes 5 volts on VCC from an Uno: CS to pin 4 or 10, SCK to 13, MOSI to 11 and MISO to 12, or on a Mega 52, 51, 50 and 53. Mokxi puts a 4 MB card in it, formatted as a real FAT16 volume with a partition table, and the card speaks the SPI mode of the SD specification: CMD0, CMD8, ACMD41, CMD58, single and multiple block reads and writes, with R1 status, data tokens, CRCs and busy after a write. The files property sets what the card holds when the run starts, as 8.3 names mapped to text; while it runs, whatever a sketch writes appears beside the board and can be downloaded singly or as a disk image. Clicking the board ejects the card, and a sketch then has to call SD.begin() again. Real cards are slower to initialize and stall now and then while erasing, and SDHC cards, FAT32 and long file names are not modeled.

Family

Clocks and links

Pins

6

files

{"HELLO.TXT": "Hello from the SD card.\r\n"}

inserted

true

Pins

## 6 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

Role

What it does

GND

Input or output

Ground.

VCC

Input or output

Supply, 3.3 to 5 V.

MISO

Output

Data from the card, at 3.3 V.

MOSI

Input

Data to the card.

SCK

Input

SPI clock.

CS

Input

Chip select.

How to use it

## How to use a microSD card module with an Arduino

The module goes on the Uno’s SPI pins: MOSI to 11, MISO to 12, SCK to 13, and CS to pin 10, with VCC on 5 V. Call SD.begin() with the CS pin and check what it returns, then SD.open() a file with FILE_WRITE, print to it and close() it.

Bytes wait in a 512-byte buffer until a sector fills or the sketch calls flush() or close(), so a logger that keeps its file open should flush every second or so, as the rocket flight computer does. Pull the card out mid-run and SD.begin() has to be called again.

Part pin

Board pin

CS

Pin 10

MOSI

Pin 11

MISO

Pin 12

SCK

Pin 13

VCC

5 V

GND

GND

Hold the button

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Writing a line to the card

How it is modeled

## What is true about the microSD card module, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

Real cards are slower in ways this one is not: long initialization, and a write
that now and then takes a hundred milliseconds while the card erases. High
capacity (SDHC) cards, FAT32 and long file names are not here.

Everything goes over SPI a bit at a time, driven by the sketch, so reading a
512-byte sector takes tens of milliseconds on an Uno, where a real SPI port takes
well under one. On a faster board each bit waits a little before it is read, so the
answer the card has just put on MISO has arrived; that makes a card read on an
ESP32-C3 or a Pico slower still. It is the one thing about this card that is
slower here than on the bench, and it matters when a sketch also has to keep up
with something else, like a GPS: the GPS logger in the gallery writes its lines
five at a time for that reason.

From microSD card module, in full.

Projects

## See the microSD card module in a project

2 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino SD Card Module: A GPS Data Logger

Boards

## The boards it is shown on

Each of these 2 boards has a built-in project with the microSD card module in it.

- Arduino Uno R3
- Arduino Mega 2560

Libraries

## Arduino libraries for the microSD card module

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- SPI
- SD
- SdFat

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the microSD card module

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
