sir, i get an error when i run this code! i need help to interface a GSM module wit 8051...here is the code
org 00h ajmp main org 30h mov p1,#00h mov p3,#00h
mov p2,#00h setb p2.1
main:mov scon,#50h mov tmod,#20h mov th1,#0fdh
mov dptr,#string1 call send_string CALL DELAY
mov dptr,#string2 call send_string call delay
mov dptr,#string5 call send_string call delay
mov dptr,#string3 call send_string
call delay
mov dptr,#string4 call send_string call delay
call here1
send_string:
l1:clr a movc a,@a+dptr setb tr1 acall send inc dptr jz l2 sjmp l1
send:mov sbuf,a here:jnb ti,here clr ti ret l2:nop
DELAY:
MOV R1,#0FFH REP2:
MOV R2, #0FFH REP1:
NOP DJNZ R2, REP1 DJNZ R1, REP2 RET
string1 :db "AT+CMGS",0 string2 :db "mobile num",0 string3 :db "message",0 string4 :db 0x1a,0 string5 :db 0x0d,0
here1 :ajmp here1
end