Shop OBEX P1 Docs P2 Docs Learn Events
Hyperterminal resetting stamp program — Parallax Forums

Hyperterminal resetting stamp program

agentileagentile Posts: 101
edited 2006-03-27 20:10 in BASIC Stamp
Hello,
·· I have a BS2 data acquisition program which is intended to dump all the stored data onto my computer via hyperterminal.· At the end of my program, after all the data has been collected, I have a loop which waits for input from a keypad.· Upon keypad input, the program enters a loop where it reads stored data and sends it out to hyperterminal using SEROUT.· There is one glitch which occurs when I connect the stamp to hyperterminal.· Upon making the connection, my program is somehow reset to the start.· The program is not being reloaded, but the program starts over as if it had just begun.·
·· Can someone explain what is going on between hyperterminal and my stamp such that a connection to hyperterminal is restarting my program?

thanks,
agentile
·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-27 19:37
    This is caused by HyperTerminal manipulating the DTR pin which we use to reset the Stamp for reprogramming.· You an avoid this problem by removing the direct-connection between the DB9-DTR and the ATN pin on the Stamp.· The diagram I've attached shows our standard programming interface.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    772 x 583 - 8K
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-27 20:04
    Umm, even if you DO put in the capacitors, when Hyperterminal opens to port, it's going to pull DTR low, which is going to reset the BS2.

    Now, if you DON'T have the capacitors, Hyperterminal will HOLD the BS2 in reset, so the capacitors certainly do something useful. But they're not going to prevent the reset entirely.

    Some people get around this by putting in a SERIN with a time-out in the beginning of their program. This lets you input a character using hyperterm, which your program can use to jump to the data output routine. If no hyperterm is connected, the time-out lets your program run normally.

    Even if Hyperterm was NOT pulling DTR low, there's a large chance that it will get 'glitched' when plugging in your DB-9 connector to get the data, which again will reset your BS2. The time-outed SERIN is a good solution.
  • agentileagentile Posts: 101
    edited 2006-03-27 20:10
    thank for the help.
Sign In or Register to comment.