template and source for hardware projects
Go to file
King Kévin 0df5d9e6c8 doc: add link to firmware 2022-07-09 14:02:12 +02:00
kicad lib: add QR code 2022-07-09 13:22:17 +02:00
library@47ad2bcbf9 lib: update repo 2022-06-22 09:13:01 +02:00
.gitignore rake: add panelization target 2022-06-10 19:32:19 +02:00
.gitmodules update library 2022-03-07 14:42:51 +01:00
.qeda.yaml lib: add used parts 2022-06-22 19:19:32 +02:00
CHANGELOG.md doc: document version 2022-07-09 13:24:26 +02:00
DEVELOPMENT.md doc: update development doc for kicad toolchain 2022-06-10 19:32:19 +02:00
JLCPCB_CORRECTION.csv save JLC PnP corrections 2022-06-10 19:32:19 +02:00
LICENSE.txt add CERN-OHL-S license 2021-07-22 12:22:58 +02:00
Makefile make: don't use commit id 2022-06-23 12:32:03 +02:00
README.md doc: add link to firmware 2022-07-09 14:02:12 +02:00
bom.ini rake: use custom bom generator configuration 2022-06-10 19:32:19 +02:00
fp-lib-table lib: add QR code 2022-06-23 12:22:49 +02:00
i2c_hd44780.kicad_pcb brd: increase qr code size 2022-07-09 13:23:04 +02:00
i2c_hd44780.kicad_pro brd: add version number 2022-06-23 12:32:25 +02:00
i2c_hd44780.kicad_sch sch: improve routability 2022-06-23 12:21:33 +02:00
refdes2fab.py add script to put refdes on fab 2022-06-23 12:23:39 +02:00
sym-lib-table lib: rename generated lib to qeda 2022-06-17 18:06:46 +02:00
version add output generation script 2021-07-22 12:34:35 +02:00

README.md

I²C adapter for Hitachi HD44780-based LCD modules, such as LCM1602.

purpose

LCM1602 are simple LCD modules, with 2 lines, and 16 characters each. There are very common, cheap, and sufficient to display text for simple projects. The LCD is driven by a Hitachi HD44780. Its interface requires 6 to 12 lines, and very good knowledge of the protocol and its timing. Also, most LCM1602 operate at 5V, while most micro-controllers operate at 3.3V.

The I²C to HD44780 adapter removes all the burden:

  • it requires only 2-lines for the I²C bus, which can be shared with other I²C devices
  • it takes care of proper LCD initialisation, with corresponding timing
  • you don't need to drive the data lines yourself, contrary to the I²C LCD backpack
  • you can directly send ASCII text to be display on the 2 lines
  • you can still send raw HD44780 messages
  • it can control the back light, with brightness setting
  • it includes LCD contrast setting
  • it can operate at 5V (required by the LCD) with 3.3V I²C interface (required by most MCU)

usage

Connect or solder the I²C to HD44780 adapter on the back of the LCM1602 LCD using the pins on the top. The side with all the parts must still be visible and pointing downwards.

Connect the I²C to HD44780 adapter to your micro-controller using the I²C pins on the left. Provide the LCD operating voltage on VCC, most of the time 5V.

You can set the LCD contrast by turning the potentiometer labeled CONTRAST. This needs to be adjusted depending on the operating voltage, angle, and temperature.

The I²C lines should be pulled up by your board, since this is just one slave device and your board is the master. This also allows you to operate the I²C bus at 3.3V, even if the LCD operates at 5V. If you don't want to pull up the I²C lines externally, you can solder 1-10 kOhm 0603 chip resistors on the I²C to HD44780 adapter board, at the place marked I²C PU. The I²C lines will then be pulled up to the LCD operating voltage.

By default, the I²C to HD44780 adapter is reachable at I²C address 0x47. You can set the 3 last bits to 0 by creating a solder bridge at the place marked 2 1 0.

By default the LCD is initialized as 2-lines, 5x8 dots, no cursor or blinking. To display text on line 1, select the I²C to HD44780 adapter I²C slave, write 1 followed by the ASCII text. To display text on line 2, select the I²C to HD44780 adapter I²C slave, write 2 followed by the ASCII text. In case the display is in a very weird state and does not update text, you can re-initialize it by writing 0 after selecting it. More commands are described in the firmware.