ivanperino
Joined: 08 Jun 2006 Posts: 14
|
16F88 High Current Sleep mode |
Posted: Wed May 21, 2008 5:48 pm |
|
|
HI, I have found a trouble I cant solve. I need some help from you.
I am working on PIC16F88 which does not "sleep" in a correct way. A high current flows from source to PIC when it is in sleep mode. At least 250uA go through uAmpmeter when it is sleeping. The code I have tried is what follows.
Code: | #include <C:\Archivos de programa\CCS4\Devices\16F88.h>
#fuses NOWDT,INTRC_IO, PUT, NOBROWNOUT, NOLVP, NOWRT, NOPROTECT, MCLR
#use delay(clock=8000000)
#define led pin_b3
#bit TMR1H_b7 = 0x0F.7
#int_timer1
void reloj(){
TMR1H_b7 = 1; //32768
}
void main(){
setup_timer_1(T1_EXTERNAL|T1_CLK_OUT|T1_DIV_BY_1);
enable_interrupts(INT_TIMER1);
enable_interrupts(GLOBAL);
while(TRUE){
output_bit(led,0);
delay_ms(100);
output_bit(led,1);
sleep();
}
} |
The LED goes up only when it is awake. It is away for 100mS and its consumption is about 2mA because LED.
Timer 1 is being swingig by a 32khz xtal, If I take the xtal off, PIC never awake and consumption downs to 90uA which is still high! datasheet displays a maximun of 1.7uA in sleep mode
Please! I know many people has past by this! thank you a lot!
Ivan Perino
Last edited by ivanperino on Wed May 21, 2008 6:10 pm; edited 1 time in total |
|