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
Too urgent to specify the appropriate toolset/architecture?
Too urgent to think of an appropriate title for the post?
Too urgent to study simple posting instructions:
www.danlhenry.com/.../keil_code.png
Too urgent to provide any comments in the code?
Too urgent to mention what error, exactly, you get?
Too urgent to search for any previous information on this very common topic:
www.keil.com/.../search.asp
"i get an error when i run this code!"
Urgent? Really? Yet you didn't even post the error.
www.catb.org/.../smart-questions.html www.catb.org/.../smart-questions.html
I, for one, refuse to help on unindented, uncommented code.
even those that may not refuse will be able to give better answers, were the code indented and commented.
Erik