|
|
View previous topic :: View next topic |
Author |
Message |
LuisF
Joined: 16 Jan 2004 Posts: 1 Location: Venezuela
|
12F675 Sleep problem.. Standby current 80uA?? |
Posted: Fri Jan 16, 2004 10:27 pm |
|
|
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();
}
} |
|
|
Ttelmah Guest
|
Re: 12F675 Sleep problem.. Standby current 80uA?? |
Posted: Sat Jan 17, 2004 3:49 am |
|
|
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();
}
} |
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?? |
Posted: Sat Jan 17, 2004 7:13 am |
|
|
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();
}
} |
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. |
|
|
Felix Althaus
Joined: 09 Sep 2003 Posts: 67 Location: Winterthur, Switzerland
|
|
Posted: Sat Jan 17, 2004 10:29 am |
|
|
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 |
|
|
|
|
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
|