can u guys comment the feed back for it

Status
Not open for further replies.

namees22

Junior Member level 2
Joined
Aug 30, 2012
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Ernakulam
Activity points
1,430
Code:
#include<reg52.h>
#include<stdio.h>
 
sbit TX1=P3^3; 
 
unsigned char SBUFF;
bit TFLG;
 
void delay(unsigned char num)
{
	unsigned char i,j;
	for(i=0;i<num;i++)
		for(j=0;j<1275;j++)
				;
}				 
void transmit_vir(unsigned char dat)
{
		unsigned char tx=0,cp_data;
		
		
			cp_data=dat; 
			TX1=0;																			
			TR0=1;
				while(TF0==1);
			TR0=0;		
			while(tx<8)
			{
				TX1=(0x80&dat)?1:0;
				TR0=1;																
					while(TF0==1);
					TR0=0;	
				cp_data=cp_data<<1;
				tx++;
      	}
      TFLG=1;
      TR0=1;
				while(TF0==1);
		TR0=0;
		TX1=1;																		      
}
void main()
{
	TMOD=0x02;
	TH0=0xFD;
	while(1)
	{
			delay(25);
			transmit_vir('a');
			while(TFLG==1);
				TFLG=0;
			delay(25);
	}		
			
}


Code:
[HTML][QUOTE][/QUOTE][/HTML]
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…