Kompilator Compiler Online C
#include<AT89X51.h> // special function register declarations
// for the intended 8051 derivative
void Delay(void); // Function prototype declaration
void main (void)
{
while(1) //infinite loop
{
P2 = 0x55; // LED 0b 0101 0101;
Delay();
P2 = 0xAA; // LED 0b 1010 1010;
Delay();
}
}
void Delay(void)
{
int j;
int i;
for(i=0;i<10;i++)
{
for(j=0;j<10000;j++)
{
}
}
}
Zealous Zebra