Two devices, one SD card. Possible?
T Chap
Posts: 4,223
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
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.
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.