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

SD Card Questions

HMSTLHMSTL Posts: 16
edited 2010-12-01 08:48 in Propeller 1
Hello,

I was planning my designs and I was wondering how I could minimize the number of pins I would have to sacrifice in order to interface the propeller to an SD card. I understand that there is the Card Select, which cannot be omitted. As for the Clock (SCLK), can I just use an external oscillator?

The Data Output is needed because I want to pull data from the card, but can the Data Input be pulled to a rail if I do not intend to write anything to do the card, or is it necessary to communicate with this pin to have the SD card do stuff?

Thank you so much,
Sean

Comments

  • KyeKye Posts: 2,200
    edited 2010-11-29 21:41
    All the pins are needed. You can't get away with less using the current drivers.
  • HMSTLHMSTL Posts: 16
    edited 2010-11-29 21:50
    Oh, well.

    Is there anything wrong with using an external oscillator for the SD card's clock?
  • W9GFOW9GFO Posts: 4,010
    edited 2010-11-29 22:05
    It would be hard for the SD card to know what data to send (DO) if it could not receive some information (DI) telling it what to do.

    The clock (CLK) is how the SD card is synchronized with the microcontroller. An external oscillator would not work.

    http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

    Rich H
  • HMSTLHMSTL Posts: 16
    edited 2010-11-30 05:25
    That's what I'd feared.

    Thanks.
  • wjsteelewjsteele Posts: 697
    edited 2010-11-30 08:19
    Don't forget, however, that you can reuse pins. For example, there is nothing preventing you from reusing the eeprom pins (28/29) or the programming pins (30/31) once the prop is booted.

    Bill
  • HMSTLHMSTL Posts: 16
    edited 2010-11-30 11:14
    This is true, and I intend to do that. I'm planning a very input-heavy project.

    I realized that 30 and 31 were available but I am a little concerned with doing things while the EEPROM is connected. Is there a chance it could accidentally be triggered to do something?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-30 12:00
    Yes, you have to be careful if you're trying to use the same pins as those used with the EEPROM. Similarly, if you use the downloading pins (30 and 31), you may run into conflicts with whatever is connected to those pins. Even if they're just connected to a header, you may have a PropPlug or equivalent connected there sometimes and forget that those lines might be driven by the PropPlug.

    Use some kind of I/O expander. They're cheap and easy to use. The I2C ones can even be connected to the same I/O pins (28 and 29) as the EEPROM. You could easily use up to 8 PCA9554 I/O expanders for 8 I/O pins each, all on pins 28 and 29.
  • dMajodMajo Posts: 857
    edited 2010-12-01 08:48
    As the SD uses the SPI comunication you can wire a resistor between the card DI and DO pins and connect the DI side to the propeller and thus spare a pin.
    This should work on most spi devices, but I am not aware of the SD protocol.
Sign In or Register to comment.