LCD scrolling text problem + Blinking Character help

Status
Not open for further replies.

Shaheers

Member level 2
Joined
Mar 24, 2010
Messages
51
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Location
Islamabad,Pakistan
Activity points
1,616
I am using mikroC for PIC v5.30 and Proteus 7.6 SP4, the problem is that, when the text move to right it became vanish, but on left side its ok!


The second problem is that i made a blinking heart charctor, which is using FOR loop, and i is not exiting from that, i mean not actually exiting ,but FIRST check the attached files and, u know what i mean,
 

Attachments

  • Blinking Heart char problem.rar
    70.9 KB · Views: 153
  • Moving text problem.rar
    67.6 KB · Views: 147

Not sure what you mean in the first problem, it might be that the _LCD_SHIFT_LEFT and _LCD_SHIFT_RIGHT move the LCD display position, not the text.

In the second problem, you have for(; which is an infinite loop, it will never finish, unless you break out of it using the break; statement, or limit it with a counter like the other two.
 
text = "Example"
a = len(text)
for c = 1 to a
b = a - len(text)
text2 = mid(text,c,b)
locate 1,1
lcd text2
next a

Enjoyed !
 
Reactions: vet

    vet

    Points: 2
    Helpful Answer Positive Rating

whether these commands to shift LCD display, then what is the function use for moving the text?


text = "Example"
a = len(text)
for c = 1 to a
b = a - len(text)
text2 = mid(text,c,b)
locate 1,1
lcd text2
next a

Enjoyed !

Really sorry bro, i cant get the words u written,(in bold)



---------

if i make a loop function for that, that shifts, display on screen by one, and then clear the screen and then display incremented text on screen, in this cause the code is gone very complicated is it so. . .
like

void ANY_FUNCTION(int a,b)
{
for(int a; a<b; a++);
{
Lcd_out_cp(a,1, "text");
delay_ms(500);
lcd_cmd(_Clear_lcd);
}
}

BUT what about the display on second row ?, the commad clear lcd is used in moving function!
 
Last edited:

Maybe can try this code **broken link removed**.
 

LCD scrolling issue to right side occurs normally, if you are using 16 character LCD and you are not blocking upto 16 character maximum than this problem will occur.

Let us talk about two characters scroll, When characters are moving from to right side from location '0' (first character) and '1' (2nd character). when 1st reach at 15 and 2nd reaches 16, its ok, but when 1st reach 16 and 2nd reaches 17 (we think that it is not possible) but due to some bug in program it is possible for real world. If you continue this scroll than your text will hide and continue its scrolling as in normal cases we are not putting some limitation on character LCD lengths and some time it goes to infinte position. I had experienced same problem on my first program and have found that software i was using was doing this.

Try to check and troubleshoot your program, and do write some functions for character scroll limitations upto your size LCD.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…