Högskolan DalarnaLab. Instruction2019-01-26/lec
Avd. Datateknik och Informatik LCD-Electronics
Lab. Nr 3Use of an alphanumeric LCD module
Aim:To provide knowledge about how to connect and print text on an alpha numeric LCD module.
Equipment:
A computer with accessible parallel port
Alpha numeric LCD module DMC16230
Alpha numeric LCD module DMC20434
Drive circuit for Electro-Luminescent Light H-5 EL Lamp
Connection cable between the parallel port and the LCD module
Resistor for the background lighting
Potentiometer for adjustment of the display contrast
A start diskette with necessary files
The two modules, DMC16230 and DMC20434, differ in the number of characters and rows. They also have different types of background lighting. Both are built up on control circuit HD44780.
1.Assembly and testing
Connection between the PC and the LCD module.
PC parallel port / Connection DMC 16230Address / Bit value / Pin nr / Note / Pin nr / Name
H37A / 2 / 14 / Inverted / 4 / RS
4 / 16 / 5 / R/W
8 / 17 / Inverted / 6 / E
H378 / 1 - 128 / 2 - 9 / Databus / 7 - 14 / D0 - D7
18 / GND / 1 / Vss
Instructions for connecting the power supply can be found in the datasheet for the module.
The computer must be started with the start diskette in the diskette drive so that the parallel port will be accessible. Start the program QBASIC by writing QBASIC. Load the file ALPHA.BAS. That file contains the three subroutines initlcd, writetolcd and operate. Write a simple main program so that you can see if the modules work. Editing and compilation is done with QBASIC.EXE. The main program is to be written before the subroutines. Then test modules DMC16230 and DMC20434 with your test program. Measure power consumption of the two modules by measuring the current and voltages. You get the power consumption by multiplying the current and the voltage.
Lab. report: Tables that show current, voltage and power consumption for both modules.
2.Background lighting
DMC16230: The module has LEDs for background lighting. Because they are LEDs a resistor must be connected in series with the diodes. Use a resistor with the resistance 3 ohm (or three ten ohm resistors in parallel ). Connect to 5 V.
Connect, test and measure the power consumption.
Lab. report: Tables that show current, voltage and power consumption for the LED backlight.
DMC20434: The module’s background lighting is Electro-Luminescent Light (abbreviated to EL).
WARNING!! High voltages are used with Electro-Luminescent Light.
The high voltage you get from an inverter shown below. Observe that the figure of the pins is seen from underneath.
Connect, test and measure the power consumption.
Lab. report: Tables that show current, voltage and power consumption for the EL backlight.
3.Power Consumption
Compare the power consumption measurements.
Lab. report: Table and comments
4.Text Display
Choose one of the modules. Write a program that shows your first name, blinking cursor position and at least one character of your own invention.
Lab. report: Source code and comments.
Lab 3 LCD Electronics- 1 -