Shop OBEX P1 Docs P2 Docs Learn Events
Current State of Writing to SD card — Parallax Forums

Current State of Writing to SD card

rjo_rjo_ Posts: 1,825
edited 2010-02-12 20:22 in Propeller 1
I'm an idiot... I admit it. You guys have been busting your backsides to offer the latest and the best, and I haven't even kept up with the conversation.

So... for anyone interested, what is the current state of the art in writing to SD cards?

What is the fastest that can be achieved, where is a snippet of code showing how to do it?

Thanks,

Rich

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2010-02-12 17:58
    If you're looking for performance, it's fsrw 2.6.

    If you're looking for bulletproof usability and complete features, look for Kye's thread "everything and the kitchen sink." It's still a work in progress but coming along.

    If you're looking to conserve Hub RAM, it remains sdspiqasm from fsrw 1.6. I am using that as the basis for most of my current personal stuff. I suppose it might be a good idea sometime to post my reworked commented version of it for people who want to add features...
  • rjo_rjo_ Posts: 1,825
    edited 2010-02-12 18:21
    Thanks, I'm using fsrw 1.6. I ran out of room, so I've off-loaded the SD-card writing to a different Prop... Now I'm looking for performance.
    I'm writing one byte at a time, which is part of my problem... but I have no idea how to write a block at a time... where can I find a code snippet for this?

    Rich
  • rokickirokicki Posts: 1,000
    edited 2010-02-12 19:09
    Use pwrite()/pread() rather than pputc()/pgetc() and that should take care of it.

    You need to minimize your per-byte overhead.

    If you need help, feel free to share more about what you're doing and perhaps even some code.
  • lonesocklonesock Posts: 917
    edited 2010-02-12 19:15
    rokicki said...
    Use pwrite()/pread() rather than pputc()/pgetc() and that should take care of it.

    You need to minimize your per-byte overhead.

    If you need help, feel free to share more about what you're doing and perhaps even some code.
    Just a quick addition to this, make sure your buffer that you use in pwrite/pread is both long aligned, and a multiple of 512 bytes. [noparse][[/noparse]8^)

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • rjo_rjo_ Posts: 1,825
    edited 2010-02-12 20:22
    uh huh[noparse]:)[/noparse]

    I'll be back[noparse]:)[/noparse]
Sign In or Register to comment.