-
Notifications
You must be signed in to change notification settings - Fork 55
Home
The hd44780 Arduino library is more than a simple library to run a specific h/w. It is actually an expandable library package that can communicate with many different types of LCD hardware and interfaces.
A major design and functional goal is to not only make the hd44780 library API compatible with the IDE bundled LiquidCrystal library across all h/w interfaces, but also make the library Plug-n-Play as much as possible without affecting any other Arduino libraries. This is accomplished by supporting the IDE library manager for installation and auto self configuration whenever possible. Self configuration is accomplished by either using auto detection through h/w probing or by sane defaults. Manual configuration is supported but not always required.
The hd44780 library is designed to allow communication and interfacing with hd44780 LCDs over a variety of h/w interfaces.
Each h/w communication interface has its own C++ i/o class.
Because the hd4780 library supports multiple h/w interfaces using i/o classes, examples are organized by i/o class.
i.e. each h/w interface has it own i/o class and each i/o class has its own set of examples.
All the examples for each i/o class are readily accessible from the Arduino IDE GUI.
-
hd44780_HC1627_I2C control LCD with native i2c interface (Tsingtek Display HC1627)
-
hd44780_I2Cexp control LCD using i2c i/o exapander backpack (PCF8574 or MCP23008)
-
hd44780_I2Clcd control LCD with native i2c interface (AIP31068, PCF2116, PCF2119x, etc...)
-
hd44780_NTCU165ECPB control Noritake CU165ECBP-T2J LCD display over SPI
-
hd44780_NTCU20025ECPB_pinIO
control Noritake CU20025ECPB using direct Arduino pin connections -
hd44780_NTCUUserial
control Noritake CU-U Series VFD display in serial mode -
hd44780_pinIO control LCD using direct Arduino Pin connections
This i/o class replaces LiquidCrystal
Because the hd44780 library package is more than a simple library, the examples are not all together in a single location.
The examples are separated and grouped in to areas as follows:
NOTE: All the example sketches that demonstrate how to use the library are under ioClass
-
Documentation
Start here for information about the library and its examples.
The hd44780 library includes a special purpose sketch calledDocumentation
to allow accessing the hd44780 library information directly from the Arduino IDE GUI.
The Documentation sketch can be found here:[File]->Examples->hd44780->Documentation
The Documentation sketch has lots of information about the library and its examples. It also includes clickable links for additional information including about the hd44780 library, hd44780 h/w, hd44780 lcd tools, and various Arduino references. The Documentation sketch is a good place to start to get an understanding of the hd44780 library and its example structure since the hd44780 library is a bit different than other Arduino libraries, particularly with respect to the examples. -
ioClass
(This is where the examples of how to use the library are located)
There is an ioClass for each supported H/W interface. The examples for each i/o class are grouped together in a directory by the name of the i/o class.
Each ioClass also contain a directory called hd44780examples which contains wrapper sketches for special purpose test sketches.
The hd44780examples ARE NOT EXAMPLES of how to use the library.
In the Arduino IDE GUI, the ioClass examples can be found here:[File]->Examples->hd44780->ioClass
For example, the examples for the hd44780_I2Cexp i/o class can be found here:
[File]->Examples->hd44780->ioClass->hd44780_I2Cexp
The HelloWorld example for the hd44780_I2Cexp i/o class will be found here:[File]->Examples->hd44780->ioClass->hd44780_I2Cexp->HelloWorld
The HelloWorld example for the hd44780_pinIO i/o class will be found here:[File]->Examples->hd44780->ioClass->hd44780_pinIO->HelloWorld
-
otherLibraries
Contains subdirectories for other (non hd44780) libraries that contain wrapper sketches for various hd44780examples sketches. This is intended to allow easy benchmarking of other libraries for comparison purposes. These examples should not be looked at as examples of how to use the hd44780 library or the support non hd44780 library. -
hd44780examples
Ignore these sketches if looking for examples of how to use the library.
The sketches under hd44780examples are not hd44780 library example sketches that demonstrate how to use the library.
These sketches should not be looked at as examples for how to use the library. They are special purpose sketches that are used as include files by i/o class special purpose wrapper examples. The special purpose sketches allow using a "wrapper sketch" to define the lcd object and lcd geometry which then includes the hd44780 example sketch as an alternative to having to edit the actual sketch. While these special purpose sketches can be modified to work standalone with any LiquidCrystal API compatible library, their primary purpose, as shipped in the hd44780 library package, is to act as an include file for the i/o class wrapper sketches and are not intended to be used directly.
See the ioClass specific subdirectories for the examples for each ioClass
hd44780 also includes sketches that are for special purposes including special purpose sketches for other LCD libraries.
One specific specific sketch is LCDiSpeed.
LCDiSpeed is intended to allow speed comparisons between various libraries.
Using this special purpose sketch, it is easy to compare the speed of various libraries and h/w interfaces.
This special purpose sketch is available for all hd44780 i/o classes as well as a few other 3rd library LCD libraries.
It can be found under a directory called hd44780examples:
[File]->Examples->hd44780->ioClass->{hd44780-io-class-name}->hd44780examples->LCDiSpeed
For 3rd party libraries it can be found here:
[File]->Examples->hd44780->ioClass->otherLibraries->{3rd-party-lib-name}->hd44780examples->LCDiSpeed
NOTE: While all the examples are always available regardless of which h/w you actually have, using an example for an i/o class that is for different h/w will not work. It will compile but obviously will not work.
The hd44780 library contains additional capabilities not available in other libraries:
- return status to tell if API functions are not working correctly (usually do to i2c communication issues)
- self configuration of i2c address and pin mappings for i2c backpacks
- ability to enable automatic line wrapping
- ability to read the display RAM or LCD status
- automatic detection and s/w work around for LCD keypad shields with bad backlight ciruit
- ability to configure lcd timing to allow using LCDs that are slower (or faster) than the reference timing.
- faster than other libraries as Arduino can run in parallel with LCD commands/instructions