Hmmm... the code in the lcd_1602_i2c.c example is slightly weird.
A 600 us delay is used to toggle the E line of the HD44780. I have some code but it's PIC16 C -- I send the bytes to toggle E as consecutive bytes. E minimum high time PW(EH) is 230 ns per HD44780 datasheet.
It's possible that the delay helped to fix something else, which could be lcd_clear(). Clear display actually needs some time to run, but someone forgot to put it in the old HD44780 datasheet Table 6 for Clear Display. Using the HD44780 datasheet alone I ran into this clear display timing problem and had to check an Arduino library to get my code to work. Later I found a AIP31068L datasheet which is a HD44780 clone and that datasheet is much better. Clear display time is 1.52 ms, but I use 2.2 ms for worst case HD44780 f(osc) timing.
A 600 us delay is used to toggle the E line of the HD44780. I have some code but it's PIC16 C -- I send the bytes to toggle E as consecutive bytes. E minimum high time PW(EH) is 230 ns per HD44780 datasheet.
It's possible that the delay helped to fix something else, which could be lcd_clear(). Clear display actually needs some time to run, but someone forgot to put it in the old HD44780 datasheet Table 6 for Clear Display. Using the HD44780 datasheet alone I ran into this clear display timing problem and had to check an Arduino library to get my code to work. Later I found a AIP31068L datasheet which is a HD44780 clone and that datasheet is much better. Clear display time is 1.52 ms, but I use 2.2 ms for worst case HD44780 f(osc) timing.
Statistics: Posted by katak255 — Tue Aug 19, 2025 4:57 pm