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.

SMS based notice board

Status
Not open for further replies.
I am trying to interface GSM Modem to microcontroller. Can anyone tell what all pins of RS 232 should I solder for successful communication establishment between the two?
 

Thanx to this forum for all help. Now 1 more question, which eprom shud i use in my project?
 

you should decide the size of data that you will send through sms to be displayed.. if you send full text message capacity also then you can have 24c64 as your eeprom.. if data is less then go for lower capacity.....
 

Thanx:) Wat is RTC memory? I came across it in a program which I downloaded from here.

---------- Post added 24-03-11 at 00:11 ---------- Previous post was 23-03-11 at 22:55 ----------

I am using 74ls164 in my circuitry. If I transmit 8 bits serially to its data pin, will it store the 8 bit bits together & then shifts the 8 bits to its next pin? OR
Will it receive a bit and shift to its next pin & then receive 2nd bit, then shift?
 

There is no problem with that.... rtc memory if i am not wrong are memory or registers which gives us hour, min, sec. date. day etc information.
these memory location are gilled with the initial starting time and then read when ever time time required...
 

Can anybody tell me what steps to be followed in stoing the sms, received on the GSM modem, to microcontroller or eprom memory?

---------- Post added at 08:08 ---------- Previous post was at 08:07 ----------

A complete steps please.....
 

What do u mean by "Echo Remove" in GSM? Is it always needed to include in program?
 

echo is the reading of typed characters repeatedly by gsm modem. If you give ATE0 then echo is disabled... ATE1 enables the echo... some times modem reads the reads the character multiple times...
 

Never connect Fbus directly to uC,phone is 3.3v logic and uC(when supply is 5 volt and usualy which is the case)is 5volt logic,you will result in damaging phone,use service serial cables or use potential divider resistors,there is a number of connection schematics on net,all the best
 

Never connect Fbus directly to uC,phone is 3.3v logic and uC(when supply is 5 volt and usualy which is the case)is 5volt logic,you will result in damaging phone,use service serial cables or use potential divider resistors,there is a number of connection schematics on net,all the best



for what is this answer???? are you making generic statement or answering the thread.....

i dont see the question of F-bus in this page...... use "quote" to answer any specific question.........
 

My circuit include microcontroller 8051, 1 (5*7)matrix led & GSM Modem connected with 3 pins (rxd, txd, gnd) to microcontroller.
In the program to receive message from Gsm modem to 8051, i av till now included
1- adjusting the baud rate with TMOD, TCON, SCON, PCON of8051 to 9600bps
2- Echo remove
3- Checcking the sim card
4- Receive the message with AT command from GSM to 8051
5- Display the stored msg in one variable to the matrix
6- Delete the message
I wanted the suggestion for wat sort of things to be included for the successful recieve of msg.
 

Actually 89v51rd2 microcontroller i m using.
 

Code:
this is the logic

[code]


/*  Header file declaration  */
#include<pins.h>
#include<string.h>

/* variable declarations */
extern unsigned char pass[15];


void main()
{
	unsigned char code gsm_cmd5[]="AT+CMGD=4";
	
	uart_gps();			//To initalise the uart
	gsm_init();			//To initalise the GSM 
	   gsmcmdsend(gsm_cmd5);		 //clear the SIM memory
               while(Rx_data()!='O');
               while(Rx_data()!='K');		  //waiting for the modem response 
	           lcd_cmdwrt(0x01);			 //clear the LCD
               lcd_datawrt("MSG DELETED..");//To print message on lcd	
	}	
}

/************************************************************************************
Function Name : enter()
Return value : None
Purpose of this function: To send carrage return and line feed to modem
************************************************************************************/
void enter(void)
{
SBUF=0x0A;//line feed
while(TI==0);
TI=0;
SBUF=0x0D;//carriage return
while(TI==0);
TI=0;

}
/************************************************************************************
Function Name : gsmcmdsend()
Arguments : cmd to be transmit to modem
Return value : None
Purpose of this function: To transmit the cmd to modem
/************************************************************************************/
void gsmcmdsend(unsigned char *cmd)
{
unsigned char i;
for(i=0;*cmd!='\0';i++)
{
SBUF=*cmd;
while(TI==0); //COMMENTED WHILE
TI=0;
cmd++;
}
delay(1);
enter();
}
/************************************************************************************
Function Name : gsm_init()
Return value : None
Purpose of this function: To initialising the modem
/************************************************************************************/
void gsm_init(void)
{
unsigned char code gsm_cmd1[]="AT";
unsigned char code gsm_cmd2[]="ATE0";
unsigned char code gsm_cmd3[]="AT+CMGF=1";
unsigned char code gsm_cmd4[]="AT+IPR=4800";
unsigned char code gsm_cmd5[]="AT&W";
unsigned char code gsm_cmd6[]="AT+CNMI=2,2,0,0,0";
//checking for AT commands
gsmcmdsend(gsm_cmd1);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
lcd_datawrt(" command 1 OK");
delay(20);
lcd_cmdwrt(0x01);
//removing echo char
gsmcmdsend(gsm_cmd2);
while(Rx_data()=='O');
while(Rx_data()=='K');//Waiting for modem response
lcd_datawrt(" command 1 OK");
delay(20);
lcd_cmdwrt(0x01);
//setting the text command
gsmcmdsend(gsm_cmd3);
while(Rx_data()!='O');
while(Rx_data()!='K'); //Waiting for modem response
lcd_datawrt(" command 1 OK");
delay(1);
lcd_cmdwrt(0x01);
//setting the Baudrate command
gsmcmdsend(gsm_cmd4);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
lcd_datawrt(" command 1 OK");
delay(1);
lcd_cmdwrt(0x01);
//setting the save to modem EEPROM command
gsmcmdsend(gsm_cmd5);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
lcd_datawrt(" command 1 OK");
delay(1);
lcd_cmdwrt(0x01);
//to enable the sms strchr (buf, 't')
gsmcmdsend(gsm_cmd6);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
lcd_datawrt("command 1 OK");
delay(1);
lcd_cmdwrt(0x01);

}


/************************************************************************************
Function Name : Recv_frm_mob()
Return value : None
Purpose of this function: To read phone number and message from modem
************************************************************************************/

void Recv_frm_mob()
{
unsigned char count;
while((Rx_data())!=':');
while((Rx_data())!='+'); //wait till " receive
for(count=0;count<12;count++) // then store 12 digit phone number including
{
phone[count]=Rx_data();
}
phone[count]='\0';
while(Rx_data()!='\n'); //wait till next line
for(count=0;count<3;count++) // store message
{
pass[count]=Rx_data();
}
pass[count]='\0'; //Add null char to string to indicate end of string
lcd_cmdwrt(0xc0);
lcd_datawrt("MSG REC ...");
delay(2);
lcd_cmdwrt(0x01);

}

[/code]
 

Sir, one hardware related question: Is it correct to connect only (Rxd,Txd & gnd) pins directly between Gsm Modem & microcontroller via RS232 connector? Directly in the sense without using diode or transister? I am doing software flow contol for serial communication.
 

you should have a total of 2 max232 IC one at modem end and other at controller end. so tx will go to tx or rx and rx will go to rx or tx depending on the type of the cable is straight or cross.....

dont use flow control for this purpose.. no additional circuit is needed ...............
 

check the code and use keil for this... the code may be more than 4k so you may need full version to see the compilation..

you can trim the code to meet your requirement

I used keil Uvision3 two years back. Evaluation version limit at that time was 32KB. I used LPC2378. But I am not aware about 8051 code size limit.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top