Searching \ for '[PIC] watchdog not working (mplab c)' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=mplab
Search entire site for: 'watchdog not working (mplab c)'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] watchdog not working (mplab c)'
2007\03\26@205534 by kris duff

flavicon
face
Hi,

I use MPLAB 7.5 with mcc 3.1

In my code, I use :

#pragma romdata CONFIG
rom const unsigned int config_word2 =
0b0001101100000001;
#pragma romdata

So, with my chip (18f6680), the RC timer is between
7ms and 33ms.  So, if I remember, I should have a
watchdog between 57s and 117s.

When the chip reset, I light some LED.  I never do
ClrWdt() so I think the watchdog should reset my
processor.  But he never reset my chip.  Any idea ???


thank you

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

2007\03\27@034534 by Alan B. Pearce

face picon face
>When the chip reset, I light some LED.  I never do
>ClrWdt() so I think the watchdog should reset my
>processor.  But he never reset my chip.  Any idea ???

How do you know it never resets the processor? The LED will go off for such
a short time that you will never see it blink.

You would be better off changing the code so that each time it resets it
changes the state of the LED, i.e. if it is off turn it on, if on then turn
it off.

2007\03\27@071736 by Gerhard Fiedler

picon face
Alan B. Pearce wrote:

>> When the chip reset, I light some LED.  I never do ClrWdt() so I think
>> the watchdog should reset my processor.  But he never reset my chip.
>> Any idea ???
>
> How do you know it never resets the processor? The LED will go off for such
> a short time that you will never see it blink.
>
> You would be better off changing the code so that each time it resets it
> changes the state of the LED, i.e. if it is off turn it on, if on then turn
> it off.

Or run through two delays after reset: one while the LED is on, another
while it is off.

Gerhard

2007\03\27@082732 by kris duff

flavicon
face
Thank you for the reply,

In fact, when the processor reset, I light on the LED
for a 1 second delay and after I light them off. So I
can see them blink.

Moreover, I use the functions at the boottime (in the
main() function) (ifBOR, ifWDTTO, etc) to know why the
processor has resetted and the function always return
0.

any ideas?

Thank you
--- Gerhard Fiedler <spam_OUTlistsTakeThisOuTspamconnectionbrazil.com>
wrote:

{Quote hidden}

> --

2007\03\27@090942 by Carl Denk

flavicon
face
I have a PIC communicating via a fiber optic > RS-485 with a PLC. As
part of the watchdog reset routine, the PIC sets a flag and keeps number
of resets that are then sent as a data string to the PLC. The PLC then
displays the watchdog flag and number of resets. From the PLC's keypad I
can reset the PIC's watchdog counter and flag.

Also the PLC watches for RS-485 errors and displays quantity of them,
with reset via keypad available.

In this PIC application, it's monitoring a natural gas well when the
receipt of valid data is important, and the PLC can E-mail if the error
persists. Eventually I hope to be able to view the data on the web cell
phone and reset or change other parameters. :)

kris duff wrote:
{Quote hidden}

>> --

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...