Arduino grove serial lcd custom characters

1.1k views Asked by At

I have grove serial lcd screen 16x2. Link.

I want to print some custom characters, but official library doesn't contain functions for creation custom chars. I've tried to use some other libraries for LCD screens which uses i2c protocol, they provide needed functions, but they don't work with this screen.

Maybe anyone had this problem?

1

There are 1 answers

0
Billylegota On BEST ANSWER

The problem is not having a function on the Arduino to make a custom char, it is that the PIC (with its current program) does not have a protocol for creating custom chars. As a result it would be impossible to make custom chars without re-programming the PIC.

As an alternative you might consider removing the board with the PIC on it to expose the display's original header. Then, as the display uses a Hitachi HD44780 (or compatible) controller, you should be able to set it up using the built-in LiquidCrystal Arduino library.


If you use the built-in Hitachi compatible library making custom chars is quite simple:

1: Create a byte to store your char:

byte myChar[8] = {
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};

2: In your init phase initialize the char:

lcd.createChar(0, myChar); // lcd.createChar(int, byte)

3: Finally you can print/write the char using its identifier (the int you passed in lcd.createChar):

lcd.write(byte(0));