amayilsamy
Advanced Member level 1
- Joined
- Feb 5, 2013
- Messages
- 420
- Helped
- 38
- Reputation
- 76
- Reaction score
- 34
- Trophy points
- 1,308
- Location
- Chennai,India
- Activity points
- 3,370
I'm using AT89C2051 for small function..
I post My code and schematic.. it is working Proteus in my circuit is not worked.
I post My code and schematic.. it is working Proteus in my circuit is not worked.
Code:
#include<reg51.h>
sbit led = P1^7;
sbit sw = P1^6;
int i,a;
void delay(unsigned int ms) ;
void main()
{
P0=0x00;
while(1)
{
P1=0x00;
// led = 1;
// sw = 0;
delay(10);
// led = 0;
// sw = 1;
P1=0xff;
delay(1);
}
}
void delay(unsigned int ms)
{
for(a=0;a<=5;a++)
{
for(i=0;i<=10000;i++);
for(i=0;i<=10000;i++);
for(i=0;i<=10000;i++);
}
}