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.

gsm interfacing with mcu

Status
Not open for further replies.

abhishek dhiman

Newbie level 5
Joined
Feb 1, 2013
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
help.JPGguys i need help.....how to connect gsm module with 89c51.

means do i should connect 89c51 via max232 with gsm module
or
should i directly connect Rxd and Txd pin og mcu to Txd and Rxd pin of gsm module
 
Last edited:

hey abhishek.. r u using any other pins besides RX and TX? coz I'm trying to interface a GSM module with LPC2148 & its just not working..
Pls check my latest thread..
 

hey abhishek.. r u using any other pins besides RX and TX? coz I'm trying to interface a GSM module with LPC2148 & its just not working..
Pls check my latest thread..

i am using only Gnd,Rxd n Txd pins... even i was able send sms twice...but i forgot pin configuration of that time.......that was just hit trial...from then onwards im still struggling :???:
 

Oh man.. my code runs fine withot the GSM module connected.. But wen I connect the GSM it just hangs.. wonder wots wrong?
 

same here code working in hyperterminal.......tested n verified,,,,,,,,,but now nothing....... can u help me,,,,,,,,, like i am using 8051..... it is ttl compatible,,,,,,there r three o/p in gsm module that are ttl o/p(Rxd, Txd n Gnd).
to connect it with 8051 should i use ttl pins or 2nd or 3rd pin of db9 connector.

luk at image which i have attached above.........plz help if u can
 

thanks irfan.......i was really confused here,,,,,,,,thanks alot :p



@irfan ahmad bro its again not working..... mcu is sending proper response to hyperterminal but not sending sms via gsm module....................

plz chk out my code

#include<stdio.h>
#include<reg51.h>

//Function to initialize RS232 Serial Port
void serial_init()
{
SCON=0x50; //setup for 8-bit data
TMOD=0x20; //setup timer 1 for auto-reload
TL1=0xFd; //setup for 9600 baud
TH1=0xfd; //Baud Rate 9600
TR1=1;
}



//This function displays a null-terminated string on the RS232 port
void send_serial(unsigned char *s)
{
while(*s!=0x0)
{
SBUF=*s;
while(!TI)
{
}
TI=0;
s++;
}
}

int i;
//Start of Main Program
void delay_ms(unsigned int);


main()
{
delay_ms(400);
serial_init(); //Initialize Serial port.
for(i=1;i<=2;i++)
{delay_ms(400);
send_serial("AT\r\n");
delay_ms(400);
send_serial("AT+CMGF=1\r\n");
delay_ms(400);
send_serial("AT+CMGS=\"7696240117\"\r\n");//my mob number here
delay_ms(400);
send_serial("gsm working\r\n");
delay_ms(400);
send_serial("0x1A\r\n");
delay_ms(400);delay_ms(400);delay_ms(400);delay_ms(400);


//send_serial("\"com test\"\r\n");
}
}


//generates delay in milli seconds
void delay_ms(unsigned int i)
{
unsigned int j;
while(i-->0)
{
for(j=0;j<500;j++)
{
;
}
}
}

if possible kindly test it......................
waiting 4 ur reply
 

TRY THIS.

thanks irfan,,,,,this was really useful to me.... as per this post..... i have to connect 3rd pin of db9 to 11pin of mcu n 2nd pin of mcu to 10th pin......am i right????????????

- - - Updated - - -

can anybody tell gsm module is ttl compatible??????????????? bcz if it ttl compatible we do nt require max232 to connect it with gsm module.............
 

are you using sim900??????

you do not need max232 to communicate mcu with gsm. i already have mentioned it .
this is ttl compatable.
apply 4.2v to gsm.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top