My holiday present to myself this year was the following 4X20 LCD: (link)
It is based on the HD4478 LCD driver chip, front ended with an I2C interface, popular because it only uses two ports on your MCU.
The information provided by the vendor is sparse, and in some cases incorrect. The address of the device is listed as 0X27 but is actually 0x3F. I was able to locate the Arduino (C++) driver for the I2C interfaced version, so I translated the Arduino driver into C#.
I then integrated Stefan Thoolen’s (http://www.netmftoolbox.com/) MultiI2C class to drive the I2C port.
After playing with the timing on the initialization a bit, it seems to be working well. I added some text management methods to the driver to simplify displaying text on four lines. The LCD is set up in such a way that it is actually driving two 40 character lines of text, wrapped on the screen. This made it confusing for me to keep straight, so these new methods made it easier to keep track of the text.
Hardware connection is a snap. Netduino (running 4.2) connected with 5v, ground, A4, and A5 to the LCD module. This LCD is using an I2C interface, so you need pullups on the A5 and A4 wires. I used 2.2k (corrected to 1.8k below) resistors on the 3V3 port. Worked great.
One nagging issue is that after running for some time, the screen will start displaying garbled data. I have not been able to pinpoint the reason; maybe bus speed, bad data wires, poor power? If I figure that out, I will post an update.***
Thanks to everyone on the forum for inspiration and ideas to get this working; especially Stefan for a great toolbox. Let me know what bugs you find or ideas on improvements.
***UPDATE: The garbage issue is resolved: I think.
Problem was that my pullup resistors were too high of a value (changed for 1k8. I remembered my analog circuit class I took 30 years ago and realized these resistors are part of a RC circuit that affect the signal shape on the wire. To high = smaller slope. There was also a small bug in the code that was not sending the initialization bytes correctly (I will upload the working copy. I also moved some of the text management methods out of this class into a separate display class)