Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

89s52 consumes more current in power down mode

Status
Not open for further replies.

gauravkothari23

Advanced Member level 2
Joined
Mar 21, 2015
Messages
640
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Activity points
6,921
Hi all....
i am trying to work on power down modw using 89S52.
the code is just simple.
Code:
#include<reg51.h>
#include <stdio.h>
unsigned char ex0_ISR_counter =0;

void ex0_ISR (void) interrupt 0
{
ex0_ISR_counter++;
}
void main()
{
EA=1;
EX0=1;
PCON |= 0×02;
  while (1)
     {
     }
}
Thats my basic code to test power down mode.
my problem is it consumes about 0.500ma of current.
but the data sheet says current consumption in power down mode is 50 microamp.
i have not connected any components to my circuit.
my circuit contains only 89S52, 11.05962 Crystal, 33pf capacitors for crystals and li-ion Battery.
please help me out of this....
Thanks.
 

You're not doing as recommended here.
The PCON |= 0x02 command should run within while(1) loop, but you're running once, just after initialize.
 

i have even tried doing that..... but the things are the same....
still it consumes around 0.500 mA of current....
 

Hi,

What is your port setup?
All periferals switched Off?

Is the oscillator the same where the 50uA is specified and with your circuit? (Switched on/ off, frequency)
(With a running 11MHz oscillator i doubt about the 50uA )

Is the supply voltage the same?


Klaus
 

Is the oscillator the same where the 50uA is specified and with your circuit? (Switched on/ off, frequency)
(With a running 11MHz oscillator i doubt about the 50uA )

Is the supply voltage the same?


Klaus
The documentation for the part specifies some IoL requirements be met for the pins and the power-down mode shuts off the clock. The test for power-down specifies a 5.5V Vcc.

Capture.JPG
 

am attaching the results of my tests...
it clearly shows that at voltage 5.50v, it consumes around 2.50 mA.
 

Attachments

  • Test new.jpg
    Test new.jpg
    2.3 MB · Views: 111

Hi,


befroe you said 0.5mA now I see 2.5mA... What happend inbetween?

breadboard...
* No ground plane
* No capacitors at VCC
* No reset connection

Again:
* What about internal periferals?
* what is your port setup? At least PORT0 must not be left floating.
* What about watchdog?
* Is your clock running or not?

Klaus
 

sorry but....
what is ground plane.....
what value capacitors should be placed between VCC and GND.
internal periferals...????
port 0, 1, 2 and 3 are 0x00;
i have not implemented watchdog.
how to check if the clock is running..

- - - Updated - - -

do i need to run the clock...???? because anyhow i am using external interrupt 0 to exit PDM.
 

According to the documentation the internal clock is shut down when going into power-down mode, watch dog is shut off, and only interrupt or reset will bring it back up.

Maybe you should show the schematic of your breadboard and the code that leads up to the power-down code.
 

That's my code:
Code:
#include<reg51.h>
#include<stdio.h>

sbit led = P0^0;

void msdelay(unsigned int value);

unsigned char ex0_isr_counter = 0;

void ex0_isr (void) interrupt  0
{
	 ex0_isr_counter++;
}

void msdelay(unsigned int value)
{
 unsigned int i,j;
 for(i=0;i<value;i++)
 for(j=0;j<100;j++);
}

void main()
{
while(1)
{
led=0;
msdelay(2000);
  {
   P0=0x00;
   led=1;
   EA = 1;		   
   EX0 = 1;
   PCON |= 0x02;
   while(1)
   {
   led=0;
   }
   }
}
}
@Klaust... the datasheet has not mentioned any where to enable watchdog timer or clock for power down mode.... even if i do then anyhow they might go OFF while power down mode... so i think i need not feel to implement that in my project....
please correct me if i am wrong...
thanks....
 

Attachments

  • TEST PDM.JPG
    TEST PDM.JPG
    116.1 KB · Views: 141

Your schematic doesn't look trustworthy. It misses EA connection and LED series resistor.

Maybe there are other differences, too.
 

FVM... thanks... but the EA connections and LED series resistor may not effect the current consumption in power down mode....
 

Hi,

I just had a view through the datasheet. Indeed the section of "power down" and the test conditions is very short.
Other datasheets spend some pages for this.

It seems the watchdog is switched off during power down.
Internal clock too, but what about the xtal? You can check this with a scope.

Also you may check every I/O pin. A simple check with a DVM gives only a part of information...but maybe worth a try.
Every pin voltage should either be GND (0 ... 0.3V) or VCC (VCC - 0.3V .... VCC).
Any other value shows either activity or a floating signal. Both increases power down current.

Klaus
 

Every pin voltage should either be GND (0 ... 0.3V) or VCC (VCC - 0.3V .... VCC).
Any other value shows either activity or a floating signal. Both increases power down current.
It's a bit different with 8051 processors. Port 1 - 3 are open drain with weak pull-ups, the outputs must be programmed to '1' (the power-up state) and not pulled down externally, otherwise they consume about 50 µA per pin. Port 0 is open drain without pull-up, open outputs should be programmed to '0' to avoid floating to mid range and excessive current consumption of the digital input buffers.

According to the published information, everything should be as required. But I'm suspecting differences of the real circuit.

but the EA connections and LED series resistor may not effect the current consumption in power down mode....
They can cause everything, from non-operation of the circuit up to a burned processor. Is it asking too much to request a correct and plausible schematic?
 

FVM and KlausST.... Thanks for help....
i have checked all the port pins... and saw that all pins are either 0v or 5.50v... but the only pin of port 0 where LED is connected shows 4v and the current consumption for 0.500mA.... so i tried removing the led and wrote P0=0x00 and took a test...., now LED pins shows 0v... but dont know why the current consumption got increase from 0.500mA to 2.30mA
@FVM... have also tried writing
P0=0x00; P1=0xff; P2=0xff; P3=0xff;
the results are same... consumption of current is about 2.50mA.
xtal pin 18 shows 5.50v but pins 19 shows nothing... i means when i connect the probe to vcc and pins 19 it shows 0.00 and again when i connect the same to GND and pins 19 results are again same...0.00.
 

so i tried removing the led and wrote P0=0x00 and took a test...., now LED pins shows 0v... but dont know why the current consumption got increase from 0.500mA to 2.30mA
If the result is actually without external connections to P0.0, it suggests that the port pin is damaged. If you operated the LED without a series resistor, this won't be surprising.
 

If the result is actually without external connections to P0.0, it suggests that the port pin is damaged. If you operated the LED without a series resistor, this won't be surprising.

no... i have connected the LED in Series with the resistor, initiallly i have kept the pin low so that LED gets on and then i took the reading... it perfectly shows 0.00v
but when i put the system in power down mode i made the pin high and LED gets off and then again took the reading.. so now in this case the pin voltage shown is only 4v.
now to check again i connected more LED's to pin P0.1, P0.2 and then again got the reading of the new LED's... the reading of new LED's are as same as the old one...
all pins which i have connected the LED's shows 4v.
so where is the rest of 1.5v gone..... why it is showing me 4v instead of 5.5v even when i have kept the pin high....

- - - Updated - - -

i have connected pull-up resistors to all the 3 LED's....
now the voltage reading shown at pin high is 5.50v which is perfect....
then why still the current consumption is too high....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top