LCD Engineering Application Notes – Instruction Codes

Instruction

Set

Instruction Code

Description

Execution Time
(when fcp or fosc is 250 KHz)

RS

R/W

DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0

Clear Display

0

0

0

0

0

0

0

0

0

1

Clears all display and returns the cursor to the home position (Address 0)

82 µs~1.64ms

Return Home

0

0

0

0

0

0

0

0

1

*

Returns the cursor to the home position (Address 0). Also returns the display being shifted to the original position. DD RAM contents remain unchanged.

40µss~1.6ms

Entry Mode Set

0

0

0

0

0

0

0

1

I/D

S

Sets the cursor move direction and specifies or not to shift the display. These operations are performed during data write end read.

40µs

Display ON/OFF Control

0

0

0

0

0

0

1

D

C

B

Sets ON/OFF of a display (D), cursor ON/OFF (C), and blink of curser position character (B)

40µs

Cursor or Display Shift

0

0

0

0

0

1

S/C

R/L

*

*

Moves the cursor end shifts the display Levitra without changing DD RAM contents.

40µs

Function Set

0

0

0

0

1

DL

N

F

*

*

Sets interface data length (DL), number at display lines (N), one character font (F).

40µs

Set CG RAM Address

0

0

0

1

ACG

Sets the CG RAM address. CG RAM data is sent and received after this setting.

40µs

Set DD RAM Address

0

0

1

ADD

Sets the DD RAM address. DD RAM data is sent and received after this setting.

40µs

Read Busy Flag & Address

0 1 BF

AC

Reads Busy Flag (BF) indicating internal operation is being performed and reads address counter contents.

1ms

Write Data to CG or DD RAM

1

0

DD RAM:
Display data RAM 
CG RAM: Character generator RAM
ACG
CG RAM address
Corresponds to cursor address
ADD  DD RAM address 
AC:  Address counter used for both DD & CG RAM
address

 

Execution time changes when frequency changes.
(Example)

When fcp or fosc is 270 KHz :
40 µs X 250 / 270 = 37 µs