Sign In

Blinking Led Any Pin

Adithya adithyapaip@gmail.com India

Hardware: 89S52 Running With 11.0592Mhzz Software: C Project Using Keil Micro Vision 4

it is simple program but i am not getting the output i implemented it bread board with the following code and schematic

Images

Program

#include<reg51.h>
sbit mybit=P1^0;
void delay(void);
void main()
{
	
	while(1)
	{
		mybit=0;
		delay();
		mybit=1;
		delay();
	}
}
void delay()
{
	unsigned char i;
	for(i=0;i<30;i++)
	{
		TMOD=0x01;
		TH0=0x00;
		TL0=0x00;
		TR0=1;
		while(TF0==0);
		TR0=0;
		TF0=0;
	}
}

Post a reply to Adithya

Think you can help Adithya ? Then post your thoughts that might help Adithya . You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.