Hello Wirecut
Here is 1 way, tie an unused pin to the mclr pin and bring it low in software.
Hello Wirecut
Here is 1 way, tie an unused pin to the mclr pin and bring it low in software.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi Joe.
many thanks for your suggestion, but unfortunatelly I do not have spare pins to dedicate to this use.
Ciao
Leo
Hi,
Other solution ... WDT Timeout ! ...
Alain
Last edited by Acetronics2; - 10th March 2008 at 09:32.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
You could use the WDT, but then you would need to insert an assembler routine that looped
until the WDT reset the PIC. Otherwise PBP will automatically clear the WDT.
You have the option of telling PBP not to clear WDT, but then it's up to you to manage it,
and that can really be a pain.
Another option is to just jump to location 0. PCLATH=0 followed by @ GOTO 0 works if you
just want to start over from 0.
Sure. If you want to re-start from location 0, then;
This isn't exactly the same as a hardware reset, but it's close.Code:X VAR BYTE TOGGLE 0 Main: FOR X = 0 TO 50 IF X = 20 THEN PCLATH = 0 @ GOTO 0 ' start over from 0 if X = 20 ENDIF NEXT X GOTO Main END
Thanks Bruce.
Since you say that it is not a hard reset but close, will this clear any return addresses in the stack if there is any?
Thanks.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks