Main Site Documentation

Understanding char table for HD44780


#1

Hi
I just bought this LCD https://www.sparkfun.com/products/9568

And it works perfect, but i really want to use some of the more special characters.
And in the HD44780 datasheet there is a table of chars, but i cant really figure out what byte command i should send to get the different chars?

Can someone help me on how i should read this table?


Page 17


#2

Can you show your code please


#3

Well right now im just using this lib: https://www.ghielectronics.com/community/codeshare/entry/371


public static void Main() {
            var display = new SparkFunSerialCharacterLcd(DisplayType.Display4X20, (Cpu.Pin)FEZ_Pin.Digital.Di1);
            display.CursorType = SerialDisplayCursorType.None;

            display.Print("Hello World");
        }


#4

Please take a look at the table. For each character you can find it’s binary code. You do that by combining upper bits with lower bits from the table. For example: capital ‘A’ will give you ‘0100’ and ‘0001’. Combining these two values into a byte - 01000001, which is decimal value of 65, which is also the ASCIi code of the ‘A’ character. Now pick a character from the table, determine it’s code and use SendByte method to output it on the display.


#5

I have just doublechecked the library. You will need to change SendByte to be a public method instead of private.


#6

Perfect!
Thank you very much for that explanation :slight_smile:


#7

You are welcome!


#8

Another thing.
There are 2 tables, but they have the same values…
So i guess im able to change char table somehow?


#9

I am out and can’t check, but there should be a way to indicate/switch the page you want to use.


#10

Check the tables again: they say they are for different ROM codes. Page 17 is ROM Code A00, Page 18 is ROM Code A02. I don’t think that’s something you can “switch”.


#11

I might think you are right…
But i should be able to create my own custom chars, somehow…
So if i figure that out, then i can just recreate what i want from the other rom…

Any guidance is welcome


#12

I can’t check at the moment, but what does determine which ROM code is in use at the moment?


#13

As far as i can read, its factory shipped with either one or the other… so i guess i only have the first one.
But i should be able to send a set of bytes to define my own custom chars.


#14

Ok. That makes sense.


#15

Yep, you can create your own characters. The ~5 earlier pages in the datasheet tell you how. Perhaps the driver portion of that is left as an exercise for the reader :wink:


#16

I found a guy who made an example for Arduino, http://forum.arduino.cc/index.php/topic,19002.0.html

So it makes a bit more sense now, so should be able to do what he does in C# instead.
So ill try that, but its kinda late here.
I’ll return with my findings later :slight_smile:


#17

Please do. You can also extend that library, you are using, and put it on codeshare.