watchdog and ver 7

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Roy Johnston
Flowcode V4 User
Posts: 220
Joined: Mon Aug 24, 2009 8:38 am
Has thanked: 2 times
Been thanked: 34 times
Contact:

watchdog and ver 7

Post 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: watchdog and ver 7

Post by medelec35 »

Hi Roy,
Have you seen this

Martin
Martin

Roy Johnston
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

Post 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.

Roy Johnston
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

Post 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.

kersing
Valued Contributor
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

Post 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
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Roy Johnston
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

Post by Roy Johnston »

Thank You

Post Reply