lundi 22 janvier 2018

LCD with 4-bit or with 8-bit

LCD






LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.



Pin Diagram











Lcd in 4-bit mode

  • Commands used to initialize the 4-bit lcd mode To initialize character lcd in 4 bit mode we send value hex 0x20 to command register of lcd. 0x20 tells the lcd controller that we want to communicate in 4-bit mode. Lcd is 1 line (has 1 row) and we want character shape displayed in 5x7 matrix.
  • If our character lcd has 2 lines (rows) we will send 0x28 instead of 0x20. It tells the lcd controller that we want 4 bit communication and character size is between 5x7 dot matrix.
  • 4-bit mode make use of only just four data pins D4-D5-D6-D7.
  • In 4-bit mode character is displayed on lcd in two pulse signals. First the higher four nibbles of a character are sent to the lcd with an enable stroke. Than the lower four nibbles are send with enable stroke.
  • Since two pulse (enable) signals are required to display a single character so 4-bit mode latency time is high.

Lcd in 8-bit mode

Commands used to initialize the 8-bit lcd mode are
  • To initialize character lcd in 8-bit mode we send vale hex 0x30 to command register of lcd. 0x30 tells lcd that we want to communicate in 8-bit mode. Lcd is 1 line (has 1 row) and we want character shape displayed in 5x7 matrix. 
  • If our character lcd has 2 lines (rows) we will send 0x38 instead of 0x20. It tells the lcd controller that we want 4 bit communication and character size is between 5x7 dot matrix.
  • In 8-bit mode only one pulse signal is required to display a character on lcd.
  • Thus it is faster than 4-bit mode.

this is the explanation of functioning of 2 mode










Aucun commentaire:

Enregistrer un commentaire