This driver can be used for various Newhaven displays. Currently, the driver was designed and tested on the following :

Newhaven NHD-0420D3Z-FL-GBW


(Please see in the attachement section the links for the documentation of the display and the wiring).

The current driver operates in text mode and operates in an I2C connection. The code exists to support a serial connection as well, but isn't exposed.

Display <name> {
    Driver     'Newhaven'
    Port       <string>
    Device     <string>
    Size       <string>
    Brightness <number>
    Contrast   <number>
    Icons      <number>

PortI2C device the display is attached to (e.g.'/dev/i2c-0')
DeviceI2C address to use (e.g.'40')(Newhaven documentation indicates 80, but 40 works for me)
Size<columns>x<rows> (e.g. '20×4')
Brightnessinitial brightness value, 1..8 (default: 6)
Contrastinitial contrast value, 1..50 (default: 25)
IconsNumber of user-defined chars reserved for Icons (default: 0)


The driver provides the following functions:

LCD::Contrast(n)sets the display contrast (1..50)
LCD::Brightness(n)sets the display brightness (1..8)


Display Newhaven {
    Driver     'Newhaven'
    Port       '/dev/i2c-0'
    Device     '40'
    Size       '20x4'
    Brightness 6
    Contrast   25
    Icons      0

  • newhaven.txt
  • Last modified: 2020/07/17 18:33
  • (external edit)