??? 01/20/09 12:59 Modified: 01/20/09 13:19 Read: times |
#161634 - Serial Communication Problems |
Hi 8051 experts. I am a newbie in this field. Can you pls help me why I can't make the circuit below to work? Pls tell me what is wrong with it. I also included the program. It might help.
Thanks in advance, Bing Lo ORG 00H ; Reset sjmp start start: MOV TMOD,#20H ;enable timer1, mode 2 (auto reload) MOV TH1,#0FDH ;9600 Baud rate MOV SCON,#50H ;8 bit, 1 stop bit, REN enabled SETB TR1 again: mov r1, #0dh mov dptr,#date1 AGAIN1:movc a,@a+dptr ;Read P0 inc dptr MOV SBUF,A ;send data HERE:JNB TI,HERE ;wait for data to be transferred CLR TI ;clear TI for next char djnz r1, again1 SJMP AGAIN ;keep doing it date1: db "Hellow World!" end |