CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

sleep mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jab351c



Joined: 27 Nov 2006
Posts: 9

View user's profile Send private message

sleep mode
PostPosted: Sun Dec 10, 2006 9:17 pm     Reply with quote

Im using a 18f4620 with a keypad linked to portB using the internal pullups. I am trying to put the PIC into sleep mode by pressing a button on my keypad and waking it up by pressing the same key, or even a different key at a later time. Any help will be appreciated.

By entering sleep mode the PIC should save floating integers that were inputs from previously running the main function correct? Becasue this is the main reason I want to use sleep mode. I enter data from the keypad that are stored as floating integers but all is lost when I power down my ciruit by simlpy cutting all power to the circuit by a switch. But I want to use these inputs upon powering the circuit backup without going through the entire input process again.

Also if I am using an LCD for my outputs how shall I get my LCD to power down when entering sleep mode? Or should I simply display that the PIC is asleep on the LCD and use a switch for the LCD after the PIC has entered sleep mode?

Thanks,
Jeff
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Dec 10, 2006 10:34 pm     Reply with quote

Quote:

I am trying to put the PIC into sleep mode by pressing a button on my
keypad and waking it up by pressing the same key, or even a different
key at a later time.

This thread has a post by Tomi with an outline of how to do it:
http://www.ccsinfo.com/forum/viewtopic.php?t=9339


Quote:
Also if I am using an LCD for my outputs how shall I get my LCD to power down when entering sleep mode?

Two commonly used methods are:

1. Use a logic-level FET (which is controlled by a PIC pin) to switch
the power on/off to external circuits.

2. If the current in the external circuits is low enough (< 5 ma), then
a PIC pin could be used to provide power. The LCD and its contrast
trimpot (or resistors) probably use only about 2 ma typically.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group