LCD adapter for 16x2 and 8x2 LCD modules Print
Written by Jurij Mikeln   

Many years ago there were problems obtaining LCD modules. If you were lucky enough to buy a certain module at a reasonable price, you could be disappointed few months later when you couldn’t buy the same or even a compatible LCD module. What was offered might have a different pinout, not to mention different physical dimensions.

Back then, it was really a nightmare buying LCDs, because you would never know what you might get. For that reason, we developed a universal LCD adapter, which was cleverly designed to handle most of the pinouts of available LCDs. Now it’s different: we can buy many types of LCDs and there isn’t the problem described above. Lately, we purchased some very attractive 8x2 blue LCDs that were both cost-effective and very nice looking. However they had a strange pinout that we have never seen before, so we had to make a new, universal PCB, which will suit both the standard 2x16 and the new 8x2 LCDs.

Schematic diagram

The schematic diagram shown in Figure 1 is very simple. You will see that it supports two LCDs (but only one at a time!), and has a MOSFET for driving the LCD’s backlight

The adapter has an IDC socket for easier connection to the MiniPin II, MegaPin development boards or any other circuit where you might want to use this LCD module. The first and second pin on the connector are +5V and GND, while others are PortX.0 to PortX.7, in that order. On the adapter side, the control pins are connected as follows (see Figure 2).

D7-D4 pins are connected to PortX.7 – PortX.4, Enable pin at PortX.2 and Register Select pin at PortX.1. So, Bascom’s LCD configuration statement would be:

Config Lcdpin = Pin , Db7 = Porta.7 , Db6 = Porta.6 , Db5 = Porta.5 ,_
Db4 = Porta.4 , E = Porta.2 , Rs = Porta.1

On the board, there is also one pin which drives the LCD backlight connected to PortX.5.

This LCD board works with either 2x8 or 2x16 LCDs and, in either case, can drive the backlight through a MOSFET. The PCB is single-sided.

If we want to drive the backlight with an AVR microcontroller, note that some AVR’s have a PWM pin on PortD.5 (ATmega16/32 etc.), whereas others use PortD.0. To accommodate this, we can cut the PCB shunts at J42 & J43, and add 2 wire jumpers to reverse the two connections. The PCB jumpers can be seen in Figure 2.

LCD adapter for 16x2 and 8x2 LCD modules


Continue reading

Shop area

Last Updated on Wednesday, 01 August 2012 14:48