gauravkothari23
Advanced Member level 2
- Joined
- Mar 21, 2015
- Messages
- 644
- Helped
- 5
- Reputation
- 10
- Reaction score
- 4
- Trophy points
- 1,298
- Activity points
- 6,951
#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)
{
}
}
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.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
#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;
}
}
}
}
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.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.
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?but the EA connections and LED series resistor may not effect the current consumption in power down mode....
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.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.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?