Discussion in "Embedded GSM Development" started by    Alvanbert    Feb 10, 2012.
Mon Mar 26 2012, 09:49 PM
#51
I believe Alvanber is right.. adding a prefix and postfix to sms message makes it easy to read and extract it from modem. you can easily look for a special character to start storing and stop storing. saves a lot of buffer space for you.

Please share your work with everyone so its helpful for them to use it.
Mon Mar 26 2012, 10:16 PM
#52
@Ajay Below is the code am using to filter the message. The problem is it filters the message required and displays it which is ok. but still in case the lcd characters arent filled, it uses the remaining potion to diplay the whole message again..i.e with date and time. i want it to display only and only the filtered message so that if the message doesnt fill the lcd screen, the remaining part remains blank. Thanks

unsigned char *temp;
temp=msg;
do
msg++;
while(*msg!='#');
msg++;
do
*temp++=*msg++;
while(*msg!='#');
*temp='\0';
Tue Mar 27 2012, 09:31 AM
#53
make two functions first extract the message body from data time etc
after that if u want to filer out the message more than make another function

void read_text( unsigned char *msg,unsigned char *no)   // this function decode the message recieved from modem
{
/*
modem send message in this format
+CMGR: "REC READ" ,"+923335946231","10/10/23,14:29:33+04"
hello

OK
*/

unsigned char *temp;
temp=msg;
do
msg++;
while(*msg!=',');         //  reaching at no
msg++;                    // doing thid because service centre message not start from +
msg++;   
do
*no++=*msg++;
while(*msg!='"');         // reaching at time
*no='\0';
do
msg++;
while(*msg!='\n');
msg++;
do
*temp++=*msg++;
while(*msg!='\r');       // reaching at end of message
*temp='\0';
}


now no has user number
now msg has "hello" according to my example
now if u want to filter out more than make a 2nd function as u make above
Thu Mar 29 2012, 07:07 PM
#54
@Majoka i have realised my problem only comes about when i use lcd_data() function to print the message string but if i use the lcd_str() function its okay with the code u gave me.

The problem with using lcd_str(), i cant control where to display part of the string as i would have done with lcd_data() function because with the lcd_data () function i can use a for loop and display string through e.g lcd_data(msg1[i]).


Mon Dec 12 2016, 09:59 PM
#55
please what does this mean in the code in this forum
1 #define LCD_EN 0X80
2. #define LCD_RS 0X20
thanks
Tue Dec 13 2016, 08:55 AM
#56
#define LCD_EN 0X80
LCD enable pin is at bit 7 of whatever port it is connected to. e.g. If LCD is connected to P1 then as per macro LCD_EN is connected on P1.7

#define LCD_RS 0X20
similar to LCD en, LCD register select (RS) is connected on bit 5 of port. e.g. P1.5 if port P1.
 rodrider like this.

Get Social

Information

Powered by e107 Forum System

Conversation

Thu May 25 2017, 05:25 AM
Monir Hossain
Can i change the 7-Segment are common pin ? And how to?
Mon May 08 2017, 12:45 PM
ivan muvunyi
please can you send me wiring diagram for automatic control of 3 phase induction motor for production of maize flour
Wed May 03 2017, 08:39 PM
imran qureshi
hello friend
Sun Apr 30 2017, 05:49 AM
Lijin G Varghese
Can u send me the circuit diagram for Program to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD
Fri Apr 28 2017, 03:47 PM
SANDEEP T S
I need pcb wizard 3.5 version kindly send valid link of yours
ExperimenterUK
Mon Apr 17 2017, 11:56 PM
Sorry..We had a problem with registration.Confirmation emails were not sent.Please re-register
Thu Apr 13 2017, 07:29 PM
Piyush Aughad
I want circuit & program for radar detection using Microcontroller 8051
Tue Apr 11 2017, 03:27 AM
Shabbir Ahmed
Hi Ajay ....hope you and your family all will be fine are you working on andriod aplications if yes then plz reply me
Sun Apr 09 2017, 06:33 PM
ATHULYA NAIR
Dear Sir, I need to know what are the complexity for programming in 8051 Microcontroller for three phase inverter?
Sun Apr 09 2017, 06:32 PM
ATHULYA NAIR
Dear Sir,

Downloads

Comments

Gaurav9527
Tue May 23 2017, 10:24 AM
rapushh
Tue May 23 2017, 10:22 AM
lubnakhan
Sat May 20 2017, 10:23 AM
Utsavi
Wed May 17 2017, 10:35 AM
Samimash
Tue May 16 2017, 01:15 PM
gangusa
Mon May 15 2017, 04:34 AM
raghuzala
Sun May 14 2017, 02:32 PM
Prakashlimbachiya
Sat May 13 2017, 07:34 AM

Online

Guests: 78, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37829
Newest member: Gaurav9527
Forum Activity
yogesh puri Avatar
Posted By yogesh puri
Thu May 25 2017, 10:33 PM
dear sirif i simulate the above program in keil it...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 24 2017, 09:42 PM
If you run the display in 4 bit mode and share pin...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 24 2017, 09:27 PM
Please post your code and Proteus file.
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 24 2017, 09:23 PM
i am unable to simulate following code in protous...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed May 24 2017, 05:01 AM
Duplicate post of http://www.8051projects.net/t651...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed May 24 2017, 05:00 AM
All I can say looking at the post is "insufficient...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed May 24 2017, 04:58 AM
(the 3 motorsteppers need to move independently, b...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed May 24 2017, 04:55 AM
I am never sure with Proteus keypad. They always h...
yogesh puri Avatar
Posted By yogesh puri
Tue May 23 2017, 10:36 PM
i am unable to simulate following code in protous....
yogesh puri Avatar
Posted By yogesh puri
Tue May 23 2017, 10:34 PM
i am unable to simulate following code in protous...