Character LCD’s (like 2 lines with 16 characters each) as in this post are easy to use. Much easier to use compared to full graphical LCDs.
The ones I’m using have either 1 or 2 lines, but I saw that there are 4 line displays too. So far my LCD component only supports one or two lines.
Ezequiel Bazotti is a reader of this blog, and wanted to use his 4 line LCD. He pointed me to the data sheet of his LCD: He is using a WH1604A from Winstar Display Co. That display is using a HD44780 compatible protocol, works with 3V supply and logic levels, and can be configured to use 4 lines. The original HD44780 only supports up to two lines, so to use 4 Lines, I need to send the ‘2 lines mode’ command, but then use different display start addresses for each line:
- Line 1 starts at offset 0x00
- Line 2 starts at offset 0x40
- Line 3 starts at offset 0x10
- Line 4 starts at offset 0x50
However, other LCD’s like the Tianma TM204ABCWVBYA has 4 lines with 20 characters each, and the character map is as below:
- Line 1: from 00h to 13h
- Line 2: from 40h to 53h
- Line 3: from 14h to 27h
- Line 4: from 54h to 67h
These offsets are coded in the Processor Expert driver as constants/defines. The latest version of the component allows to enter the settings in the properties:
💡 Note that above addresses are in hexadecimal.
Consequently, the LCDHTA component offers up to 4 lines in the settings:
With this and coded ‘blindly’, it worked with the first try :-):
Happy Line-ing 🙂