You are on page 1of 2

org 0000h

main: mov dptr,#1000h

mov scon,#50h

mov tmod,#20h

mov th1,#0fdh

setb tr1 ;timer1 start

mov r1,#00h ;clear r1

back: mov a,r1 ; r1=a

movc a,@a+dptr ;take character from the address generated

mov sbuf,a ;send it to sbuf and to txd pin

here: jnb ti,here ;ti bit is high if all the bits are transfer

clr ti ;if all the bits are send ti becomes high

;so clear ti to accept another character

inc r1 ;increment memory pointer

cjne r1,#48,back ;check all the charatcters all transfer

sjmp main ; continue to transfer same message


org 1000h

mess: db 'WELCOME TO VIIT 17U130 SHRIKANT AND 17U414 URAVI'

end

You might also like