EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

How to control SIEMENS C35 using microcontroller 8051

Started by Lawrence January 8, 2004
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?
llllgh@yahoo.com (Lawrence) wrote in
news:547fbd34.0401081004.33226014@posting.google.com: 

> 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?
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 -> --
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.
Lawrence wrote:
> 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?
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
Dear Lawrence,

> ORG 1930H > DFB "AT",0FFH > ORG 1940H > DFB "ATZ",0FFH > ORG 1950H > DFB "ATE0",0FFH > ORG 1960H > DFB "ATA",0FFH
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
"Mark A. Odell" <nospam@embeddedfw.com> wrote in message news:<Xns946A87132C3ECCopyrightMarkOdell@130.133.1.4>...
> llllgh@yahoo.com (Lawrence) wrote in > news:547fbd34.0401081004.33226014@posting.google.com: > > > 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? > > 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.
how do i to initial the modem in the data cable? does it require any delay when sending data?
Lawrence wrote:
> > how do i to initial the modem in the data cable? does it require any > delay when sending data?
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
Lawrence wrote:
> "Mark A. Odell" <nospam@embeddedfw.com> wrote in message > > llllgh@yahoo.com (Lawrence) wrote in > > > > > 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? > > > > 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. > > how do i to initial the modem in the data cable? does it require > any delay when sending data?
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 <cr>. 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<number> 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?<cr>. 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. <http://cbfalconer.home.att.net> USE worldnet address!
> How to using the AT Command? It's only for C language or can use in > microcontroller assemble language?
Check out this document: http://www.like.e-technik.uni-erlangen.de/download/pemsy/s35i_c35i_m35i_atc_commandset_v01.pdf Baudrate is 19200 8N2 or 8E1 if I recall correctly.
> 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.

The 2024 Embedded Online Conference