PDA

View Full Version : lcd delay time



asifiqbal
- 10th February 2018, 05:50
i have tried serial 16x2 with 9600 buad and alpha 16x2 with 16f73 but both take much time to print,serial takes 15ms and alpha takes 4ms to print,is there any way to print on lcd in less than 200us by changing hardware or software?thanks

HenrikOlsson
- 10th February 2018, 16:16
If you look at the datasheet for the 44780 controller you can see the timing requirements, not all "compatible" controllers are equal though which is why PBP has the DEFINE LCD_COMMANDUS and LCD_DATAUS.
The defaults for those are 1500us for a command and 44us for each data byte. So if you do a clear screen, write 16 characters, move cursor to second line, write 16 characters that's a total of 1500+(16*44)+1500+(16*44) = 4408us which is pretty close to the 4ms you mention. You can always try lowering the timing values and see where it stops working.

For a serial LCD it obviously depends on the baudrate but it TOO has to write to the LCD which will then take those 4ms.

One way to get around that would be to do a buffering serial LCD controller. You could then send it data at a very high baudrate and it would then update the screen while the main CPU does other things. Or be clever and only write to the screen when and where data actually changes.

/Henrik.

Art
- 13th February 2018, 08:43
Obvious answer is to toss the serial LCD backpack and use the HD44780 parallel interface, if your chip has the IO to afford it.
Some can play up if you didn’t give the LCD it’s delay time at first startup.