Here is a simple LED Blinking Program for beginners
#include
void delay(unsigned int i)
{
unsigned int j;
while(i-->0)
for(j=0;j<500;j++);
}
void main()
{
P1=0x00;
while(1)
{
P1=0x01;
delay(1000);
P1=0x00;
delay(1000);
}
}