fbpx

Interface GSM With 8051

GSM stands for Global System for Mobile communication. It is a digital cellular technology used for transmitting voice and data services. GSM operate on mobile communication band 900mhz and 1800mhz,it operate on 850mhz and 1900mhz. GSM use narrowband Time Division Multiple Access (TDMA) technique for transmitting signals.

  • GSM has different configuration :
    1. Sim300.
    2. Sim900.
    3. Sim900A.
  • Sim300 is triband GSM mode it can operate at three frequency 900mhz,1800mhz,1900mhz band.
  • Sim900 is a quadband GSM mode it can operate at four frequency frequency 850mhz, 900mhz, 1800mhz,1900mhz.
  • Sim900a is a dual band GSM mode it can operate at two frequency 900mhz,1800mhz.
  • AT commands use to control the modem.
  • In GSM mode for each functions like make call and to send message, to access internet ,there is set of AT commands is used to activate the function.

AT Commands

AT SMS Commands

Hardware Required

  • Gsm Modulee.
  • 8051 MicroController.

Gsm Pinout

  • Vin= +5V.
  • Tx= Rx of Microcontroller.
  • Rx= Tx of Microcontroller.
  • Gnd= Ground.

Circuit

Virtual Circuit

Code

 #include <REGX51.H>
 void uart_int()
 {
 TMOD=0X20;
 TH1=0XFD;
 TR1=1;
 SCON=0X50;
 }
 void transmit(unsigned char*a)
 {
 int i;
 while(a[i]!='\0')
 {
 SBUF=a[i];
 while(TI==0);
 TI=0;
 }
 }
 void transmit1(unsigned char b)
 {
 SBUF=b;
 while(TI==0);
 }
 void main()
 {
 uart_int();
 transmit("AT+CMGF=1\r");
 transmit("AT+CMGS=");
 transmit1('"');
 transmit("mobile number");
 transmit1('"');
 transmit1('\r');
 transmit("ENTER YOUR SMS TEXT");
 transmit1("26");
 } 

Leave a Reply

Your email address will not be published. Required fields are marked *