#define NUM 1333 /* Function to delay for 1 ms */ void delay1ms(void) { int x; x = NUM; /* Inner loop delays for 1 ms */ while (x > 0) { x = x-1; } }