//transmit program 
#include<reg51.h> 

void Serial_Init(void) 
{ 
SCON=0x52;  // set TI flag to indicate that UART is free
ES=0;       // disable serial interrupt due we have no its ISR
// EA=1;    // enable rest interrupts if it needs
TMOD=0x20; 
TH1=0xE6; 
TR1=1; 
} 

void Transmit_Char(unsigned char c) 
{ 
while(!TI); //Waits until previous transmit has been done
TI=0; 
SBUF=c; 
}