Ciao Emanuel,
I have tweaked this library to use on my own project.It looks as if the problem is in the E signal timing is not right, certainly in derivatives of TextLCD. The E signal is left HIGH after a transfer - but it should be low.
Correct sequence should be:
1. Write the correct data on D7:D4 with E LOW, and RS in the correct condtion (command or display data is selected by it)
2. Wait 1us.
3. Write the data/RS again, with E HIGH.
4. Wait 1us.
5. Write the same data/RS yet again, with E again low
6. wait 1us
In addition, The clear screen command requires a longer wait - I use 10ms to cover many different types, including the Winstar OLED 20 x 4.
If any of the 6 steps above are omitted, the driver is in violation of the timing diagram of the Sunplus 780, the Winstar WS0010, or any of the other clones of the HD44780 that are actually inside today's module production. The Hitachi original is no longer in production.
The reason for the complexity is that this old Motorola bus timing latches the data at the fall of E, but requires data to be present slightly before and after. tHe 1us is larger than needed, but this will ensure reliability across a wide range of driver chips, some of which may not comply very well with the timing specs.
Sorry, my library is a bit roughly constructed at the moment, and customised to the WinStar OLED 20x4, and I2C front end.
Hi guys,
I want to ask if you know if the Text LCD library includes in the code the necessary delays after, for example a clear LCD instruction? Because sometimes, if I don´t insert some wait instructions in my code after a LCD instruction, the LCD doesn´t respond properly.
Also, I want to know if someone has experience of having any trouble using this library, or every thing worked fine.
Thanks in advance,
Emanuel