void delay(void) { unsigned int a,b,c; for (a=0xffff;a>=0;a--) { for ( b=0xffff;b>=0;b--) { for (c=0xffff;c>=0;c--); } } } You can set the value of a,b,c or add another variable to according to delay time & cpu clock frequency.[ This message was edited by: Ranjeet on 13-05-2003 12:12 ]