PDA

View Full Version : PIC Hangs when using Serin TimeOut



Squibcakes
- 20th July 2006, 02:24
Hi,

I've seen this problem a few times now and its strange.
It's the same with both Serin or HSERIN. eg

<ul>
EXAMPLE:
HSERIN 1500, FAIL,[WAIT ("HERE IT IS")]
HSEROUT ["I GOT IT"]
GOTO EXAMPLE

FAIL:
HSEROUT["BAD WIRING"]
GOTO SOMETHING ELSE
</ul>
This example works fine if all connections are correct, but if I cross over GND and RX wire (eg deliberate wire mistake) then it just causes the PIC to Hang up waiting and not preceed after 1.5 secs to FAIL.

Why is this so? ( I have WDT set to ON too.)

I need to allow for this wire mistaking and get the program recognize this and do something else (eg check another serial input pin for instance)

Cheers
Squib

mister_e
- 20th July 2006, 02:27
Do a search for Idle state
http://www.picbasic.co.uk/forum/showpost.php?p=9786&postcount=5

Squibcakes
- 20th July 2006, 02:59
Thanks Mistere.