Watchdog timer doubt ??

Status
Not open for further replies.

vishnuksumithran

Newbie level 4
Joined
Dec 28, 2011
Messages
5
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,312
Is there any specific reason why all watchdog timers count down and not up ie from a initial value down to zero ??
 

if countdown is used , then it will be easier for generating interrupt
in hardware module as rollover from all zeros to ones , (the underflow)
can be taken from the msbit.

otherwise , if countup is used you must have a comaparator also to compare and interrupt at the specified time.

countdown doesnot require a comparator. only the carrbit out of msb can be used for interrupt.
it is reduction in hardware , why countdown is used.
 


You are saying a rollover from all zeros to ones (ie count down) can be used to generate a interrupt by utilizing the MSB Bit, but interrupt can also be generated by a rollover from all ones to zeros (ie count up) by utilizing the MSB Bit correct ??
 
Last edited:

yes.
when you want to use countup , then the loaded value is
(max.value-desired count).

when count down , it is "countvalue" only.

both are valid.
but countdown method has easier remembering for the count to be loaded.

some controllers , like 8051 use countup for their timers(timer0).
the maxcount-desired value is loaded in that.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…