[Solved] Program works only when connected to PC via USB -- but I want to cut the cord!
I am dusting off an old project built on a USB protoboard. The program emits a lot of serial data that shows up in the Parallax serial terminal; so far so good. I actually don't care about the data and want to run the program disconnected from the PC, but when I try, the program does not work reliably. It'll do its thing for a little while, then stop briefly, then start working again, then stop... Not sure if it's rebooting or what. I assume the problem is related to the serial data having no place to go.
I vaguely recall that this was a known issue back in the day. Anyone remember what's going on and how to work around it?
I tried commenting out the term.init call (term being fullduplexserial) but that didn't help. In fact I think the program stopped working altogether, though it's hard to tell.
Any help appreciated!
Comments
Serial ports don't care if data goes nowhere. So it won't be that.
Hmm, looks like Parallax is not keeping the docs on the Proto Board USB (#32812). I found what I assume is the correct board at Mouser - https://www.mouser.com/ds/2/321/parallax_32212-propeller-protoboard-documentation--1197468.pdf
It's possible for unwanted external resets. Are you changing anything else other than removing the USB? eg: Are you moving the board into an electrically noisy environment?
This one? https://www.parallax.com/product/propeller-project-board-usb/
I think this describes the issue. https://forums.parallax.com/discussion/comment/1050515/#Comment_1050515
You should be able to mitigate the issue in software. Just be sure that the serial pins to the FTDI chip stay low.
Instead of commenting out term.init, try setting using an unused pin for the serial TX, instead of the usual P30.
Oh, I see, the USB chip is getting enough power to do a reset.
That would most likely hang because the TX buffer fills up and nothing empties it.
@Wuerfel_21 Makes sense.
@SaucySoliton Yes, that second link is what I was hoping someone would remember, and you did! Thanks.
I won't be able to verify the fix until tomorrow, but when I do I'll mark this solved.
Changed 30 to 29 and all is well now. The forum to my rescue once again; thank you all!