Shop OBEX P1 Docs P2 Docs Learn Events
Getting Information from Propeller to Computer Files — Parallax Forums

Getting Information from Propeller to Computer Files

rcm14rcm14 Posts: 11
edited 2012-04-16 17:25 in Propeller 1
Is there any way to get data stored on the Propeller and extract it to a file on a computer. I know that the serial terminal displays the info, but I'm looking to extract the info from the Propeller to a file.

Is this extraction possible.

Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-16 15:10
    The connection from the Propeller to the PC used for downloading and debugging is just an ordinary asynchronous serial COM port. The Propeller and a PC program can talk back and forth and data can be sent in either direction. There are some serial terminal programs that will store anything sent to the display also to a text file. They can also read a text file and transmit the data to the Propeller as if it were typed on the PC's keyboard. There are programs like Stamp Plot Pro and PLX-DAQ that are available from Parallax's Downloads webpage that were written for use with the Stamps, but work fine with the Propeller as well. Stamp Plot Pro can produce graphs and save data from the Propeller to a file, all using commands sent to the PC from the Propeller. PLX-DAQ is an Excel plug-in intended for a Stamp to directly enter data into a spreadsheet which can then be saved.

    You can also attach an SD card to a set of 4 I/O pins on a Propeller and there are objects in the Object Exchange which will let you write data to PC-compatible files on the SD card. The Propeller can read files from the SD card and load programs from the SD card as well. These can be written to the card by the Propeller or by any PC with an SD card reader/writer.

    You can also create your own program on the PC to talk to the Propeller via a COM port and write any kind of file supported by the programming language you're using. A number of people have written VB (Visual Basic) programs to do this. There's a thread around here somewhat that describes a template for this.
  • rcm14rcm14 Posts: 11
    edited 2012-04-16 15:14
    Thank you! That's a lot of useful information!
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-04-16 15:19
    I use Windows HyperTerminal to capture text printed to the screen. I also use it quite a bit to send files between the Prop and a PC using the YMODEM protocol. And, as Mike said, you can always copy write files to an SD card.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-16 16:55
    Phil wrote a program to write data from a Prop to a csv file on a PC.
  • RaymanRayman Posts: 14,839
    edited 2012-04-16 17:11
    I've also found SD and ymodem the easiest ways...
    Here's my ymodem code:
    http://www.rayslogic.com/propeller/Programming/YModem/Ymodem.htm
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-04-16 17:25
    If you use serial communications it is somewhat easier to assume that all files are binary and convert this to base-64 via a uuencode routiine. This file can then be transmitted safely using common serial communications channels and software such as Hyperterminal (not recommended) or TeraTerm which is a far superior serial terminal (which I wished was available for Linux too).

    An example of base-64 output of a Propeller binary file:
    begin-base64 644 prop.bin
    ALTEBG4yEAC0FiB65ABAelQGDgTUABwAnwIAABwDBAA+AwAAZQMAAJADBADZ
    AwAAHgQAACwEBADrBQAA+wUAABIGAAApBgAAVAZEAYgJjAHIDaABcA6gAQAD
    <snip>
    OCDoNfx5dHjoxYDMdHjn6MWA0MeA2Gs4Ah40xwxwKDbsQoAKAjQzMkAKBUKY
    Nu0hMgAAAA==
    ====
Sign In or Register to comment.