Create a function that transmits one byte to an HD44780 LCD controller using the following sequence. Allow one microsecond between each instruction. To clock in a byte:
Set the E line low.
Set the RS line high if you're sending data, or low if your sending a command.
Set the E line high
Put the four most significant bits on DB4 to DB7
Set the E line low.
Set the E line high
Put the four least significant bits on DB4 to DB7.
Set the E line low The E line should remain low until you're ready to clock in another byte.