Searching \ for '[PIC]:problem with Watch-Dog' 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/devices.htm?key=pic
Search entire site for: 'problem with Watch-Dog'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:problem with Watch-Dog'
2002\08\27@093741 by Samuel BOUQUET

flavicon
face
Hello, I'm using PIC16F876 with PCM (from CCS) C-Compiler.
I put the Prescaler from the timer 0 to the Watch Dog because timer 0 is
lead externally and has to be incremented at each falling edge. I put NOWDT
on the configuration bits. in spite of those elements the PIC resets because
of the WDt.
Please, how can i solve it.
____________________
Samuel BOUQUET
Sociiti INOV'TRONIK
8/10 rue Emile Sehet
ZA des chataigniers
95150 Taverny
____________________
Tel: (33) 1 39 95 29 50
Fax: (33) 1 39 95 74 10
spam_OUTs.bouquetTakeThisOuTspaminovtronik.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\27@111356 by Dale Botkin

flavicon
face
Samuel BOUQUET <.....s.bouquetKILLspamspam@spam@INOVTRONIK.COM> said:

> Hello, I'm using PIC16F876 with PCM (from CCS) C-Compiler.
> I put the Prescaler from the timer 0 to the Watch Dog because timer 0 is
> lead externally and has to be incremented at each falling edge. I put NOWDT
> on the configuration bits. in spite of those elements the PIC resets because
> of the WDt.

Can you post your #FUSES line and the code you're using to set up TIMER0 and
the prescaler?

Dale

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\27@111605 by Mike Mansheim

flavicon
face
> Hello, I'm using PIC16F876 with PCM (from CCS) C-Compiler.
> I put the Prescaler from the timer 0 to the Watch Dog because timer 0
> is lead externally and has to be incremented at each falling edge. I
> put NOWDT on the configuration bits. in spite of those elements the
> PIC resets because of the WDt.

I've used NOWDT in CCS with the F876 and it works fine.  So:

- most programming software allows you to manually change the settings
 of the configuration bits.  Did the watchdog inadvertently get turned
 on that way?
- Are you sure it's a watchdog reset?  How do you know?
- are you using an emulator?  With the ICE2000, for example, you change
 the watchdog stuff via menu options - the settings in the hex file
 don't have any effect.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\28@031214 by Samuel BOUQUET

flavicon
face
> >Samuel BOUQUET <s.bouquetspamKILLspamINOVTRONIK.COM> said:
> >
> > Hello, I'm using PIC16F876 with PCM (from CCS) C-Compiler.
> > I put the Prescaler from the timer 0 to the Watch Dog because timer 0 is
> > lead externally and has to be incremented at each falling edge. I put
NOWDT
> > on the configuration bits. in spite of those elements the PIC resets
because
> > of the WDt.

>Dale Botkin said:
>
>Can you post your #FUSES line and the code you're using to set up TIMER0
and
>the prescaler?
>
>Dale

Here is the #fuses line:
       #fuses XT, NOPROTECT, NOWDT, PUT, NOPROTECT, NOBROWNOUT, NOLVP, WRT, CPD

and the code lines:
       setup_counters (RTCC_EXT_H_TO_L, RTCC_DIV_2);
       bit_set (OPTION_REG, 3);
       set_timer (0);

I read on a Microchip datasheet (Mid Range Reference Manuel, 33023.pdf) that
there are assemblary lines to get the PIC working on a good way (page 176).I
am working on it to try to get the timer working good. the WDT seems to be
stop with those instructions.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@031912 by Samuel BOUQUET
flavicon
face
>Mike Mansheim said:
>> Hello, I'm using PIC16F876 with PCM (from CCS) C-Compiler.
>> I put the Prescaler from the timer 0 to the Watch Dog because timer 0
>> is lead externally and has to be incremented at each falling edge. I
>> put NOWDT on the configuration bits. in spite of those elements the
>> PIC resets because of the WDt.

>I've used NOWDT in CCS with the F876 and it works fine.  So:

>- most programming software allows you to manually change the settings
>  of the configuration bits.  Did the watchdog inadvertently get turned
>  on that way?
>- Are you sure it's a watchdog reset?  How do you know?
>- are you using an emulator?  With the ICE2000, for example, you change
>  the watchdog stuff via menu options - the settings in the hex file
>  don't have any effect.

My programmer is fine, i do not use an emulator.
I use timer0 with prescaler at 1:1. Microchip Datasheets explain that it
could activate the WDT, despite i don't use assemblary routine they
recommend to use in this case. when i use their routine, my timer0 don't run
anyway. I still working on it.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@101937 by Dale Botkin

flavicon
face
On Wed, 28 Aug 2002, Samuel BOUQUET wrote:

