Everything for Electronics

Tech Forum





January 2015

HD44780-based LED Display: Scrolling Text False Start

I have been experimenting with scrolling text on some HD44780-based LED displays of various sizes. The commands I talk about below are those for that device, not any particular PIC code.

I first clear the display and home the cursor sending a 01 command to the display. Then, I change to One Line mode with a 48 command. A long text message is then sent to the display using the data mode in a loop to send all the characters. This message is 72 bytes long and should be going into LCD RAM locations 128 through 199.

At this point, I have tried a number of commands to reliably reset the active window to the start of my message, but none of them seem to work for all the different displays I have tried this on.

On some of the displays, nothing works. Then, the text is scrolled using the Pan Right command: 24 in a loop that repeats it 136 times to display the complete message two times. The scrolling does work, but sometimes it starts at the beginning of the message and other times it starts at the 41st character. This action seems to be random.

As I stated, I have tried inserting several different commands just before the scrolling routine but none of them have worked. These commands include repositioning the cursor to position 128, the start of the first line, homing the cursor (2), and adding a cursor right and a cursor left command after that. None of these measures seems to have any effect.

Does anybody know of a reliable way to have this scrolling message always start at its beginning? If possible, I need a solution that works on all HD44780-based displays. I know this is a tall task and may need to use different approaches for different displays.

#1153
Paul Alciatore
Beaumont, TX