View previous topic :: View next topic |
Author |
Message |
didou1987
Joined: 09 Apr 2008 Posts: 3
|
rotate text in lcd display |
Posted: Wed Apr 09, 2008 3:45 am |
|
|
hi
this my code:
Code: |
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#include "flex_lcd.c"
//==========================
void main()
{
int i=0;
lcd_init(); // Always call this first.
lcd_gotoxy(4,1);
lcd_putc("\f Hi can you help me please");
lcd_putc(" how to rotate texte in the lcd display? ");
}
}
|
i used 2*16 lcd display but the world can't be apparete
so how to rotate texte to display a long caracére like in this exemple
thank you _________________ hi to all |
|
|
Matro Guest
|
|
Posted: Wed Apr 09, 2008 3:50 am |
|
|
If you have such a function, you can use lcd_puts() or lcd_printf() to display a complete string.
A tip that you can try here is to add :
#device PASS_STRINGS = IN_RAM
in your code to force string constants to be copy in RAM.
Matro. |
|
|
PicFan
Joined: 01 Jan 2004 Posts: 11 Location: Indianapolis (Go Colts!)
|
Re: rotate text in lcd display |
Posted: Wed Apr 09, 2008 9:44 am |
|
|
I think what you are asking is how to display more than 16 characters per line on a 2x16 character LCD? This type of display will store 40 chars per line but can only display 16 chars at any one time.
The answer is simple, you cause the LCD to shift-left multiple times to display the "hidden" characters.
If you have a "send_byte" routine in your LCD library, use the following code snipppet to shift the LCD text to the left.
//send instruction to LCD for text to shift left
//this will allow more than 16 chars per line to be displayed
lcd_send_byte(0,0x18);
Best Regards,
PicFan
didou1987 wrote: | hi
this my code:
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#include "flex_lcd.c"
//==========================
void main()
{
int i=0;
lcd_init(); // Always call this first.
lcd_gotoxy(4,1);
lcd_putc("\f Hi can you help me please");
lcd_putc(" how to rotate texte in the lcd display? ");
}
}
i used 2*16 lcd display but the world can't be apparete
so how to rotate texte to display a long caracére like in this exemple
thank you |
|
|
|
didou1987
Joined: 09 Apr 2008 Posts: 3
|
|
Posted: Wed Apr 09, 2008 11:02 am |
|
|
how to put LCD shift-right multiple times to display the "hidden" characters _________________ hi to all |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|