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 support@ccsinfo.com

How to Enable WDT of 16F684

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



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

How to Enable WDT of 16F684
PostPosted: Thu Mar 04, 2010 4:10 am     Reply with quote

Dear Sir,
I am using 16F684 device & CCS PCM compiler ver. 4.073
In my application I want to Enable WDT but the prescaler of WDT is shared with Timer0.Also I am using Timer0 for another purpose & every 2msec it will generate interrupt. So how can I enable the WDT without affecting prescaler of Timer0?
_________________
Thank You,
With Best Regards,
Deepak.
Ttelmah
Guest







PostPosted: Thu Mar 04, 2010 6:09 am     Reply with quote

You are almost certainly not using the main WDT prescaler with timer0.... Smile

On older chips, there was a single prescaler that was used for either the watchdog, or timer0.
On this chip, there are two prescalers, and a 'cross connection. The watchdog, has a 16bit prescaler, and an output. Timer0, has it's own 8bit prescaler, which can be connected to the output of the watchdog prescaler, _or_ to either the external clock input, or the master clock/4. The watchdog output, can be connected directly to it's own prescaler, or via the timer0 prescaler (phew!....).
If the PSA bit is set to '0', then the watchdog can run off it's own 16bit prescaler, while timer0, uses the 8bit prescaler. This is the default setting.
If you are in doubt, simply look at the .LST generated for the timer setup lines, and verify that bit3, of the option register (0x81), is left as zero.

Best Wishes
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