code:-
#include<reg51.h>
void transmit (unsigned char s[]);
void main()
{
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
SBUF='A';
while(TI==0);
TI=0;
transmit (" Hello world");
while(1);
}
void transmit (unsigned char s[])
{
unsigned char r;
for(r=0;s[r]!='\0';r++)
{
SBUF=s[r];
while(TI==0);
TI=0;
}
}
Comments
Post a Comment