Microcontroller › 8051 › INTERFACING OF 89C51 WITH GSM
- This topic has 6 replies, 4 voices, and was last updated 12 years ago by
Ganesh Selvaraj.
-
AuthorPosts
-
March 24, 2014 at 10:07 am #2979
mahesh
ParticipantI want to send a string through SIM 300 GSM Module .. what are the steps i have to follow ??
March 24, 2014 at 5:15 pm #11372doraemon
Participantu mean u want to send string to server or to send AT commands.
March 24, 2014 at 5:29 pm #11376mahesh
ParticipantYeah i want to send string thro GSM Module using AT commands without PC
March 24, 2014 at 5:31 pm #11377Ganesh Selvaraj
ParticipantThere are many tutorials regarding interfacing of gsm modem with a microcontroller in this website. GO TO EG LABS and choose the controller.
March 25, 2014 at 8:56 am #11383SHAH DISHANT H.
ParticipantHi,
Interfacinf GSM is as easy as sending data on UART. Refer datasheet of SIM300 and find the sequence of data to be sent.
March 30, 2014 at 1:39 pm #11421mahesh
ParticipantI had tried something …
bt its nt working at all

any1 help me out to get off the errors ..
the code is like :
ORG 0000H
SJMP MAIN
ORG 0040HMAIN:
;ACALL DELAY_10GSM :
MOV TMOD,#20H ; timer 1 mode 2
MOV SCON,#50H; serial mode 1, rec enable
MOV TH1,#0FDH
SETB TR1 ;start timerMOV DPTR,#M2
MOV R6,#02H
A1 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R6, A1
MOV A,#13
ACALL SEND
ACALL DELAY_SMALLMOV DPTR,#M1
MOV R7,#09H
A2 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R7, A2
MOV A,#13
ACALL SEND
ACALL DELAY_SMALLMOV DPTR,#M3
MOV R5,#8
A3 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R5, A3
MOV A,#'”‘
ACALL SENDMOV DPTR,#M4
MOV R4,#13
A0 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R4, A0MOV A,#'”‘
ACALL SEND
MOV A,#13
ACALL SEND
ACALL DELAY_SMALLMOV DPTR,#MSG
MOV R4,#22H ; SET COUNT AS PER MSG LENGTH
MOV R4,#34
A4 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R4, A4MOV A,#1AH
ACALL SEND
ACALL DELAY_SMALLACALL DELAY_SMALL
;LJMP MAINSEND : MOV SBUF,A
WAIT : JNB TI, WAIT
CLR TI
RETM1 : DB “AT+CMGF=1”
M2 : DB “AT”
M3 : DB “AT+CMGS=”
M4 : DB “XXXXXXXXXX”MSG : DB “TOTAL DATA=1 & FINAL DATA= 1108000”
DELAY_SMALL :
MOV R1,#07H
D1 : MOV R2,#0FFH
D2 : MOV R3,#0FFH
D3 : DJNZ R3,D3
DJNZ R2,D2
DJNZ R1,D1
RET;DELAY_10 :
;MOV P1,#00H ; LED FLASH @ PORT P1
;ACALL DELAY_SMALL ; LED FLASH @ PORT P1
;MOV P1,#0FFH ; LED FLASH @ PORT P1
;ACALL DELAY_SMALL ; LED FLASH @ PORT P1;MOV R5,#10
;MIN_1 :
;MOV R4,#60
;MIN_10 :
;ACALL DELAY_SMALL
;DJNZ R4,MIN_1
;DJNZ R5,MIN_10
;RETEND
March 30, 2014 at 5:44 pm #11423Ganesh Selvaraj
ParticipantWhy don’t you try Embedded C… it is easier and you get a lot code examples also online
-
AuthorPosts
- You must be logged in to reply to this topic.