You are on page 1of 1

#include<reg51.

h>

void main()
{
unsigned char temp;
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;

while(1)
{
while(RI==0);
temp=SBUF;
RI=0;
if(temp=='\r')
{
SBUF=P1;
while(TI==0);
TI=0;
}
}
}

You might also like