Thursday , March 30 2017
Home / Embedded Systems / Character LCD Command Sheet HTML Version

Character LCD Command Sheet HTML Version

I was looking for an Image of the Character LCD command sheet throughout the internet and failed find any good resolution images that I can use for post references. Here is a HTML Version that could be used at whichever resolution you choose!

Character LCD Command Sheet

Instruction
Code
Description
Execution
time
RS
RW
D7
D6
D5
D4
D3
D2
D1
D0
Clear display  0 0  0  0 0 0 0 0 0 1  Clears display and returns cursor to the home position (address 0).  1.52 ms
Cursor home 0 0  0 0 0 0  0  0  1  *  Returns cursor to home position. Also returns display being shifted to the original position. DDRAM content remains unchanged.  1.52 ms
Entry mode set 0 0 0 0 0 0 0 0 I/D  S  Sets cursor move direction (I/D); specifies to shift the display (S). These operations are performed during data read/write.  37 μs
Display on/off control 0 0 0 0 0 0 0 1  C  B  Sets on/off of all display (D), cursor on/off (C), and blink of cursor position character (B).  37 μs
Cursor/display shift 0 0 0 0 0 1 1 R/L  *  *  Sets cursor-move or display-shift (S/C), shift direction (R/L). DDRAM content remains unchanged.  37 μs
Function set 0 0 0  0 1 DL s/c  F  *  *  Sets interface data length (DL), number of display line (N), and character font (F)  37 μs
Set CGRAM address 0 0  0  1       CGRAM address  Sets the CGRAM address. CGRAM data are sent and received after this setting.  37 μs
Set DDRAM address 0 0  1        DDRAM address  Sets the DDRAM address. DDRAM data are sent and received after this setting.  37 μs
Read busy flag & add resscounter 0 1 BF        CGRAM/DDRAM address  Reads busy flag (BF) indicating internal operation being performed and reads CGRAM or DDRAM address counter contents (depending on previous instruction).  0 μs
Write CGRAM or DDRAM 1 0         Write Data  Write data to CGRAM or DDRAM. 37 μs
Read from CGRAM orDDRAM 1  1         Read Data  Read data from CGRAM or DDRAM.  37 μs
Instruction bit names:

  • I/D – 0 = decrement cursor position, 1 = increment cursor position;
  • S – 0 = no display shift, 1 = display shift;
  • D – 0 = display off, 1 = display on;
  • C – 0 = cursor off, 1 = cursor on;
  • B – 0 = cursor blink off, 1 = cursor blink on ;
  • S/C – 0 = move cursor, 1 = shift display;
  • R/L – 0 = shift left, 1 = shift right;
  • DL – 0 = 4-bit interface, 1 = 8-bit interface;
  • N – 0 = 1/8 or 1/11 duty (1 line), 1 = 1/16 duty (2 lines);
  • F – 0 = 5×8 dots, 1 = 5×10 dots;
  • BF – 0 = can accept instruction, 1 = internal operation in progress.

About Siddharth

Siddharth is a Firmware Engineer, techie, and a movie-buff. His interests include, Programming, Embedded Systems, Linux, Robotics, CV, Carpentry and a lot more. At times, you could see some of his sunday projects converge on release quality. You get to know him on the following social channels.

Check Also

GLEM: Graphical LCD Emulator in C

At some point in time we all have had to develop some sort of UI …

Keep in touch with the current trends!
Did you like this article? Sign up and get our latest posts delivered to your inbox!
  We hate spam and never share your details.