BV4619 Text Positioning
January 16, 2014 08:36AM
I am running a normal 4x20 LCD

How can I do the following:

Move cursor to a certain position
Move cursor to line 2,3, and 4

If I send: rdabcdefghijklmnopqrstuvwxyz it displays a-t on the 1st line, then jumps to the 3rd line and dispalys u-z ?
Re: BV4619 Text Positioning
January 16, 2014 08:38AM
The BV4619 directly controls the HD44780 or equivalent on the display and that gives a clue as to where to look for the answers. To move the cursor around the display a command is sent. Not all displays are the same but for the majority of 20x4 displays will respond to the following:

start of line1 = 128
start of line2 = 192
start of iine3 = 148
start of line4 = 212

As an example if the cursor needs to be moved to the start of line 2 then send command "hc192" (I2C 2,192). To move the cursor to an exact location then add the column (char position) to the command. Again as an example to move the cursor to line 4, column 6 would be 212+6=218 so "hc218" (I2C 2,218).

Any characters following this command sent with the data command, e.g. "hdfred<ent>" will start from the set cursor position.

The HD44780 has an awkward memory addressing that can cater for all variations of lines and character widths and so will not scroll as expected. It is up to the host (the software or device that is driving the BV4619) to do that. However for the vast majority of applications for this type of display the user will want to place text at exact positions and so scrolling would just get in the way.
Sorry, only registered users may post in this forum.

Click here to login