How to control SIEMENS C35 using microcontroller 8051

Hi, i'm doing a final year project with tittle remote process control control using a mobile phone. but i cant communicate the microcontroller 8051 with SIEMENC C35 using a data cable. How to using the AT Command? It's only for C language or can use in microcontroller assemble language?

Reply to
Lawrence
Loading thread data ...

snipped-for-privacy@yahoo.com (Lawrence) wrote in news: snipped-for-privacy@posting.google.com:

AT commands are from the old Hayes Modem company. The command set is simple ASCII. Once you get the baud rate and physical layer drivers correct for the C35 phone you will be able to send it AT commands in C, Forth, Pascal, BASIC, or assembler.

--
- Mark ->
--
Reply to
Mark A. Odell

This is my 8051 microcontroller program to initialize and C35, but it cannot work,( I am using C16 compiler)and AT89S8252 microcontroller

start: MOV A,PCON SETB ACC.7 MOV PCON,A MOV TMOD,#20H MOV TH1,#0FDH MOV SCON,#50H SETB TTR1

MOV DPTR,#1930H ACALL SENDCOM MOV DPTR,#1940H ACALL SENDCOM MOV DPTR,#1950H ACALL SENDCOM MOV DPTR,#1960H ACALL SENDCOM

SENDCOM: A1: CLR A MOVC A,@A+DPTR CJNE A,#0FFH,CON ` RET CON: ACALL SENDW INC DPTR SJMP A1 SENDW: CLR T1 MOV SBUF,A H1: JNB TI,H1 RET

ORG 1930H DFB "AT",0FFH ORG 1940H DFB "ATZ",0FFH ORG 1950H DFB "ATE0",0FFH ORG 1960H DFB "ATA",0FFH

END

any comment?? i also connect the C35 and MAX207 with a data cable.the MAX207 was to connect to the pin 10 and 11 ( transmit and receive) of the microcontroller.

Reply to
Lawrence

I don't know if you mean the TC35 or the MC35, or the packaged modem versions with RS232, or something else, but the ones I have used implement an extended AT command set. The standard AT commands are readily availkable on the web, but you'll have to get the Siemens manual for their proprietary extensions.

The bare modules are logic compatible, the packaged version RS232. In either case, get your serial port routines working and tested (using a terminal program or something similar) before even hooking up to the modem. IIRC they autobaud, so start at something easy like 9600 8N1. It doesn't use handshake until you set it up.

You can use the AT command set with anything that can send and receive ASCII text,in any language, but be warned, it's a right pain in the genome.

Paul Burke

Reply to
Paul Burke

Dear Lawrence,

You have to append a CR (0D hex) to the AT commands!

HTH Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

how do i to initial the modem in the data cable? does it require any delay when sending data?

Reply to
Lawrence

You MUST read the data book. If it is the bare module you are using, you must assert the IGN line for a few milliseconds after power up, otherwise you won't get anything. Send it a CR character (0x0d by default) and it should respond "OK". No other setup is required (except to configure using the AT command set for your own needs). make sure you are supplying enough current

Paul Burke

Reply to
Paul Burke

An "AT" controlled modem is basically in one of two states: active or quiescent. In the quiescent state it receives commands that start with at and end with . The AT portion serves to set the communication speed, and the modem adapts accordingly.

It usually gets out of the quiescent state to the active state via the ATA or ATD commands. In the active state it first synchronizes with the remote modem, and then becomes transparent to data. ATA causes it to answer an incoming call, and ATD causes it to dial and originate a call.

In the process of switching states (or processing commands) it normally sends back responses, such as OK, or possibly just a number.

So you don't really have to time most things. Their is more than this, of course, such as response to DTR line, and use of CD line, etc. IIRC the modem will usually give help when sent AT?. Simple, portable, and effective. That is why Hayes was king of the modem market for a long time and the protocol became virtually universal.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
     USE worldnet address!
Reply to
CBFalconer

Check out this document:

formatting link

Baudrate is 19200 8N2 or 8E1 if I recall correctly.

Reply to
jetmarc

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.

Reply to
jetmarc

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.

Reply to
jetmarc

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

Reply to
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 ; 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 ;

Reply to
Lawrence

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.