Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[plz]8051 + cell phone

Status
Not open for further replies.
Code:
     ORG   00H
     JMP   START

     ORG 050H
START: 
     MOV   P1,#01H
     CALL  SETTING_UART
     MOV   DPTR,#TABLE
     CALL  TX_STR
     MOV   P1,#81H
LOOP: 
     JMP   LOOP

PrintChar:
     CALL  TX_CHAR
     INC   DPTR
TX_STR:
     CLR   A
     MOVC  A,@A+DPTR
     JNZ   PrintChar
     RET   

TX_CHAR:
     JNB   TI,$
     CLR   TI
     MOV   SBUF,A
     RET

SETTING_UART:
     MOV   SCON,#50H
     MOV   TMOD,#20H
     MOV   TH1,#0FDH
     SETB  TR1
     RET

;     ORG   0A0H
TABLE: 
     DB    "AT+CMGD=1",0DH,0AH,00H
     END

Basically your code is right, I just make some improvement.

Are your sure your cell phone running on 9600 Baud?
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
budhy said:
Are your sure your cell phone running on 9600 Baud?
not all the phone can use 9600 baud rate? got different?
my cell phone is Nokia 2300..
how can check it running on 9600 baud rate or not
 

how can check it running on 9600 baud rate or not
Use HyperTerminal to check the baudrate
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
budhy said:
how can check it running on 9600 baud rate or not
Use HyperTerminal to check the baudrate
the computer side, i am using other cell phone connect by usb to computer, then use vb to receive msg... i done this part already.
that phone is Motorola L7. i had try using hyper terminal before.
i am using 9600,19200,115200 also can link with L7.
the baud rate in hyper terminal, is set by user rite?
so how can we test it?
 

Well,
there are things to remember first.

» Phones with no modem doesnt support AT Commands. They work on FBUS protocol. eg. Nokia 1100

» To connect phones to MC you need to understand MBUS protocol. which works on 9600 Baud.

» FBUS works on 115.7K Baud so not possible to interface with MC [except those can work with 115K baud]

» Most of the data cables have switcher circuit for FBUS and MBUS. To enable FBUS there are conditions:
a) DTR - high
b) RTS - Low
To enable MBUS conditions are:
a) DTR, RTS - low

» N8250 has internal modem so it supports AT commands.

» All cables with RJ45 jack are Flasher cables not data cables.

if anyone has information regarding MBUS please share it. I am doing my reserch on this protocol used for Nokia 1100 the frame formats etc. please if you have any material Do share it.

Regards,
Ajay Bhargav
www.rickeyworld.info
 
how to understand f-bus and M-Bus.. i have NOKIA 1100
i want to interface it 8051, plz help me in simple way



.
 

how to understand f-bus and M-Bus.. i have NOKIA 1100
MBUS is bi-direction Asynchro Serial BUS, multiplexed TX-RX line
FBUS is uni direction Asynchro Serial BUS, has separated TX-RX line

although they has same function for AT command, use FBUS instead of MBUS

From this schematic you can understand that!
23_1166413467.jpg


Take a look at Nokia 1110, 6030, 6060 easy flash connector pinout
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
sorry about that, is me again.
i am using "Siemens MC35i" GSM Modem now.
my 8051 able delete a msg inside GSM modem.
but... still cant send out a msg.
is that possible anyone help me correct it..?
thanks a lot.
//
hidden
//
 

Your delay time is to short! Try this
Code:
DELAY:
        MOV R5,#0H
DL0:
        MOV R7,#0H
DL1: 
        MOV R6,#0H
        DJNZ R6,$
        DJNZ R7,DL1
        DJNZ R5,DL0
        RET
Its better waiting for '>' from cellphone instead of delay.
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
may i have a windows version of 8051 simulator?
i am using dos version "AVSIM51", dun know how to simulation UART.
is that possible simulator can simulate UART by received a signal from Computer Com1?
thanks a lot.
 

sorry. i got another question again.
problem with receive message from GSM modem.
in my program, already sent out "AT+CMGR=1",0DH

the following program was,
baud rate = 9600,n,8,1

RECEIVE:
JNB RI,$
CLR RI
MOV A,SBUF
CJNE A,#'W',RECEIVE
MOV P2,A ;DISPLAY
MOV B,#07H ;DISPLAY
MOV P1,B ;DISPLAY
LOOP:JMP LOOP

there are a "W" inside my SIM card msg.
after debug, program just can receive 0AH.
tat code is the end of msg.
is that because GSM modem faster than 8051?
so i cant receive signal from GSM modem?
sorry of my poor english.
thanks for u help.
 

is that because GSM modem faster than 8051?
so i cant receive signal from GSM modem?
This is not GSM modem vs 8051 speed problem, as they are communicate thru 9600 baud serial line.

Code:
RECEIVE:
     JNB  RI,$
     CLR  RI
     MOV  A,SBUF
     CJNE A,#'W',RECEIVE
