; SEND SERIAL DATA
SEND :
MOV SBUF, A ; LOAD DATA IN BUFFER
HERE :
JNB TI, HERE ; WAIT TILL LAST BIT IS GONE
CLR TI ; GET READY FOR NEXT CHARACTER
RET ; RETURN TO CALLER
; RECIEVE SERIAL DATA
RECV :
JNB RI, RECV ; WAIT TILL LAST BIT HAS COME
MOV A, SBUF ;
CLR RI ; GET READY FOR NEXT CHARACTER
RET ; RETURN TO NEXT CHARACTER
SEND :
MOV SBUF, A ; LOAD DATA IN BUFFER
HERE :
JNB TI, HERE ; WAIT TILL LAST BIT IS GONE
CLR TI ; GET READY FOR NEXT CHARACTER
RET ; RETURN TO CALLER
; RECIEVE SERIAL DATA
RECV :
JNB RI, RECV ; WAIT TILL LAST BIT HAS COME
MOV A, SBUF ;
CLR RI ; GET READY FOR NEXT CHARACTER
RET ; RETURN TO NEXT CHARACTER
No comments:
Post a Comment