Shop OBEX P1 Docs P2 Docs Learn Events
BS2 from flash to text file — Parallax Forums

BS2 from flash to text file

RockitRocketRockitRocket Posts: 4
edited 2010-05-25 02:31 in BASIC Stamp
Hello Everyone,

I am using a BS2 to log some data that I am receiving from a series of accelerometers. The data is being written to an external flash memory chip. I am able to read from the flash memory and display the data through the debug command, so I know everything is working correctly. The issue that I am having, however, is extracting that data into a text file. I am not familiar with the procedure to do this and I have not been able to find any good examples online either. If anyone has any good examples of extracting data from a flash memory and storing it into a text file using the BS2, please, provide me with some insight. I appreciate any help I may receive in advance.

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-05-18 23:11
    The BS2 is storing the data in the raw memory, and accessing it the same way, so there is no concept of a "file" as far as the BS2 and flash memory are concerned.

    Since you know that it works via DEBUG, and since DEBUG is just a special variation of SEROUT, you could develop a program on the PC that communicates with the BS via serial connection, and retrieves the data.

    This program would:
    Open the serial port
    Send a request to the BS2 for data
    (BS2 receives request from PC, retrieves the data from flash, sends it to PC)
    Get the data back from the BS2
    Create/Append to a text file on the PC
    Repeat until finished
    Close the serial port

    This shouldn't be too difficult with any reasonably modern programming language. You can use languages such as Perl, Python, Ruby, Tcl, PowerShell, VB.Net, Delphi, C/C++, C#, or whatever you may be comfortable with.

    I'm certain that there are all kinds of code examples on the these forums for doing some form of serial comms with "language X", so if you already have a preference, search for that. If you need more pointers, just ask.

    Post Edited (Kevin Wood) : 5/18/2010 11:17:07 PM GMT
  • BuGeYeSBuGeYeS Posts: 6
    edited 2010-05-25 02:31
    Have you tried a com port logger?
    write your debug routine to debug all of the data at once, the logger will output to txt file for you. Hope this helps.
Sign In or Register to comment.