This LCD I2C interface adapter can be added to a 16 x 2 or 20 x 4 character LCD display with a standard parallel interface to make it I2C compatible.
- LCD I2C Interface Adapter
KEY FEATURES OF LCD I2C INTERFACE ADAPTER:
- Provides I2C to parallel data conversion
- Backlight enable jumper
- Contrast control potentiometer
- 0x27 I2C default address. Jumper selectable from 0x20 – 0x27
- 5V operation typical, 3.3V if the LCD supports it
The board has a PCF8574 I2C chip that converts the I2C data from an MCU into the parallel data required by the LCD display.
By default, the industry standard HD44780 compatible 16 x 2 and 20 x 4 character LCD displays require 4 or 8 parallel data lines to drive them along with a couple of pins for chip select and chip enable. This consumes a lot of pins on the MCU. This adapter board reduces the data pin requirements to only 2 pins which can also be shared with other I2C devices.
The backlight intensity is not directly controllable though the I2C interface, however there is a jumper on the I2C board that supplies Vcc power to the backlight. That jumper can be removed and a voltage applied to the header pin nearest the ‘LED’ markings on the board to provide power to the backlight separately.
The default I2C address is 0x27. The address is marked on the bag that the board comes in.
If you need to adjust the I2C address to avoid a conflict with another device, this can be done by soldering jumpers to the board.
There are 3 address jumper locations marked A0, A1, A2. Normally these lines are pulled high using built-in pull-up resistors. If you bridge these pads using a blob of solder, it grounds that address line. If you were to bridge all 3 to ground, the address would be 0x20. The range of all possible addresses spans from 0x20 to 0x27
If you are unsure of the I2C address of this or any other device, it is easy to find out what it is. Just refer to this blog post.
The MCU connection to the I2C adapter is via a 4 pin header.
1 x 4 Header
- GND = Connect to system ground. This ground needs to be in common with the MCU.
- VCC = Connect to 5V. This can come from the MCU or be a separate power supply. Some LCD may operate at 3.3V and this module can also operate at 3.3V
- SDA = Connect to the I2C / SDA pin on the MCU.
- SCL = Connect to the I2C / SCL pin on the MCU.
A red LED on the board lights when power is applied.
The pin-out of the right angle header which is soldered to the LCD follows for reference, but in general you don’t need to worry about it as the I2C interface board takes care of this interface.
1 x 16 Header
- VSS = Connect to system ground. This ground needs to be in common with the MCU
- VDD = Connect to 5V. This can come from the MCU or be a separate power supply.
- VO = Display contrast. Connect to approximately a 20K potentiometer between 5V and ground to adjust contrast of the display
- RS = Register Select. Selects the command or data register. A logic LOW = Command, HIGH = Data.
- RW = Read / Write. The display is a write only device. This pin is grounded to keep it in write mode at all times.
- E = Enable. This pin enables writing to the display when active LOW
- D0 – D7 = Data pins. D0-D7 used for 8-bit mode. D4-D7 used for 4-bit mode
- A = Backlight Anode. Connects to 5V.
- K = Backlight Cathode. Connects to ground
Assembling the Adapter to the LCD
To use the adapter, you will need to insert the 16-pin header into the 16 solder pad holes on the back of the LCD and solder them in place.
This is easy to do, but if you already have other pins in those holes, they will need to be removed first before this board can be added. The picture below shows the adapter mounted to the back of an LCD2004 4 x 20 character LCD.
OUR EVALUATION RESULTS:
Using the parallel interface on LCD displays is mainly interesting as a learning exercise, but for general use the I2C interface is a much better solution in almost all cases due to the large reduction in pins consumed on the MCU.
This is the same module used on our I2C compatible LCD displays we sell and is well supported using the LiquidCrystal_I2C.h and similar libraries. For using the board with software, you can check out one of the LCDs below that already have this module installed.
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- I2C interface verified
- Packaged in a resealable ESD bag for protection and easy storage.
|Vcc||range||2.5 – 6V (5V typical)|
|Dimensions||L x W (PCB)||42mm x 19mm (1.6 x 0.75″)|