How to interface GSM Module with PIC18F4550 Microcontroller
Summary
The Global System for Mobile (GSM) communication is the Second Generation of mobile technology. Although the world is moving towards Third and Fourth generation but GSM has been the most successful and widespread technology in the communication sector. GSM technology paved a new way for mobile communication.
This project explains the interfacing of a GSM Module with a PIC microcontroller. It also covers a way to dial a particular GSM mobile number as well as send a message to it using AT Commands with the help of PIC18F4550.
Description
As explained earlier (refer GSM interfacing with 8051), a line converter MAX232 is employed to convert the RS232 logic data of GSM Module to TTL logic so that it can be processed by the microcontroller. In this project, instead of RS232 logic data, TTL logic output has been taken and thus PIC18F4550 has been directly connected with GSM Modem without any line converter in between. The following diagram shows the TTL input and output of GSM modem used.
Objectives:
1. Test the simple AT Command.
2. Find out the IMEI number of the GSM Modem.
3. Connect a call to a GSM mobile number (Dial a number).
4. Send a text message to a mobile number.
The provision of these four operations has been provided by means of four tactile switches. Each switch corresponds to each of the above functions. AT Commands used to perform the above operations have been given below along with their output. (For complete list of AT Commands supported by GSM Modem, refer the list in tutorial on AT Commands.
1. Test the simple AT Command.
AT (Enter)
OK
2. Find out the IMEI number of the GSM modem.
AT+GSN (Enter)
xxxxxxxxxxxxxxx(15- digit unique IMEI number)
OK
3. Dial a number.
ATDXXXXXXXXXX; (Enter) (10-digit mobile number)
OK
4. Send a text message.
AT+CMGS= “XXXXXXXXXX” (Enter) (10-digit mobile number)
>Hello ^z (Enter message after ‘>’ and use Ctrl+z to terminate the message)
The program for the controller is written in a manner so that when a particular switch is pressed, its corresponding command will be called to execute. LCD is also interfaced with PIC18F4550 to display the results. The circuit connections of GSM module, LCD and switches with controller are shown in the circuit diagram tab. Check the video for the execution of this project.
Programming Steps:
1. Store all AT commands into strings.
2. Set the baud rate of microcontroller to 9600bps.
4. Enable the global and peripheral interrupt bits of the INTCON register.
5. Configure Port D as input port.
6. Use if condition to detect the pressed switch.
7. As switch is pressed, process the corresponding AT command and transmit via USART.
8. Reception interrupt method is used to store the GSM output data into an array.
Video
Code
This Code is only visible to Registered users. Please Login/Register
Components
|
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments... |
|
PIC18F4550 PIC18F4550 is an 8-bit microcontroller of PIC18 family. PIC18F family is based on 16-bit instruction set architecture. PIC18F4550 consists of 32 KB flash memory, 2 KB SRAM... |
- 48953 reads
