PDA

View Full Version : long sleep



geselaw
- 9th April 2005, 18:33
Hi guys, I am new to this forum ,so I am going to ask a question

I want my pic16f628 to sleep for the nigh(at least 6 hours). And resume in the morning without restarting. I have already used TMR1 for real time clock.


My second question is ...there is one switch state that I want my pic to remember even if the power fails. any idea?

I am glad to be a member ofthis forum and I hope there will be something that I can contribute.

Melanie
- 10th April 2005, 02:31
>> "I want my pic16f628 to sleep for the nigh(at least 6 hours). "

SLEEP 21600

see SLEEP command in Manual

>> "...there is one switch state that I want my pic to remember even if the power fails"

use the 16F628's integral EEPROM...

see WRITE, READ and DATA in the Manual