BS1 new DEBUG window refuses to work
Paulo
Posts: 21
After closing the DEBUG window that opens when I run my code, a new DEBUG with the same configuration of the former one don't work. I'm leaving the BS1 connected and supposedly running the same code just downloaded to it. The first window shows what it is expected to with blinking green lights and all, but the new one seems totally dead.
I am using this code:
SYMBOL· square········· = B2··········· ' FOR/NEXT counter
SYMBOL· stepSize······· = B3··········· ' step size, increase by 2 each loop
Setup:
· stepSize = 1
· square = 1
Main:
· FOR square = 1 TO 250 STEP stepSize·· ' show squares up to 250
··· DEBUG square······················· ' display on screen
··· stepSize = stepSize + 2············ ' add 2 to stepSize
· NEXT································· ' loop until square > 250
· GOTO Main
· END
I set the new DEBUG window to 2400,n,8,off and it is mapped to COM5. What am I doing wrong?
I am using this code:
SYMBOL· square········· = B2··········· ' FOR/NEXT counter
SYMBOL· stepSize······· = B3··········· ' step size, increase by 2 each loop
Setup:
· stepSize = 1
· square = 1
Main:
· FOR square = 1 TO 250 STEP stepSize·· ' show squares up to 250
··· DEBUG square······················· ' display on screen
··· stepSize = stepSize + 2············ ' add 2 to stepSize
· NEXT································· ' loop until square > 250
· GOTO Main
· END
I set the new DEBUG window to 2400,n,8,off and it is mapped to COM5. What am I doing wrong?
Comments
This is normal behavior for the BS1…Unlike the BS2 which is sending out formatted data, the BS1 is sending raw register streams of data. The DEBUG window only knows the configuration of this data at program time. If you then close the window that information is lost. I hope this explains the confusion. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Does this means the BS1 stops sending DEBUG data when I close the window? If this BS1 is disconnected from the PC wich loaded its code and connected to another serial inport, maybe in another PC, should this new receiver get any data? If so, may I use HyperTerminal to get it?
I wanted to use the BS1 as a "talker", sending a continuous steam of bytes, any bytes, to a serial port. Does DEBUG and programming line do the job?
If you want a continuous stream of bytes, you would need a BS1 program that just sits in a loop doing a DEBUG statement. If it does anything else in the loop, there will be a pause in the stream when the BS1 is doing the "something else".
You really have two options…It’s not that the BS1 stops sending the data…It’s that the Editor/DEBUG Window doesn’t know anymore how to interpret the raw data coming in. The BS1 is always sending out all registers when debugging. So your first choice is to leave the DEBUG screen open.
Your second choice, which would work better but would require slightly more code, and I/O pin and some parts would be to send your debug data through an I/O pin using SEROUT. You would need a line driver such as a MAX232 to get the signals to RS-232 levels, or it is possible to use the BS1 Serial Adapter, but the point is you’d be using an I/O pin in place of the PCI/PCO programming pins.
Instead of DEBUG you would use SEROUT and manually format your data going out. An advantage to this is you could use any terminal program such as HyperTerminal and reconnect at any time and the data would still be there. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It seems I'll have to hack my adapter...