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

how to put PIC16F639 into sleep mode

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



Joined: 27 Sep 2007
Posts: 6

View user's profile Send private message

how to put PIC16F639 into sleep mode
PostPosted: Sun Jan 13, 2008 6:46 pm     Reply with quote

Halo,

i tried to put PIC16F639 into sleep mode, the currenct consumption should be 'zero" ampere but my lowest current consumption is 0.02A.
i use the command sleep() to put PIC16F639 in sleep mode, is it any other thing else i didn't set to put the chip into sleep mode?
please advice..
thanks..
Ttelmah
Guest







PostPosted: Mon Jan 14, 2008 4:02 am     Reply with quote

Do a search on the forum. There have been many threads about this in the past.
General things:
1) Remember that pins driving things draw current. You need to switch all pins to the state where things are turned off, before entering sleep. Also, don't leave inputs 'floating'. These will result in extra power being drawn.
2) What voltage regulator are you using for your supply?. Simple regulators like the 7805, can easily account for 10mA themselves...
3) Turn off unwanted peripherals. Things like the watchdog timer. If not being used.

Best Wishes
yan612



Joined: 27 Sep 2007
Posts: 6

View user's profile Send private message

PostPosted: Wed Jan 23, 2008 10:13 pm     Reply with quote

thanks for the advice..
i've go through all about sleep that i can find in the forum and tryout some of the method but it still cant work..
actually, i am using another chip (AS3931 from austria microsystem) to replace the AFE part in PIC16F639. So, i cannot use the SPI part of the AFE.
without using the function in the AFE, can i still use the wake up from sleep function??i just want a confirmation from any of you so that i don't need to crack my head doing what that is impossible, thanks
Ttelmah
Guest







PostPosted: Thu Jan 24, 2008 8:03 am     Reply with quote

If you are not using the AFE, then switch to the 636...
Yes, you can wake from sleep without using the internal AFE. Just connect the 'wake' output, to the RA2 pin on the PIC, and enable this interrupt.

Best Wishes
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 9:02 am     Reply with quote

Quote:

Just connect the 'wake' output, to the RA2 pin on the PIC...

... wiring a ~10K pull up resistor in the open drain output of the AS3931.


Humberto
Ttelmah
Guest







PostPosted: Thu Jan 24, 2008 9:11 am     Reply with quote

Yes, very essential.

Best Wishes
yan612



Joined: 27 Sep 2007
Posts: 6

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 8:20 pm     Reply with quote

thanks for the advice.. Smile

but, my RA2 pin is occupied for LED as i need it as indicator..
if i remain using RA0 as my wake pin, is it possible?
thanks
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Jan 25, 2008 5:38 am     Reply with quote

Quote:

but, my RA2 pin is occupied for LED as i need it as indicator..

RA2 is the ONLY pin available in this MCU for use as an EXTernal INTerrupt.

Quote:

if i remain using RA0 as my wake pin, is it possible?

I would like that you know that nobody of us would know the answer without reading such info in the device manufacturer data sheet.

Page 147:
12.12.1 WAKE-UP FROM SLEEP
Read the datasheet and you will know why not.


Humberto
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