News:

Let's find out together what makes a PIC Tick!

Main Menu

Sleep n seconds on 12F1822

Started by charliecoutas, Today at 08:51 AM

Previous topic - Next topic

charliecoutas

I am trying to make a 12F1822 Sleep for a number of seconds. The config is:

Device = 12F1822                                                       

Config1 FOSC_INTOSC, WDTE_ON, PWRTE_ON, MCLRE_OFF, CP_OFF, BOREN_OFF, CLKOUTEN_OFF, IESO_OFF, FCMEN_OFF
Config2 WRT_OFF, PLLEN_ON, STVREN_OFF, LVP_OFF

When I write "Sleep 20" the compiler warns: "The Watchdog fuse is disabled, so the microcontroller may never wake up on its own"

Can somebody point me in the right direction please?

Charles

See_Mos

#1
Sleep uses the watchdog timer.  Have a look at register WDTCON and the bit WDTEN

trastikata

Hi Charlie,

this is an old but relevant post:

https://protoncompiler.com/index.php?msg=12828

If you still have questions, let us know.

Regards

charliecoutas

Thanks See_MOS, Trastikata. Can't try it now, will report back Tuesday.

Charlie