Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for 2 sec WDT timer for pic18f452

Status
Not open for further replies.

ahmet2004

Member level 3
Joined
Jan 1, 2004
Messages
63
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
383
WDT and pic18f452

I am using the PIC18f452 with WDT to reset.
The WDT timer only has a reset time on 1:128 which is not sufficient time.
I would like the timer to reset after 2 seconds.
My crystal is a 20 MHz.

How do I go about this
 

Re: WDT and pic18f452

Hi,

As always, it is best to read the data sheet:
The WDT time-out period values may be found in the
Electrical Specifications (Section 22.0) under parameter
D031. Values for the WDT postscaler may be
assigned using the configuration bits.

Then if you go to:
TABLE 22-7: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER, POWER-UP TIMER
AND BROWN-OUT RESET REQUIREMENTS

You will see that:
31 TWDT Watchdog Timer Time-out Period (No Postscaler) Min:7 Typ:18 Max:33 ms
So, in other words. Each WDT is 18ms. and the Postscalaer will incrament with 1 every 18ms! so for 2 sec you will need 2/0.018=111 or 128 and you have set it before.
Also, 0.018ms is not depanded on your OSC, it verys by tempreture only.

Yes?

Good luck.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top