Help needed - Fast(er) 4-Channel SD R/W Object
MacTuxLin
Posts: 821
Over the last few months, I've managed to mastered Rhino3D (only to the level of what I planned to do) plus going through the pain of 3D printing (its still an ongoing pain once a while). Anyway, I have designed the casing for one of my old product, propeller-powered X4 duplicator. However, I am not happy with the speed at which it is duplicating. My code uses safe_spi_var.spin by Jonathan "lonesock" Dummer but not writing in a concurrent fashion. However, I just don't have the time to work on this as I'm working on other critical projects. So, I'm seeking help from the community. In return, I can offer to ship to you 1 unit of my Portable microSD X4 Duplicator plus 4 pcs of SanDisk 2GB microSD cards. On top of that, I'll throw in 5 pcs of P8X32A-Q44 if you could achieve this within a week.
[video=youtube_share;IO5nRekoPXc]
Ok, now on to my requirement. Basically:
1. The object will READ from the Master card & WRITE to the Target card(s) in sector-mode.
2. The object will need to know how many sectors there are in the Master card & write accordingly.
3. If each microSD uses 1 Cog, then the object must allow start & stop of unused target sockets.
4. The writing onto the Target cards should be done in parallel.
5. The maximum number of allowable cogs is 4 as my main code will need the other 4.
6. Maximum allowable main hub memory space is 3,072 long.
7. Object in PASM is preferable.
The connection between the prop & the microSDs are direct:
Thanks!
[video=youtube_share;IO5nRekoPXc]
Ok, now on to my requirement. Basically:
1. The object will READ from the Master card & WRITE to the Target card(s) in sector-mode.
2. The object will need to know how many sectors there are in the Master card & write accordingly.
3. If each microSD uses 1 Cog, then the object must allow start & stop of unused target sockets.
4. The writing onto the Target cards should be done in parallel.
5. The maximum number of allowable cogs is 4 as my main code will need the other 4.
6. Maximum allowable main hub memory space is 3,072 long.
7. Object in PASM is preferable.
The connection between the prop & the microSDs are direct:
#0, uSDMasDO, uSDMasCLK, uSDMasDI, uSDMasCS,{ } uSDTar1DO, uSDTar1CLK, uSDTar1DI, uSDTar1CS,{ } uSDTar2DO, uSDTar2CLK, uSDTar2DI, uSDTar2CS,{ } uSDTar3DO, uSDTar3CLK, uSDTar3DI, uSDTar3CSThink, that's about it. Any questions & suggestions are welcome. PM me.
Thanks!
Comments
good to hear that you are busy...
876 kB/s is about the fastest you can read a sd with save_spi in blockmode in PASM. (writing is faster).
advanced tools of the RAISD-System (C - create array out of sd-1) loads a PASM BLOB doing exactly that.
Even reading one card in block mode and writing the other three in blockmode parallel just in PASM without spin takes about 15 min/GB.
4-pin sd-mode was very long classified (you needed to be member in the sd-card association) but is available now.
BUT just works with checksum enabled. Not without checksum like spi allows you.
and you need to create a checksum for each PIN (yes each bit has its own checksum).
Somewhere here in this forum I read of someone trying? it and deciding that the time to create the checksums eat up the gain of the 4 pin transfer.
We need a P2 board fitting into the RAISD-KIT ...
Enjoy!
Mike
Yeap, really appreciated your advices early this year & some of that did take roots, just so you know. I'm re-inventing my business & looking forward to make a dent in the market
Thanks! I think I'd did tried on 2 cards late last year as well & guess that's the best for now. I'll might be able to lock myself up for 3 days somewhere end of next month to work on this...
You're right. P2 might just be the much needed catalyst for RAISD-KIT. Let's keep this in the back-burner for now.
Cheers!
thanks,
Jonathan
Hey Jonathan,
If you do take this up, you can have the option of taking the current designed case which already has the 2 designed-in microSD pockets at the back or a cut-out slot for inserting your Prop-Plug, you'll just loose one pocket. Just let me know.
Thanks
so I we write all blocks once we can disable this "feature"?
and may get rid of those unpredictable 'lag' hitting once in a while ?
please explain more ...
Enjoy!
Mike
Warning: this is very untested!! Also, there is no error checking going on.
The actual SD controller has read-ahead and write-behind, so the speed should not be as bad as you fear. Can you test this and see if it does what you want...maybe add some timing?
Mike: If you copied an entire blank SD card to another blank SD card, the newly copied card has had all blocks written. The wear leveling controller on the card is in trouble now, because it thinks it has to keep around all those copies of 0 blocks, even though the user may not have any interest in them. This _might_ get rid of the timing jitters, if there are no wear-leveling operations to perform, but it also means the life of the card is reduced.
Jonathan
Also, please PM me your address so I could pack & ship you your items.
Cheers
PST Showed
Tried 3 different uSD cards but result was the same. Any ideas?
sorry,
Jonathan
The result seems right.
And, I'd like to make good my offer so I just PMed you about delivering those items to you. Don't worry, I'm a good guy .
Jonathan