Sunday 22 November 2015

HOW TO INTERFACE GSM MODEM USING 8051 MICROCONTROLLER



           HOW TO INTERFACE  GSM MODEM USING 8051   MICROCONTROLLER
GSM is widely used mobile communication architecture used in most of the countries. This project demonstrates the interfacing of microcontroller AT89C51 with HyperTerminal and GSM module. It aims to familiarize with the syntax of AT Commands and their Information Response and Result Codes. The ASCII values of characters in the Information Response, Result Codes and their syntax can be monitored by an LED array. For the basic concepts, working and operation of AT commands and GSM module refer GSM/GPRS Module.

The project explains interfacing of the AT89C51 microcontroller with the GSM module and the HyperTerminal. HyperTerminal is a Windows application. The AT commands are sent by the HyperTerminal to the GSM module. The Information Response and/or Result Codes are received at the microcontroller and retransmitted to the HyperTerminal by the controller.
A GSM module has an RS232 interface for serial communication with an external peripheral. In this case, the transmit pin (Tx) of the computer’s Serial port is connected with the receive pin (Rx) of the GSM module’s RS-232 interface. The transmit pin (Tx) of the RS-232 of GSM module is connected to receive pin (Rx) of microcontroller’s serial transmission pin. And the serial transmit pin of the microcontroller is connected to the receive pin of the computer’s Serial port. 







CODING

void gsm()
{
UART_TX_STR("AT");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000);
UART_TX_STR("AT+CMGF=1");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000); 
UART_TX_STR("AT+CMGS=\"+919597821105\"");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000);
UART_TX_STR(" STUDENT 1 ABSENT"); // CONTENT SECTION
UART_TX(0x1a);

}

 void gsm1()
{
UART_TX_STR("AT");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000);
UART_TX_STR("AT+CMGF=1");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000); 
UART_TX_STR("AT+CMGS=\"+919597821105\"");
UART_TX(0x0d);UART_TX(0x0a);
delay(65000);delay(65000);delay(65000);
UART_TX_STR(" STUDENT 2 ABSENT");
UART_TX(0x1a);

}



























No comments:

Post a Comment