I indianhits New Member Mar 26, 2010 #1 Code: if(P1_3==1) setswitch[0]='1'; else setswitch[0]='0'; if(P1_4==1) setswitch[1]='1'; else setswitch[1]='0'; if(P1_5==1) setswitch[2]='1'; else setswitch[2]='0'; i=0; while(i<3) { SBUF=setswitch[i]; while(TI==0); TI=0; i++; } hello guys when ever i try to recieve the data it doesn't work.can anyone please tell me where the problem is Thanks! and don't mind about Baud rate,undefined variables etc...
Code: if(P1_3==1) setswitch[0]='1'; else setswitch[0]='0'; if(P1_4==1) setswitch[1]='1'; else setswitch[1]='0'; if(P1_5==1) setswitch[2]='1'; else setswitch[2]='0'; i=0; while(i<3) { SBUF=setswitch[i]; while(TI==0); TI=0; i++; } hello guys when ever i try to recieve the data it doesn't work.can anyone please tell me where the problem is Thanks! and don't mind about Baud rate,undefined variables etc...
Norlin New Member Mar 26, 2010 #2 this for an 8051? looks like your loop is ok (I looked at: **broken link removed**) Maybe one of your initializations isn't right?
this for an 8051? looks like your loop is ok (I looked at: **broken link removed**) Maybe one of your initializations isn't right?
I indianhits New Member Mar 27, 2010 #3 thanks for reply i got it right by myself was problem with my PC software that i have created to communicate with uC
thanks for reply i got it right by myself was problem with my PC software that i have created to communicate with uC