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 CCS Technical Support

16F88 High Current Sleep mode

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



Joined: 08 Jun 2006
Posts: 14

View user's profile Send private message

16F88 High Current Sleep mode
PostPosted: Wed May 21, 2008 5:48 pm     Reply with quote

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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 21, 2008 5:55 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=23376
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