Transcript from http://developer.pertelian.com/index.php?option=com_content&view=section&id=3&Itemid=9 Received via http://web.archive.org/web/20100903020330/http://developer.pertelian.com/index.php?option=com_content&view=section&id=3&Itemid=9 Apr 2019 ## Pertelian X2040 Hardware Instruction Set To issue an instruction, you must first issue a Set Instruction Mode command to set the LCD in instruction mode. The Set Instruction Mode command has byte code 0xFE hex (254 decimal). | Instruction | Byte 7 | Byte 6 | Byte 5 | Byte 4 | Byte 3 | Byte 2 | Byte 1 | Byte 0 | Description | Exec. Time | | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | | Set Instruction Mode | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | Sets the LCD to Instruction Mode | 1.64ms | The byte following the Set Instruction Mode command is treated as an instruction. For example, to clear the display write the byte codes 0xFE and 0x01 to the device. | Instruction | Byte 7 | Byte 6 | Byte 5 | Byte 4 | Byte 3 | Byte 2 | Byte 1 | Byte 0 | Description | Exec. Time | | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | | Clear display | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | Clears display and returns cursor to the home position (address 0) | 1.64ms | | Backlight Off | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | Turns the backlight off | 1.64ms | | Backlight On | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | Turns the backlight on | 1.64ms | | Entry mode set | 0 | 0 | 0 | 0 | 0 | 1 | I/D | S | Sets cursor move direction (I/D), specifies to shift the display (S). These operations are performed during data read/write | 40us | | Display On/Off control | 0 | 0 | 0 | 0 | 1 | D | C | B | Sets On/Off of all display (D), cursor On/Off (C) and blink of cursor position character (B) | 40us | | Cursor/display shift | 0 | 0 | 0 | 1 | S/C | R/L | * | * | Sets cursor-move or display-shift (S/C), shift direction (R/L). DDRAM contents remains unchanged | 40uS | | Function set | 0 | 0 | 1 | DL | N | F | * | * | Sets interface data length (DL), number of display line (N) and character font(F) | 40uS | | Set CGRAM address