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.
So basically not checking the registration state on the network, or if the modem has reached a point where sending/receiving SMS is viable.
Assume Proteus is a poor reflection of reality, if you want your system to work in the real world you're going to have to observe what is actually happening rather that walk through a script that shows no depth of understanding.
What does AT+CREG? report?
In putty software AT+CREG? +CREG: 0,1
OK it is the response
Ok, that's great but what does the interaction log look like when you automate that on the 89V51, and the SMS fails to send?
sorry for late reply. i can not read the response from microcontroller... or i have written the program to read data from RX pin .. and display it to LCD. and i am using that program to read response of gsm.. bt in proteus it itdisplys nothing on lcd .. .. another try.. i wrote program in that after sending every AT commnad and reading the respone i m displaying on LCD that "AT+*** send".. and i join lcd between the tx and rx wires i.e microcontroller RX -LED- GSM TX and Microcontroller Tx -LED- GSM Rx to know that are signals is passing between them.. then also no command send.. to check the LED is wroking or not i set my multimeter in continoty mode and cheak the LCD between Microcontroller Rx-LED- GSM Tx .. LCD glows.. as soon as i glows led twice LCD displays "AT+** send". and after 2nd time i glow led twice LCD displays about 2nd command"AT+** send" after giving this type of pulses every command send one by one.. then also msg is not read..
what may be problem???
Sounds like you need to pick a system that's easier to debug or instrument.
Perhaps you should start by coding your application/automation so it runs on a PC via the COM port, so your app talks in place of Putty/Terminal.
This way C code running on the PC can using printf, files, time, etc to debug and better understand the interaction. Unless you can program proficiently on a PC you're going to have an uphill battle programming on an embedded target with difficult/limited internal visibility.
so u r saying instead of using proteus and the real hardware . i should interact the GSM with the PC using Serial communication. And not to use Putty!! & to understand completely the working of GSM connecting it with PC. Like how it responds and all using C. so please tell me any best software so that i can make communication of GSM nd PC and send commands by C CODE..
Is the Proteus approach working well for your programming/debugging style?
You'd use a Microsoft or GNU C compiler, the serial port access could be abstracted via a couple of subroutines so ostensibly the same core code could be run on the PC or 8051.
Get the automation and interaction figured out without the circus of a black box you have minimal internal visibility into.
Note that the uVision simulator can direct its simulated UART output to a COM port, and can receive input from a COM port into the simulation:
www.keil.com/.../uv4cl_sm_uartcommunication.htm
See: www.avrfreaks.net/.../2306116
And: www.avrfreaks.net/.../2417261