This library provides an interface between the microcontroller and LCD module. Note that this code is not for I2C modules.
Main features:
- Supports 16x1, 16x2, 16x4, 20x4, 20x2, 32x2, 40x2 LCD display modules
- Option for automatically wrapping the text to a new line
- Numbers can be padded with zeros to maintain user interface layout
- Scrolling a string of characters
- Includes two types of big digits numerical fonts for making a clock
- Has support for user defined fonts and other special fonts included by default in the LCD memory
- Support for 8 and 4 bit mode interface
- LCD backlight dimming or on/off control using PWM
Contents:
- Hardware interfacing
- Software interfacing
- Printing strings on the LCD display
- Printing numbers
- Displaying float numbers
- Clearing the LCD display
- Moving the LCD cursor
- Scrolling a string of characters from right to left
- Controlling the LCD backlight brightness using PWM
- Custom LCD digits - 3 characters wide digits
- Custom LCD digits - sharp digits
- Print special characters located inside the HD44780 LCD memory
- Using custom LCD symbols
- Download LCD Library
Hardware interfacing ATmega328 AVR microcontroller with a 16x2 LCD module with PWM brightness control
This LCD modules can be connected in 4 bit mode or 8 bit mode. Using 4 bit mode is recommended because it uses less pins but the code is a bit more complex. In the following example I use 4 bit mode.