Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Can someone help how to find formula and calculate this task?

How many times per second will be reset if the microcontroller is set to 1:128 preskaler microcontrollers and works on Frequency of 8 Mhz.

Could someone explain me how to solve this kind of task? Please.

share|improve this question
    
On the '887 you have 2 prescalers on the watchdog - the dedicated 16-bit watchdog prescaler, and the secondary prescaler shared with Timer0. Are you using the secondary one at all, or just the watchdog one? –  Majenko - not Google Nov 30 '11 at 17:57
    
just watchdog one –  jiki Nov 30 '11 at 18:00

1 Answer 1

The watchdog always runs from the internal 31KHz internal oscillator.

The general formula for calculating the watchdog time is:

\$\frac{1}{31000}\times WDTPrescaler [\times Prescaler]\$

Where \$WDTPrescaler\$ is the dedicated 16-bit watchdog prescaler, and \$Prescaler\$ is the optional 8-bit prescaler shared with the Timer0 module.

So in your case it's

\$\frac{1}{31000}\times 128 = 0.004129032\$

Which is roughly 4ms.

If you were using the secondary shared prescaler you would multiply the answer by that value as well.

share|improve this answer
    
if I use secondary prescaler the formula is the same or diffrent? –  jiki Nov 30 '11 at 18:06
    
The formula would include the part in [ and ]. You can think of not using the Timer0 prescaler as using it but with it set to 1:1 - so multiply the answer by 1 - which does nothing ;) –  Majenko - not Google Nov 30 '11 at 18:07
    
the value in [ ] is 128 or 256? –  jiki Nov 30 '11 at 18:08
    
I have clarified my answer a little –  Majenko - not Google Nov 30 '11 at 18:09
1  
@jiki: Please accept the answer if you find it correct and helpful. –  Andrejs Cainikovs Nov 30 '11 at 18:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.