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 support@ccsinfo.com

LCD Write position

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



Joined: 18 Oct 2011
Posts: 4

View user's profile Send private message

LCD Write position
PostPosted: Tue Oct 18, 2011 11:28 pm     Reply with quote

So i was using the flex_lcd.c along with flex_kbd.c to interface a PIC with a keypad to an LCD. I was looking to implement some kind of counter where a user could input a number from the keypad to the lcd and i could use a button to make the value shown on the display count down. As of right now my keypad works meaning that as you write number they start on the first line of the lcd and writes in the direction of left to right.
I was looking to be able to write to the LCD from right to left for on the second row of the 2x16 LCD display without clearing the message of the first of the LCD. heres the code of the flex_lcd.c i am using. I think the void lcd_gotoxy(int8 x, int8 y) controls the line of cursor but i am not too sure how to use it. Any help or suggestions are welcome. Thank you in advance.
Code:

// flex_lcd.c

#define LCD_DB4   PIN_D4
#define LCD_DB5   PIN_D5
#define LCD_DB6   PIN_D6
#define LCD_DB7   PIN_D7

#define LCD_E     PIN_A2
#define LCD_RS    PIN_A0
#define LCD_RW    PIN_A1

// If you only want a 6-pin interface to your LCD, then
// connect the R/W pin on the LCD to ground, and comment
// out the following line.

#define USE_LCD_RW   1     
 

http://www.ccsinfo.com/forum/viewtopic.php?t=24661
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 11:42 am     Reply with quote

Quote:

I think the void lcd_gotoxy(int8 x, int8 y) controls the line of cursor but i
am not too sure how to use it.

Look at the demo program for the 20x4 flex lcd driver. It has several
lines where it sets the x,y cursor position. It puts a number in each of
the 4 corners of the lcd. You can see how to use the function:
http://www.ccsinfo.com/forum/viewtopic.php?t=28268
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