Microcontroller › 8051 › Gsm modem with AT89C51
- This topic has 9 replies, 5 voices, and was last updated 9 years, 11 months ago by
muneebullashariff.
-
AuthorPosts
-
January 11, 2013 at 2:54 pm #2061
amit kulkarni
ParticipantCan 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>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
STAY: SJAMP STAY
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<code>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?
January 11, 2013 at 5:08 pm #8932AJISH ALFRED
ParticipantHi Amith,
Why don’t you post a diagram? It would have been more easy for us to find out the problem.
January 13, 2013 at 8:12 am #8939amit kulkarni
Participantwe have drawn this circuit in paint. Drawing is not very good.RS232 male connector is connected just to make it easy to make the connections…Waiting for your replyJanuary 13, 2013 at 5:20 pm #8943AJISH ALFRED
ParticipantThe connection is alright. Make sure that you’ve made the ground common for both the MCU and the modem including max232.
January 14, 2013 at 9:03 am #8948amit kulkarni
ParticipantThe ground is common no problem with it….
why it is not working?
January 14, 2013 at 11:55 am #8950nidhin.k
Participanthi…..
please use 11.0592MHz crystal…. it will work
January 14, 2013 at 12:27 pm #8952amit kulkarni
Participantit is not shown here in this diagram,but i have connected it
February 14, 2013 at 11:10 am #9138RAJI G
Participantfirst verify ur serial communication program and then proceed..
February 14, 2013 at 4:18 pm #9140amit kulkarni
ParticipantThis problem has been Solved
Thank you all
April 26, 2013 at 3:13 pm #9586muneebullashariff
Participantwhat was the problem???
-
AuthorPosts
- You must be logged in to reply to this topic.