Strange Display Data RAM Adressing on 16X1 LCD Module

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hope on the right forum for this. I'm using a ATMEGA324P with a LUMEX 16X1 character LCD module in 4-bit mode. It's uses a Samsung S6A0069 driver chip which I think is identical to the Hitachi one used everywhere.

I got some text to come out on the display, but the text isn't where I expect it to be.

I have to use 2-line mode to get anything to appear after the 8th character on the display even though the module is only 1-line. I write 8 characters and then I need to reposition the cursor to address 0x40 for the 9th-16th display characters.

In other words, the Display RAM is addressed like this for the 16 character positions:

    00 01 02 03 04 05 06 07 40 41 42 43 44 45 46 47

This seems weird. My other 20X4 LCD module didn't exhibit this strange addressing behavior. Is this normal? This makes writing string to it, mighty tricky.

TIA.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

This seems weird. My other 20X4 LCD module didn't exhibit this strange addressing behavior. Is this normal? This makes writing string to it, mighty tricky.

Yes, it's normal. It's usually easiest to keep a position counter in your low level routine to automatically adjust for the line split.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CirMicro wrote:
Quote:

This seems weird. My other 20X4 LCD module didn't exhibit this strange addressing behavior. Is this normal? This makes writing string to it, mighty tricky.

Yes, it's normal. It's usually easiest to keep a position counter in your low level routine to automatically adjust for the line split.

I can do this, but it just seems that the DDRAM should be linear within the same line.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is what it is, according to whatever datasheet covers that model. There is no "should", your model appears to be implemented as a 2x8 logically. 4x20's are also "weird"--lines 1 then 3 then 2 then 4 on some models. Maybe it "should" be different but it is what it is.

[...In recent years, it is what it is has supplanted giving 110 percent and taking them one game at a time as the reigning sports cliché. ...]

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.