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.

DOUBT: Using both Timer0 and WDT in 16f84a

Status
Not open for further replies.

bomba

Full Member level 2
Joined
Sep 9, 2003
Messages
134
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
1,193
using timer0 16f84a

I need to use both wdt and the timer 0 compiling with ccs.
I need to set the timer0 prescaler to 1:256, and I have no problem with WDT time (18ms or .......). If is possible, which is the right manner to implement that.

Other question is Can I simulate the wdt into proteus 6.3 sp1.

Thanks a lot in advance.
 

timer0 prescaler

Hi there,

Please correct me if I am wrong, but I believe that you cannot use both WDT and Timer0 simultaneously. That is why Microchip names 'Postscaler' and 'Prescaler' for the same component. It's pretty confusing sometimes.

:)
 

using both wdt and timer0

Hi bomba,

you can use timer0 and the watchdog at the same time on a 16F84(a) but if you assign the prescaler to timer0 the watchdog will run without postscaler which means that you have to reset the watchdog at least all 18mS if you do not want it to reset your cpu.

This limitation is present as timer0 and the watchdog share the same prescaler (postscaler in case of the watchdog) and you can only assign it to one of them ...

hope this helps
 

16f84a watchdog

bomba said:
I need to use both wdt and the timer 0 compiling with ccs.
I need to set the timer0 prescaler to 1:256, and I have no problem with WDT time (18ms or .......). If is possible, which is the right manner to implement that.
It's possible, only the prescaler is shared between them. Be sure to use the sequence written in the datasheet to setup the prescaler or you'll get a reset even before your program is started.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top