странно, а вот так вообще из цикла не выходит:
u_1 ()
{
unsigned char i,byte=0,counter=0;
//while(RB0 == 0){}
//for(i=0;i<100;i++){} //1.5 byte
while (counter<8){
if (RB0 == 1) byte=(byte | (1 << counter++));
}
//for(i=0;i<50;i++){} //1 byte
//counter=counter+1;
//if (RB0 == 1) byte,0=1;
//}
data[0]=byte;
//data[0]=0;
}