# Pico demo sd-card

**URL:** <https://forums.pimoroni.com/t/pico-demo-sd-card/21076>\
**Category:** Support\
**Created:** [January 1, 2023, 11:03am UTC](https://forums.pimoroni.com/t/pico-demo-sd-card/21076 "2023-01-01T11:03:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tonypigram](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/tonypigram/32/9334_2.png) [@tonypigram](https://forums.pimoroni.com/u/tonypigram)\
**Post date:** [January 1, 2023, 11:03am UTC](https://forums.pimoroni.com/t/pico-demo-sd-card/21076/1 "2023-01-01T11:03:11Z")

</div>

Can anyone tell me what the correct values for using the sd-card on the pico demo board are?  
I have a FAT32 formatted sd-card, that has been tested and works in 2 other LCD screen sd-cards (using different GPIO values) and I can read/write and list the files/folders.

Using the same code with the pico demo board, all I get now is ‘bad SCK pin’.  
I’m looking for something that maps:  
SD\_CLK : (GPIO 5)  
SD\_DAT3 : (GPIO 22)  
DAT2 : (GPIO 21)  
DAT1 : (GPIO 20)  
DAT0 : (GPIO 19)  
CMD : (GPIO 18)

to the required values for CS, SCK, MOSI and MISO. The Hardware PDF does give me values - but they do not seem to work - did I mis-interpret them? [https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf](https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf) PAGE 21

This does not work as I expected it to in MicroPython code:

cs = machine.Pin(18, machine.Pin.OUT, value=1)  
spi = machine.SPI(0,  
baudrate=1000000,  
polarity=0,  
phase=0,  
bits=8,  
firstbit=machine.SPI.MSB,  
sck=machine.Pin(5),  
mosi=machine.Pin(19),  
miso=machine.Pin(20))

sd = sdcard.SDCard(spi, cs)

any assistance / guidance really appreciated!

---

_[View the full topic](https://forums.pimoroni.com/t/pico-demo-sd-card/21076)._
