Hello.. I am doing one project in which msg from GSM is read and it is Displayed to LCD. but microcontroller 89v51 and GSM900A does not communicate every time.. sometimes it successfully happen that AT command from microcontroller is send to GSM and message from any no. to GSM is Displayed to LCD.. bt it's not happening everytime.. i am not getting the solution, Please help.. I have connect 12V,2A supply to GSM.. Microcontroller Rx pin connected to Tx of GSM.. Microcontroller Tx pin Connected to Rx of GSM.. and Ground to Ground.. Please help me. what may be the problem? and how should i fix that.
Sounds like a software issue.
You need to wait and respond appropriately to the AT commands. If they indicate it is in the process of reading the SIM, or connecting to the network, you need to wait and retry as appropriate, rather that jamming AT commands and delaying arbitrarily.
Thanks Westonsupermare Pier.. bt i didn't get the issue.. My code works fine in proteus software.. bt in actual hardware there is problem of communication .. I have given delay after sending one AT command and i m also waiting for respone.. I have given 1sec delay . Should i give more delay?? and as u say how can i monitor the indication of reading process is going on???
Why?
If you're waiting for the response, then a delay is pointless - possibly even detrimental.
eg, what happens if the response comes during your delay ... ?
What he actually said was:
If [the responses from the module] indicate it is in the process of reading the SIM, or connecting to the network ..."
So you need to be reading the responses from the module, and acting accordingly.
The possible responses that the module might provide will be detailed in its documentation
SORRY.. i have send the AT command then i am waiting for respone. and my code is working fine in proteus software
View all questions in Keil forum