[sdiy] Multiple LCD connection sanity check please
Tom Wiltshire
tom at electricdruid.net
Tue Jan 11 16:22:44 CET 2011
Neil,
> Reading the HD44780U controller datasheet I see there are 125uA (typ)
> pullups on the Data lines (equivalent to around 40k). If you have
> lots of displays in parallel then your drivers must be able to
> comfortably pull down a few mA quickly.
Ok, fair enough. I'm using a dsPIC, and the outputs can drive an LED, so I'm guessing that means they could handle this. I'm also guessing that HD44780 "compatible" LCD drivers might use other pull up values...
Failing that (simply paralleling them all up) I guess I'd be looking at adding a tristate buffer between the LCD inputs and the bus, would I?
> It also means you won't be polling the BUSY flag then? In that case
> you will have to make assumptions about execution time of LCD commands
> and hope you're not wrong, or take conservative estimates and suffer
> the performance penalty.
I'm ok with that. Following advice I received here in the past, I've written a buffered LCD output routine. You can stuff long messages into a buffer, and then a background task sends a character to the LCD every 0.5mS. The only clever bit is that you can also send delays to the LCD buffer, which makes it easy to deal with LCD commands that take more than a single 0.5mS time period.
The code looks like this;
LCDSendCommand(CLEAR);
LCDSendDelay(4); // Equivalent to 2mS
LCDSendMessage("Hello World");
LCDSendCommand(LINE2);
LCDSendMessage("Anyone home?");
LCDSendDelay(4000); // Display this lot for 2 seconds
The nice bit is that all this lot only takes as long as it takes to put that data in the buffer, not how long it takes to go to the LCD, so it doesn't hold things up, even when you tell it to display a message for several seconds.
> How many displays are you intending of paralleling up?
Well, 6 or 8 would be nice. Shall I give it a whirl and let everyone know how I get on?!
Thanks,
Tom
More information about the Synth-diy
mailing list