Steun onze actie WeGoSTEM

Voor onze actie WeGoSTEM zoeken we nog vrijwilligers. Doe mee via

LCD Display

The LCD display on the Dwengo board is a 16x2 character display with backlight. This display uses a frequently used HD44780 compatible controller.

Controlling the LCD

The display is easy to use by means of the Liquid Crystal library which was developed for Arduino compatible boards. This library ensures that the display is initialised correctly and it provides some handy intuitive functions for writing text to the display. Please refer to the Dwenguino LCD example in Arduino IDE (Arduino IDE > File > Examples > Dwenguino) for an example.

Whenever you start from a new sketch, include the following libraries:

  1. #include <LiquidCrystal.h>
  2. #include <Wire.h>
  3. #include <Dwenguino.h>

And initialise the Dwenguino board by using:

  1. initDwenguino();

after which you can write text to the dwenguinoLCD by using on of the functions of the Liquid Crystal library. This dwenguinoLCD has been pre-initialised by the initDwenguino() function. For example:

  1. dwenguinoLCD.print("hello");

Please refer to the Liquid Crystal library for an overview and take a look at the Dwenguino Examples in Arduino IDE.

Pin configuration

This table shows the standardised pin configuration for the 16-pins connector of these frequently used displays.

Pin Function Dwenguino board Description
2 Vcc +5V
3 V0 Trimmer TR1 Contrast adjustment
4 RS PE0 Register select: low = instruction, high = data
5 R/W PE1 Low = Write, High = Read
6 E PE2 Enable (active high)
7 DB0 PA0 Data-bus bit 0 (not used in 4-bit mode)
8 DB1 PA1 Data-bus bit 1 (not used in 4-bit mode)
9 DB2 PA2 Data-bus bit 2 (not used in 4-bit mode)
10 DB3 PA3 Data-bus bit 3 (not used in 4-bit mode)
11 DB4 PA4 Data-bus bit 4
12 DB5 PA5 Data-bus bit 5
13 DB6 PA6 Data-bus bit 6
14 DB7 PA6 Data-bus bit 7
15 LED+ +5V Positive backlight supply
16 LED- PE3 Negative backlight supply

Please note that the LCD uses PE0-PE3 which are also known as arduino pins 20, 21, 22 and 23. Consequently, you should not connect anything to these pins on the extension connector when using the LCD!