The OLED LEC1621
There availalbe OLED character displays in the well known 16x2 layout. These displays use less power than default LCD and are clearly readable even without the need of backlight. Obviously they can only be used to displays characters - but as they have a different driver IC, you can chose from up to 4 fonts during runtime.
The OLED LEC 1621 - Overview
The OLED LEC 1621 is a character based and LCD styled displays.
- Contains 4 different character sets which can be switched during runtime
- offers parallel interface (8bit/4bit), 4 wire SPI, 3 wire SPI and native I2C with two wires
- is available in several color options (I've tested yellow and white)
- has very clear characters
Connectivity Options for the LEC1621
The OLED LEC1621 can be used in 8bit/4bit parallel mode like common 1602 LCDs. Therefore you could also use I2C or SPI expanders. Additionally the display has built in SPI and I2C support. Read your datasheet, because for I2C it might be necessary to solder two jumpers on the backside of the display. In my case it was JIM0 and JIM1 - but please consolidate YOUR datasheet. When dealing with I2C always check with an I2C scanner, if your device is responding. In my case the display address is 0x3c.
The Hardware Driver for the OLED LEC1621
If you want to use the OLED with its native I2C interface you can use the Wire (I2C) hardware driver:
#include <NoiascaLiquidCrystal.h> #include <NoiascaHW/lcd_wire.h> cosnt byte addr = 0x3c; // check the LCD address with an I2C scanner LiquidCrystal_Wire lcd(addr, cols, rows, convert_SPLC780D1_003A);
Remember to add a Wire.begin() to your setup() like in the examples, as this will not be done in the library. As mentioned before, you can also use the parallel interface or an external expander chip.
Noiasca Liquid Crystal and the OLED
The nice point for this OLED Display is that it contains 4(!) different fonts. Each font can be activated during runtime or by hardware jumpers.
- font0: English Japanese
- font1: Western European
- font2: European Russian
- font3: Western European II
For easy usage of these fonts I recommend my "Noiasca Liquid Crystal" as this library will do character mapping from UTF-8 to the existing characters in the LCD ROM.
Depending on the chosen font you will need different mappings:
|0||English - Japanese||convert
|this font is based on the HD44780_A00. Additionally it will
contain Hebrew letters, but unfortunately I'm not able to read
Hebrew... and so support of Hebrew is still on the todo list.
So it's absolutely fine if you use the default - you don't need to set it.
|1||Western European I||convert_LEC1621_01||extended with "Western" letters|
|2||English - Russian||convert_LEC1621_02||Mainly for Cyrillic letters used for Russian or Ukrainian, Bulgarian, and lot of other languages|
|3||Western European II||SPLC780D1_003A||this character set is similar to the European SPLC780D1. It is my preferred font for Germanic languages.|
You can read more about this character mapping in the Introduction of the library. For the time being you should know that you don't need to enter the octal ROM addresses. To print special characters on the display just print what you want to get:
For font = 2 you can also use Cyrillic:
The example 0922_OLED_LEC1621 explains, how these displays are handled.
Additional methods for the OLED Display
To switch between fonts you must call following method:
lcd.setFont(3); // possible values 0..3
The OLED display doesn't have a backlight you neither need to switch it on nor off.
Your own Character Converter
If you need a different character converter you can hand over a callback function as optional last parameter.
Obviously - you also have to implement the callback function to do all the magic.
See the examples in the folder "50_Convert" how to write your own character converter.
For best support of German characters I recommend to use font 3. This character set is very similar to the SPLC780D1_003A and adds support for small and capital Umlauts from the LCD ROM. Don't forget to switch to font 3 in the setup after initialization of the display.
#include <NoiascaLiquidCrystal.h> #include <NoiascaHW/lcd_wire.h> cosnt byte addr = 0x3c; // check the LCD address with an I2C scanner LiquidCrystal_Wire lcd(addr, cols, rows, convert_SPLC780D1_003A); // Ä becomes Ä void seutp() Wire.begin(); lcd.begin(); lcd.setFont(3); // activate character set 3 Western European II
Hardware Variant Newhaven Display NHD-0216KZW
I'm very confident that the Newhaven NHD-0216KZW displays are using the same IC as the datasheet seems very similar. So I assume that these NHD-0216KZW are also supported by my library. If you have a Newhaven display - please let me know.
Several classes in "Noiasca Liquid Crystal" enables you to use the LCD styled 16x2 character OLEDs. I recommend to use the native wire (I2C) interface after setting the jumpers.