unsigned int i;
while(1){
   P2=0xff; //if led is in P2
   for(i=0;i<0xffff;i++);
   P2=0;
}