Quote Originally Posted by tamersoss View Post
Dear Freinds ...
I can't understand precisely what is the delay we control using these two defines :
DEFINE LCD_COMMANDUS 1000 ' SET COMMAND DELAY TIME IN us.
DEFINE LCD_DATAUS 40 ' SET DATA DELAY TIME IN us.
Please help me to understand precisely what we aim to control through these defines ... also , What are the defaults ?
A parallel LCD, Hitachi 44780 compatible LCD, is basically a smart LCD. It has a processor of sorts, it's own RAM, it's own way of talking. So basically, when you LCDOUT, you ARE communicating with another processor.
Those delays are needed to let the LCD processor have time to do what it needs to do.
In short, start big and work your way down until the LCD fails, then add a bit for a fudge factor.
CommandUs (word value) generally works with 1000, but some LCDs want 2,000 or more.
DataUs (byte value) usually works at 100, again, some want more.

Most of the LCDs I've got here in my shop will work with as little as CommandUs of 200 and DataUs of 35.
YMMV...