> Here is the #fuses line:
>         #fuses XT, NOPROTECT, NOWDT, PUT, NOPROTECT, NOBROWNOUT, NOLVP, WRT, CPD

That's correct, and will disable WDT.

> I read on a Microchip datasheet (Mid Range Reference Manuel, 33023.pdf) that
> there are assemblary lines to get the PIC working on a good way (page 176).I
> am working on it to try to get the timer working good. the WDT seems to be
> stop with those instructions.

That procedure is needed when switching the prescaler between the WDT and
TIMER0, whether you have the WDT enabled or not.  I think the problem is
occurring when you manually set OPTION_REG bit 3.  What are you trying to
accomplish with that?  This line:

setup_counters (RTCC_EXT_H_TO_L, RTCC_DIV_2);

will (safely) assign the prescaler to TIMER0, you don't need to do it
yourself.  The compiler will use the corerct procedure to avoid the
problem noted in the midrange manual.  Just delete the "bit_set
(OPTION_REG, 3)" statement and I think you'll be OK.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@111418 by Samuel BOUQUET

flavicon
face
By setting the OPTION_REG bit 3 I put the prescaler to the WD. I need a 1:1
TIMER 0 in my application. So the bit PSA (OPTION_REG bit 3) has to be set.
But by setting it the prescaler goes to the WD. My problem is that it
generates a reset a short time after because of the WDT which should be
disabled.
So how can i get safely a timer 0 without prescaler and without an undesired
WDT-reset?



-----Message d'origine-----
De : pic microcontroller discussion list
[@spam@PICLISTKILLspamspamMITVMA.MIT.EDU]De la part de Dale Botkin
Envoye : mercredi 28 aout 2002 16:18
A : KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU
Objet : Re: [PIC]:problem with Watch-Dog


On Wed, 28 Aug 2002, Samuel BOUQUET wrote:

> Here is the #fuses line:
>         #fuses XT, NOPROTECT, NOWDT, PUT, NOPROTECT, NOBROWNOUT, NOLVP,
WRT, CPD

That's correct, and will disable WDT.

> I read on a Microchip datasheet (Mid Range Reference Manuel, 33023.pdf)
that
> there are assemblary lines to get the PIC working on a good way (page
176).I
> am working on it to try to get the timer working good. the WDT seems to be
> stop with those instructions.

That procedure is needed when switching the prescaler between the WDT and
TIMER0, whether you have the WDT enabled or not.  I think the problem is
occurring when you manually set OPTION_REG bit 3.  What are you trying to
accomplish with that?  This line:

setup_counters (RTCC_EXT_H_TO_L, RTCC_DIV_2);

will (safely) assign the prescaler to TIMER0, you don't need to do it
yourself.  The compiler will use the corerct procedure to avoid the
problem noted in the midrange manual.  Just delete the "bit_set
(OPTION_REG, 3)" statement and I think you'll be OK.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@113939 by Dale Botkin

flavicon
face
On Wed, 28 Aug 2002, Samuel BOUQUET wrote:

> By setting the OPTION_REG bit 3 I put the prescaler to the WD. I need a 1:1
> TIMER 0 in my application. So the bit PSA (OPTION_REG bit 3) has to be set.

If you want no prescaler on TIMER0, I'd suggest
"setup_counters(RTCC_EXT_H_TO_L,WDT_2304MS);".  Actually, the preferred
method would be:

setup_timer_0(RTCC_EXT_H_TO_L);
setup_wdt(WDT_2304MS);

The WDT is disabled, so the prescaler setting is immaterial as long as
it's assigned to the WDT.

> So how can i get safely a timer 0 without prescaler and without an
> undesired WDT-reset?

Let the compiler do the work.  8-)

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@114341 by Olin Lathrop

face picon face
> By setting the OPTION_REG bit 3 I put the prescaler to the WD. I need a
1:1
> TIMER 0 in my application. So the bit PSA (OPTION_REG bit 3) has to be
set.
> But by setting it the prescaler goes to the WD. My problem is that it
> generates a reset a short time after because of the WDT which should be
> disabled.
> So how can i get safely a timer 0 without prescaler and without an
undesired
> WDT-reset?

The watchdog timer can be disabled in the configuration bits.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@115217 by Dale Botkin

flavicon
face
On Wed, 28 Aug 2002, Olin Lathrop wrote:

> The watchdog timer can be disabled in the configuration bits.

Yes, but fiddling with the PSA bit can cause an unintended WDT reset even
if it's disabled, apparently.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@125754 by Olin Lathrop

face picon face
> Yes, but fiddling with the PSA bit can cause an unintended WDT reset even
> if it's disabled, apparently.

I find that *very* hard to believe.  Do you have any solid evidence to
support this belief?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@132448 by llile

