Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to interface GSM/GPRS modem to a MCU?

Not open for further replies.


Newbie level 1
Sep 6, 2007
Reaction score
Trophy points
Activity points
mcu interface gprs

I have gsm/gprs modem and 89c52 microcontroller.
I have studied all set of AT n extended AT commands used for sending n receiving sms using hyperterminal at PC and was successful. Now i need to interface my gsm modem to 8052.I dont know how to start.

gprs with mcu

use 8051 micros or other types like AVR with MAX232 RS232 interface IC,to connect to GSM and GPS modules(you need 1 RS232 port for GSM and another one for GPS).

Use AT commands according to module datasheet(GSM), for GPS use NMEA0183 protocol.

you should send and receive data by micro using c code and the port driver written for its serial port.

gprs interface

Nowadays all microcontrollers come with internal serial port or USART. The GSM modem also communicates using serial port.

So the connection would be
8052(inbuilt USART) ----->GSM modem

Now, program the microcontroller to send all AT commands, through the serial port.
Remember, the GSM modem always echoes the data that it has received. So when you transmit a byte you should also recieve the same. For example If microcontroller transmits 'A' to GSM modem, immediately after that Gsm modem will transmit a 'A' back to microcontroller which it has to recieve it.

Your program should imitate all the commands that you have practised in Hyperterminal.

pls check the following link interface sim300 gprs modem with 8051 microcontroller

Embed4u » Code Library

unsigned char x=0,i,g[20];
unsigned char s1[9]="AT\r\n"; //send "AT" command modem will response
unsigned char s2[18]="AT+CIPMODE=0\r\n";//Select TCPIP Application mode
unsigned char s3[30]="AT+CLPORT=\"UDP\",\"3500\"\r\n"; //set Local Port
unsigned char s4[45]="AT+CIPCSGP=1,\"\"\r\n";//set csd or GPRS for Connection mode "ur GPRS provide address"
unsigned char s5[15]="AT+CSTT\r";//Start Task and set apn
unsigned char s6[15]="AT+CIICR\r";//Bring up wireless connection with GPRS or CSD
unsigned char s7[15]="AT+CIFSR\r"; // Get Local Ip Address "is assign for GPRS Modem"
code unsigned char s8[50]="AT+CIPSTART=\"UDP\",\"\",\"3500\"\r\n"; // Start Up TCP or Udp Connection
unsigned char s9[15]="AT+CIPSEND\r\n"; //Send Datat Through TCP or UDP Connection
unsigned char sd[46]="193308950\r\n"; // This is the Example Data Send through GPRS Modem

Can i simulate this using ISIS Proteus with the help of VIRTUAL TERMINAL.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to