Shop OBEX P1 Docs P2 Docs Learn Events
Need help interfacing C program to BASIC Stamp — Parallax Forums

Need help interfacing C program to BASIC Stamp

neologosneologos Posts: 1
edited 2008-02-27 02:48 in BASIC Stamp
Hi,
I have a double need.
1) To find a C program to compile under Lynux to manage data exchange with BS2.
2) To find a C program to dowload a BS2·program to eeprom of the board (like Stamploader but to include·in an application)
please help.
Regards
Neo

Post Edited By Moderator (Chris Savage (Parallax)) : 2/26/2008 4:58:54 PM GMT

Comments

  • terry_bearterry_bear Posts: 84
    edited 2008-02-27 02:48
    neologos,

    The answer to your second question is actually a set of programs, one of which runs the tokenizer (supplied by Parallax) and one which downloads the tokenized program into the Stamp.

    The collection of utilities that you are looking for is bstamp-2006.05.31.tar.gz It can be found at Sourceforge, and includes the source code for both the wrapper for the tokenizer and the downloader. Be aware that the current tokenizer does not support BS2px, and the wrapper which calls it does not support the latest version of BS2pe (the source code is easy to fix, however)

    There are multitudinous answers to your 1st question, if I understand you correctly. To send data to the Stamp, I usually just redirect the echo command to the serial port. That works from the shell and from perl (you can use the various "print' commands in C) Data from the Stamp can be read in a similar fashion.

    All of the above assumes that you are using DEBUG. It gets complex vary quickly if you have to be concerned about the baud rate,parity, etc. having been change (perhaps by some other program that accessed the port) There are serial port modules availabe in C, but I don't have one myself (yet)

    Have fun!

    Terry
Sign In or Register to comment.