• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

interfacing GSM sim900 modem with 8051

my objective is to read message sent by some mobile number on the SIM connected to gsm module.. LCD connected to 8051

i did followed so many tutorials all of those are really confusing..
they just explain the setup and then skip to the code..
i just want a step by step explanation for programming for this objective
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
Whenever I need to do something I browse the internet... If you cannot find your first choice, widen your search..

Virtually everything you can come up with, has been done on the arduino.

http://tronixstuff.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/

Read through the tutorial.... Even though the programming language is C++ you will be able to follow...

The code is simply ascii text via an AT command set..... There is two tutorials....
 
Whenever I need to do something I browse the internet... If you cannot find your first choice, widen your search..

Virtually everything you can come up with, has been done on the arduino.

http://tronixstuff.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/

Read through the tutorial.... Even though the programming language is C++ you will be able to follow...

The code is simply ascii text via an AT command set..... There is two tutorials....

i have tried interfacing of gsm 900 module with Arduino uno
after reading some tutorial on the internet i found that sending "AT" as an AT command will give OK as a Result by the GSM Module

so i tried to send AT serially But I did not received any OK

heres my code


#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int led = 8;
// incoming serial byte
int inByte;
void setup()
{
lcd.begin(16, 2);
// initialize the led pin as an output.
pinMode(led, OUTPUT);
// start serial port at 9600 bps
Serial.begin(9600);
// wait for a while till the serial port is ready
delay(100);
// send the initial data once //
Serial.print(" AT");
}



}
void loop()
{
// if we get a valid byte, read analog ins:
if(Serial.available())
{
// get incoming byte:


inByte= Serial.read();
Serial.write(inByte);
lcd.print(inByte);
// send the same character back to serial port

// blink the LED once //
digitalWrite(led, LOW);
delay(100);
}
else
digitalWrite(led, HIGH);
while(1);
}


i did noticed that something is received as LED on pin 8 glows once
but why the recieved character cant be seened on lcd or either on the serial monitor screen????
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
Look in the datasheet at the coms setup... If hardware handshaking is required... I have had to switch off hardware handshaking and run with three wire connection...

Assuming that it isn't the problem, connect the GSM up to a PC and try all the commands first...
 

EE World Online Articles

Loading

 
Top