The meanings of the LCD command bits

rtarbell

New member
I am using a 20X2 LCD, using 4-bit mode. I don't understand all of the command bits used in the initialization.

For instance,
After writing one character in the first position, I would like the cursor to auto-increment to the second position. Does this mean I should set the "I/D" bit in the "entry mode" command?

I would like to hide the cursor so that the user can not see the cursor at all. Does this mean that I should clear the C and B bits in the "Display ON/OFF control" command?

In the "Cursor or Display shift" command, what exactly are the "S/C" and "R/L" bits used for? I don't understand the explanation given in the datasheet.

I'm close to getting the LCD screen to work, but right now, all I get is a bunch of dark blocks in the second row when I power up my unit. Thank you for any help!

-Richard
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
... but right now, all I get is a bunch of dark blocks in the second row when I power up my unit...
Sounds like your initialization sequence is not working.
Code:
I/D = 1 : Increment	I/D = 0 : Decrement
S = 1 : Display Shift On
D = 1 : Display On
C = 1 : Cursor Display On
B = 1 : Cursor Blink On
S/C = 1 : Shift Display	S/C = 0 : Move Cursor
R/L = 1 : Shift Right	R/L = 0 : Shift Left
DL = 1 : 8-Bit		DL = 0 : 4-Bit
N = 1 : Dual Line	N = 0 : Single Line
F = 1 : 5x10 dots	F = 0 : 5x8 dots
BF = 1 : Internal Operation
BF = 0 : Ready for Instruction
 
Top