CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

I have problem to disable Watchdog Timer in sleeping

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
HGHK



Joined: 29 Jun 2010
Posts: 33

View user's profile Send private message Yahoo Messenger

I have problem to disable Watchdog Timer in sleeping
PostPosted: Tue Sep 21, 2010 3:24 pm     Reply with quote

I use external INT for wake up and if WDT were on it makes INT to wake up! what must i do?
I use pic16f876 and cant turn WDT off. I need it to communicate processes and ADC after wake up.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 21, 2010 4:17 pm     Reply with quote

Quote:

I use pic16f876 and cant turn WDT off. I need it to communicate
processes and ADC after wake up.

Watchdog Timer has nothing to do with communication.
HGHK



Joined: 29 Jun 2010
Posts: 33

View user's profile Send private message Yahoo Messenger

Worry about Turn OFF WDT
PostPosted: Wed Oct 06, 2010 5:14 am     Reply with quote

If I turn off WDT, then I2C, delay, usart are work or not? and tell me WDT take effect in what components in PIC16f876a?
Thanks Wink Question
Ttelmah



Joined: 11 Mar 2010
Posts: 19545

View user's profile Send private message

PostPosted: Wed Oct 06, 2010 7:36 am     Reply with quote

WDT, does not affect _any_ components.
It affects the whole _chip_.
It basically provides one function. If the wdt_restart is not called at regular intervals. it resets the chip. The 'point' is that if you are performing functions that must be serviced, and wish to potentially 'deal' with the situation where a particle traversing the chip accidentally makes it jump somewhere it shouldn't, or where an electrical spike again puts the chip into a state it should not reach, you write your code so that provided all things that should happen, do happen, it will reset the watchdog (and _only_ then), so that the chip will 'reset itself' if it is not running as it should.

Best Wishes
HGHK



Joined: 29 Jun 2010
Posts: 33

View user's profile Send private message Yahoo Messenger

Worry about WDT
PostPosted: Sun Oct 10, 2010 12:37 am     Reply with quote

I worry If I turn off WDT, then I2C, usart, sleep and delay are work or not? and tell me WDT take effect in what components in PIC16f876a? (for example if WDT were on effect in sleep and wake up occured)
Thanks
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Oct 10, 2010 5:46 am     Reply with quote

As was told to you twice earlier...NO..turning off WDT will not directly
affect ADC, I2C or the UART. Turning it off will also NOT keep the SLEEP
or DELAY functions from functioning normally.

However, WDT can be used to wake up from a sleep condition. If the
WDT is enabled when SLEEP is entered the WDT will wake the chip up
when it times out.

Turning off the WDT WILL affect the ability of the chip to recover from a
potential lockup condition due to coding errors or power instability!

Read the 16F876A DATASHEET section 14.13 on the WDT for more
information. Also, see the PIC MCU Midrange Family Reference Manual
Section 26.3 for a detailed explanation of WDT.

http://ww1.microchip.com/downloads/en/devicedoc/33023a.pdf
_________________
Google and Forum Search are some of your best tools!!!!
HGHK



Joined: 29 Jun 2010
Posts: 33

View user's profile Send private message Yahoo Messenger

Thanks
PostPosted: Wed Oct 13, 2010 1:09 am     Reply with quote

Thanks for your guidance thanks a lot Very Happy Smile Wink Cool
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group