Can files written by the SD card object be read directly to a PC?
ElectricAye
Posts: 4,561
Hi all,
just another pestering about SD cards: can anybody please tell me if the files written by the SD card object(s) in the Object Exchange can be read directly by a PC? Ideally I want to be able to unplug my SD card from my data acquisition unit, plug it into my computer and transfer the files into an Excel spreadsheet. Am I dreaming or is this a possibility without building all sorts of interface circuits, performing rain dances, etc.?
thank you,
Mark
just another pestering about SD cards: can anybody please tell me if the files written by the SD card object(s) in the Object Exchange can be read directly by a PC? Ideally I want to be able to unplug my SD card from my data acquisition unit, plug it into my computer and transfer the files into an Excel spreadsheet. Am I dreaming or is this a possibility without building all sorts of interface circuits, performing rain dances, etc.?
thank you,
Mark
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Files written by the SD card object can be read directly by a PC. There's a caveat here though. A file is just a sequence of bytes. The content of the file and its format may be crucial to the PC program trying to read it. Text files are the common denominator. Most PC programs can read some kind of text file. Excel, for example, can read CSV or Comma Separated Values files. It can also read tab separated values files. Google "wiki CSV" for a description of this. Propeller code can easily produce this.
Let's see if I understand this right:
Paul is saying that a PC can understand FAT16. And FAT16 is what the SD card object will provide for you.
But Excel needs, let's say, CSV. But to get CSV files you have to rewrite the SD card object code so it writes the data from the Prop to the SD card in a CSV kinda way. Otherwise Excel might be blind to the generic kind of FAT16 file.
Am I close?
Mark
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Post Edited (jazzed) : 8/27/2008 6:34:21 PM GMT
Yup, quite simple to write CSV to SD really. Here's a snippet (that comes after mounting the card):
Hope that helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
thanks very much for posting some code containing human language as well as Spin.· One look at this, and I'm gaining inspiration.· Seeing how the method call is actually set up helps a lot.· It's refreshing.· Ahhh...
much appreciated,
Mark
·
I am such a noobie to the propeller that I don't know a lot yet. But, here is what happened to me.
I bought a card from SparkFun for about $15. I had a 4 Gig SD ready, but I was told it is too big and may not work. So, I purchased a 2 gig SD card. I put a right angle curve in a male connector and cut off the extra pins. I soldered it right onto the protoboard. First, I hooked up the main pins to p0,p1,p3,p4. But, this conflicted with other setting. So , I hooked it up to 8,9,10 and 11. The documentation that came with the sparkFun will show you what goes to what pin. I don't think that it is important WHERE you hook them as much as you have to change the software to match the I/O pins. I complete rewired and resoldered the whole system 3 times. So it looks like a mess. But, it is working.
Next, I loaded up Boebot BasicPP.Bin into the propeller.
I had a lot of problems getting the Propeller to see my PC on the USB connector. It all boiled down to the stupid baud rate was too high. Once I gave it the 9600 baud that it worked, it came back with an "OK". This meant that the BASIC Language was loaded into the Propeller and was ready to accept commands.
I had previously loaded onto the SD card a program to test it with. I wasn't able to run the program because it was not a BASIC program. But, when I said "FILES", it gave me a list of files on the SD card. I rubbed my eyes and did a double take. Could this be this simple, I asked myself?? So, I erased the files on the SD and put more with a specific name that I did not have on another drive. BINGO! When I said "FILES" it listed this special program on the SD card. I am soooooo happy!
Make sure that you have a good ground and a good positive voltage on the card as well as data lines.
Hope that this flimsy attempt to help you does you some good. IF Even ONE item that I mentioned helps you, I will be glad. These are a GREAT group of guys. Bar NONE.
Hey, thanks for sharing your experiences with this SD thing.· I'm totally new to this Spin business, too.· I made excellent progress learning how to use the Prop and got some fundamental things started with it and I've been thrilled with my progress.· But lately I've been hitting a wall.· Much of the advanced aspects of the Prop require useage of what's in the Object Exchange (the Obex).· Problem is, much of the material there is scantily documented, if documented at all.· It's frustrating because the concept of Object-oriented programming is to have Objects that you don't have to crawl inside of and do a mind-meld with.· But that's not how the Obex is working out for me.· Instead, I'm feeling like I'm making a nuisance of myself asking for help on every little thing.· So far people have been gracious enough to try to help out, but in some cases I'm so hopelessly new at this that I don't even know the first thing of what they're talking about.· Example: two weeks ago I didn't even know what an SD card was!
Ain't that pathetic!
·
"Life!", as a friend used to say with a sigh.
But we all have had to start at the beginning. Just wish I could of had an earlier start; say, like 'twp_man' before teens. Sigh. LIFE!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
If you're having trouble with SD cards, why not post your particular problem to the forum? The people on here held my hand almost the entire way until I got my system up and running, and I knew NOTHING about SD cards when I started out. In fact, if you use the search button in the upper right hand corner of the screen and search for... Posted By... ElectricAye, you are destined to find dozens of questions about SD cards answered for me by forum gurus like Mike Green, rokicki, Rayman, OBC, StephanL, simonL, jazzed, Micah Dowty, AndreM.... in fact, it would be easier to name who DIDN'T help me get my SD card up and running.
See for example....
http://forums.parallax.com/forums/default.aspx?f=25&m=295496&g=295702#m295702
Good luck,
Mark