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
Reply by Paul Burke●January 12, 20042004-01-12
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
Reply by jetmarc●January 9, 20042004-01-09
> 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.
Reply by jetmarc●January 9, 20042004-01-09
> 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.
Reply by jetmarc●January 9, 20042004-01-09
> How to using the AT Command? It's only for C language or can use in
> microcontroller assemble language?
> "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!
Reply by Paul Burke●January 9, 20042004-01-09
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
Reply by Lawrence●January 9, 20042004-01-09
"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?
Reply by Wolfgang Mahringer●January 9, 20042004-01-09
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 by Paul Burke●January 9, 20042004-01-09
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