Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD Vertical Scrolling with PIC16F877A

Status
Not open for further replies.

jinchang

New Member
Hello,

I am doing a personal project now and am using 4X4 Keypad, PIC16F877A, 16X2 parallel LCD.

I am having some problem in fitting the long string in the display since it only goes upto 16 characters. I was thinking of using vertical scrolling, however, I am having some hard time finding the source code or a website with some kind of tutorial describing how to make the vertical scroll.

I am using MPLAB 7.6 and developing in assembly (not C). Could any of you please give me some sample asm code, suggestions, or links to the website that has a good tutorial on making the vertical scroll using PIC and assembly language?

Thank you very much for you support.
 
I don't know if you're aware?, but your LCD is almost certainly 2x40 with a 16 character 'window' on the memory - there are LCD commands to scroll this window along the 40 characters.

To scroll it vertically you're looking at doing it entirely in software, basically storing the strings any writing the entire display every change.
 
Thanks for your quick reply.
Yes, I am aware that it can store 2X40 string.
Basically I am not sure how to write a software to scroll preferrably vertically to make it easier for the reader to read rather than horizontal.
However, either horizontal or vertical scrolling is fine for me.
The trouble is that I do not have any idea how to make the scrolling works.
Do you know how to write a software to either scrolling or link that has an example?
Thank you!
 
Horizontal scrolling just requires writing instructions to the display, it's listed in the datasheet - but I can't say I've ever had occasion to do it?.

To do it vertically you need all the strings in memory, and a pointer to the string currently displayed on the top line. To scroll down increment the pointer to the nest line, display it, and display the following string on line 2 as well. To scroll up, decrement the pointer, and display the two lines.
 
Yes... It seems that I need to strore the string to CG RAM and manipulate from there..

I am a bit confused in making the pointer to the string and increment/decrement the pointer to the nest line..

Could you explain little further please?
 
Think of it as a two dimensional array (in processor memory - NOT CG), say you have ten strings, and the pointer is currently at 5 - then you display string 5 on the top line, and string 6 on the bottom line. To scroll down increment the pointer to 6, and display strings 6 and 7 - and so on. Obviously you have to trap the limits of the string tables as well.
 
Maybe I was not too clear about my situation.
I meant the vertical scrolling within 1 line.
The first line will be fixed with one string, and I would like the second line to be vertically scrolling (animating) with 4 different strings.
What I would like to ask is how I can make the animated scrolling within one line instead of making a sudden change of the string on the second line.

I appreciate your help!
 
That is what I would like to know.
If I could do it pixel by pixel to change the string in more smooth manner.
I wonder if there are any existing algorithm or method to implement it in relatively simple way...
 
jinchang said:
That is what I would like to know.
If I could do it pixel by pixel to change the string in more smooth manner.
I wonder if there are any existing algorithm or method to implement it in relatively simple way...

You could try studying the datasheet, but I don't think you can?.
 
You mean like this,
**broken link removed**

It can be done but it uses the user definable characters and so is limited to 8 characters and is done completely in software. More info here.

Mike.
 
outstanding.
I didn`t really know that such things could be done.thank you very much pommie
 
Last edited:
Pommie said:
You mean like this,
**broken link removed**

It can be done but it uses the user definable characters and so is limited to 8 characters and is done completely in software. More info here.

Yes, pretty cool! - I had a suspicion it could be done in that way, but I didn't (and still don't) consider it a practical solution - due to the lack of available characters - but it's still damn cool! :D
 
It is a good site and thank you!
I am trying to implement the same this on my own.
Will let you know how it goes.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top