- This topic has 6 replies, 4 voices, and was last updated 10 years, 10 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › INTERFACING OF 89C51 WITH GSM
I want to send a string through SIM 300 GSM Module .. what are the steps i have to follow ??
u mean u want to send string to server or to send AT commands.
Yeah i want to send string thro GSM Module using AT commands without PC
There are many tutorials regarding interfacing of gsm modem with a microcontroller in this website. GO TO EG LABS and choose the controller.
Hi,
Interfacinf GSM is as easy as sending data on UART. Refer datasheet of SIM300 and find the sequence of data to be sent.
I 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 0040H
MAIN:
;ACALL DELAY_10
GSM :
MOV TMOD,#20H ; timer 1 mode 2
MOV SCON,#50H; serial mode 1, rec enable
MOV TH1,#0FDH
SETB TR1 ;start timer
MOV 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_SMALL
MOV 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_SMALL
MOV DPTR,#M3
MOV R5,#8
A3 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R5, A3
MOV A,#'”‘
ACALL SEND
MOV DPTR,#M4
MOV R4,#13
A0 :
MOV A,#00H
MOVC A,@A+DPTR
ACALL SEND
INC DPTR
DJNZ R4, A0
MOV A,#'”‘
ACALL SEND
MOV A,#13
ACALL SEND
ACALL DELAY_SMALL
MOV 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, A4
MOV A,#1AH
ACALL SEND
ACALL DELAY_SMALL
ACALL DELAY_SMALL
;LJMP MAIN
SEND : MOV SBUF,A
WAIT : JNB TI, WAIT
CLR TI
RET
M1 : 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
;RET
END
Why don’t you try Embedded C… it is easier and you get a lot code examples also online