help me with RS232 COM1 code

Status
Not open for further replies.

indianhits

New Member
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...
 
this for an 8051?
looks like your loop is ok (I looked at: **broken link removed**)
Maybe one of your initializations isn't right?
 
thanks for reply i got it right by myself

was problem with my PC software that i have created to communicate with uC
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…