CHAPTER 14 8-BIT SERIAL I/O
;--------------------Interrupt processing routine-----------------------------------------------------------
WARI
; --------------------------------------------------------------------------------------------------------------------
338
MOV
SMR,#01001100B ; Clears the interrupt request flag, allows the interrupt
MOV
SSEL,#00000001B ; Selects the 8-bit serial I/O.
SETB
SST
SETI
:
CLRB
SIOF
PUSHW
A
XCHW
A,T
PUSHW
A
MOV
A,SDR
SETB
SST
:
User processing
:
POPW
A
XCHW
A,T
POPW
A
RETI
ENDS
END
request output, sets shift clock input (SCK), prohibits
serial data output (SO), selects the external shift clock,
and sets LSB first.
; Allows serial I/O transfer.
; Enables interrupts.
; Clears the interrupt request flag.
; Reads transfer data.
; Allows serial I/O transfer.