Im just a beginer in programing and in making circuits... im currently doing my project... i used PIC16F877A and a GSM benqM23... the problem is the replying of my device... my project are compost of different sensors and when it detect it will send message to the given number and also you can send message to the device and it will reply to you... the sending part is ok but the reply part is not working... when i seperate the program for the reply it works well but when i combined it with the program of my sensor and sending it doesnt work... i dont know the problem if it is my program or my device... some one pls help me... here is my program...
my current program----> the reply part is not working
Hi...may i ask first what's the purpose of the a0...a3 variables?
am I understanding correctly that your program waits for "SM" from the modem for 5 seconds if not goes to main2? then if the modem does reply with "SM" yo go directly to reply...
hellow master_olan... the purpose of the a0...a3 is just to declared it as port.a0...port.a5 and etc... because my input for my sensor is port a,b,c,e...
yes you are right about the purpose of the program it is to waits for "SM" from the modem for 5 seconds if not it goes to main2... then if the modem does reply with "SM" it go directly to reply.
The replying program only is working well... but when i put it in the program of sensors and send it doesnt work... i dont know the problem why is not working... may be the declaration of
Well I programmed a PIC16f877a to a GSM modem for a friend some months ago... I also had problems with receiving data from Modem to PIC and added a buffer (74LS125)... It worked after that... also try changing this:
DEFINE HSER_TXSTA 20h
to this:
DEFINE HSER_TXSTA 24h
the manual says 24h works with high speed baud rates.. It's what I did with mine...
Last edited by master_olan; - 4th March 2011 at 02:44.
Hellow master_olan thanks again for your help and reply... sorry for my noob question but where i should put the buffer... sorry im just a beginer in making circuits... it would be a great help if you can post a schematic diagram of your MUC with buffer... and thanks a lot
Well... just connect GSM Mod. TX to input of buffer then output of buffer to RX of PIC... Just like this...
If that doesn't work i suggest you spy in your system by using the PCs hyperterminal.. That way you will know if the Module or the PIC does respond to the commands...
hi master_olan
I Did all the things you said but it did not work... i also check it in pc but still the reply did not work... any suggestion or solution? thank you for your help and effort
Bookmarks