We sometimes get questions about what kind of LCD displays our TWILCD board supports.
TWILCD is based around an ATTiny 4313 uC and uses a digital potentiometer to set contrast and PWM to control the backlight. This not only frees up resources on your Arduino, but allows you to control it using only two digital pins (SDA and SCL). We have based our TWILiquidCrystal library on the LiquidCrystal library that is bundled with Arduino, so with only a few changes you should be up and running. (You need to include Wire.h and change from LiquidCrystal.h to TWILiquidCrystal.h)
Pin and header support:
Generally all 1x16 (both 1-16 and 15,16,1-14 versions) and 2x7 (+ backlight) are supported. Unfortunately 2x8 is not supported without some manual fixing with wires. (note that some 2x8 displays also have separate connectors for the backlight, marked A and K. A display like that will work.)
Any 2-line display with up to 40 characters per line is supported. 4-line displays with 20 characters per line are also supported.
The above picture show the following displays:
- 1x16 pins with backlight, 16x2 LCD
- 2x7 pins, 20x2 VFD (with LCD compatible pinout)
- 2x7 pins + backlight, 20x4 LCD
- 2x7 pins, 40x2 LCD (no backlight)
The following code was used in this example, the only thing changed between the pictures are row, col and type: