Electronic – HD44780: How long do I have to wait for busy flag to reset

character-lcdhd44780shift-register

I'm driving a HD44780 controlled character LCD (HY-0802B-104-R) with shift registers (74LS164). So, the communication will be one-way only; I won't be able to read any data from the LCD.

Normally, after sending any command to the LCD, we wait for the busy flag to be reset. Now that I won't be able to read the busy flag, can you tell me how long I must wait after sending a command to the LCD? And, will the waiting time be constant, or will it dependent on the command sent?

Best Answer

There are roughly 47,723 different clones of the HD44780 out there, and some may run a little faster than others. The normal recommendation would be to wait 1.6ms after a command which clears the screen or resets scrolling to home position, and 40us after any other command.

Note that if you're initializing a display which is in an unknown state, it's possible that the display may have received a "clear screen and reset scrolling" command just before your initialization routine started, so you need to wait 1.6ms before you begin. Then, after you've waited, it's possible that the first byte you send might be misinterpreted as the second byte of a "reset scrolling" command, thus causing the display to be busy for 1.6ms. Note that if the display was busy processing a "clear-screen" command which was received just before your initialization code started, that scenario won't apply, but since your code has no way of knowing whether the display was processing a clear-screen, you can rule out neither the possibility that it was, nor that it wasn't.