Interfacing of GSM modem with 8051

Amit Kulkarni

Amit Kulkarni

@amit-Ja5LGK Oct 24, 2024
hello,
I want to interface GSM modem to AT89C51 to send messages.
I have attached ciruit diagram and code too!
This code is not working 😔
In circuit diagram, I have connected RS232 Male connector to RS232 female connector (which is already there on the board). Just have a look..
Please tell me where i am going wrong...
GSMCIRCUIT1
ORG 0000H
        MOV TMOD,#20H              //TIMER 1, MODE 2
        MOV TH1,#-3                //9600 BAUD RATE
        MOV SCON,#50H            //8 BIT, 1 STOP, EN ENABLED
        SETB TR1
 
        MOV DPTR,#MSG1
        ACALL H1
        ACALL DELAY
        MOV DPTR,#MSG2
        ACALL H1
        ACALL DELAY
        MOV DPTR,#MSG3
        ACALL H1
        ACALL DELAY
        MOV DPTR,#MSG4
        ACALL H1
        ACALL DELAY
        MOV DPTR,#MSG5
        ACALL H1
        ACALL DELAY
H1:      CLR A
        MOVC A,@A+DPTR
        JZ B1
        ACALL SEND
        INC DPTR
        SJMP H1
B1:
        RET
SEND:    MOV SBUF,A
H2:    JNB TI,H2
        CLR TI
        RET
DELAY:  MOV R3,#50H
HERE2:  MOV R4,#50H
HERE:    DJNZ R4,HERE
        DJNZ R3,HERE2
        RET
 
 
ORG 300H
MSG1: DB "AT",0DH
      DB 0H
MSG2: DB "AT+CMGF=1",0DH
      DB 0H
MSG3: DB "ATE=0",0DH
      DB 0H
MSG4: DB "AT+CMGS=",'"8149111111"',0DH
      DB 0H
MSG5: DB "TEXT",0X1A
      DB 0H
 
      END
waiting for your reply,

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww Jan 13, 2013

    first of all I'm confused with your circuit. Can you tell me from where you got this circuit diagram? there will be no need of MAX232 if you are going to connect Microcontroller directly with Modem. First send AT to modem and check for response if you are not able to receive then check your serial connection in between and report it here.
  • Amit Kulkarni

    Amit Kulkarni

    @amit-Ja5LGK Jan 13, 2013

    actually i am not connecting any MAX232 from outside. It's already there on GSM modem. And its connections are given further to RS232 female connector which is also there on the board so we need not to connect an other MAX232 from outside right? we just need to connect that female connector to controller directly. And i used that RS232 male connector to make it simple to connect female connector to microcontroller.
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww Jan 14, 2013

    amit251291
    actually i am not connecting any MAX232 from outside. It's already there on GSM modem. And its connections are given further to RS232 female connector which is also there on the board so we need not to connect an other MAX232 from outside right? we just need to connect that female connector to controller directly. And i used that RS232 male connector to make it simple to connect female connector to microcontroller.
    See If your GSM Modem board consist a MAX232 then you also have to use one more MAX232 on microcontroller side. Please confirm this. 😀
  • arunchary

    arunchary

    @arunchary-VtqB3c Jan 31, 2013

    hi,first you need to check the GSM modem with SIM status wheather it is in command or data mode and then clear the SIM memory with message then go for MAX232 section of the modem and the connect o controller.
    one more thing wheather your controller is ready to sending are recieving the messages or not check it once then make connection,. still your getting confusion,.
    follow this site to get some clarifications.
    #-Link-Snipped-#