??? 06/14/07 06:48 Read: times |
#140739 - Here is code for Serial, Responding to: ???'s previous message |
ORG 0000
ANL PCON,#07FH MOV SCON,#050H MOV TMOD,#020H ;setting for 2400 bps of UART MOV TH1,#0FDH MOV DPTR,#MYDATA ;moving the address of String SETB TR1 ;starting the Timer CLR TI ;clearing the Transmit flag LOOP: CLR A MOVC A,@A+DPTR JZ HERE ;if the acc is 0 then jump out loop ACALL SEND ;print the char INC DPTR SJMP LOOP HERE: SJMP HERE SEND: MOV SBUF,A TST: JNB TI,TST CLR TI RET ORG 250H MYDATA: DB "DAREDEVIL IS HERE",0 END |