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
watchdog and ver 7
Moderator: Benj
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact:
Re: watchdog and ver 7
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.
WDTCON |= 0x01;
I did not realise it was the upper caps, I thought it was the | that did it.
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact:
Re: watchdog and ver 7
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.
its simply the upper case.
do you possibly know what the character | does.
I found that command on the microchip website.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: watchdog and ver 7
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.)Roy Johnston wrote: do you possibly know what the character | does.
I found that command on the microchip website.
The assignment is shorthand for WDTCON = WDTCON | 0x01
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact: