In this tutorial, we write data to the 16 x2 character LCD. Our tutorial consists of three parts. In first part, we create the project code with VHDL. In second part we create the project with C in Xilinx EDK
We will use ISE Design Suit 14.2 as compiler. We carried out all projects in this tutorial on the Spartan 3E-1600 Development Board
Before begin the project, let’s take a quick look at character LCD and its commands.
Dot Matrix Character LCD
The most widely used character LCDs are the ones that include the Hitachi HD44780 LCD controller. Character LCDs generally include 14 pins as a contact interface. In addition to these pins, LCDs also have 2 extra pins for backlight power supply terminals. The pinout and pin descriptionÂ is as follows:
- RS(register select) pin: There are two important registers inside the LCD. This pin is used for their selection. If RS = 0, the instruction command code register is selected, then allowing the user to send a command such as clear display, set cursor move etc. If RS=1, the data register is selected and allowing the user to send data to be displayed on the LCD.
- R/W (read/write ) pin: This pin allows the user to write information from LCD. If R/W = 1, data can be read from LCD, if R/W=0, data can be sent to LCD so that LCD displays
- E(enable) pin: This pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high-to-low pulse must be applied to this pin in order to for the LCD to latch in data presented at the data pins.
- D0-D7(Data Lines) pins: These pins are used to send information to the LCD or read the contents of the LCD’s internal registers.
- VDD,VSS, VEE(0) : The voltage Vcc and Vss provided by +5V and ground respectively while Vee is used for controlling LCD contrast. Variable voltage on the Vee pin is used to specify the contrast (or darkness) of the characters on the LCD screen.
Before sending data to be displayed onÂ the LCD screen we should send some commands to prepare the LCD for displaying
Initial Setting Commands
Input Mode Commands
Display ON/OFF and Cursor Commands
Display/Cursor Shift Commands