• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with PIC16F886 Timer

Status
Not open for further replies.

Naren Rover

New Member
Hi guys I have a doubt with Timer 0 of PIC16F886 or moreover with Watchdog Timer ,I'm Changing the value on a 7 segment for every seconds using Timer_0
What my Problem is Watchdog is Initially Disabled in 886 , but my controller is being reset by Watch dog timer. Can anyone Point out where i have made a mistake
I have used 886 before but i haven't got this problem. thank you. I have attached C file and Proteus Error message. Thank you
 

Attachments

Pommie

Well-Known Member
Most Helpful Member
You don't appear to have any config settings which is where you would disable the WDT. Either add config setting or put a clrwdt instruction in you display routine.

Mike.
 

Naren Rover

New Member
actually I was working before without Config Settings and it was working good, i have attached a c file which i used to increment and Decrement value on 7 segment using 886 without config register. it is working good.
And What i read from data sheet(if I'm right) , Watchdog timer is disabled initially
 

Attachments

Pommie

Well-Known Member
Most Helpful Member
I dont use simulators so can't help but I do know that the wdt is setup in config registers.

Mike.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
I dont use simulators so can't help but I do know that the wdt is setup in config registers.
Likewise, I don't use simulators (if you're doing electronics how does playing a computer game help? - particularly when it has only a passing resemblance to real life) , but in any PIC program it's absolutely essential that you set the config fuses correctly, the default settings are usually absolutely useless - and as far as I'm aware the default setting for the WDT is ON.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
actually I was working before without Config Settings and it was working good, i have attached a c file which i used to increment and Decrement value on 7 segment using 886 without config register. it is working good.
And What i read from data sheet(if I'm right) , Watchdog timer is disabled initially
I love these kind of threads.... The watchdog is obviously causing your issue.... ISIS is showing you this in your first post...

Likewise, I don't use simulators (if you're doing electronics how does playing a computer game help? - particularly when it has only a passing resemblance to real life) , but in any PIC program it's absolutely essential that you set the config fuses correctly, the default settings are usually absolutely useless - and as far as I'm aware the default setting for the WDT is ON.
Likewise... But when you are VERY familiar with hardware, simulation is a software boon.... I can debug 10 x quicker....

If you are a newby, then simulators can cause more heartache... Partly because certain features are not modelled.... Crystal for one.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top