Shop OBEX P1 Docs P2 Docs Learn Events
speed up data logger — Parallax Forums

speed up data logger

yoda152yoda152 Posts: 18
edited 2011-03-28 08:37 in BASIC Stamp
iv tryed to speed up data logger part of my code by using a 1 or 0 for two conditions that will be meet ( this 1 or 0 will then be writen to the memory stick). but when i try to run my program with DEC1 there is no data writen to the usb stick, it works if i use DEC5 why is this

see line 240 in code attached

any help would be great.

it would make sense that a 1 digit number would take a shoter time to be writen to the usb stick than a 5 digit number i need this speed up.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-03-28 08:37
    When you write to the memory stick, there's a 4 byte write count. In your program it has $00, $00, $00, $07 which calls for 7 data bytes to be written. When you change to DEC1, you have to adjust this count to fit. Read the description of the various commands in the Vinculum documentation (VDAP Firmware Spec) via the link on the Datalogger's webstore page. The count has to include any delimiters you want written to the Memory Stick (like CR or LF).

    There's a lot of overhead in writing small bits of data to the Memory Stick. Shortening the amount of data written will help a little, but not a lot. You may have to buffer several readings and write them all at once to the Memory Stick to reduce the effect of this overhead.
Sign In or Register to comment.