Fast 4bit LiquidCrystal for Arduino DUE / using 5V LCD

Here is a modification to the new liquidcrystal library (1.2.1). I removed support for backlight adjustment and only include normal 4bit and 8bit support. It uses the digitalWriteDirect function that I found on this forum somewhere.

Writing every char on a 20x4 lcd with the standard library takes about 22ms, with this modification of the new library the same action takes only 5.1ms. I have only tested this with one lcd screen so feel free to report back if you get it working for your display.

The display I used for this uses 5V logic, I connected the VDD and LED+ pins to 5V, the logic pins are connected as normal, 3.3V seems to be enough for the logic chip on the lcd. Since the RW pin is connected to GND there should be no writing back to the Arduino DUE, correct me if I'm wrong.

Use like this:

#include <LiquidCrystalDue.h>
LiquidCrystalDue lcd(7, 6, 5, 4, 3, 2);

The rest is standard

There may be a confict if you include the standard library or the unmodified version of the new library

LiquidCrystalDue.zip (445 KB)