Discussion in "Embedded GSM Development" started by    Alvanbert    Feb 10, 2012.
Sat Mar 10 2012, 01:29 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, 01:33 AM ]
Sun Mar 11 2012, 10:41 PM
#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, 07:26 AM
#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, 11:49 AM
#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, 12:11 PM ]
Mon Mar 12 2012, 12:10 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, 12:23 PM ]
Mon Mar 19 2012, 06:44 PM
#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, 02:26 AM
#47
Great!. Feel free to share with us...
Wed Mar 21 2012, 11:07 AM
#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, 01:38 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, 02:22 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

Conversation

ExperimenterUK
Sat Sep 13 2014, 12:34 PM
jaimin1212,Pimpalkhare Create a thread for your question
jaimin1212
Sat Sep 13 2014, 02:35 AM
i want to make self balancing robot using MPU6050 using atmega8.. please help to get data of gyro and accelerometer from this sensor through atmega8.
Thu Sep 11 2014, 09:00 AM
Sunil Pimpalkhare
Hello sir, I am trying to make Wearfin project https://www.youtube.com/watch?v=iZ6PVBvQf-g so can u help me in teaching how to built the program???
Thu Sep 11 2014, 02:21 AM
hariom panday
plz hlp me in my project
iec.naga
Tue Sep 09 2014, 01:19 AM
spi
Mon Sep 08 2014, 08:14 AM
fameem
water changing in fish tank automatically using microcontoller with timer. send idea to me
dexter_a
Sat Sep 06 2014, 11:09 AM
hello guys
Sat Sep 06 2014, 10:10 AM
munaxa
plx guide me
Sat Sep 06 2014, 10:09 AM
munaxa
hi i want to buy plx guie me
ajay_bhargav
Sat Sep 06 2014, 03:10 AM
@Ben, Its hard to undrstand the context like this. If you can post in forum with some example code we might answer you better.

Downloads

Comments

deepbhadani
Fri Sep 19 2014, 01:08 PM
desaiakshay92
Fri Sep 19 2014, 12:45 AM
Fiddu
Thu Sep 18 2014, 02:28 AM
piku_123
Tue Sep 16 2014, 11:29 AM
qudor
Tue Sep 16 2014, 11:06 AM
sara_seecs
Tue Sep 16 2014, 10:53 AM
akshar
Fri Sep 12 2014, 12:45 PM
iec.naga
Tue Sep 09 2014, 01:09 AM

Online

Guests: 50, Members: 0 ...

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

Members: 37517
Newest member: deepbhadani
Forum Activity
kirangowle Avatar
Posted By kirangowle
Sat Sep 20 2014, 12:35 AM
Hello All,I want to connect normal speaker (as a s...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Sep 17 2014, 12:59 AM
I think its important to list out the features of ...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Sep 17 2014, 12:45 AM
you need to put a wait condition in ISR till the s...
akshar Avatar
Posted By akshar
Mon Sep 15 2014, 04:41 AM
sir,i used microcontroller 89v51rd2 in circuit. No...
bobparihar Avatar
Posted By bobparihar
Mon Sep 15 2014, 02:24 AM
i am programming interrupt 0 using 8051my task is....
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Sep 13 2014, 12:23 PM
There may not be an exact equivalent .You will hav...
akshar Avatar
Posted By akshar
Sat Sep 13 2014, 03:18 AM
Sir, Good Morning,Thank you for making me a member...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:52 AM
which compiler are you using? I suggest XC8 with M...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:49 AM
I always prefer Olimex Dev boards when it comes to...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:44 AM
master will always lower down the Chip select... s...