----- Original Message ----- 
From: "Robert Bergfors" <[EMAIL PROTECTED]>
Subject: [Sdcc-user] Passing data with function calls


> device seems so make the device do *something*, but that seems quite
> random as well, at different times, flashing the device with the exacttly

I should have mentioned ... there is no harm in waiting too long for the 
LCD.  In fact, when you are first trying to get things done, I would 
encourage you to wait VERY long.  As I mentioned, the strobe only needs 450 
ns, so that part can simply be a couple of nops.  But if you don't wait long 
enough after sending a character, the processor on the LCD will get confused 
and will tend to start behaving randomly.  Indeed, when you are debugging, 
it is sometimes helpful to wait -seconds- so you can see what is going on.

The wait before, and after, the initialization is quite long, and things 
like clearing the display take longer than writing a character.  The 
physical LCD itself is quite a bit slower than the processor, so in most 
applications, you can have excessive delays waiting for the processor 
without actually impacting the application.

In addition, not all LCDs are up to spec. Sometimes cheap LCDs are available 
because they didn't quite meet the specifications, and sometimes it is the 
speed.  I would suggest you read the datasheet for the controller, and 
initially wait at least double the required times until you get things 
running.  Once everything is working, then back the times closer to the 
spec.  Although some LCDs might not quite make the spec, my experience is 
that they rarely miss by much, so just a tiny bit more than the minimum is 
USUALLY enough.  But until you get your code sorted, better to just send the 
commands to the LCD at a leisurely pace.

--McD


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to