I am using proteus software. And i have written a code to send 8 bit parallel data serially (89C51). To observe data i have use virtual terminal. I am observing hex data on the virtual terminal. But Data whatever i am sending is not matched with received data. I am getting wrong data of 1st four bit.
this is my code. ( I am giving data at port-0 and virtual terminal is connected with TX pin of controller)
ORG 0000h
MOV TMOD,#20H
MOV TH1, #0FDH
MOV SCON, #50H
SETB TR1
NEXT: MOV A, P0
MOV SBUF, A
TRANS: JNB TI, TRANS
CLR TI
SJMP NEXT
END