Shop OBEX P1 Docs P2 Docs Learn Events
SD card write speed — Parallax Forums

SD card write speed

Alex41Alex41 Posts: 112
edited 2009-12-15 21:13 in Propeller 1
Hello,

I'm new to the propeller. I see alot of info about using a SD card with the propeller.

At this point I don't have any specific code or application to post.

1. Say I'm using the SD card to record data through an ADC. I want to read 10 channels, each one 10 times per second. Can I write to the SD card fast enough to keep up with this?

2. I'd like to import this data into an excel spreadsheet. The data has to be saved in a certain format to be read by excel? This is where My understanding gets a little fuzzy. What do I need to do to save this data in the correct format?

Thanks for any help,
Alex

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If at first you don't succeed, then skydiving is not for you.

Comments

  • blittledblittled Posts: 681
    edited 2009-12-14 17:11
    1. Look at this thread :http://forums.parallax.com/showthread.php?p=824166. It describes a SD Card reader in detail.

    2. I would use comma delimited data eg. 1,2,3.56,4.56 since Excel excepts this format. You'll have to use Floatstring to convert the raw data to ascii.· Also you should buffer your incoming data since the conversion to Ascii will be slower than your sampling rate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Will work for Propeller parts!
  • lonesocklonesock Posts: 917
    edited 2009-12-14 19:48
    The latest versions of FSRW are definitely fast enough for this application (100 samples a second, say 10 characters per sample, is 1kB/s). Even using FSRW in the absolute slowest mode (using the pputc calls for one byte at a time) you will have plenty of speed. (You can write at ~ 25 kB/s in the slow mode, and if you buffer the output data and write it in blocks of 512 bytes, you can get speeds of ~ 1 MB/s).

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-12-14 20:53
    @blittled:
    about 2.) Is this knowledge or just a feeling? My feeling is that SPIN should be fast enough to convert 100 numbers into ASCII per second. Isn't it?
  • blittledblittled Posts: 681
    edited 2009-12-15 00:10
    Just a feeling... I was just thinking it would be slower.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Will work for Propeller parts!
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-12-15 05:45
    Then you should adjust your feelings about the prop ;o)

    80_000_000 cycles per second makes 20_000_000 MIPS in PASM.
    I measured some SPIN instructions when I started with the propeller and they needed ~450 cycles. Maybe some need more, some need less. So, you can have ~170 MSPINIPS per second. That should be enough to convert some more numbers into strings.
  • Alex41Alex41 Posts: 112
    edited 2009-12-15 21:13
    Many thanks for all of the replies.

    It has me pointed in the right direction for learning more about logging data to a SD card.

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
Sign In or Register to comment.