Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to scroll lower line of lcd

Status
Not open for further replies.

garg29

Advanced Member level 1
Joined
Nov 17, 2004
Messages
443
Helped
25
Reputation
50
Reaction score
10
Trophy points
1,298
Activity points
3,593
lcd scrolling

dear friends
i want to scroll the lower line of lcd with a long message of more than 16 characters .and keeping the upper line fixed(not scrolling). how to do it with 8051 in assembly.

with best regards
amit
 

lcd scroll

sup garg29,

As you've probably realised, you posted this twice, I'm sure admin will do the honours..

Anyway, as far as I know, with the HD44870 type LCD modules, you can only scroll the entire display, both top and bottom lines. The locations in the address RAM stay the same, it just shifts the display.

You could look for alternative LCD's that might have this feature, I think some 'semi-graphic' modules have this option, but they cost a bit more. I suppose, you could try shifting the display (whole display) and then quickly 'rewrite' your top line data, sharting one address location on from what it was previously. Since LCD's have really slow rise/fall times, you might not see the line being re-written (might be best to do this in 8-bit-mode). I have to admit, its a tricky one, but I'm sure someone in here has figured something out.

Just had an idea :idea: You could write your top line data as normal (with incrementing address counter) and then switch to right-most location on the bottom line, and make the address counter decrementing, and possibly use a scroll feature. This way, you won't actually scroll the display as such, but your second line will scroll in from the right, moving left (with the cursor fixed at the bottom right) as you write it. So, you write your first line as normal, and then as you write your second line, after changing the cursor/counter config, write each character on the second line with a big delay (0.5s?) between writing. The length of the delay determines scroll speed.

I'm still not sure what display you have, but theres a shed load of info on the net, so just google it and you should the commands for changing address counter config etc..

here's a couple to start you off:
**broken link removed**
www.epemag.wimborne.co.uk/lcd1.pdf
www.epemag.wimborne.co.uk/lcd2.pdf

The last two are excellent, my main LCD reference.

Anyway, hope this helps in some way.

BuriedCode

Added after 2 hours 45 minutes:

Hey, just found a wicked link:

http://www.geocities.com/dinceraydin/lcd/commands.htm

That'll show you how to do it with anitmated *.gif's. If you look at the page, I'm thinking the bit about 'Entry mode set command 07h'

It's a bit sad, but you've got me thinking now, cus I want to do something similar with the LCD on my computer (built from scratch using HD44870 + PIC). I don't know 8051's very well, but micro's are micro's :D

Regards,

Buried(in)Code

Added after 4 hours 20 minutes:

Just did a little experiment, the HD44870 can't do it :( In display scroll mode it really does scroll the whole display, inluding the top line. Looks like you'll have to 're-write' every character on your second line, each time bringing the start postion forward one (or back one). Its a hassle, but I've just done it and it looks ok, because it writes to the module so fast, the line simply 'appears', and when you do it a second time, starting one cursor left, it 'appears' again. Not in anyway elegant software-wise, but it works for me.
 

    garg29

    Points: 2
    Helpful Answer Positive Rating
lcd scrolling display

garg29 said:
dear friends
i want to scroll the lower line of lcd with a long message of more than 16 characters .and keeping the upper line fixed(not scrolling). how to do it with 8051 in assembly.

with best regards
amit

To scroll the second line have two methotd:
1. Scroll line by line.
2. Scroll char by char shift line to left.

Assume you had a long string variable in address of XRAM/IRAM and ending by NULL char (00H).

TO SCROLL LINE BY LINE
1. Use cnt var as counter of string variable and set to 0.
2. locate lcd to col=1 and row = 2
3. copy 16 byte string variable begin from cnt as index to lcd.
4. cnt=cnt+16
5. delay 300ms
6. repeat 2 to 5 until ending by NULL.

TO SCOLL CHAR BY CHAR SHIFT LINE TO LEFT
1. Use cnt var as counter of string variable and set to 0.
2. locate lcd to col=1 and row = 2
3. copy 16 byte string variable begin from cnt as index to lcd.
4. cnt=cnt+1
5. delay 300ms
6. repeat 2 to 5 until ending by NULL.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top