Scrolling LCD

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Hi 

   

i want to scroll the message in LCD display(16*2 lCd Hitachi ).

   

Now i able to write message now i want to scroll that how to do it .

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into the Hitachi controller datasheet

   

or

   

probably would be better to manually (programatically) shift the output-string. Will be a good practice to get acquainted to C-strings, pointers and all that stuff.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

One way, given you have a string in a buffer that is  len(strg) + 1,

   

is to ( assume lcd is 16 char in a row ), so array is myString[ 17 ],

   

addresses 0 - 16, 16 chars + one NULL (terminates string)

   

 

   

1) Write string buffer to LCD

   

2) Delay for the length of time between display writes, like 1 sec as example

   

3) Move the characters in the string right 1 element, start by

   

extracting 1 char, 14'th char (LCD column address 0 - 15) and write it back to buffer

   

at address 15. Do this for 15 more, then fill myString[ 0 ] = ' ';

   

4) Test for 16 shifts, if so exit loop

   

5) goto 1

   

 

   

This is a destructive write, eg the string buffer ultimately becomes all blanks.

   

 

   

If you want the save the string copy it inot a temp buffer for the scroll operation use.

   

 

   

Something like that.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Hi

   

what is purpose of of this command LCD_scrl_left$ right (datasheet) but when i implement this it doesn't works

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The actual LCD controller has a command set that will execute

   

certain functions, you can do this vs C code as I suggested.

   

 

   

Use LCD_Char_WriteControl() function in Creator LCD component

   

 

   

Regards, Dana.

0 Likes