Saturday, February 6, 2016

The best 68¢ I have spent in a long time

In March of 2015, I was given an Arduino starter kit by my son-in-law as a gift for helping him build a new PC.  Included in the kit was a 16 character by 2 line LCD with a Hitachi parallel interface.  I quickly discovered what a pain it was to connect to the Arduino, mostly due to the considerable number of connections necessary.

Even using the 4 bit parallel mode, +5V, GND, and 6 control pins on the Arduino are needed to control the display.  In addition to the Arduino connections, another 8 or so jumpers are needed to ground other pins, provide power for the backlight, and control the display contrast. Every time I wanted to use the display, I had to reconnect the tangled web of jumpers just to use the damn thing.

A few weeks later I purchased a 20 character by 4 line LCD (also equipped with a Hitachi parallel interface) but with a I2C daughterboard soldered on the backside.  At the time, I had NO experience with I2C devices, but due to the wonders of the internet, it didn't take long to find and learn how to use F Malpartida's wonderful and flexible driver library for I2C enabled LCD displays.

I was overjoyed to discover how much simpler it was to connect to the Arduino! +5V, GND, and 2 I2C pins; that's all it takes.  No more rat's nest of jumpers, just 4 simple connections.  The I2C board on the back of the display even includes a pot for adjusting the display contrast.  A far easier interface, and a 4x20 character display to boot.   At this point, the 16x2 LCD got set aside.





Fast forward to about six months ago; I was perusing AliExpress (one of my favorite cheap Chinese Arduino accessory websites) and stumbled across the very same Hitachi parallel to I2C daughterboard that was fastened to my 2004 LCD, for just 68¢, including shipping!

Three weeks later, after receiving it in the mail.  I soldered it to my 1602 LCD, and voilĂ !; I can now connect the 1602 LCD to the Arduino via I2C using just 4 wires, instead of the confusing and complicated parallel interface it came equipped with.

The best 68¢ I have spent in a long time.

Link to the adapter:
http://www.aliexpress.com/w/wholesale-i2c-lcd-adapter.html

Link to the F Malpartida I2C LCD library:
https://bitbucket.org/fmalpartida/new-liquidcrystal/overview