User Tools

Site Tools


info:lcd_4_bit_interfacing

This is an old revision of the document!


LCD 4 bit Interface

In 4-bit mode the data is sent in nibbles, first we send the higher nibble and then the lower nibble. To enable the 4-bit mode of LCD, we need to follow a special sequence of initialization that tells the LCD controller that the user has selected 4-bit mode of operation. Here is the reset sequence to put the LCD in 4 bit mode.

 1. Wait for abour 20mS
 2. Send the first init value (0x30)
 3. Wait for about 10mS
 4. Send second init value (0x30)
 5. Wait for about 1mS
 6. Send third init value (0x30)
 7. Wait for 1mS
 8. Select bus width (0x30 - for 8-bit and 0x20 for 4-bit)
 9. Wait for 1mS

The busy flag will only be valid after the above reset sequence. Usually we do not use busy flag in 4-bit mode as we have to write code for reading two nibbles from the LCD. Instead we simply put a delay usually 300 to 600uS. This delay might vary depending on the LCD. It depends on the LCD module. So if you feel any problem running the LCD, simply try to increase the delay. This usually works. 400uS is a good typical value.

info/lcd_4_bit_interfacing.1295099499.txt.gz · Last modified: 2011/01/15 08:51 by tomgee