| Online Development Notebook > Index > ODN > Raw Device Programming > 10 - InitLCDCmd |
Command #10 - InitLCDCmd
Description:
Initialize LCD variables. This includes the selection of the lines used for RW, RS, E and the port used for data. RW, RS, and E are reset. These commands are appropriate for HD44780 devices and devices that are compatible.
Command Format:
| Byte Number | Description |
| 0 | 10h: InitLCDCmd |
| 1 | RW line selection, RS line selection |
| 2 | Data port, E line selection |
| 3 | <not used> |
| 4 | <not used> |
| 5 | <not used> |
| 6 | <not used> |
| 7 | <not used> |
Command Format Details:
Byte 0 contains the command. Byte 1 selects the RW line in the higher nibble, and the RS line in the lower nibble. Byte 2 selects the port to write the byte in the higher nibble, and the E line in the lower nibble. A value of 0-h is port A, a value of 1-h is port B. Byte 3 through byte 7 are unused.
Bit⁄Line Selection
| Byte Value | Result | Byte Value | Result | |
| 00h | Affect A.0 | 08h | Affect B.0 | |
| 01h | Affect A.1 | 09h | Affect B.1 | |
| 02h | Affect A.2 | 0Ah | Affect B.2 | |
| 03h | Affect A.3 | 0Bh | Affect B.3 | |
| 04h | Affect A.4 | 0Ch | Affect B.4 | |
| 05h | Affect A.5 | 0Dh | Affect B.5 | |
| 06h | Affect A.6 | 0Eh | Affect B.6 | |
| 07h | Affect A.7 | 0Fh | Affect B.7 |
Response Format:
| Byte Number | Description |
| 0 | 10h: InitLCDCmd |
| 1 | <not used> |
| 2 | <not used> |
| 3 | <not used> |
| 4 | <not used> |
| 5 | <not used> |
| 6 | <not used> |
| 7 | <not used> |
Response Format Details:
Byte 0 contains the command. Byte 1 through byte 7 are unused.
Example Usage:
The command 10-89-0A-00-00-00-00-00 will select port A for the data lines to the LCD, B.0 for the RW line, B.1 for the RS line, and B.2 for the E line.
| Hardware: U401 USB Interface U421 USB Interface |
| Programming: USBm DLL Programming Download Files |
| Application Notes: U4x1 Application Notes Misc Applications and Information FAQ |