|
|
View previous topic :: View next topic |
Author |
Message |
deepakomanna
Joined: 06 Mar 2007 Posts: 92 Location: Pune,India
|
How to Enable WDT of 16F684 |
Posted: Thu Mar 04, 2010 4:10 am |
|
|
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
|
|
Posted: Thu Mar 04, 2010 6:09 am |
|
|
You are almost certainly not using the main WDT prescaler with timer0....
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 |
|
|
|
|
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
|