This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051 UART Assembly

I am having some trouble getting the UART module on my 8051 to transmit. The TXD pin shares usage with the LCD and the RXD shares usage with the OE pin of a latch.

Here is what I am doing. I am using a Logic Analyzer to verify that I am transmitting.


...Print to LCD (uses TXD)

mov SCON, #50h
mov TMOD, #20h
clr TCLK
clr RCLK

;I do a case for baud one ex is
anl PCON, #7Fh
mov TL1, #98h
mov TH1, #98h

setb REN
clr TI
clr RI
setb TR1

mov A, DPH
call convert_to_ascii
call get_parity

transmita:

mov SBUF, A
jnb TI, $
clr TI

jmp transmita