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
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.