I’m using microcontroller Atmel at89c52. I need to make an interface with a wireless sensor via serial port with 19200 baud rate
I have used 11.0592 MHz Crystal but the uC didn't respond for send or receive
Is there any problem with this code for serial please?
; FUNCTIONS/SUBROUTINES
SERIAL1:
MOV A, PCON
SETB ACC.7
MOV PCON, A
MOV TMOD, #20H; timer1 mode 2
MOV TH1, #0FDH
MOV SCON, #50H ; 8-BIT, 1 STOP BIT, REN ENABLED
SETB TCON.6
CLR TI
MOV SBUF, A
H_1: JNB TI, H_1
RET