flavicon
face
This sounds like another classic CCS bug to me.  Several times I have
found that #fuses bits work backwards in some of their releases,  right
now I have a project for the 'F73 that must use "NOPUT" to *enable* the
power up timer.  A sheepish tech at CCS explained that they are working on
this after I wasted a couple of hours pulling out my hair..

Try enabling your WDT, I'll bet the WDT will then turn off.   Or else,
upgrade to the version du jour.


-- Lawrence Lile





Olin Lathrop <RemoveMEolin_piclistEraseMEspamEraseMEEMBEDINC.COM>
Sent by: pic microcontroller discussion list <RemoveMEPICLISTspam_OUTspamKILLspamMITVMA.MIT.EDU>
08/28/02 11:57 AM
Please respond to pic microcontroller discussion list


       To:     RemoveMEPICLISTTakeThisOuTspamspamMITVMA.MIT.EDU
       cc:
       Subject:        Re: [PIC]:problem with Watch-Dog


> Yes, but fiddling with the PSA bit can cause an unintended WDT reset
even
> if it's disabled, apparently.

I find that *very* hard to believe.  Do you have any solid evidence to
support this belief?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@142235 by Dwayne Reid

flavicon
face
At 12:24 PM 8/28/02 -0500, llileSTOPspamspamspam_OUTSALTONUSA.COM wrote:
>This sounds like another classic CCS bug to me.  Several times I have
>found that #fuses bits work backwards in some of their releases,  right
>now I have a project for the 'F73 that must use "NOPUT" to *enable* the
>power up timer.  A sheepish tech at CCS explained that they are working on
>this after I wasted a couple of hours pulling out my hair..
>
>Try enabling your WDT, I'll bet the WDT will then turn off.   Or else,
>upgrade to the version du jour.

Assuming the original poster is using a PS+, why not just look at the fuse
data when the file is loaded into the programmer?

dwayne

--
Dwayne Reid   <spamBeGonedwaynerSTOPspamspamEraseMEplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@152000 by Dale Botkin

flavicon
face
On Wed, 28 Aug 2002, Olin Lathrop wrote:

> > Yes, but fiddling with the PSA bit can cause an unintended WDT reset even
> > if it's disabled, apparently.
>
> I find that *very* hard to believe.  Do you have any solid evidence to
> support this belief?

Well, yes, otherwise I wouldn't have said it.  As the OP noted, you can
look at section 11.6.1 on page 11-8 of DS31101A, the PIC Midrange
reference manual.

"NOTE: To avoid an unintended device RESET, the following instruction
sequence (shown in Example 11-1) must be executed when changing the
prescaler assignment from TIMER0 to the WDT.  This sequence must be
followed even if the WDT is disabled."

I'd say that explains why he gets a WDT reset when he manually twiddles
PSA even though he's got the WDT disabled.  I had to look it up to be
sure, but there it is plain as day.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body


2002\08\28@152411 by Dale Botkin

flavicon
face
On Wed, 28 Aug 2002 @spam@llile@spam@spamspam_OUTSALTONUSA.COM wrote:

> This sounds like another classic CCS bug to me.  Several times I have
> found that #fuses bits work backwards in some of their releases,  right
> now I have a project for the 'F73 that must use "NOPUT" to *enable* the
> power up timer.  A sheepish tech at CCS explained that they are working on
> this after I wasted a couple of hours pulling out my hair..
>
> Try enabling your WDT, I'll bet the WDT will then turn off.   Or else,
> upgrade to the version du jour.

I bet not.  I know for a fact what he's setting will compile with the
correct fuse settings for the 'F87x series, I do it almost daily.  That's
why I figured it was probably his programmer until he mentioned the MCHP
recommended sequence for switching the PSA and saw he was explicitly
setting PSA without doing that; that looks like the smoking gun.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\29@032921 by Samuel BOUQUET

flavicon
face
Thanks for these advice. I will make the recommanded changes in the software
and tell you if that works.

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspam_OUTspammitvma.mit.edu


2002\08\29@032942 by Samuel BOUQUET

flavicon
face
I was surprised too when I read this in the Datasheet of the PIC. And I can
assure you that it really happens.

