Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

HD44780 address calculation error for some displays #343

Open
Sh4rK opened this issue Jan 31, 2018 · 1 comment
Open

HD44780 address calculation error for some displays #343

Sh4rK opened this issue Jan 31, 2018 · 1 comment

Comments

@Sh4rK
Copy link
Contributor

Sh4rK commented Jan 31, 2018

Hi!

We are using a HD44780 compatible display in our project. It is a 4x16 display, marked "1604A". We found out that the current address computation is not correct for this display. The correct line addresses are: 0x00, 0x40, 0x10, 0x50. I made a quick patch to make this display work, but it breaks current functionality: Sh4rK@52998df.

Unfortunately I don't have any other displays to test, and I have no experience with them, so I don't know how to write a generic solution that works with everything, or even if it's possible. Maybe the only way would be to take some additional parameter(s) that describe the address calculation.

@salkinium
Copy link
Member

Hm, in that case I would suggest wrapping the address calculation into a (stateless) function and passing that into the constructor and default it with the current implementation. That would be backwards compatible and you can add yours. Alternatively as a template argument, but that’s a bit verbose.

I think I have some hd44780 displays lying around, I’ll give this a try. The calculation may only haven been tested on dual displays /o\

@salkinium salkinium added this to the 2018q1 milestone Feb 1, 2018
@salkinium salkinium removed this from the 2018q1 milestone Apr 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants