Sunday, 5 October 2014

Write a program to transfer the message “YES” serially at 9600 baud, 8-bit data, 1 stop bit. Do this continuously.

MOV  TMOD,#20H             ;timer 1, mode 2
MOV  TH1,#-3                    ;9600 baud
MOV  SCON,#50H
SETB TR1
AGAIN:  MOV  A,#”Y”                        ;transfer “Y”
ACALL TRANS
MOV  A,#”E”                       ;transfer “E”
ACALL TRANS
MOV  A,#”S” ;transfer “S”
ACALL TRANS

SJMP AGAIN                       ;keep doing it

No comments:

Post a Comment