This is the COMPLETED LCD driver code.