Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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.
 

7rots51

Advanced Member level 4
Joined
May 17, 2002
Messages
1,184
Helped
25
Reputation
50
Reaction score
12
Trophy points
1,318
Activity points
9,651
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.
 

kumeemb

Junior Member level 3
Joined
Nov 12, 2006
Messages
27
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,502
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.
 

raj123x_01

Newbie level 6
Joined
Dec 9, 2009
Messages
14
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Location
chennai
Activity points
1,368
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
 

mahesXtremeEngineering

Advanced Member level 4
Joined
Dec 17, 2011
Messages
103
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,832
Can i simulate this using ISIS Proteus with the help of VIRTUAL TERMINAL.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top