Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top