Advice on WDT/PWRTE/BOR

Mosaic

Well-Known Member
Hi guys:
I'd like to 'harden' my code with reset management. To handle brown outs and WDT time outs.

Can anyone offer any sample code, 16F asm, that shows the use of the register bits and handling those type of resets?

It seems that in the 16f886 a reset can cause the default HFINTOSC freq to goto 4Mhz. based on the IRCF bits of the OSCCON register

I'd like to keep it at the 8MHz as fused.
 
Last edited:
The fuses don't define the internal oscillator speed. You have to write to OSCCON to get 8MHz. What do you want to do different from a normal reset?

Mike.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…