View previous topic :: View next topic |
Author |
Message |
yan612
Joined: 27 Sep 2007 Posts: 6
|
how to put PIC16F639 into sleep mode |
Posted: Sun Jan 13, 2008 6:46 pm |
|
|
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.. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Mon Jan 14, 2008 4:02 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
yan612
Joined: 27 Sep 2007 Posts: 6
|
|
Posted: Wed Jan 23, 2008 10:13 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Jan 24, 2008 8:03 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Thu Jan 24, 2008 9:02 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Jan 24, 2008 9:11 am |
|
|
Yes, very essential.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
yan612
Joined: 27 Sep 2007 Posts: 6
|
|
Posted: Thu Jan 24, 2008 8:20 pm |
|
|
thanks for the advice..
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 |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Jan 25, 2008 5:38 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|