How do I stop/break a program that is running
stevebzzzzz
Posts: 38
Hi,
Dumb question, but I have the BS2 Homework board. Is there any command I can issue from the PC to stop a running program? I know I can erase the program and then run it that way, but I was wondering if there is an easier way. There is no switch (Yet) on my board, so pressing the reset butting just starts the endless loop...well...you know what I mean
Thanks Steve
Dumb question, but I have the BS2 Homework board. Is there any command I can issue from the PC to stop a running program? I know I can erase the program and then run it that way, but I was wondering if there is an easier way. There is no switch (Yet) on my board, so pressing the reset butting just starts the endless loop...well...you know what I mean
Thanks Steve
Comments
'
If you look at DEBUGIN, You can read data from the PC and make a program jump(subroutine)
'
You can add a IF THEN to your main code to read a ASCII character sent back from the DEBUG window to jump to a stop (subroutine)
'
Take a little time and read through these.(15 minute read, 30 minutes at the most)
'
http://www.parallax.com/Store/Books/BASICStamp/tabid/168/CategoryID/42/List/0/SortField/0/Level/a/ProductID/143/Default.aspx
'
http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
'
Read into the serial part too!
There is a way to force a "break" condition on the serial port, but all the Stamp does at that point is reset and start running (as it's designed to do).
The only other idea to offer is for the Stamp program to monitor the state of an I/O pin that's set by a switch. Testing on the pin would allow the program to jump out of whatever it's doing and go do something else.
I'm sure other more experienced users will have other thoughts,
DJ