EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

How to control SIEMENS C35 using microcontroller 8051

Started by Lawrence January 8, 2004
> how do i to initial the modem in the data cable? does it require any > delay when sending data?
Bet on it! You should do what's known as "char pacing", ie insert a delay of 5-10ms between each character you send, and always wait for the remote response (inclusive terminating 0d 0a) plus another 5-10ms before sending the next command. The C35 also has the bad habbit of falling asleep after a while of inactivity or when receiving excessive amounts of "garbage". That is, when it suddenly stops to work, you may have to press a key on the keyboard or even power-cycle it to recover.
Paul Burke wrote:

> > > You MUST read the data book. If it is the bare module you are using,
Apologies. Why do Siemens seem to call ALL their mobile phone something35? I assumed the OP was talking about the MC35 GSM engine, getting home I find my daughter's mobile is a C35. Paul Burke
Hi, I write my program base on yours advice but it still can't work,
i set the 19200 baudrate with 8E1.

after that I send the command to the modem connect to C35.
I send < 41 54 5a 0d >( = ATZ) first with set 5mS delay when sending
each chararacters , but I din receive any response from modem.


this is part of my program,
;-------------------------------------------------
;SET BAUD RATE AT 19200,8BIT, 1 STOP BIT AND REN=1
;-------------------------------------------------
C35:
MOV A,PCON
SETB ACC.7
MOV PCON,A
MOV TMOD,#20H
MOV TH1,#0FDH
MOV SCON,#50H
SETB TR1
;-------------------------------------------------
;SEND COMMAND TO MODEM
;-------------------------------------------------
MOV A,#41H        ;A
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#54H        ;T
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#5AH        ;Z
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#0DH        ;<CR>
 ACALL SENDW
 ACALL DELAY_5mS
;-------------------------------------------------
;RECEIVE DATA FROM MODEM
;-------------------------------------------------
          MOV DPTR,#1500H
          ACALL RECEI
;--------------------------------------------------
RECEI:	ACALL RECV
	MOVX @DPTR,A

BUSY:	MOV A,96H	;UTILIZING RDY/BSY TO DETERMINE THE END OF WRITE CYCLE
	ANL A,#WDTRST
	JZ BUSY
	MOVX A,@DPTR
        ACALL TEST           ;TEST PROGRAM FOR RECEIVE 'OK'ODH OR
'ERROR'ODH
        JZ FINISH

	INC DPTR
	SJMP RECEI

RECV:	JNB RI,RECV     ;<-------MY PROGRAM WERE STOP HERE WHICH IT
CAN'T
	MOV A,SBUF      ;        RECEIVE ANY DATA FROM MODEM
	CLR RI
	RET
SENDW:	CLR TI			;SEND SINGLE BYTE TO C35
	MOV SBUF,A
H1:	JNB TI,H1
	RET
FINISH:
END

The 2024 Embedded Online Conference