Shop OBEX P1 Docs P2 Docs Learn Events
sd card and quickstart board — Parallax Forums

sd card and quickstart board

amossamamossam Posts: 35
edited 2012-08-21 11:30 in Propeller 1
While surfing around, I noticed that you can connect SD card directly to mcu... so I give it a go! :D

Check attached pics for my setup, and wiring and idea I got from here...

After hardware setup, I copied quickstart.cfg to quickstartsd.cfg and added folowing lines to end of file:
    sd-driver: sd_driver.dat
    sdspi-do: 0
    sdspi-clk: 2
    sdspi-di: 1
    sdspi-cs: 3
according to this thread, and also used code from that thread to check is it working...

"sdspi-do" is MISO on card, and "sdspi-di" is MOSI on card

to my big surprise, it worked!! :D tried with 2 cards, one SanDisk microSD 2GB, second one SanDisk microSDHC 8GB

is it a big problem absence of pullup resistors and 0.1uF capacitor between GND and Vcc (3.3V)?

and most important question; can I damage board with this setup??

thx
1024 x 765 - 74K
1024 x 765 - 94K

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-08-20 21:42
    Nice work. Glad you have something working.

    Many SD cards have pull-up resistors built-in. I have a few where the pull-ups must be added - I've used 10K to 100K no problem. Typically you should add a 0.1uF decoupling capacitor between power and ground close to a component. Long and/or thin leads tend to introduce inductance that cause high frequency noise on power connections and may spill into I/Os that will may trouble over a long time, so use a capacitor if possible.

    Your connections look fine to me. Your hardware should be Ok as is. Consider the capacitor for good measure.
  • amossamamossam Posts: 35
    edited 2012-08-21 03:17
    jazzed wrote: »
    Nice work. Glad you have something working.

    Many SD cards have pull-up resistors built-in. I have a few where the pull-ups must be added - I've used 10K to 100K no problem. Typically you should add a 0.1uF decoupling capacitor between power and ground close to a component. Long and/or thin leads tend to introduce inductance that cause high frequency noise on power connections and may spill into I/Os that will may trouble over a long time, so use a capacitor if possible.

    Your connections look fine to me. Your hardware should be Ok as is. Consider the capacitor for good measure.

    Thx. I was surprised that worked from the second try only!! :D

    So, I should add pull-ups between MISO and MOSI lineas and Vcc? And capacitor between GND and Vcc? Ok, will do! :)

    Btw, jazzed, on my previous thread you mentioned another way of creating delay in C, not with usleep nor waitcnt. (quote: "There is another method that will be faster for normal C programs, but requires more code rework. ") What had you in mind? empty loops? thx
  • jazzedjazzed Posts: 11,803
    edited 2012-08-21 11:30
    amossam wrote: »
    So, I should add pull-ups between MISO and MOSI lineas and Vcc? And capacitor between GND and Vcc? Ok, will do! :)

    If you plan to use more than one type of SD card, put 100K pull ups on ChipSelect, MISO, and MOSI.
    amossam wrote: »
    (quote: "There is another method that will be faster for normal C programs, but requires more code rework. ") What had you in mind?

    I've added an example in your other thread that uses waitcnt2.
Sign In or Register to comment.