Shop OBEX P1 Docs P2 Docs Learn Events
New Tutorial: SD cards — Parallax Forums

New Tutorial: SD cards

Nick McClickNick McClick Posts: 1,003
edited 2010-11-26 09:05 in Propeller 1
Just put up a new tutorial on using SD cards with the Prop - you can read it here.

While I've written the previous tutorials, 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!

Comments

  • KaosKiddKaosKidd Posts: 296
    edited 2010-11-23 11:13
    Real nice writeup!
    Clean, clear and right to the point!

    KK
  • RonPRonP Posts: 384
    edited 2010-11-23 12:27
    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.
  • wjsteelewjsteele Posts: 697
    edited 2010-11-23 12:56
    Fantastic job, Nick! It's perfect.

    Bill
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-11-23 14:05
    Looks great. Thanks!
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-11-23 15:50
    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 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. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2010-11-23 20:10
    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)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-11-24 07:36
    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 on page 5 of the Propeller Cookbook.

    OBC
  • WhitWhit Posts: 4,191
    edited 2010-11-24 07:49
    Thanks Nick and OBC!
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2010-11-24 10:03
    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 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 McClickNick McClick Posts: 1,003
    edited 2010-11-24 10:17
    @OBC - for sure, you can post it here and I'll copy it and add a link in the article.
  • lonesocklonesock Posts: 917
    edited 2010-11-24 11:02
    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
  • TtailspinTtailspin Posts: 1,326
    edited 2010-11-24 13:24
    Very Nice, Thank You.
    Easy to Understand.
  • LevLev Posts: 182
    edited 2010-11-24 14:18
    @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
  • EmptyBitEmptyBit Posts: 72
    edited 2010-11-25 00:06
    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
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-11-25 00:24
    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. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2010-11-25 06:54
    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! :)
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-11-25 11:10
    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.
  • TappermanTapperman Posts: 319
    edited 2010-11-25 13:47
    JonnyMac wrote: »
    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
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-11-26 09:05
Sign In or Register to comment.