ELEC/XJEL3662 – Mini-project – Clock
timings for the LCD
In writing your program to control the LCD there are several delays that you need to introduce. Remember that your code communicates with the HD44780U control IC.
There is actually a problem here – the data sheets provided to not give all the information you need. The HD44780U sheet gives many timings, but many of these are (if you read the associated notes) for a clock frequency of 270 kHz. This does not imply that the IC will be clocked at that frequency – it is merely an example. In fact, the table at the top of page 25, rightmost column, describes how the times are scaled for any other frequency.
The top of page 49 gives the range of frequencies for which the IC is guaranteed to work: from 125 kHz to 350 kHz. The actual frequency is chosen by whoever designs the circuit board with the HD44780U on it.
In your case this circuit board is the LCD module, which is a Powertip PC1602-F. The data sheet for this is also on Minerva, but it is only one page long and makes no mention of the clock frequency.
I examined one of these LCD modules and put a scope on the clock line. (The IC pins are covered in black compound, but I managed to work out where the clock line emerged.) It does indeed go at 270 kHz, so the times in the HD44780U data sheet are the correct ones to use. (I only tested one LCD module; it would have been more cautious to have tested several.)
If you are looking for these pulse timings, by the way, they are on pages 49 and 50. This table is for a power supply voltage which is what our LCD uses; the similar nearby table is for other supply voltages.
ELEC/XJEL3662 – LCD clock timings – Dr Chris Trayner = 2019nov6