sajidraheem
Newbie level 4
rs 232 at89c51
I am using AT89C51 for serial communication, through which i want to have the gsm based industial control.
I am trying RS 232 interfacing through MAX 232.
The circuit diagram is attached.. The test program code burnt in microcontroller is:
..............................................................................................................
MOV SCON,#50h ; 8 bit, 1stop, REN enabled
MOV TMOD,#20h ; Timer1, Mode 2 (auto-reload)
MOV TH1,#-3 ; 9600 buad rate
SETB TR1 ; start timer 1
AGAIN: MOV SBUF,#'A' ; Letter A to be transferred
HERE: JNB TI,HERE ; wait for the last bit
CLR TI ; clear TI for next character
SJMP AGAIN ; keep sending A
..............................................................................................................
This code should transmit A to serial port continously.. but I am not getting any output on Hyper Terminal when i connect the circuit to my pc. I dont know what is the problem. Can anyone help me in this regard?
I am using AT89C51 for serial communication, through which i want to have the gsm based industial control.
I am trying RS 232 interfacing through MAX 232.
The circuit diagram is attached.. The test program code burnt in microcontroller is:
..............................................................................................................
MOV SCON,#50h ; 8 bit, 1stop, REN enabled
MOV TMOD,#20h ; Timer1, Mode 2 (auto-reload)
MOV TH1,#-3 ; 9600 buad rate
SETB TR1 ; start timer 1
AGAIN: MOV SBUF,#'A' ; Letter A to be transferred
HERE: JNB TI,HERE ; wait for the last bit
CLR TI ; clear TI for next character
SJMP AGAIN ; keep sending A
..............................................................................................................
This code should transmit A to serial port continously.. but I am not getting any output on Hyper Terminal when i connect the circuit to my pc. I dont know what is the problem. Can anyone help me in this regard?