Discussion in "Project Doubts" started by    aanbarasan    Dec 6, 2013.
Fri Dec 06 2013, 09:11 pm
#1
I am doing project on SMS display in 16x2 LCD using 8051 and SIM300 GSM Modem.
On receiving SMS i got following response from GSM Modem.
+CMT: "+91987654321","shiva","13/12/03,11:01:25+22"
testmessage

For extracting the SMS text i used following code, but LCD is not displaying any text on receiving new SMS. On initialization of LCD i have put test string as "Welcome GSM" which is displayed correctly. Are there any need to look for Carriage Return and Line Feed from GSM response?...

while(value!='+'); 
while(value!='C'); 
while(value!='M'); 
while(value!='T'); 
while(value!=':');
while(value!='"'); 
while(value!='\n');
lcddata(value); //write value to LCD
Fri Dec 06 2013, 10:21 pm
#2
Where does "value" come from ?
We need to see the rest of your code, can you attach it, perhaps as a zip file.
 aanbarasan like this.
Sat Dec 07 2013, 10:43 am
#3
In this forum search for 8051 GSM project you will find many good information regarding interrupt based SMS extraction
 aanbarasan like this.
Sun Dec 08 2013, 07:11 pm
#4
@aanbarasan can you send the codes i am also doing a project as yours.... maybe we could help each other.
Tue Dec 10 2013, 09:13 pm
#5
Sorry for delayed reply..i have gone through some of the threads and found out the problem in my code..Initially i was directly displaying the LCD with strings from "Array1" which stores the SBUF values..Now i have added "Array2" for temporarily storing the and displaying contents from Array1 to Array2..
Initial code was:
while(value!='+');
while(value!='C');
while(value!='M');
while(value!='T');
while(value!=':');
while(value!='"');
while(value!='\n');
for(count=0;count<32;count++) 
	{ 
		msg[count]=Rx_data();
		if(msg[count]=='\r')
		break;

lcddata(value); //write value to LCD
} 

Modified part of code was:
for(k=0;k<32;k++)
{
	store[k]= msg[k];
	lcddata(store[k]);
}
Mon Dec 16 2013, 03:40 am
#6
for easier extraction you can put your message in a start and end character e.g. @Your message#
you can wait till you get @ after that read everything in buffer till you get #.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm
Zacharybus
Sun Apr 21 2024, 02:45 am