LCD display special characters

Hello!

I got a LCD Display and I'm trying to display the characters given on the last page of the data sheet (https://www.sparkfun.com/datasheets/LCD/GDM1602K-Extended.pdf). For the %-symbol the Upper bits are 0010 and the Lower bits are 0101. How can I display this symbol on the LCD?

Thanks for your help!

Use lcd.write( the number here ) to get one of the symbols you can't get from the keyboard.

Thanks for the fast reply! So it would look like lcd.write(00100101); ?

Or recalculate it to an other numeric system. Binary 00100101 translates to 37 in Decimal, or 0x25, where the 0x tells it is hexadecimal.

MAS3: Binary 00100101 translates to 37 in Decimal, or 0x25, where the 0x tells it is hexadecimal.

Do I have to tell the Arduino if the number is binary or decimal?

Do I have to tell the Arduino if the number is binary or decimal?

lcd.write(B00100101); (32+4+1=37 dec) lcd.write(0x25); lcd.write(37);

should all yield the same results

Great, thank you!

Or recalculate it to an other numeric system. Binary 00100101 translates to 37 in Decimal, or 0x25, where the 0x tells it is hexadecimal.

Why would you possibly want to recalculate it to another numeric system if your compiler can deal with the original number system?

The absolute very best you can hope to accomplish when you do the recalculation is that you may do it correctly. On the other hand the compiler will do any required recalculations correctly every time.

Don

That remark was just to let janschol know he doesn't [u]have[/u] to use an abstract binary code to get a display to show some glyph. There's other ways of doing the same thing. I knew some purist (don't be offended) would react. Personally i think 37 is easier to remember than 00100101. If one knows that ASCII table by heart, it might be easier to them to remember 0010 0101.

If you look where he is looking, "on the last page of the data sheet" that he specifies, you will find that the character locations are specified in binary. It is the number 37 that is abstract since it appears nowhere on that page.

If you look at his original post he even specified those binary numbers and asked how to use them.

The answer was given by mike in the first reply.

Don

Do I have to tell the Arduino if the number is binary or decimal?

Since the compiler was written by someone with ten fingers the default is decimal. You have to tell it if you are using another number system as pointed out in reply #5.

Don