View Full Version : How can I get the DEBUG function to work?
09-04-2008, 04:54 AM
I'm pretty new to the BS/2 (and programming microcontrollers in general).· I've been using the DEBUG·to try and·troubleshoot some of the code I've made.· I made a simple LED flasher program to try and figure this out, with the output port and a variable put into DEBUG.· DEBUG is showing that the variable is staying at 0 and not incrementing, and even though the LED is flashing like it's supposed to, DEBUG shows the output port not transitioning.· I've attached a copy of the code.· Any ideas?
09-04-2008, 05:16 AM
Move the DEBUG statements into your DO .. LOOP. The stamp only sends information to the debug terminal when it encounters the DEBUG statement. So your program sends the data once and then never resends in the loop.
I've attached your code with the revision.
The HOME formatter moves the cursor to the top of the screen, so the output should be placed over itself for each iteration (or you can take it out and watch the data roll down the terminal).
09-04-2008, 07:27 AM
Why didn't I think of this before? You're absolutely right, this works great! This is going to make all future programming for me about a 1000X easier!!