[moved] Bascom compiler
Wed Apr 09 2008, 06:08 pm
below is the program i am using to send mesg with the GSM modem..but the problem is that the GSM does respond to the same...i have used max232 to convert the tx and rx outputs to rs 232 format...i can receive the same on the hyperterminal of my computer....can you please tell me wat cud be wrong...thanks
$regfile = "89s8252.dat" $crystal = 11059200 $baud = 9600 Print "AT"; Print Chr(13) Print "AT+CSCA=" + 919892051914 ",145 "; Print Chr(13) Waitms 3000 Print "AT+CMGF=1"; Print Chr(13) Waitms 3000 Print "AT+CSMP=17,168,0,0"; Print Chr(13) Waitms 3000 Print "AT+CMGS=" + 919821048857 ""; Print Chr(13) Print "hello"; Print Chr(13) Print Chr(26)
[ Edited Wed Apr 09 2008, 10:01 pm ]
Wed Apr 09 2008, 09:51 pm
do one thing. Connect your hardware to your pc and see are you getting everything correct or not.
Don't forget to add
print chr(10)
after sending character 13. But thats only while checking on pc.
Don't forget to add
print chr(10)
after sending character 13. But thats only while checking on pc.
Thu Apr 10 2008, 10:31 am
wat does the chr(10) do?? apart from that i have tried that and i receive everything correctly in the hyperterminal except maybe the spaces in the between the '+' and the number following it.... shld i try to increase the delay for the modem to respond...
Thu Apr 10 2008, 10:04 pm
actually the reason i told you to test on hyper terminal, i think the mobile number should also come inside double quotes. I'm not sure i'm correct but i want you to try out.
Sat Apr 12 2008, 02:45 pm
i tried it with the hyperterminal...and you are right the mobile number also comes inside double qoutes....but even after making the changes..i am not able to communicate wid the modem using microcontroller....does the modem need any sort of hardware initialization...
Sun Apr 13 2008, 06:39 am
You still send a lot of unwanted Carriage return and Line feed
waitms as a range of 1-255; use wait or waitmse if you need long delay
the program MUST terminate with end
At least the manual must be read.
Regards
waitms as a range of 1-255; use wait or waitmse if you need long delay
the program MUST terminate with end
At least the manual must be read.
Regards
' $regfile = "89s8252.dat" $crystal = 11059200 $baud = 9600 Print "AT"; Print Chr(13); waitmse 3000 Print "AT+CSCA=" + 919892051914 ",145 "; Print Chr(13); Waitmse 3000 Print "AT+CMGF=1"; Print Chr(13); Waitmse 3000 Print "AT+CSMP=17,168,0,0"; Print Chr(13); Waitmse 3000 Print "AT+CMGS=" + 919821048857 ""; Print Chr(13); waitmse 3000 Print "hello"; Print Chr(13); Print Chr(26); waitmse 3000 end
Sun Apr 13 2008, 09:17 am
The above code wont work and i have tried a lot. I got code from the following website
www.8051projects.info its work fine
www.8051projects.info its work fine
Sub Sendsms Disable Serial Set Scon.1 Print "AT+CMGS=" ; Chr(34) ; "+919821048857" ; Chr(34) Reset Scon.1 Enable Serial Wait 2 Disable Serial Set Scon.1 Print "Hello from Microcontroller" ; Chr(26) '26--> "^Z" Reset Scon.1 Enable Serial End Sub
[ Edited Sun Apr 13 2008, 09:21 am ]
Mon Apr 14 2008, 06:34 am
does the above code work fine with 89c52...does it need other AT commands like setting up of mesg center no etc...i am attaching the manual for my gsm module..can you please look at it and let me know...
how to connect the tx and rx pins of the uc to the db9 serial cable using max232...i have a sample circuit but not sure if this will work..and wat do i have to do abt the rts and cts pins on the connector...
how to connect the tx and rx pins of the uc to the db9 serial cable using max232...i have a sample circuit but not sure if this will work..and wat do i have to do abt the rts and cts pins on the connector...
[ Edited Mon Apr 14 2008, 03:10 pm ]
Powered by e107 Forum System