Clock Radio

SD Card Hacking

Thu Sep 23 2021 14:25

So I'm connecting a SD card socket to my ESP32-C3 dev board, just to see if I can do some basic SD card reading. The SD library doesn't really explain what pins to use but there are designated pins for SPI so I connect it to those. Doesn't work.

After some searching and fiddling, it turns out the pins ESP32 Arduino uses for SPI are not those pins. Because all the ESP32s have an I/O matrix it can route signals to whatever GPIOs it wants. And apparently it decided to not use the pins listed in Espressif's pinout. Wunderbar.

The good news is the pins it did choose were adjacent so the wiring job was the simplest thing in the world.

TFT adapter with SD card slot
connected to an ESP32-C3 on a breadboard

Yes, that's a tiny TFT display. All these tiny SPI TFT modules seem to come with a SD card slot so I'm just hijacking it for that.

The other things on board are a CS4334 I2S DAC, and hiding behind the jumper jerky is the OK BOOMER amplifier board I made earlier. We're gonna see if we can make a MP3 player!