;     
     MOV  P2,A               ;DISPLAY
     MOV  B,#07H             ;DISPLAY
     MOV  P1,B               ;DISPLAY
LOOP:
     JMP  LOOP

There some questions from above code :
1. Are you sure your Nokia operate at 9600 baud? There are a feature on Nokia to setup communicate baud rate. Check it
2. Are you sure your Nokia operate on Text Mode SMS (not PDU mode)?
3. 'W' (capital W) is different from 'w', which one do you mean?

Try this code :
Code:
     MOV  R0,#30h
     CLR	A
Clear:     
     MOV  @R0,A
     INC  R0
     CJNE R0,#50h,Clear

     MOV  R0,#30h
RECEIVE:
     JNB  RI,$
     CLR  RI
     MOV  A,SBUF
     MOV  @R0,A
     INC  R0 
     CJNE R0,#50h,RECEIVE
;     
     MOV  P2,A               ;DISPLAY
     MOV  B,#07h             ;DISPLAY
     MOV  P1,B               ;DISPLAY
LOOP:
     JMP  LOOP
after that inspect content of internal RAM 30h .. 4Fh, and let me know
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
1. Are you sure your Nokia operate at 9600 baud? There are a feature on Nokia to setup communicate baud rate. Check it
i am using Siemens MC35i GSM modem. i had test before using Hyperterminal with baud rate 9600. able to receive and send msg. is that means it was able communicate in baud rate 9600?
2. Are you sure your Nokia operate on Text Mode SMS (not PDU mode)?
default setting in Siemens Mc35i GSM modem, AT+CMGF is set to '1'.
3. 'W' (capital W) is different from 'w', which one do you mean?
capital 'W', ascii code (57H)
after that inspect content of internal RAM 30h .. 4Fh, and let me know
sorry, this is the main problem i had met.
i dun know how to test UART in simulation program. i am using AVSIM51.
i need to burn into my 8951 to test it.
em, sorry about that. how can i test in software? thanks a lot.
is tat AVSIM51 possible to do that?

Added after 25 minutes:

practical result:
IF R0=50H
P1 just display 03H, still loop inside receive subroutine, last value receive is "0AH"

if edit the program like this, (to test the connection)
Code:
RECEIVE:
     	JNB  	RI,$
     	CLR  	RI
     	MOV  	A,SBUF
     	MOV  	P2,A               ;DISPLAY
     	MOV  	B,#07H             ;DISPLAY
     	MOV  	P1,B               ;DISPLAY
LOOP:
     	JMP  	LOOP
then
P2 can get "A", ascii (41H)
P1 can get "07H"
 

i dun know how to test UART in simulation program. i am using AVSIM51.
i need to burn into my 8951 to test it.
Yes, I think you have to test it on the real 8951 platform, not on a simulator

em, sorry about that. how can i test in software? thanks a lot.
is tat AVSIM51 possible to do that?
I never use simulator, especially AVSIM51.
How do you connect your Cellphone to AVSIM51? Thru PC COM port?

Do you know Protues, it is a good uC simulator, take a look at Proteus VSM Feature Comparison

Proteus VSM for 8051
Features
The 80C51 model simulates all the main features of the real device including:
The entire 8051 instruction set and SFRs.
All I/O operations.
All on-chip peripherals including the timers and UART in all their modes of operation*.
All interrupt modes.
Internally generated processor clock for better performance. I/O and other event timing accurate to one clock phase.
Program and external data memory can be simulated internally to the model for maximum throughput, or externally in order to validate the hardware design.
Provides internal consistency checks on code.
Fully integrated in to ISIS's source level debugging system and source code management system. Support is included for source level debugging with the ASEM-51 shareware assembler and includes source, register, and memory windows.
 

    wcgan

    Points: 2
    Helpful Answer Positive Rating
thanks a lot.
i had done already all the function.
8051 able to control GSM modem to send and receive msg lo..
^_^.

thanks a lot budhy..
u help me a lot...
thank you...
 

can i use NOKIA 1100 , can connect flash cable ? does nokia 1100 support AT-commands ??












.
 

All cellphone support AT command.

Connect your 1100 to PC comport thru flash cable, test it with HyperTerminal.
 

wcgan said:
sorry about that, i dun know where should i post this topic..
i just wan do a simple thing ..
connect cell phone with microcontroller 8051 to send a msg ...
how can i connect it?
can... anyone answer me?
thanks a lot.
 

this link is related to this topic

**broken link removed**
 

hello friends how are you i am also doing this project on connection of mobile with microcontroller i have a 6310 . the at commands work well withh hyperterminal but when i send these commands from the microcontroller there ,it doesnt work. i mean the mobile just echos the command send to it when i have the gnd removed and only tx and rx connected . but when i connect the gnd it doesnt even echo .
i dont even know which pins to connect i mean i have just connected the tx and rx to the 8051 the rest are just open . do i have to connect the rest of the pins in some manner please help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top