How to implement the SD card object? Where to even begin using it?
ElectricAye
Posts: 4,561
I've been contemplating storing data on an SD card and I have downloaded the highly acclaimed SD card object from the Object Exchange (Thank you, rokicki) and I have studied it for several hours. I have read general descriptions on how SD cards do what they do. And I have approached Oneness with Spin and all its glory. Problem is, I still can't figure out how to actually use the SD card object. I mean, I know this sounds utterly stupid, but where do I plug in my data so it goes to the card?
Let's assume I have a bunch of variables, some of which contain integers, others that contain decimals, and maybe some others that have things like a date stored in them. For example, let's call them
Decimal1, Decimal2, Decimal3
IntegerA, IntegerB, IntegerC
Date2, Date7, Date8
So what methods do I call in which of the many objects that are listed in the SD card object? Frankly, I can't even tell which of the versions is the "beginning"... if there is such a thing. And I have yet to learn (choke) assembly language so... I know I'm exposing myself here, how shallow my knowledge of everything Spin is. But a concrete example of how this SD card object is actually employed would really help clear the fog from my brain... I hope*.
many thanks,
(and desperate as usual)
Mark
*At least insofar as SD cards are concerned.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
Let's assume I have a bunch of variables, some of which contain integers, others that contain decimals, and maybe some others that have things like a date stored in them. For example, let's call them
Decimal1, Decimal2, Decimal3
IntegerA, IntegerB, IntegerC
Date2, Date7, Date8
So what methods do I call in which of the many objects that are listed in the SD card object? Frankly, I can't even tell which of the versions is the "beginning"... if there is such a thing. And I have yet to learn (choke) assembly language so... I know I'm exposing myself here, how shallow my knowledge of everything Spin is. But a concrete example of how this SD card object is actually employed would really help clear the fog from my brain... I hope*.
many thanks,
(and desperate as usual)
Mark
*At least insofar as SD cards are concerned.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
Comments
The formatted output methods are really simple and you can adapt them easily to Rokicki's routines as provided in the Object Exchange.
I will definitely look into this. The sooner I get my SD cards up and running, the sooner I can finish my photon pulse height analyzer and get on with more important things, like The Cow Compass Challenge!
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
http://www.sdcard.org/about/memory_card/pls/Simplified_Physical_Layer_Spec.pdf
I suppose it might be of use to somebody who already knows how they work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
·I am surprised that it is not included in the OBEX SD stuff.
The test file demonstrates a write file (writes 300 "R" ) to file. Re_opens the file and reads the file back.
It also demonstrates a simple file listing
Ron
Post Edited (Ron Sutcliffe) : 8/27/2008 10:22:43 AM GMT
cheers,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
Mark
www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/73/List/0/Level/a/ProductID/505/Default.aspx?SortField=ProductName%2cProductName
You could use the expansion card with other Propeller boards since it just provides an EEPROM (128K bytes) and the usual SD card connections. The book itself is worth the price.
Post Edited (Mike Green) : 8/27/2008 3:13:12 PM GMT
Well, I guess I'll have to break down and do just that. But if my photon counting system starts playing Doggy Kong with itself, my suspicions of a conspiracy here will be immediately confirmed.
thanks for your help again,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.
Please see my example code in your other thread on this topic (http://forums.parallax.com/showthread.php?p=746324)...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style