Discussion in "Embedded GSM Development" started by    Alvanbert    Feb 11, 2012.
Sat Mar 10 2012, 11:59 am
#41
The reason for missing the 2nd and 4th lines are (my opinion) the 20x4 LCD adress ranges are different.

like this :

0,1,2...........17,18,19
64,65,.........81,82,83
20,21,.........37,38,39
84,85,.....101,102,103

After writing to position 19, you must jumpt0 64th position, so u need to command the LCD
to reposition to 64 and after writing to position 83 , u need to jump to 20th position.

So u can make a function for this... Hope i am not wrong



[ Edited Sat Mar 10 2012, 12:03 pm ]
Mon Mar 12 2012, 08:11 am
#42
you're right firoz.. Alvanbert needs to write a function that takes care of printing string and wrapping them to new line when they reaches the end of first line or say 20 characters.
Mon Mar 12 2012, 04:56 pm
#43
Yes Ajay. Am really trying to figure out how to do that. Bt need ur help on this as well
Mon Mar 12 2012, 09:19 pm
#44
u can take 4 varialbles as LINE1 , LINE2, LINE3 and LINE4 and save ur message in them with 20 charactes each.
supose ur sms is in SMS_INFO character:

for(int i=0;i<20;i++)
    LINE1[i]=SMS_INFO[i];

for(int i=0,j=20;i<20;i++,j++)
    LINE2[i]=SMS_INFO[j];

for(int i=0,j=40;i<20;i++,j++)
    LINE3[i]=SMS_INFO[j];

for(int i=0,j=60;i<20;i++,j++)
    LINE4[i]=SMS_INFO[j];


then u can write a small routine that wil send all 4 variables to 4 lines.

LCD_4line(){
LCD_Add(0x00);
for(int i=0;i<20;i++)
      LCD_data(LINE1[i]);

LCD_Add(0x64);
for(int i=0;i<20;i++)
      LCD_data(LINE2[i]);

LCD_Add(0x20);
for(int i=0;i<20;i++)
      LCD_data(LINE3[i]);

LCD_Add(0x84);
for(int i=0;i<20;i++)
      LCD_data(LINE4[i]);
}

If i were to write , then i would do something as this. May be there are easy ways, but am not sure


[ Edited Mon Mar 12 2012, 09:41 pm ]
Mon Mar 12 2012, 09:40 pm
#45
Y do i write codes in long ways

hehe this is moe simple
LCD_4line()
{
LCD_Add(0x00);
for(int i=0;i<20;i++)
      LCD_data(SMS_info[i]);

LCD_Add(0x64);
for(int i=20;i<40;i++)
      LCD_data(SMS_info[i]);

LCD_Add(0x20);
for(int i=40;i<60;i++)
      LCD_data(SMS_info[i]);

LCD_Add(0x84);
for(int i=60;i<80;i++)
      LCD_data(SMS_info[i]);
}


Some one Give proper way here , else i might spam here with all sorts of stupid coding of mine


[ Edited Mon Mar 12 2012, 09:53 pm ]
Tue Mar 20 2012, 04:14 am
#46
Thanks Alot firoz3321, your code worked just fine for me. Now i can display the whole message on the four lcd lines.

i however still have some issues. I would love the message to start from the last point on the last line and then scroll from down upwards both horizontally to the left and upwards with each word following each other. Is it possible.

Secondly, can someone write me a function to delete sms from sim memory after a specified period of time(e.g After 5 Hours). THANK YOU ALL FOR BEING HELPFUL.
Wed Mar 21 2012, 11:56 am
#47
Great!. Feel free to share with us...
Wed Mar 21 2012, 08:37 pm
#48
what is the best way i can use to filter my messages as they are outputting to the lcd screen. i want it to only display the content between the"#" symbol and another "#" symbol at the end. i dont want it to display anything else.

so that only messages sent with # at the beginning and at the end can be displayed. pliz help
Sun Mar 25 2012, 11:08 pm
#49
@ Alvanbert
first step is to extract relevant message from sms
after that u has to check first # then display whole message till the 2nd #
i think when u extract message from sms
that will be ur real message that u want to display
i think no need of two #
Mon Mar 26 2012, 11:52 am
#50
@Majoka how can i do this without using the #'s because my main aim is to only display the sent sms. I dnt wnt the display to include the date, time.... I wnt only the msg as sent by the user. Thanx

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am
Astorne
Tue Apr 16 2024, 08:52 pm