Strange behavior
Codeswinger
Posts: 5
Friends,
An easy one regarding QuickStart; At boot i light the on-board LED at P20. In the spin loop, I then monitor another pin and send data via the USB cable to a small app written in VB using "Parallax Serial Terminal" object but as soon I hang up, the LED goes out. My spin app continues to run as nothing has happened. Same thing when I run Windows HyperTerminal but not when running the Prop PST app.
The question; Does hanging up trigger something in the Prop and/or QuickStart that leads to P20 going low? I have tried all on-board LEDs as well as an external LED to P27. Same behavior. What is happening here?
Many thanks for any advice.
An easy one regarding QuickStart; At boot i light the on-board LED at P20. In the spin loop, I then monitor another pin and send data via the USB cable to a small app written in VB using "Parallax Serial Terminal" object but as soon I hang up, the LED goes out. My spin app continues to run as nothing has happened. Same thing when I run Windows HyperTerminal but not when running the Prop PST app.
The question; Does hanging up trigger something in the Prop and/or QuickStart that leads to P20 going low? I have tried all on-board LEDs as well as an external LED to P27. Same behavior. What is happening here?
Many thanks for any advice.
Comments
The Prop is reset when the DTR signal on the serial port becomes active. Depending on the PC program, this may happen when the port is opened (like with HyperTerm). Some programs, like PST, don't do this unless you specifically call for it (like with a menu item to reset the Prop). That would cause the LED to go out (on a reset). The question is why your Spin program seems to continue running. Your program would start over from its beginning if you downloaded it into EEPROM. If you only downloaded it into RAM, it would be erased and replaced with the program stored in the EEPROM.
Can't tell without seeing code as to what the problem is. Sounds a bit like a recursive call that is running out of stack & crashing. Post your code so we can help.
Jim
And sorry for not providing code in my first post. I figured it to be a general design question and not a code related one. I will run some tests based on Mikes reply and see if the chip actually resets. This DTR signal seems like the most probable reason, but then again - the code/chip doesn't act like it is rebooting. But the code *is* in EEPROM so there might be a reboot after all. It is the only logical reason for the led to go off. I'll be back in an hour or two. Dinner awaits..
Thanks.
CS
I must be buffoon of the year. The chip rebooted as a result of DTR, but it did with such speed of course that I never noticed. Sorry that I occupied space and time. I'll think twice next time.
CS