EmbeddedRelated.com
Forums

Problem in interfacing 8051 with gsm module

Started by embedidea July 3, 2006
hello martin,

we are able to send the data to the hyperterminal now. but the same data
when given to GSM modem doesnt work. we are using wavecom's module. we
sent the basic at commands as data through UART. the program is as
follows.
--------------------------------------------------------------------------
ORG 0000H;
LJMP MAIN;
ORG 0030H;
MAIN:
		MOV TMOD,#20H;//setting timer 1 
		MOV TH1,#0FDH;//initalizing timer1
		MOV SCON,#50H;//8 databits 1 startbit,1stop bit no parity
		CLR TI;
		CLR RI;
		SETB TR1;//starting timer1
		MOV A,#'A';//actully transmitting the command..
		MOV SBUF,A;// the command is atdt<phonenumber> for dialing
		ACALL TRANSMIT;
		MOV A,#'T';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'D';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'T';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'9';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'4';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'4';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'0';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'9';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'5';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'7';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'2';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'9';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#'5';
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#03BH;
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#0DH;
		MOV SBUF,A;
		ACALL TRANSMIT;
		MOV A,#0AH;
		MOV SBUF,A;
		ACALL TRANSMIT;
HERE:	SJMP HERE;
TRANSMIT:
HERE1:	JNB TI,HERE1;
		CLR TI;
		RET;

END;
--------------------------------------------------------------------------
we are able to get the data sent on the hyperterminal. but the same when
given to GSM modem doesnt work.
please suggest any chages to the code to be made. we are confused if this
is the right way to send at commands from 8051.

Thanks in advance.