CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LCD R/W pin, is this needed?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Will Reeve



Joined: 30 Oct 2003
Posts: 209
Location: Norfolk, England

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

LCD R/W pin, is this needed?
PostPosted: Tue Sep 07, 2004 7:26 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 07, 2004 8:23 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 07, 2004 8:38 am     Reply with quote

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







PostPosted: Tue Sep 07, 2004 9:04 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 07, 2004 9:13 am     Reply with quote

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







PostPosted: Tue Sep 07, 2004 9:19 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group