LCD modules form a very important part in many arduino based embedded system designs. So the knowledge on interfacing LCD to arduino is very essential in designing embedded systems. This article is about interfacing a 16×2 LCD to Arduino. JHD162A is the LCD module used here. JHD162A is a 16×2 LCD module based on the HD44780 driver from Hitachi. The JHD162A has 16 pins and can be operated in 4-bit mode or 8-bit mode. Here we are using the LCD module in 4-bit mode. First, I will show you how to display plain text messages on the LCD module using arduino and then few useful projects using LCD and arduino. Before going in to the details of the project, let’s have a look at the JHD162A LCD module.
JHD162A LCD module 16×2.
The JHD162A has 16 pins and can be operated in 4-bit mode or 8-bit mode. Here we are using the LCD module in 4-bit mode. Before going in to the details of the project, let’s have a look at the JHD162A LCD module.The schematic of a JHD162A LCD module is given below.
The name and functions of each pin of the JHD162A LCD module is given below.
Pin1(Vss):Ground pin of the LCD module.
Pin2(Vcc):+5V supply is given to this pin
Pin3(VEE):Contrast adjustment pin. This is done by connecting the ends of a 10K potentimeter to +5V and ground and then connecting the slider pin to the VEE pin. The voltage at the VEE pin defines the contrast. The normal setting is between 0.4 and 0.9V.
Pin4(RS):Register select pin.The JHD162A has two registers namely command register and data register. Logic HIGH at RS pin selects data register and logic LOW at RS pin will select command register. If we make the RS pin HIGH and put a data on the data lines (DB0 to DB7) it will be recognized as a data. If we make the RS pin LOW and put a data on the data lines, then it will be taken as a command.
For more detail: Interfacing LCD to Arduino uno