PDA

View Full Version : New Tutorial: SD cards



Nick McClick
11-23-2010, 07:05 PM
Just put up a new tutorial on using SD cards with the Prop - you can read it here (http://www.gadgetgangster.com/sell-your-project/331).

While I've written the previous tutorials (http://www.gadgetgangster.com/sell-your-project/293), this one was contributed by OBC (Jeff Ledger). The focus is on data logging, but the same principles apply however you use fsrw.

I hope you find it useful. If you have any questions / comments or spot any errors, let me know!

KaosKidd
11-23-2010, 07:13 PM
Real nice writeup!
Clean, clear and right to the point!

KK

RonP
11-23-2010, 08:27 PM
Thanks Nick and OBC, just the kind of Tutorial I need right now. Just received my micro-SD Card Adapter from Parallax a few weeks ago now I can play with it.

wjsteele
11-23-2010, 08:56 PM
Fantastic job, Nick! It's perfect.

Bill

ElectricAye
11-23-2010, 10:05 PM
Looks great. Thanks!

Nick McClick
11-23-2010, 11:50 PM
Thanks guys!

I take no credit - this is Jeff's work. I did a little light copyediting, but that was about it.

I have been working on a Control flow (http://www.gadgetgangster.com/sell-your-project/327) tutorial for a few weeks to fit between the blinky light tutorial & the Object tutorial, but I'm still not done. It's turning into a novel, but the topic is pretty core to programming & I figure it's worth the extended treatment.

John A. Zoidberg
11-24-2010, 04:10 AM
Nice! This could be the first SD card usage tutorial + a Parallax Serial Terminal.

However, I don't have a Gadget Gangster board now, so I temporarily used the bent headers as the SD card socket which I felt that it didn't work (well, tested, and didn't) so I am now purchasing some SD card slots too.

By the way, any pinout diagrams for the SD card and the connections too?

Thanks. :D

Oldbitcollector (Jeff)
11-24-2010, 03:36 PM
Thanks for the encouragement guys.

@Nick, Could you make the sources available or shall I post it here?

@John, Sorry about that. I should have included that information
in the document. You can find it here (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf) on page 5 of the Propeller Cookbook.

OBC

Whit
11-24-2010, 03:49 PM
Thanks Nick and OBC!

John A. Zoidberg
11-24-2010, 06:03 PM
Thanks for the encouragement guys.

@Nick, Could you make the sources available or shall I post it here?

@John, Sorry about that. I should have included that information
in the document. You can find it here (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf) on page 5 of the Propeller Cookbook.

OBC

No worries OBC. The SD card test just works great on the Kingston 2GB SD-card w/FAT32 inside! I had to temporarily use the self-fabricated bent header pins bonded with some crazy glue as a SD-card connector while waiting for the real ones to arrive.

What else I could do with it? Hmm... the possibilities of a music box? Data logger? MP3 Player? Wow! :idea:

Nick McClick
11-24-2010, 06:17 PM
@OBC - for sure, you can post it here and I'll copy it and add a link in the article.

lonesock
11-24-2010, 07:02 PM
Looks great, guys! I think the only thing you might want to add would be how to access multiple files at one (and the restrictions for doing so). I've seen quite a few questions on that topic over the last few months. Again, though, that's only a small suggestion...it looks great as it is!

Jonathan

Ttailspin
11-24-2010, 09:24 PM
Very Nice, Thank You.
Easy to Understand.

Lev
11-24-2010, 10:18 PM
@Nick or Jeff:
Nice job on the tutorial. It gave me the kick I needed to get started with the SD card. The examples were easy to understand, and they worked great.

@anyone:
I have a question though. The last example in the tutorial demonstrates data logging. It writes text strings to the SD card in a format that can be opened later with a spreadsheet set up to read comma delimited files. Although it works fine as presented, I don't see how this would be useful because in practice the data would be stored as variables with values obtained from sensors, rather than as text strings. Does anyone know how to mod the example program so that variables can be written to the SD card? Or, am I missing something?

Lev

EmptyBit
11-25-2010, 08:06 AM
Appreciate the time it took to do the work.

Am I missing something here? Is this conceptual only or is there a link to relevant downloads to test the examples within this tutorial so we can follow along on the same page?

The download given in the tutorial does not match content.

$0

Loopy Byteloose
11-25-2010, 08:24 AM
Thanks for the tutorial.

I do have one question though. By writing in FAT16 mode rather than pure SPI interface, does that assure that the SDcards will be long life?

This seems to be a key issue that should always be mentioned in an introduction. I have been rather wary of playing with SDcards because their useful life can be shortened substantially by the wrong software code.

John A. Zoidberg
11-25-2010, 02:54 PM
I tested the SD card by using my new SD card connectors purchased from Farnell, with the program. I had to painstakingly solder it because right now I don't have a nice break-out board on my hands.

However, I still can't get it to play wave files. Any tutorials on that as well? It'll make an awesome music player too! :)

JonnyMac
11-25-2010, 07:10 PM
If you've got access to an SD card and it's working, demo code I've posted in another thread will get you going -- many people have used it to get started with playing WAVs.

Tapperman
11-25-2010, 09:47 PM
If you've got access to an SD card and it's working, demo code I've posted in another thread will get you going -- many people have used it to get started with playing WAVs.

What thread? Did you mean this one?

http://forums.parallax.com/showpost.php?p=921863&postcount=2

... Tim

JonnyMac
11-26-2010, 05:05 PM
This one:
-- http://forums.parallax.com/showthread.php?t=123900