Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top