View previous topic :: View next topic |
Author |
Message |
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
LCD R/W pin, is this needed? |
Posted: Tue Sep 07, 2004 7:26 am |
|
|
I am running out of pins; I am using a LCD 4-bit parallel interface, as I only ever write to the LCD I can’t see any problem in tying R/W to GND via 10k. My code allyways holds it low anyway. Anyone else do this?
I remember one problem on an old design with initialising a certain brand of LCDs where you had to wait for conformation of the init settings, but the batch I have here (5 examples) of a new type seem very happy indeed with the “delay” method of init. I just don't want the next batch to need it!
Will |
|
|
alexbilo
Joined: 01 Jun 2004 Posts: 39 Location: Trois-Rivières
|
|
Posted: Tue Sep 07, 2004 8:23 am |
|
|
I've used this trick before... Never had any problem with the LCDs I used. Of course, that doesn't guarantee that you'll never encounter LCD that needs some reads, but I guess you'll be able to find models that are compatible with your design.
Good luck, _________________ Alex |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Tue Sep 07, 2004 8:38 am |
|
|
You are 'supposed' to check the Busy Flag(BF) every time you write to the LCD or you might get garbage on the screen. The only way to do this is to put the device in Read mode so you can check that bit. I used to simply put a delay in my routine but found that the display would 'wigg out' every now and then. Since I started checking the BF bit I haven't had any problems.
Ronald |
|
|
Steve H. Guest
|
|
Posted: Tue Sep 07, 2004 9:04 am |
|
|
I don't use this pin - I add in the worst case delay and always wait that amount of time - instead of checking the busy flag. I have done this for nine years with VFD's and LCD's with no problems.
Steve H. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Sep 07, 2004 9:13 am |
|
|
The proper way is to check the busy flag. However, some people still put delays after writing to external serial eeproms rather than checking for an ACK. Obviously checking the flag is better and doesn't waste processor time on a delay. |
|
|
Ttelmah Guest
|
|
Posted: Tue Sep 07, 2004 9:19 am |
|
|
Mark wrote: | The proper way is to check the busy flag. However, some people still put delays after writing to external serial eeproms rather than checking for an ACK. Obviously checking the flag is better and doesn't waste processor time on a delay. |
One way which has worked for me in the past, is to just send one byte at a time to the LCD, from inside an interrupt driven at 100Hz. There are only a couple of commands, which take longer than this (you must be careful to look at the 'worst case' timings), and when these are used, I set a flag, which prevents a byte being sent on the next interrupt. This limits the maximum data rate to the LCD, at 100cps, but does save the R/W pin, and has been used on a couple of systems that have run for over ten years!. The original code was on a Z80, but a latter variant went onto the early PIC 16C84. In a couple of cases the systems using this have run 'non-stop' from initialisation, except possibly for a watchdog restart, but some of these have logged data continuously for this time, without problems...
Best Wishes |
|
|
|