to come out from stop mode you can use Interval timer or Watch dog timer also. Keep in mind that enable the Subsystem clock for Inerval/watchdog while using stop/halt/sleep mode. Use NOP(); after STOP(); eg. while(1) { Main programs; line 1; line n; STOP(); NOP(); NOP(); } } also no need to take delay for stabilization it will take care itself.
↧