EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / I had tried something … bt

I had tried something … bt

|

Microcontroller › 8051 › INTERFACING OF 89C51 WITH GSM › I had tried something … bt

March 30, 2014 at 1:39 pm #11421
mahesh
Participant

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

RSS Recent Posts

  • Assistance locating a 'trail' camera gadget, please ? May 16, 2026
  • reviving old swordfish program but? May 16, 2026
  • Analog multiplexer has gone obselete May 16, 2026
  • Difference between TTL, RS232 and RS485 May 16, 2026
  • Smart Buoy project May 16, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise