Usage Instructions

The TWILCD display can be used with any microcontroller that has a TWI or I2C bus. It works both with 5V and 3.3V systems (note that maximum brightness is lower on 3.3V compared to 5V. Also note that some displays only support 5V or 3.3V, so be sure to refer to the data sheet of the display you are using with TWILCD).

To use with an Arduino or a board compatible with the Arduino IDE, there is an Arduino library available. It is implemented using the Wire library, and should work with any Arduino.

If your processor is not directly supported, you can interface with the chip directly using its TWI protocol.

All versions of the TWILCD board use the same library.

Usage with Arduino

The TWILCD display is directly supported in the Arduino IDE. Version 1.0 or later is required.

To use it, either download our custom IDE package, with the required library preinstalled:
Arduino IDE with Akafugu Libraries.

If you already have the Arduino IDE installed, get the package and follow the instructions in this page:
Akafugu Libraries.

Once you have the Arduino IDE and the Akafugu Libraries installed, start or re-start the IDE. You should now have a TWILiquidCrystal submenu inside the File -> Examples menu.

Here is a small example sketch for dislaying a number counter:

Copy and paste this code into the Arduino IDE, and press VERIFY to compile it. You can also access this sample code along with other examples in the File -> Examples -> TWILiquidCrystal menu.

To try out the display with an Arduino board, you will need to hook up the four required wires.

If you have a R3 pinout compatible board, it will have dedicated pins marked SDA and SCL in the upper left corner of the board.

If you have a standard Arduino boards, such as the Arduino UNO, hook the wires up like this:

SDA - Pin A4
SCL - Pin A5
VCC - 5V

If you have an Arduino Mega board, use the following connection:

SDA - Pin 20
SCL - Pin 21
VCC - 5V

If you have a Serial and ISP Breadboard Adapter board SCL and SDA is in the upper right side of the board. The pins are marked with SCL and SDA and should be easy to find.

Other newer Arduino boards also have SCL and SDA marked on the silk screen.

After everything is hooked up, connect the USB port of the Arduino to your computer, select the correct port in the Tools->Serial Port menu, and press the Upload button. Once programming finished, you should see [[[“hello world”]]] displayed along with a second counter.

Protocol Documentation

If your processor has hardware TWI/I2C, adding support for it should be easy. We recommend using the GitHub library as a reference.