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

Flex_lcd question.....

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








Flex_lcd question.....
PostPosted: Fri Apr 25, 2008 2:37 pm     Reply with quote

Hi,

I'm using the flex_lcd4x20.c driver in a project. I'd like to be able to 'scroll' the display up when I reach the end of the last line. To do this, I envision reading the characters of line 2 and writing them to line 1, reading the characters of line 3 and writing them to line 2, etc., etc. To do this, I need a function that can read the current value of each character on a line. I see that there is a function called lcd_read_byte in the driver, but it doesn't have an address argument, so I'm not sure what value it actually returns when it's used?

Dave
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 25, 2008 2:47 pm     Reply with quote

You could use the lcd_getc() function to do this. But why read the LCD ?
That's very time-consuming. Instead, keep the lcd text data in a
2-dimensional array in the PIC. Then to scroll the LCD, start writing
to the LCD from the next line down in the array.
Guest








PostPosted: Fri Apr 25, 2008 3:30 pm     Reply with quote

Hi PCM,

I thought about doing that but I'm not sure if I have the available RAM. I'll have to check.

I'm confused, why a 2 dimensinal array? I was thinking of something like this to hold the data for lines 2 to 4:

Code:


int8 CharData[19] [2];



Dave
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 25, 2008 4:16 pm     Reply with quote

That is a two dimensional array.
http://www.eskimo.com/~scs/cclass/int/sx9.html
Guest








PostPosted: Fri Apr 25, 2008 7:20 pm     Reply with quote

PCM,

Errr, yes, of course it is! Sorry, just a brain freeze on my part. I honestly don't know what I was thinking :-)!

Dave
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