Shop OBEX P1 Docs P2 Docs Learn Events
how do the stamp IDE debug terminal macros work? — Parallax Forums

how do the stamp IDE debug terminal macros work?

LawsonLawson Posts: 870
edited 2007-07-19 21:19 in General Discussion
First off I'm trying to write a program that responds to short packets of binary encoded asynchronous serial information. (one start byte, one "command" byte, one "data" byte, and finally a checksum byte) I'd like to find a PC program with which I can pre-assemble these packets on the PC and send them out on command. It looks like the Debug Terminal built into the stamp IDE can do this for me with it's macros. Unfortunately I have not been able to find any information on how these macros work, or how to send arbitrary binary data. (or how to receive binary data either) Also, Is there any way to setup the stamp IDE debug terminal to echo the data it sends out?

I'm sure similar topics have been discussed here before. but I've found no trace of those topics when searching with search.parallax.com.

Sincerly,
Marty

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-07-02 22:03
    Hi Marty, here's a screenshot of a simple macro and below is the sample code to capture and display. Control + Shift + A executes the macro in this case.

    x VAR Byte
    y VAR Byte
    z VAR Byte

    main:
    SERIN 16,16468,[noparse][[/noparse]DEC x,DEC y,DEC z]
    DEBUG DEC x,CR, DEC y,CR,DEC z,CR
    PAUSE 5000
    DEBUG CLS
    GOTO main

    Jeff T.
    759 x 505 - 54K
  • LawsonLawson Posts: 870
    edited 2007-07-02 22:22
    ok, that works quite well for ascii text, not soo well for the arbitrary 8-bit binary values I'd like to send. It's hard to type in non-printing characters, Even harder to tell if the data sent back is correct if it prints as " ". (there's like twenty codes that print as " ") Ideally I'd like to type in the data to be sent in hexadecimal and view the received data in hexadecimal. (actually, delimited decimal integers would be easier, but that'd be less likely to exist)

    I've got my prop programmed to echo any bytes sent to it. This is making it easier to see what works and what doesn't.

    Thanks,
    Marty
  • LawsonLawson Posts: 870
    edited 2007-07-19 21:19
    I did manage to find a temporary solution. (short of programming my spare BS2 to do this)

    The parent page for this program is gone, but I managed to find a copy of it floating arround the web. It shows the any recieved data in ASCII, decimal, hex, and binary. It also allows entering raw byte values, in decimal or hex, into it's three macro slots. Additionally it has some buttons for and indicators for all the other I/O lines in an RS232 port. It is attached below in case it'll be useful to someone else.

    Later,
    Marty

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?
Sign In or Register to comment.