89S4051 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,922
HI all,
I am using 89S4051 MCR. to make a small project..
my only question is how can i use idle mode in 89S4051.
i Tried Writing the code:
Code:
#include<reg51.h>
#include<stdio.h>

sbit ledon=P1^6;

unsigned char ex0_isr_counter = 0;

void ex0_isr (void) interrupt  0
{
	 ex0_isr_counter++;
}
	
void main()
{	
	  ledon=1;
	  EA = 1;		   
	  EX0 = 1;
	  IE0=1;
	  PCON |= 0x01;
	  ledon=0;
}
it exits idle mode but within a second it again enter the idle mode.
i have a led connected to it.. which gets on after the idle mode is exited..
but the led gets off within a sec which stats that it has again entered the idle mode
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…