CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rotate text in lcd display

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
didou1987



Joined: 09 Apr 2008
Posts: 3

View user's profile Send private message MSN Messenger

rotate text in lcd display
PostPosted: Wed Apr 09, 2008 3:45 am     Reply with quote

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







PostPosted: Wed Apr 09, 2008 3:50 am     Reply with quote

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!)

View user's profile Send private message

Re: rotate text in lcd display
PostPosted: Wed Apr 09, 2008 9:44 am     Reply with quote

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

View user's profile Send private message MSN Messenger

PostPosted: Wed Apr 09, 2008 11:02 am     Reply with quote

how to put LCD shift-right multiple times to display the "hidden" characters
_________________
hi to all
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 09, 2008 11:08 am     Reply with quote

This thread has sample code for horizontal scrolling on an LCD.
http://www.ccsinfo.com/forum/viewtopic.php?p=61235
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group