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

12F675 Sleep problem.. Standby current 80uA??

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



Joined: 16 Jan 2004
Posts: 1
Location: Venezuela

View user's profile Send private message Send e-mail

12F675 Sleep problem.. Standby current 80uA??
PostPosted: Fri Jan 16, 2004 10:27 pm     Reply with quote

Hi All!
I have tried to sleep to the PIC12F675, because my application needs it
but the current is 80uA and not 1nA like it says the data sheet.
This is the program that i use.
Where is the error?
That I forget to turn off?

Thanks for any help.

#include <12F675.h>
#device adc=8
#use delay(clock=4000000)
#fuses INTRC_IO,NOWDT,NOPUT,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD

void main()
{

setup_adc_ports(0);
setup_adc(ADC_OFF);
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A0);
DELAY_MS(500);
OUTPUT_LOW(PIN_A0);

WHILE(TRUE){
SLEEP();
}

}


For PIC 16F628 and PIC16F84 working fine and these are the programs.

#include <16F628.h>
#use delay(clock=4000000)
#fuses INTRC_IO, NOPROTECT,NOWDT,NOPUT,NOLVP,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD
void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A1);
DELAY_MS(1000);
OUTPUT_LOW(PIN_A1);
WHILE(TRUE){
SLEEP();
}
}


#include <16F84A.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,NOPROTECT

void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);

output_high(pin_A1);
delay_ms(1000);
output_low(pin_A1);

while(True){
sleep();
}
} Question
Ttelmah
Guest







Re: 12F675 Sleep problem.. Standby current 80uA??
PostPosted: Sat Jan 17, 2004 3:49 am     Reply with quote

LuisF wrote:
Hi All!
I have tried to sleep to the PIC12F675, because my application needs it
but the current is 80uA and not 1nA like it says the data sheet.
This is the program that i use.
Where is the error?
That I forget to turn off?

Thanks for any help.

#include <12F675.h>
#device adc=8
#use delay(clock=4000000)
#fuses INTRC_IO,NOWDT,NOPUT,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD

void main()
{

setup_adc_ports(0);
setup_adc(ADC_OFF);
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A0);
DELAY_MS(500);
OUTPUT_LOW(PIN_A0);

WHILE(TRUE){
SLEEP();
}

}


For PIC 16F628 and PIC16F84 working fine and these are the programs.

#include <16F628.h>
#use delay(clock=4000000)
#fuses INTRC_IO, NOPROTECT,NOWDT,NOPUT,NOLVP,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD
void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A1);
DELAY_MS(1000);
OUTPUT_LOW(PIN_A1);
WHILE(TRUE){
SLEEP();
}
}


#include <16F84A.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,NOPROTECT

void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);

output_high(pin_A1);
delay_ms(1000);
output_low(pin_A1);

while(True){
sleep();
}
} Question


It may be nothing to do with the program. To get low standby currents, you have to look at everything 'else' round the chip. For instance, how are the signals 'held' when asleep, what is the consumption of your voltage regulator circuit, what do other chips in the circuit do, when their inputs float, etc. etc..

Best Wishes
Guest








Re: 12F675 Sleep problem.. Standby current 80uA??
PostPosted: Sat Jan 17, 2004 7:13 am     Reply with quote

Ttelmah wrote:
LuisF wrote:
Hi All!
I have tried to sleep to the PIC12F675, because my application needs it
but the current is 80uA and not 1nA like it says the data sheet.
This is the program that i use.
Where is the error?
That I forget to turn off?

Thanks for any help.

#include <12F675.h>
#device adc=8
#use delay(clock=4000000)
#fuses INTRC_IO,NOWDT,NOPUT,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD

void main()
{

setup_adc_ports(0);
setup_adc(ADC_OFF);
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A0);
DELAY_MS(500);
OUTPUT_LOW(PIN_A0);

WHILE(TRUE){
SLEEP();
}

}


For PIC 16F628 and PIC16F84 working fine and these are the programs.

#include <16F628.h>
#use delay(clock=4000000)
#fuses INTRC_IO, NOPROTECT,NOWDT,NOPUT,NOLVP,NOBROWNOUT,NOPROTECT,NOMCLR,NOCPD
void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);

OUTPUT_HIGH(PIN_A1);
DELAY_MS(1000);
OUTPUT_LOW(PIN_A1);
WHILE(TRUE){
SLEEP();
}
}


#include <16F84A.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,NOPROTECT

void main()
{
setup_counters(RTCC_INTERNAL,RTCC_DIV_2);

output_high(pin_A1);
delay_ms(1000);
output_low(pin_A1);

while(True){
sleep();
}
} Question


It may be nothing to do with the program. To get low standby currents, you have to look at everything 'else' round the chip. For instance, how are the signals 'held' when asleep, what is the consumption of your voltage regulator circuit, what do other chips in the circuit do, when their inputs float, etc. etc..

Best Wishes


Thank for the help, but there is not anything connected to the PIC, only
a led to pin 7 with 1K resistor, I remove it and it is the same thing. I just test the standby current for evalution and I make it to decide which PIC to use. I measure the current in the pin 8 (Vdd=5 Volt)
If your you have time, make the test and you comment me your results.

Thanks for your time. Smile
Felix Althaus



Joined: 09 Sep 2003
Posts: 67
Location: Winterthur, Switzerland

View user's profile Send private message

PostPosted: Sat Jan 17, 2004 10:29 am     Reply with quote

Hi

I see two possible points for current reduction:

1) why do you use RTCC_INTERNAL? Use EXTERNAL and pull the T0CK pin low, so you don't have any changes in the tmr0 register

2) as default, all pins are inputs and there can be any voltage on open pins, causing them to draw "very much" current. Try to set all pins as outputs and set them low.


Perhaps this helps...

mfg
Felix
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