0% found this document useful (0 votes)
65 views1 page

Page Number 106: Serial Communication (Refer After Reading Module-4) Serial Communication (Refer After Reading Module-4)

This document contains code for serial communication in assembly language. It initializes the serial port by configuring the timer and serial control registers. It then enters a loop that sends the characters "GMIT" repeatedly over the serial port by moving each character to the serial buffer register and waiting for transmission to complete before sending the next one. A message string containing "GMIT" with a terminating byte is also defined to allow sending the message by incrementing a pointer through the string rather than individual characters.

Uploaded by

Arunkuma81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

Page Number 106: Serial Communication (Refer After Reading Module-4) Serial Communication (Refer After Reading Module-4)

This document contains code for serial communication in assembly language. It initializes the serial port by configuring the timer and serial control registers. It then enters a loop that sends the characters "GMIT" repeatedly over the serial port by moving each character to the serial buffer register and waiting for transmission to complete before sending the next one. A message string containing "GMIT" with a terminating byte is also defined to allow sending the message by incrementing a pointer through the string rather than individual characters.

Uploaded by

Arunkuma81
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Page number 106

wSERIAL COMMUNICATION SERIAL COMMUNICATION


(Refer after reading Module-4) (Refer after reading Module-4)

ORG 00H ORG 00h


MOV TMOD, #20H MOV TMOD,#20h
MOV TH1, #-3 MOV TH1,#-3
MOV SCON, #50H MOV SCON,#50h
SETB TR1 SETB TR1
UP: MOV A, #'G' REPEAT:
ACALL SEND MOV DPTR, #msg
MOV A, #'M' UP: CLR A
ACALL SEND MOVC A,@A+DPTR
MOV A, #'I' JZ REPEAT
ACALL SEND ACALL SEND
MOV A, #'T' INC DPTR
ACALL SEND SJMP UP
SJMP UP SEND:
SEND: MOV SBUF, A MOV SBUF,A
HERE: JNB TI, HERE HERE: JNB TI, HERE
CLR TI CLR TI
RET RET
END msg: db "GMIT",0
END

You might also like