(bottom of p. 239 of datasheet 16F18877)
Took me a while to notice this line.
I would guess by this bit?
(p. 163 of datasheet)
But then I see no way that PBP is aware of that or can reset the WDT.
Ioannis
Because if the WDTE bits in CONFIG3 is anything but 0b01 the SEN bit is ignored and the CONFIG block of the code contains _WDT_ON which, according to the .INFO file for the device means
_WDTE_ON ...
Since on power up the SEN bit of the WDTCON0 register is at 0 (Watchdog disabled), why does that chip resets itself?
Ioannis
I was testing a new breadboard layout and PIC config; to make sure I had a heartbeat before piling more code.
Demon Today, 12:53It is definitely a reset, a look at the lst file shows that the looped code segment has no pbp statements in it that generate a clwdt instruction
that loop does the the same thing for every pic...
What is the duration of this reset, if it is reset?
You may add a PAUSE 1000 at the beggining of the program and see if this duration is increased. This will confirm that PIC is indeed reseting....
Qualifying Compiler |
Upgrade Description | |
Upgrade PICBASIC PRO (PBP) 2.60 or later to PBP3 Gold Edition | ||
|
||
|
||
Upgrade PICBASIC Compiler (PBC) to PBP3 Silver Edition |
Re: SOLVED - PIC seems to RESET unless I add a PAUSE in Mainloop
Basically the CONFIG settings allows you to force the WDT either on/off OR allow the program to turn it on/off at runtime.
HenrikOlsson Today, 21:11As for resetting/clearing it, as long as you don't DEFINE NO_CLRWDT 1 PBP...