fbpx

Interface GSM With Arm7

Description

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

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

AT Commands

AT SMS Commands

Hardware Required

  • GSM Module.
  • LPC21XX MicroController.

GSM Pinout

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

Circuit

Code

 #include <LPC21xx.H>
 void uart_transmit(unsigned char a);
 void uart_transmit1(unsigned char *a);
 void delay();
 int main()
 {
 VPBDIV=0X02;
 PINSEL0=0X00000005;
 U0LCR=0X83;
 U0DLL=0XC3;
 U0DLM=0X00;
 U0LCR=0X03;
 uart_transmit1("AT+CMGF=1\r");
 uart_transmit1("AT+CMGS");
 uart_transmit('"');
 uart_transmit1("mobile no");
 uart_transmit('"');
 uart_transmit1("\r");
 uart_transmit1("type your massage");
 uart_transmit1("26");// Ascii value for Ctrl+z
 delay();
 }
 void uart_transmit(unsigned char a)
 {
 U0THR=a;
 while(!(U0LSR & 0X20));
 }
 void uart_transmit1(unsigned char *a)
 {
 int i=0;
 while(a[i]!='\0')
 {
 U0THR=a[i];
 while(!(U0LSR & 0X20));
 i++;
 }
 }
 void delay()
 {
 int i,j;
 for(i=0;i<1000;i++);
 for(j=0;j<40;j++);
 } 

Leave a Reply

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