CHAPTER 13 UART
;--------------------Interrupt processing routine-----------------------------------------------------------
WARI
; --------------------------------------------------------------------------------------------------------------------
312
MOV
SRC,#00011101B
MOV
SSD,#00001000B
MOV
A,SSD
MOV
A,SIDR
MOV
SODR,#13H
SETI
:
PUSHW A
XCHW A,T
PUSHW A
MOV
A,SSD
MOV
A,SIDR
:
User-defined process
:
POPW
A
XCHW A,T
POPW
A
RETI
ENDS
END
mode 1. Set asynchronous mode, enable clock output
and serial data output.
; Select the dedicated baud rate generator, and set the baud
rate 375 bps.
; Disable the transmission interrupt request and enable the
reception interrupt request.
; Required before transmission
(TDRE = 1 enables transmission)
; Clear error flags.
; Write the data to be transmitted (13
; Enable instruction.
; Save A and T.
; Read the data to be transmitted, then clears the input data
flag.
; Restore A and T.
).
H