Shop OBEX P1 Docs P2 Docs Learn Events
Propeller program - help — Parallax Forums

Propeller program - help

computer guycomputer guy Posts: 1,113
edited 2007-05-14 06:24 in Propeller 1
Does anyone know how to pass the propeller program a command.
More specificly.
things like this (these are from the scribbler program, it runs the command down below - for BS2).
/NoDebug
/NoPrompt
/Download

Like "Propeller.exe /NoDebug /Download file.spin"

For the basic stamp you can use.
"stampw.exe /NoDebug /Download file.BS2"
but i don't know what to do for the propeller.

Thank you smile.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-13 02:17
    The Propeller Tool is interactive only. I don't believe there is any way to pass information to it. We've been over this before in the context of using the Spin compiler as a back end for a C to Spin translator or a macro pre-processor and have been told that it cannot be done and that we should wait for the eventual release of the compiler as a library like the DLLs for the Stamp. Now that Parallax has said that there will not be a cross platform DLL for the Propeller, it seems likely that there may not be a DLL for Windows either..
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 02:19
    Is there any other way to download the code to the propeller from a file using perl.

    Thank you smile.gif

    Post Edited (computer guy) : 5/13/2007 2:35:17 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-13 03:06
    There's a loader written in Python (http://forums.parallax.com/showthread.php?p=611536).
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 03:17
    Thanks Mike will look into running that from the perl code i have.
    I am using the scribbler code with a propeller chip.

    Thank you smile.gif
  • AribaAriba Posts: 2,682
    edited 2007-05-13 05:07
    You can also use PropTerminal for Download - see:

    http://forums.parallax.com/showthread.php?p=649540


    With: PropTerminal.exe filename.binary -L ComNr

    the Terminal will only download the binary file in the RAM of the Propeller chip and terminate then.

    Andy
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 05:11
    Thanks but no thanks.

    I am using spin not binary and i need something that can run in the background(not visible).

    Thank you smile.gif
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 05:13
    If you are interested though, and you know delphi (or python) and perl.
    You could take a look at the bottom of this post.

    http://forums.parallax.com/showthread.php?p=611536

    Thank you :-)
  • AribaAriba Posts: 2,682
    edited 2007-05-13 05:55
    Hello computer guy

    1) If PropTerminal is startet with commandline parameters it does not show the Terminal Window, only a Console Window (DOS Box) that displays the status. In most programming languages this Console can be hided with a parameter in the function that starts external programs.

    2) You can't download a Spin File directly, it must be compiled first, and this can do only the Propeller Tool IDE until now. But you can save the compiled version of a Spin File as .binary and download it with this Phyton- or delphi code, or with PropTerminal.

    Andy
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 06:03
    Would still like something built into the program.

    Thank you smile.gif
  • AribaAriba Posts: 2,682
    edited 2007-05-13 06:35
    @computer guy

    OK, because of the same reason I included a loader in PropTerminal.

    @Mike Green
    Mike Green said...

    The Propeller Tool is interactive only. I don't believe there is any way to pass information to it. We've been over this before in the context of using the Spin compiler as a back end for a C to Spin translator or a macro pre-processor and have been told that it cannot be done...
    Perhaps it will be possible to 'remote control' the Propeller Tool with Send-Keys messages from another Application. Every Application in Windows can send messages to another window. But there will be no feedback from Propeller Tool, so the controling application has to wait a fixed time after a command, that is long enough also for slow computers.
    Just an idee...

    Andy

    Post Edited (Ariba) : 5/13/2007 6:42:19 AM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 11:56
    Is there a way to detect which com port the prop is connected to.

    Thank you smile.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-13 14:17
    You have to open the port (to reset the Prop) and successfully go through a dialog with the Prop (essentially do an "identify chip" sequence). This can be inferred from Chip's loader written in Spin: http://forums.parallax.com/showthread.php?p=591445. The Prop and PC exchange bits from a "linear feedback shift register", then the Prop sends its version number and the PC sends back a command. For "identify chip", this would just be a "shutdown" command.
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 21:52
    Thank you Chip's code has helped me understand it a lot better.
    Will have a go at programming something in perl when i get home.

    Thank you smile.gif
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-13 22:03
    What would i do for the RESn pin.

    Thank you smile.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-14 02:49
    I'm not clear why you're asking about the RESn pin. Chip's loader takes care of toggling it.

    If you're asking because you're rewriting the routine in perl, consider that the normal PropPlug
    (or equivalent wiring) uses DTR such that the Propeller gets reset when the serial port gets
    opened or closed. Look at the Python version. I think you'll find that the port is opened, then
    the next code is what follows the RESn toggle in Chip's loader.
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-14 06:24
    Yes i am writing perl code to do it.
    I am 2 days new to perl so may need some help if anyone can supply it.

    Thank you smile.gif
Sign In or Register to comment.