hi gies....
I am trying to transmit data serially to my pc throught hyperterminal... But i am unable to do so...
I am using 89s51 , Does 89s51 has buit in UART and can its timers capable of generating sufficient baud rate? On internet all the site's which have contents on serial data transfer , are using 89c51 series microcontrollers... Plz help me out....
#include<reg51.h>void main(){char A[]="usman ali butt";int i=0;
TMOD=0x20;// Timer1 Mode2 8 bit auto reload
TH1=0xFD;// 9600 bps
SCON=0x50;// 8 Data bit, 1 start bit, 1 stop bit
TR1=1;// Timer1 ONwhile(1){while(A[i]!='\0'){
SBUF=A[i];while(TI==0);// It automatically poles up to 1 when character is transmitted
TI=0;
i++;}
i=0;}}
I am receiving garbage value on hyper terminal..... Does it mean something...