Programming: Sending Commands and Characters to the LCD
A command to clear the screen is 0x01 and is used first. A time delay is needed since the clear screen command takes a bit of time.
The next command is to set the LCD into 8-bit mode using 0x38. This command takes 39 microseconds, so 50 microseconds is used to be safe.
The next command set is done in one statement using a binary notation: the x denotes the location that a '1' would be.
0b0000x000 = to enable this command function
0b00001x00 = to make the display on
0b000010x0 = to turn the cursor on
0b0000100x = to make the cursor blink
The final command is 0b00001110 to turn the display and cursor on, but not blink the cursor.
Another delay of 39 us is needed so 50 us is used.
The sending a character function is used hereafter to send characters.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.