SBUF/SCON 8085 Serial Communication

microcontrollerprogrammable-logic

While using 8085 especially at a different baud-rate ,
DTE being the micro-controller, DCE being any modem/or a Display device coupled with
RS232 db9 or db25 port.
I can understand SBUF can Store upto 8 bit of data when its full, it gives A TI high
ie it hires a transmitter interrupt,
But Iam confused whether this SBUF (mentioned in program) bleongs to the DTE or DCE,

Suppose there is a program,To transmit at baudrate 4800,
ORG 00H;
00 MOV SCON #50H;
01H MOV TMOD #20H;
02H MOV TH1,-6;
03H MOV A,#'Y';
04H CALL PRINT;
05H MOV A,#'E';
06H CALL PRINT;
07H MOV A,#'S';
08H CALL PRINT;
09H CLR TI;
0AH SJMP 03H;

PRINT: MOV SBUF,A;
P1: JNB TI,P1;
RET;

Also during transmission of 'Y' to the receiver of the DCE, REN flag must be enabled,
there is a need for both the sides to understand the tranmission of data(first 8bit has taken place, which this program seriouly misses) and we use TI for that ,
but can we address both ends SBUF in a single program?

Best Answer

The second line of your print subroutine should be

P1:  JNB TI, P1

so you don't keep stuffing the character into SBUF. You should only place a new character in SBUF after the UART says it is ready for a new character.

(Disclaimer: I haven't worked with an 8085 UART for a long time.)