wiki:Newhaven

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

Newhaven NHD-0420D3Z-FL-GBW

Scaled and rotated properly

(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 Section

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

Parameters

Driver'Newhaven'
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. '20x4')
Brightnessinitial brightness value, 1..8 (default: 6)
Contrastinitial contrast value, 1..50 (default: 25)
IconsNumber of user-defined chars reserved for Icons (default: 0)

Plugins

The driver provides the following functions:

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

Examples

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

Last modified 8 years ago Last modified on 01/31/11 20:11:33

Attachments (2)

Download all attachments as: .zip