PDA

View Full Version : Strange behavior



Codeswinger
04-01-2012, 02:00 PM
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.

Mike Green
04-01-2012, 03:08 PM
It would help to give more information. With any question like this, it's helpful to post your code, particularly your Propeller program.

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.

RS_Jim
04-01-2012, 03:38 PM
Codeswinger
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

Codeswinger
04-01-2012, 06:07 PM
Thank you both Mike and RS_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

Codeswinger
04-02-2012, 12:14 AM
Dear all,
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