void Delay( unsigned char x ) {
   unsigned char i,j;
   for(i=0;i<x;i++)
      for(j=0;j<1000;j++);
}