-----Message d'origine-----
De : pic microcontroller discussion list
[TakeThisOuTPICLIST.....spamTakeThisOuTMITVMA.MIT.EDU]De la part de Olin Lathrop
Envoyi : mercredi 28 ao{t 2002 18:58
@ : TakeThisOuTPICLISTKILLspamspamspamMITVMA.MIT.EDU
Objet : Re: [PIC]:problem with Watch-Dog


> Yes, but fiddling with the PSA bit can cause an unintended WDT reset even
> if it's disabled, apparently.

I find that *very* hard to believe.  Do you have any solid evidence to
support this belief?




*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservspamRemoveMEmitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamspamBeGonemitvma.mit.edu


2002\08\29@084910 by Samuel BOUQUET

flavicon
face
Is it possible that the undesired WDT doesn't appear on the ICEPIC Emulator
but is here on the programed 16F872?

-----Message d'origine-----
De : pic microcontroller discussion list
[spamBeGonePICLIST@spam@spamspam_OUTMITVMA.MIT.EDU]De la part de Dale Botkin
Envoye : mercredi 28 aout 2002 21:24
A : TakeThisOuTPICLISTspamspamMITVMA.MIT.EDU
Objet : Re: [PIC]:problem with Watch-Dog


On Wed, 28 Aug 2002 llileEraseMEspamSALTONUSA.COM wrote:

> This sounds like another classic CCS bug to me.  Several times I have
> found that #fuses bits work backwards in some of their releases,  right
> now I have a project for the 'F73 that must use "NOPUT" to *enable* the
> power up timer.  A sheepish tech at CCS explained that they are working on
> this after I wasted a couple of hours pulling out my hair..
>
> Try enabling your WDT, I'll bet the WDT will then turn off.   Or else,
> upgrade to the version du jour.

I bet not.  I know for a fact what he's setting will compile with the
correct fuse settings for the 'F87x series, I do it almost daily.  That's
why I figured it was probably his programmer until he mentioned the MCHP
recommended sequence for switching the PSA and saw he was explicitly
setting PSA without doing that; that looks like the smoking gun.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestRemoveMEspamEraseMEmitvma.mit.edu


2002\08\29@090532 by Dale Botkin

flavicon
face
On Thu, 29 Aug 2002, Samuel BOUQUET wrote:

> Is it possible that the undesired WDT doesn't appear on the ICEPIC Emulator
> but is here on the programed 16F872?

Probably.  Emulators often don't reproduce all of the correct hardware
conditions, let alone the incorect ones.

Dale

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam@spam@mitvma.mit.edu


2002\08\29@135025 by llile

flavicon
face
AHA!


-- Lawrence Lile





Dale Botkin <@spam@dalespam_OUTspam.....BOTKIN.ORG>
Sent by: pic microcontroller discussion list <spamBeGonePICLISTEraseMEspamMITVMA.MIT.EDU>
08/28/02 02:19 PM
Please respond to pic microcontroller discussion list


       To:     PICLISTspamBeGonespamMITVMA.MIT.EDU
       cc:
       Subject:        Re: [PIC]:problem with Watch-Dog


On Wed, 28 Aug 2002, Olin Lathrop wrote:

> > Yes, but fiddling with the PSA bit can cause an unintended WDT reset
even
> > if it's disabled, apparently.
>
> I find that *very* hard to believe.  Do you have any solid evidence to
> support this belief?

Well, yes, otherwise I wouldn't have said it.  As the OP noted, you can
look at section 11.6.1 on page 11-8 of DS31101A, the PIC Midrange
reference manual.

"NOTE: To avoid an unintended device RESET, the following instruction
sequence (shown in Example 11-1) must be executed when changing the
prescaler assignment from TIMER0 to the WDT.  This sequence must be
followed even if the WDT is disabled."

I'd say that explains why he gets a WDT reset when he manually twiddles
PSA even though he's got the WDT disabled.  I had to look it up to be
sure, but there it is plain as day.

Dale

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistserv@spam@spamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-request@spam@spamEraseMEmitvma.mit.edu


2002\08\30@095824 by Samuel BOUQUET

flavicon
face
My problem is solved. I have my timer0 with a 1:1-prescaler and no unwilling
WDT-reset. But I haven't seen that I had also a problem of lack of intensity
in my circuit, which provoked also a reset. So please excuse me for all! My
training master, Samuel, is now very upset because you would think he was
stupid. But he is clean in the story (except if we considered he could have
helped me a little more for a so small problem... bad master! :-D )

Maxime

Maxime has just forgot to tell you that last month, he already got this
problem...
bad trainee! :-(

Sam

-----Message d'origine-----
De : pic microcontroller discussion list
[.....PICLISTRemoveMEspamMITVMA.MIT.EDU]De la part de Dale Botkin
Envoye : jeudi 29 aout 2002 15:04
A : .....PICLISTSTOPspamspam@spam@MITVMA.MIT.EDU
Objet : Re: [PIC]:problem with Watch-Dog


On Thu, 29 Aug 2002, Samuel BOUQUET wrote:

> Is it possible that the undesired WDT doesn't appear on the ICEPIC
Emulator
> but is here on the programed 16F872?

Probably.  Emulators often don't reproduce all of the correct hardware
conditions, let alone the incorect ones.

Dale

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam@spam@mitvma.mit.edu

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


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