Microcontroller › 8051 › Anyway to convert assembly code in to C code? › this is the code i have for
March 10, 2011 at 7:12 am
#5695
G Thomas
Participant
this is the code i have for serial connection. How do i insert this into my main code for controller:
ORG 30H
INI:
MOV TMOD,#21H
MOV TH1,#0A0H ;9600 BAUD
MOV SCON,#50H ;8 BIT UART MODE
MOV TH0,#HIGH(-50000)
MOV TL0,#LOW(-50000)
SETB TR1
MAIN:
JB RI,SERIAL
JMP MAIN
;==================
SERIAL:
CLR RI
MOV A,SBUF
JMP MAIN
the code for microcontroller is: