PDA

View Full Version : 16f628a wont wake up



Peter1960
- 25th August 2008, 08:38
Right,

Have a 16f628a.

@ DEVICE pic16F628A, INTOSC_OSC_NOCLKOUT
@ DEVICE pic16F628A, WDT_OFF
@ DEVICE pic16F628A, PWRT_ON
@ DEVICE pic16F628A, MCLR_OFF
@ DEVICE pic16F628A, BOD_OFF
@ DEVICE pic16F628A, LVP_OFF
@ DEVICE pic16F628A, CPD_OFF
@ DEVICE pic16F628A, PROTECT_OFF

Use the memreset pin as input switch, start, tied high via resistor, cap across switch.

At the end of the program

@ sleep
pause 100

goto beginning of program

Now....

It goes to sleep, no problem, but when i power down and reapply power,
hence using pwrttimer reset option, it stays ASLEEP !!!

help, please ?

can post complete code, but over 700 lines.

Acetronics2
- 25th August 2008, 10:22
help, please ?

can post complete code, but over 700 lines.



Hi,

But, may be you could post the " beginning of program " AND the " Sleep config "( with some lines before the @ sleep command ) sections.

THE good question :

Some interrupts used ??? ...

Alain

sayzer
- 25th August 2008, 11:04
@ DEVICE pic16F628A, WDT_ON


__________________________-

Acetronics2
- 25th August 2008, 13:59
@ DEVICE pic16F628A, WDT_ON


__________________________-


Hi, Sayzer

That way you are sure the Pic will not sleep too long a time ...

Alain

Bruce
- 25th August 2008, 14:22
With BOD_OFF this PIC can run with a supply of around 3V. If you cycle power quickly, and
have enough capacitance on the power supply rail to hold Vdd >=3V during cycle time, it
may not allow time for the PIC to reset, so it would never exit sleep.

You could try BOD_ON or just allow time for a full reset when cycling power off/on.