Hello guys i need help with this code.
Basically i want to echo the letter 'A' in HyperTerminal but all i get is this
Please help me.Thanks!
Rich (BB code):
#include <AT89X55.H>
unsigned char ch='A';
void serial_init()
{
SCON=0x50;
TMOD=0x20;
TH1=0xFD;
TR1=1;
TI=1;
}
void main()
{
serial_init();
while(1)
{
SBUF=ch;
TI=1;
while(TI==0);
TI=0;
}
}
Please help me.Thanks!