GSM modem interfacing to AT89C51

Discussion in 'Embedded Systems and Microcontrollers' started by amit251291, Jan 11, 2013.

  1. amit251291

    Thread Starter New Member

    Dec 30, 2012
    4
    0
    Can you please tell me how to interface GSM modem (sim 300) to microcontroller (AT89C51)to send sms?

    I need assembly program for the same..

    I have prepared my own but it is not working:

    here it is:

    Code ( (Unknown Language)):
    1. ORG 0000H
    2.         MOV TMOD,#20H               //TIMER 1, MODE 2
    3.         MOV TH1,#-3                //9600 BAUD RATE
    4.         MOV SCON,#50H            //8 BIT, 1 STOP, EN ENABLED
    5.         SETB TR1
    6.                
    7.         MOV DPTR,#MSG1
    8.         ACALL H1
    9.         ACALL DELAY
    10.         MOV DPTR,#MSG2
    11.         ACALL H1
    12.         ACALL DELAY
    13.         MOV DPTR,#MSG3
    14.         ACALL H1
    15.         ACALL DELAY
    16.         MOV DPTR,#MSG4
    17.         ACALL H1
    18.         ACALL DELAY
    19.         MOV DPTR,#MSG5
    20.         ACALL H1
    21.         ACALL DELAY
    22. STAY: SJAMP STAY
    23. H1:      CLR A
    24.         MOVC A,@A+DPTR
    25.         JZ B1
    26.         ACALL SEND
    27.         INC DPTR
    28.         SJMP H1
    29. B1:
    30.         RET
    31. SEND:     MOV SBUF,A
    32. H2:     JNB TI,H2
    33.         CLR TI
    34.         RET
    35. DELAY:  MOV R3,#50H
    36. HERE2:  MOV R4,#50H
    37. HERE:    DJNZ R4,HERE
    38.         DJNZ R3,HERE2
    39.         RET
    40.    
    41.  
    42. ORG 300H
    43. MSG1: DB "AT",0DH
    44.       DB 0H
    45. MSG2: DB "AT+CMGF=1",0DH
    46.       DB 0H
    47. MSG3: DB "ATE=0",0DH
    48.       DB 0H
    49. MSG4: DB "AT+CMGS=",'"8149111111"',0DH
    50.       DB 0H
    51. MSG5: DB "TEXT",0X1A
    52.       DB 0H
    53.  
    54.       END
    connections:
    GSM modem has following on-board connections:

    MAX232----->> RS232 (Female connector)

    pin 7 ---> Pin 2
    pin 8 ---> Pin 3

    So i have done following connections after this:

    RS232 (Female connector) --->> RE232(PCB male connector ) ( This o did because it was difficult to take connections from on-board Female connetor)

    I took out following pins from RS232 male connector and connected to microcontroller:

    RS232(PCB male connector ) ---> AT89C51
    Pin 2 --> Pin 11
    Pin 3--> Pin 10
    Pin 5 Grounded.

    Rest AT89C51 connetions:

    Crystal oscillator 12 Mhz.
    EN (Pin 31) -VCC
    Pin 40-- VCC
    Pin 20-- Gnd


    Are these connetions are correct??
    why my program is not working ??


    can any one tell me assembly program to interface the same?
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    How about supplying a schematic. That will allow us to be able to see your connections instead of read about them.
     
  3. athgen

    New Member

    Jan 8, 2013
    2
    0
    i think . can help you
     
  4. amit251291

    Thread Starter New Member

    Dec 30, 2012
    4
    0
    here is my circuit diagram...

    please tell me where i am going wrong :|
     
Loading...