Skip to content

Archive for June, 2013

12
Jun

LCD Display

I’d picked up a display off eBay a little while back from “WIDE.HK”.

LCD 23008

The display was a standard Arduino 1602 style with an I2C interface. The reason I bought it was because it offered GREEN LETTERS on the BLACK background. And I will be the first to say, it delivers on that aspect. Using it though, not so much.

The big stumbling block was that the display didn’t use the same LiquidCrystal_I2C library that my YWRobot displays used.

Wide.HK uses a MCP23008 expander to drive the LCD display. I scanned around a bit and found a couple of places that sported a similar type display with an 23008, but unfortunately they were wired differently. Those Arduino libraries didn’t work.

I asked for, and received an Arduino library from Wide.HK to make the display work. Wide.HK supplies a library called “LCDI2C4Bit” and it won’t compile on the Arduino 1.0 or newer. So I knew it was old. I managed to fix that quickly enough but the library was basically limiting. Two hard coded print commands, some goofy keywords for moving the cursor and that was it.

I’ve never written a library or even modified one for the Arduino before. But I liked the display so much I decided to invest some time in working on the library. After six failed attempts at it, I finally had a library that worked almost exactly like the Liquid Crystal library I was used to. I even posted it on the Arduino forum and another user tested it out and reported it worked perfectly. I felt pretty good considering.

For those who have a WIDE.HK LCD display, you can download my Arduino Library from here:

LCDI2C4Bit MCP23008 Library

While I was checking out some of the other offerings of Wide.HK, I found they sold the backpack as a standalone item:

IMG 3757

If you look closely, you’ll see that the edge of the board has “half holes” and not the full holes we normally see on these backpacks. On the end are the Vcc, GND, SDA, SDL solder pads. When you get an LCD like this from WIDE.HK they piggy back the board right on to the back of the LCD. This makes for a thin installation for sure. It also means you can’t use that backpack on anything else.

IMG 3760

I’d decided a while ago to make any new backpacks I bought removeable. So might as well start here and solder a male header right on the LCD display and a matching female connector on the backpack:

IMG 3762

Of course with this connection method, the display is significantly thicker:

IMG 3765

Which as it turns out is not a deal breaker for me. The backpacks were selling for around the $6 US mark off eBay and that’s not a bad deal either because if I remember correctly I was paying more than that for the YWRobot ones.

Really, if you wanted to make your own I2C backpack, it’s not that hard to do. Plenty of wiring schematics around to help out.

After attaching the backpack to my LCD, I powered up the Arduino and had a moment of “oh-oh” because the display was blank and then I remembered the contrast pot. A quick adjustment and..

IMG 3767

Works like a hot darn. According to Wide.HK, the backpack will work with a 1602, 1604 and 2004. I’m going to have to find some other ones to test my library with since I only have a 1602 right now.

None the less, it’s sure nice being able to run a full LCD display via and I2C thus leaving a lot of Arduino pins freed up.