Shop OBEX P1 Docs P2 Docs Learn Events
Two devices, one SD card. Possible? — Parallax Forums

Two devices, one SD card. Possible?

T ChapT Chap Posts: 4,223
edited 2014-02-15 13:24 in Propeller 1
I am looking at a pick and place that requires the files to be accessed with an SD card. Setting up new boards will require some tweaks to the text file that lives on the SD. I am curious if anyone has ever tested two devices connected to the SD card. The idea being, to place a propeller module in the unit, run wires to the SD card reader pads, then send the file updates from a PC to the Prop to update the file. My assumption would be that the traces would need to be cut to on the device so that it no longer sees the card, then by electronic switch or physical switch, select who is controlling the SD.

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-02-15 11:31
    I assume you have serial communications with that Propeller. If not you may as well put that in place rather than running wires for SD use.

    With that in place a better idea is to write a little code on the Propeller that accepts files over the serial line and writes them to the sdcard.

    You will want a protocol to run over the line to ensure the files is received correctly. Have a search for xmodem. ymodem, zmodem here on the forum. I recall that Dr_Acular had those working in Spin. Or perhaps others have different suggestions. With protocols like xmodem you can often download files over serial using hyperterminal or some other terminal software.

    Wiring two computers, Prop and PC. to s single SD shared by some switch is going to be fraught with issues. At least the Prop will have to be told to close all files and unmount the drive and probably halt the SPI driver before the PC can be switched in. Else you are going to see mangled files.
  • T ChapT Chap Posts: 4,223
    edited 2014-02-15 11:37
    The idea is to add the propeller module inside the pnp device, so that the communication would be over a USB >FT232 > propeller > SD. It is an easy matter to send the file with a checksum. The propeller will accept the file, then write it to SD as you said. The question is, which lines must be switched, if any to the SD, so that both devices cannot talk at once. It is debatable if the other device will Smile out if the lines are cut, since it likely mounts on power on or either SD insert.
  • Heater.Heater. Posts: 21,230
    edited 2014-02-15 12:40
    Ah, sorry,now I see..This is an existing machine that uses SD cards and you want to load the SD remotely.

    I would suggest you skip the Prop solution and just look into a WIFI enabled SD card.http://ae.transcend-info.com/products/CatList.asp?FldNo=24&LangNo=0&Func1No=0&Func2No=203
    I'm presuming the software they have allows files to be moved in both directions.
  • T ChapT Chap Posts: 4,223
    edited 2014-02-15 13:24
    Great idea. Thanks for the reminder about these cards.
Sign In or Register to comment.