-
Notifications
You must be signed in to change notification settings - Fork 60
ioclass: hd44780_HC1627_I2C
The hd44780_HC1627_I2C ioClass is used to control Tsingtek Display Co HC1627 LCD devices in i2c mode which have a native I2C interface.
This i/o class is NOT for use on devices that use a backpack with a simple I2C i/o expander chip such as a PCF8574 or MCP23008
The HC1627 device in i2c mode uses two i2c address:
- base address for RS clear
- one address higher for RS set
The communication interface is very simple:
8 bit data is sent using the base address; command/status use the base address +1
The configurable base address can be: 0x38, 0x3A, 0x3C, 0x3E
The I2C interface can only control the LCD and does not have the capability to control the backlight so the backlight will always remain on.
See the included HelloWorld sketch for a minimal example of how to declare the lcd constructor and initialize the LCD.
Using the Arduino IDE, hd44780_HC1627_I2C examples can be found here:
[File]->Examples->hd44780->ioClass->hd44780_HC1627_I2C
This device needs pullups on the bus signals.
While it will usually work on an AVR platform without external pullups,
it doesn't always work.
If the sketch code was previously using another library then all that is necessary is to change the header file includes and the lcd object constructor.
No other code changes should be necessary.
change this:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
to this:
#include <Wire.h>
#include <hd44780.h> // main hd44780 header
#include <hd44780ioClass/hd44780_HC1627_I2C.h> // HC1627 i/o class header
hd44780_HC1627_I2C lcd; // declare lcd object: auto locate i2c address
// if you want to use a specific i2c address use:
// hd44780_HC1627_I2C lcd(i2c_address);
HC1627 datasheet:
https://dvtecnologia.com.br/imagens/HC1627-SYH-I2C-30_Eng%2CA.pdf
Here are examples of such a device:
- HC1627-B-LWH-I2C-30
- HC1627_I2C-SYH-I2C-30 The HC1627 device in i2c mode uses two i2c address:
- base address for RS clear
- one address higher for RS set
The communication interface is very simple:
8 bit data is sent using the base address command/status use the base address +1
The configurable base address can be: 0x38, 0x3A, 0x3C, 0x3E
The I2C interface can only control the LCD and does not have the capability to control the backlight so the backlight will always remain on.
This device has 2 address pins to configure the base address.
The configurable base address can be: 0x38, 0x3A, 0x3C, 0x3E
It overlaps with the addresses for the PCF8574A and PCF2116/PCF2119xr