LCD Backpack modified LiquidCrystal library

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
amez
 
Posts: 6
Joined: Wed Jul 14, 2010 11:19 pm

LCD Backpack modified LiquidCrystal library

Post by amez »

Hi:

Will sketches written with the original LiquidCrystal library work with the I2C modified library?
It seems that they require inclusion of the wire library (at least to compile)

Mike

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: LCD Backpack modified LiquidCrystal library

Post by adafruit_support_bill »

The Adafruit version is a superset of the original, so the existing sketches should work with minimal changes. All the character output and display control functions work exactly as before.

To convert to backpack use, you will need to include wire.h and use either the I2C or SPI version of the LiquidCrystal constructor. The new library also adds functionality for backlight control that was not in the original.

Hamradio2008
 
Posts: 110
Joined: Sun Oct 10, 2010 4:37 pm

Re: LCD Backpack modified LiquidCrystal library

Post by Hamradio2008 »

I have one of the backpacks and have been working I2C with it. Be sure to study the MCP23008 datasheet on how to address and configure the chip. The default address is 0x20 (a 7 bit binary number) however be careful concatenated with the R/W (read/write bit which is zero in this case) it forms the 8-bit binary number 0x40. Following that you need to send the configuration registers to set up the chip. THen the Data.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”