« A bigger basic H-bridge | Main | On Paper »

Serial LCD Controller (June 26, 2005)

makes a number of rather nice serial (and USB based) LCD and VFDs. What they do not make, are inexpensive LCDs. Thankfully, hacking serial onto a cheap parallel LCD is sometimes almost as good.

A $13 controller board I received for a piece of equipment was designed to operate with a . A similar parallel LCD can be found around the net for less then $8. Combined with a cheap PIC16f627 µC and some passives it makes for an acceptable substitute.

Whole books have been written on interfacing a µC to a parallel LCD and whole other books on interfacing a µC to RS232 devices; thankfully, someone at Hi-Tech has already read those books and provided PicC (lite) with nice C libraries to do both tasks. USART.{C,H} provide hardware based serial IO and LCD.{C,H} provide most of what�s needed to talk to a HD44780 in 4-bit mode. With all this in hand, all that�s needed is a small amount of C-code to read characters from the serial line and dump them out to the LCD looking out for Matrix Orbital commands and translating them into HD44780 commands.

The manuals for any Matrix Orbital LCD have a fairly good reference on what every command is and does in it's appendix; based on this, it's fairly easy to find the equivalent HD44780 command. Almost all of the regularly used commands have a direct 1 to 1 map to HD44780 equivalents, and when they don't, you can string together a few HD44780 commands for the same effect.

My quick hack PIC code doesn't implement all of the MO command set, but it implements enough of the MO commands that my $12 controller board can talk to the display. LCDC (MO's recommended PC based flashy looking software) also produces the same output on my PIC+HD44780 as on a real MO display.

Anyhow, my code is downloadable. It does include my modified copies of HiTech�s standard libraries as necessary to configure the serial line and implement a few extra commands on the LCD.


Posted by spiffed at June 26, 2005 1:11 PM