Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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?

Status
Not open for further replies.

labin

Newbie level 1
Joined
Sep 6, 2007
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
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

Hi,
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


#include<string.h>
#include<reg51.h>
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,\"airtelgprs.com\"\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\",\"219.64.118.125\",\"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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top