Shop OBEX P1 Docs P2 Docs Learn Events
SD Card Pins — Parallax Forums

SD Card Pins

Duane C. JohnsonDuane C. Johnson Posts: 955
edited 2011-03-06 19:07 in Propeller 1
I have DongleBasic running on my PropStick.
It uses pins[11..8].
I wanted to try to put it on other pins such as pins[25..22].
To do this I edited BB_definitions.spin like this
{{  spiDO       = 25        ' zig 
    spiClk      = 24
    spiDI       = 23
    spiCS       = 22
}}
    spiDO       =  8        ' Original Pins
    spiClk      =  9
    spiDI       = 10
    spiCS       = 11
However, this doesn't work, well sort of.

I can perform the "FILES" command but can't load any.

Same thing for pins[15..12].

Edit: The problem was caused by my "Antique" 32MB card.

What are there any restrictions on which pins must be used?
Are there other things that must be edited to make this work?

Why do I want to do this?
I use plugboards and have my SD Card socket mounted atop
an 8 pin 25mil square header that can be directly plugged into the
plug board from DIP pins 27 to 34. This straddles the crystal and
gets power from the DIP pins 29 and 32. It would work very nicely
with no wiring and not take up any extra plugboard space.

Duane

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-03-04 21:05
    There are no restrictions on which pins can be used or what order they're in. I've used pins 11..8, 3..0, 7..4 as well as non-adjacent pins (20, 11, 13, 12) and they all seem to work.
  • bsnutbsnut Posts: 521
    edited 2011-03-05 21:09
    I have question which can help Me, Duane and others. I am doing a project that needs the SD card and a RS485 chip to send data to another Propeller. Can I share the spiCS and Receive Enable pin on the same pin or is it going to be an problem? Why, I'm asking this, I may need more pins for what I'm doing.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-03-05 21:46
    No. Think about what each of them do.
  • bsnutbsnut Posts: 521
    edited 2011-03-06 03:09
    Thanks for your help. I realise what each pin is for the SD card, that's why picked chip select pin. I will just use another pin, which will not cause any problems with the RE485 come.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-03-06 19:07
    Thanks Mike!
    Everything works great now.
    I replaced my antique 32MB, (2001), card with a new 512MB one. I was surprised that the FILES statement worked but nothing else on pins[25..22].

    Here are some pictures to show how to put one together.

    CD-Card_1.jpg
    Pre-bend the tiny socket pins to match those of the header.

    CD-Card_2.jpg
    Add the 1uF ceramic capacitor.
    Add 30 gauge wire between the 2 ground pins and the corners of the metal cover.
    Bend the pins on the header over as in the photo so they are nearly in line with the adjacent pin. Note, one pin is left straight. Cut this pin shorter to be even with the bent ones. Remove the 2 middle pins.

    CD-Card_3.jpg
    Solder one end of the 6 20kO 603 SMT resistors to the socket pins sort of like a "tomb stone".
    Add 30 gauge wire across the tops of the resistors and the 3.3V on the capacitor.
    Measure the resistors to make sure they are connected properly and there are no shorts.

    CD-Card_4.jpg
    Solder the header to the socket pins.

    CD-Card_6.jpg
    This is how it is mounted on my plugboard.
    BTW, that is my version of the PropStick. The EEPROM, Crystal, Regulator, and other parts are sandwiched between the top 2 I.C. sockets. The bottom I.C. socket is sacrificial, in case I break a pin off it can be replaced

    Edit BB_definitions.spin like this
    spiDO = 25
    spiClk = 24
    spiDI = 23
    spiCS = 22

    Duane
Sign In or Register to comment.