Shop OBEX P1 Docs P2 Docs Learn Events
Micro SD card and CSV file — Parallax Forums

Micro SD card and CSV file

James LongJames Long Posts: 1,181
edited 2008-03-12 17:38 in Propeller 1
I'm asking this to see if it is even possible.....before jumping in to deep. I figure it is....but because I haven't tried it.....I want to ask.

Using the fsrw and friends.....would it be possible to write a ASCII file that is comma separated values?

Is there a way to calculate the write speed of such a file....before trying it. (approximate value)

Does anyone see a problem with this idea?

James L

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L

Partner/Designer
Lil Brother LLC (SMT Assembly Services)

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-12 02:09
    Should be totally doable.
    No problem creating ASCII files with fsrw.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-12 12:20
    fsrw and friends? What is that?

    Yes, I think it is possible to do ascii files and such. Looks into gettin the HydraSD card that Andre LaMothe has created. It looks like it contains a lot of information on writing SD card drivers and a FAT16 file/directory structure too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • bambinobambino Posts: 789
    edited 2008-03-12 13:41
    Hi Timothy. fsrw and friends is one of Rokicki's drivers in the OBEX for sd cards. I have not used micro SD cards, but I assume their compatable.

    Does Andre's book have support for formatting SD_Cards too, just wondering!
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-12 14:11
    The HydraSD card comes with what looks to be a great manual. The SD stuff isn't in the Hydra book, sorry if my post was unclear.

    Thanks for the clarification on the fsrw. Formatting is usually done on the PC, I am not sure that is done by the Prop. I don't know what is all in the manual, except for the sample on his website and the title of contents.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 14:22
    James,
    The write speed varies widely depending on the SD card you're using and how much data you're writing at a time.
    There was a posting some time ago with the results of some simple timing tests, but I don't have the link.
  • James LongJames Long Posts: 1,181
    edited 2008-03-12 17:01
    Mike Green said...
    James,
    The write speed varies widely depending on the SD card you're using and how much data you're writing at a time.
    There was a posting some time ago with the results of some simple timing tests, but I don't have the link.
    Mike,

    I had read that post, I just want to make sure using ASCII was not going to be a problem. I'm not sure how much more overhead ASCII is going to take. I'm not sure the method of writing at this point.......for I haven't studied the object that closely.

    James

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 17:18
    James,
    ASCII is just character strings and text is less dense than binary information (takes more bytes to contain the information hence net speed is lower). The difference in speed has nothing to do with where you're writing it. It takes two bytes to write a 16 bit signed integer in binary and 6 bytes to write the same thing as ASCII text whether it's going to an SD card or out a serial port to a PC.
  • James LongJames Long Posts: 1,181
    edited 2008-03-12 17:29
    Mike,

    You just provided what I needed.....I didn't know how much overhead ASCII would be.

    so I will have to take the speed and divide by 6 and that will give me an approximate write speed. Appoximate, because i will be adding commas, and line feeds,

    I think the item I'm working on will work fine at that speed, but I will have to check.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 17:38
    Don't forget that 6 bytes ("+99999") is the worst case. If you suppress leading zeros and leave out the sign if it's positive, you'll do much better. Don't make this more complicated than it needs to be. Figure out what sort of data you'll have and write it out on paper as you'd expect it to look in the file, then count the number of bytes of data and you'll have a rough average of how much data you need to write out in whatever period of time.
Sign In or Register to comment.