November 5, 2013, 4:59pm
I’m starting to work with 16x2 CharDisplay.
There are 2 methods for print text on display:
In particular is interesting the method “Putc” because allows to print an ASCII character passing its decimal code.
This is the question: is supported Extended ASCII Table or not?
I tried to print the degrees char (°) but I can’t see it (the example above shows my attempt because 176 represents the extended ASCII table degrees char value). The display shows a minus char (-).
November 5, 2013, 6:03pm
I haven’t looked at the code of the driver, or used it, but I would expect that you need to worry about the code that corresponds to the character, not the standard ASCII code… see something like
http://shop.tuxgraphics.org/electronic/tuxgr_blue16x2_charset.png as an example of the standard character set. Edit: I see 176 is also the degrees symbol - time to dig into the driver code
November 5, 2013, 6:16pm
the display uses a display chip which is identified in the developers guide. find the data sheet for the chip. it should answer your question.
November 6, 2013, 3:31am
Thanks for both replies, they’re useful! ;D
Another question: is it possible to paint custom characters using the standard driver?
(I worked with a similar char display programming in C++ and I could paint custom characters by setting dots on and dots off manually) .
If I remember the specs correctly you can define/design your own char set, but setting individual pixels is not possible.
November 6, 2013, 7:19am
@ Reinhard Ostermeier - Thanks for reply. It is exactly what I wanted to mean: a custom charset.
How can I define my own charset? Can you give me a tip?
You should look for the data sheet / docs of the Controller chip. Haven’t done this my self.
Pages for logged out editors learn more
The Hitachi HD44780 LCD controller is an alphanumeric dot matrix liquid crystal display (LCD) controller developed by Hitachi in the 1980s. The character set of the controller includes ASCII characters, Japanese Kana characters, and some symbols in two 40 character lines. Using an extension driver, the device can display up to 80 characters. Numerous third-party displays are compatible with its 16-pin interface and instruction set, making it a p...
lots more if you use a search engine, look for “hd47780 datasheet”
The controller also allows for 8 custom symbols/chars. I have a modified driver here someplace that I wrote to allow for setting and using the custom chars. I’ll clean it up and post it later on
November 6, 2013, 2:35pm
Thanks to all for replies.
@ Brett - I found this link that lists all characters that HD44780 accepts (personally tested):
@ danibjor - That’s great! I’m courious to see your code!
November 13, 2013, 7:17am
@ danibjor - great, excellent! Thank you very much!!