Hello, I could successfully interfaced GSM modem to PC. now i want to interface the same modem to AT89C51. so can any one please suggest any site where i will get a sample of a program?? actually i referred some sites but i got all C programs and i want to do programming in assembly. because rest of my program is in assembly.so if available please suggest me some sites where i will find programs in "assembly language"
also, In many circuits i saw use of LCD to display responses from modem. but in my case i don't want to use LCD for this purpose. my doubt is In any case we have to input those responses from GSM modem to microcontroller,otherwise communication won't be possible right? please correct me if i am wrong.
thank you :)
Serial communication is serial communication.
The UART code don't care if there is a modem or something else connected on the outside.
You claim you have found C programs for modem communication - the modem don't care if the AT commands are sent using a C program or an assembler program. So what issues do you see with using the same AT commands these C program uses, but with your assembler code?
Hello sir,
ORG 0000H MOV TMOD,#20H MOV TH1,#-3 MOV SCON,#50H SETB TR1 OK1: MOV DPTR,#0090H ACALL ACCESS MOV DPTR,#00A0H ACALL ACCESS MOV DPTR,#00b0H ACALL ACCESS MOV DPTR,#00C0H ACALL ACCESS MOV DPTR,#00d0H ACALL ACCESS ACCESS: CLR A MOVC A,@A+DPTR ACALL SEND INC DPTR CLR A MOVC A,@A+DPTR ACALL SEND RET SEND: MOV SBUF,A HERE: JNB T1,HERE CLR TI RET ORG 0090H MSG1: DB "AT" ORG 00A0H MSG2: DB "AT+CMGF=1" ORG 00b0H MSG3: DB "AT+CMGS=" ORG 00C0H MSG4: DB "34" // FOR " ORG 00d0H MSG5: DB "1234567891" // MOBILE NUMBER ORG 00E0H MSG6: DB "34" //FOR " ORG 00F0H MSG7: DB "HI" // MESSAGE TO BE SENT ORG 0100H MSG8: DB "26" // ctrl+z END
This is what i could do by referring a book. Please correct me wherever i am wrong.
how to put AT+CMGS="XXXX" ? this is actual AT command. "AT+CMGS="XXXX"" this will also give an error.. OR whatever i have done is correct or its wrong?
Also i am confused in lines of MSG4, MSG6, MSG8. here i have used 34,34,26 as ASCII codes of "," & CTRL+Z respectively.(www.bbdsoft.com/ascii.html referred for ASCII codes) we use DB "xx" to pass ASCII value of the parameter right? so whether whatever i have done is correct or its wrong? -- Best regards, Amit Kulkarni
"If you can't code it yourself downloaded code is worthless"
you REALLY need to study a) "the bible" www.8052.com/.../120112 b) Keil re memory 'sections' (which you will not understand unless you have understood "the bible" first)
I am not in the habit of helping people cheat om theit exam, thus the pointers above which should lead you to figure out the problem yourself.
If, however, the "institute of learning" you attend encourage cheating to improve the graduation rates, ask your teacher for a link.
Erik
Why you being so rude?? well, I am not cheating anyone here. I have prepared this code myself. I am not asking for any ready made program right? I complied this program in KEIL, and found no errors, but this doesn't mean that my program is logically correct too. That's why i asked here. I had referred some book in which one program was given which sends 2 strings serially. According to that program, i prepared this one.
so please. i am just asking for a help. Point to point discussion can solve my problem i think.
Why you being so rude??
If you consider it 'rude' to give you two references that will enable you to fix your problem, we disagree on the meaning of the word.
I have prepared this code myself. ... I had referred some book in which one program was given which sends 2 strings serially.
that is contradictory.
if you have copied code from a book, that is NOT the same as coding it yourself.
as said many times "if you can not code it yourslf copying code is worthless"
again, if you study the two references I gave you you will find the basic mistake.
okay i am sorry. i took it in a wrong way.. Thank you for those 2 references. i did not understand by 'Keil re memory 'sections''. can you please explain little more?
i had just referred that book. i understood that code and then i prepared my own code and posted here.
i did not understand by 'Keil re memory 'sections'' DATA, IDATA, XDATA, BDATA, PDATA