Special chars with Hitachi LCDs and LiquidCrystal

I have a LCD and I have it working with LiquidCrystal library. However I want to be able to write the "degree" symbol as in "degrees celcious". You know, the little circle. The Hitachi datasheet shows this character in the table of extra characters...it says that the upper byte is 1011 and the lower byte is 0000. How can I write this with the LiquidCrystal library? Will lcd.write(10110000) work?

This may help.

There are 8 custom character slots that you can define on your own.

It should look something like this.

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

// Array to define a custum character. 
byte Degree[8] =

void setup()
  // assignes a custom Character to one of the 8 custum charicter blocks (0-7)

void loop()

Just change the array as you see fit. 1 lights up an LCD pixel and 0 keeps it off. The array is built to represent one of the 5x8 digets on the display.

BTW this is more of a software question rather then a hardware interfacing question.


I use this for custom characters but maybe it’s a bit ott if you only want a few.


Will lcd.write(10110000)

"10110000" is a binary number and to use binary numbers in Arduino applications you need a B prefix.

So if you write "lcd.write(B10110000)" you should be ok. Alternatively you could convert to hexadecimal notation (0xb0) or decimal (176).

The thing is though when I do lcd.print(176) the string "176" gets printed. I tried doing lcd.print(b10110000) but it didn't compile.

The degree symbol is not really a custom character I think; it's in the datasheet table I just need to know how to send it to LiquidCrystal so it gets printed properly instead of whatever I send getting literally printed as a string.

The thing is though when I do lcd.print(176) the string "176" gets printed.

This is as expected (lcd.print converts to ascii decimal). You initially wrote lcd.write() and that makes a difference. If you insist on using lcd.print, the correct syntax in this case would be "lcd.print(176, BYTE)". When using "lcd.write()" BYTE is implied.

If you want to use binary notation, the "b" prefix must be uppercase.

Thank you, I didn't know there was a difference between lcd.print() and lcd.write(). I should RTFD better.