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

How to write something to the LCD with delay

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








How to write something to the LCD with delay
PostPosted: Thu Nov 24, 2005 7:35 pm     Reply with quote

How can I write something to the LCD (for example: "INGRESE HORA ACTUAL") that is bigger than the display (2 x 16) and to create a delay between characters? If I use lcd_putc("INGRESE HORA ACTUAL"), it write "INGRESE HORA ACT" and without delay between letters.

Thanks


I
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Nov 24, 2005 8:14 pm     Reply with quote

You didn't give any kind of details like the display type, the version of the CCS compiler and the PIC model.

Depending on the display controller you should be able to set the display to scroll left when you add new characters. You will have to look at the display data sheet to find out the control sequence.

As far as the delay you will have to use print the characters to the display one at a time. If you want to use any sort of formatting use sprintf() to a string then output the string one char at a time with a delay in between. Otherwise just use a loop and putc the chars to the LCD with the delays.
Guest








PostPosted: Fri Nov 25, 2005 1:41 pm     Reply with quote

I have a 2 x 16 LCD Hitachi44780 compatible
CCS IDE version 3.43
PCH version 3.19

Tanks
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Nov 25, 2005 2:24 pm     Reply with quote

Thats the standard LCD controller and has scroll left capability. It also has the ability to place characters in specific locations.

See LCD.C in the drivers directory for the basic driver.

See the link below here for the data sheet and all the commands that can be used. Page 24 is the instruction set. Take some time to learn it. This display controller is very widely used The data sheet also gives all the connection info. See the LCD.C driver header for more info.

http://fab.cba.mit.edu/classes/863.05/classes/11_14/44780.pdf
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 25, 2005 2:36 pm     Reply with quote

This thread has a function that will scroll the LCD text to the left by 1 character:
http://www.ccsinfo.com/forum/viewtopic.php?t=20948
Guest








PostPosted: Fri Nov 25, 2005 3:03 pm     Reply with quote

Tank you all
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