Safe reading of HD44780 busy flag

Assumes mcu directly connected to lcd controller.
May mcu and/or lcd controller be damaged when program contains error.
For example when some of pins connected to D4-D7 configured as output,
RS=LOW, RW=HIGH and ENABLE=HIGH?

Yes, the HD44780 controller will be damaged if you have RW=1 E=1 and the AVR has D4-D7 as outputs.

The HD44780 will have its data bus as output. There will be a FIGHT.

Life is much simpler if you just hard-wire RW=0 and use delays instead of Busy flag.

David.

I really make this error, but display was connected via 510 ohm resistors, so it still works.

Using the busy flag could speed up transfer...(push to todo list)

[update]

  • performance
  • extra RW line/pin
  • increase size & complexity of the code.

removed from todo list :wink:

You should consider the situation where the LCD is just monitoring a process as opposed to being the reason for the process. Without some sort of timeout procedure in the busy flag check (adding even more complexity to the code) a failure in the LCD could cause the entire process to grind to a halt.

Don