Shop OBEX P1 Docs P2 Docs Learn Events
SD Card - Multiple File Read — Parallax Forums

SD Card - Multiple File Read

JohnCJohnC Posts: 64
edited 2010-10-30 14:30 in Propeller 1
I'm working on a project where I need to simultaneously read from two files on an SD card. Reading alternates between files, and throughput is fast enough that there doesn't seem to be time to open and close each file in turn.

I briefly looked at FSRW a few nights ago, and learned that calling fat.popen() internally calls fat.pclose.

Is this possible?

Comments

  • RaymanRayman Posts: 14,889
    edited 2010-10-30 13:45
    My understanding is that you can read from 2 different files at the same time starting with FSRW 2.6. I don't remember how you do it though...

    You may need 2 instances of the FSRW object to do it...
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-10-30 14:30
    Have a look at that: http://forums.parallax.com/showthread.php?t=117573
    (see the last post for the latest version)

    It's an extension for FSRW. It's usually meant for fast access to SWAP-files where each byte (or more) of the file can be accessed by giving it's address inside of the file. Please note the preconditions.

    With this you can read/write from/to 4 files simultaneously (each slot can access a different file) and the original FSRW functions can still be used for full SD card access.

    Hope it helps.
Sign In or Register to comment.