Page 1 of 1
watchdog and ver 7
Posted: Fri Jul 15, 2016 5:40 pm
by Roy Johnston
If I use this command wdtcon = 0x01; to start the watchdog timer , the project wont compile. I get the following error messages.
Employing 18F4550 errata work-arounds:
* Corrupted fast interrupt shadow registers
(908) exit status = 1
(908) exit status = 1
It works on flowcode 6
thanks
Re: watchdog and ver 7
Posted: Fri Jul 15, 2016 6:03 pm
by medelec35
Hi Roy,
Have you seen
this
Martin
Re: watchdog and ver 7
Posted: Fri Jul 15, 2016 6:10 pm
by Roy Johnston
thanks , I was just about to post that I did the following and it works.
WDTCON |= 0x01;
I did not realise it was the upper caps, I thought it was the | that did it.
Re: watchdog and ver 7
Posted: Fri Jul 15, 2016 6:13 pm
by Roy Johnston
ok I removed the | character and it now works,
its simply the upper case.
do you possibly know what the character | does.
I found that command on the microchip website.
Re: watchdog and ver 7
Posted: Fri Jul 15, 2016 7:57 pm
by kersing
Roy Johnston wrote:
do you possibly know what the character | does.
I found that command on the microchip website.
The pipe '|' symbol is logic or, in the assignment you were using it takes the original value of WDTCON and performs a logic OR with 0x01. (Sets bit 0 of WDTCON if not set, leaves it set if already set.)
The assignment is shorthand for WDTCON = WDTCON | 0x01
Re: watchdog and ver 7
Posted: Fri Jul 15, 2016 8:41 pm
by Roy Johnston
Thank You