PDA

View Full Version : Scroll text on LCD second line



Raadys
- 20th May 2013, 12:19
Hi,

I am looking to scroll a second line on LCD Text.

Here is a sample code I used.



int main(){
char *a ="Testing LCD";
char *b ="ScrollingText";
....
....
....
LCDInit();//Fn to intilise LCD

LCD_Write(a,1); // fn to write data on first line of LCD
LCD_Write(b,2); // fn to write data on second line of LCD

while(1){
LCDCommand(0x18); // shifting the entire text to left
LCDDelayms(); // delay
}
}

This code shift both lines of text.



But I want to shift only the second line of LCD.

Any help would be great.



PIC30F5011/ MPLab IDE V8.8 / PICKIT3


Regards,
Raady.

Jumper
- 20th May 2013, 16:39
Hi,

You would probably get more answers in a C forum rather than the Pic Basic forum since the code you posted is in C language. Also I doubt Pic Basic supports the PIC30F..

so you will have to look elsewhere

Art
- 25th May 2013, 16:14
scroll (shift) the text buffer yourself in memory before sending it to the LCD
rather than getting the LCD to scroll it.
Bitwise rotate the entire text array eight times in the desired direction,
or bytewise rotate it once.