netmf Character LCD

It’s about programming .NET Micro Framework device, Netduino. I will make it work with HD44780-compatible Character LCD.


What is this display?

PC2402LRS-ANH-H Character LCD

This one is PC2402LRS-ANH-H, more images at google.

It have 14-pin interface: 4 or 8 data pins, 3 control pins, power, ground, brightness adjust pin. In can display up to 255 different characters, graphics for few of them can be set up by programmer, rest are hard-written in ROM.


What can my Character LCD class do?

Class can handle complicated LCD controller protocol / initialization / timing / interface.

Timings from manual


It also offer straightforward Hashtable to map symbols you use to ones your LCD have in it’s ROM: some displays have Japanese character set, some have Cyrillic etc.

Character table


Sample code

Example usage of Lcd class

Once lcd is created, display is initialized and ready to work. This code does creeping line.
Here are class public members:

Visual Studio 2010 + ReSharper File Structure


Once you know how your LCD microcontroller works, it’s pretty straightforward. But to understand it, you might need to read some manuals. You can also find online LCD simulator very useful.

Here is BitBucket open source netmf LCD page.

If you have any questions, if you want something added or you have a change suggestion, do not hesitate to leave a comment.

My work desk with Netduino and Lcd connected

Close view on Netduino and Lcd connector

Character LCD in action

UPD: my Character LCD class was mentioned at Microsoft blog. Woot! :)