Running LCD display and tlc5940 simultaneously

Hi,

So I'm working on a project that runs an LCD display and a tlc5940 LED driver simultaneously. While the LED driver works fine all the time, the LCD display only shows the correct text (which is just "Hello world" at this point) when the LED driver is completely off. As soon as I even initialize the LED driver, the LCD just starts displaying boxes or other junk though the LEDs light up correctly.

My question is, is it possible to control both an LCD display and an LED driver with only one arduino? And if so... any idea what I may be doing incorrectly?

Thanks!

Hello qijie and welcome to the forum.

It´s the LCD display parallel interface? Wich LCD library are you using?

Salute

I'll bet you're dealing with the same issue I am. There seems to be a conflict between liquidCrystal.h and wire.h. Here's my thread on the issue.

And hello G_Man, nice to see you around :slight_smile:

Yeah, me and G_Man and probably others having trouble with the default LCD library and Wire library.
Did some tests without the DS1307 library but just Wire.h and same stuff, sometimes it works sometimes it doesnt, depending the how you code and place the lcd instructions, it´s unstable.

I found a nice solution for the parallel LCD library (I dontt liked the LCD4bit library at all). Fixed the LCD issue using this: Google Code Archive - Long-term storage for Google Code Project Hosting. that works flawless.

This turned the best thing because:
1- You can use parallel LCD that are cheaper, the 74LS164 sift register is also very cheap and common.
2- You can use just two wires like in the serial LCD, but you dont need to make the RX pin busy like on serial
3- The guy library is very good, fast and reliable, accept numbers (LCD4Bit dont), you can specify types just like in Serial.print like 'srlcd.print(value, HEX)' or anything.
4- You can specify 8 (or more not sure), custom characters on his library.

Made a couple of tests and the library is really light and fast, and makes you code smaller.

Guys should add this stuff as default IDE library IMO.

Salute,

Rodrigo

Thanks for the shift registers idea! The errors I get do seem really similar to yours, G_Man though I'm not sure it's the same issue since I'm only using the LiquidCrystal library and the tlc5940 library (not the Wire library). Also, the way my circuit is made, it's really hard to add in new components and do any major circuit changes. However, I will try this idea out if it comes to it!

For my LCD display I'm using the circuit/library/code here:

And for the tlc5940 I'm using the circuit/library/code shown here:
http://www.arduino.cc/playground/Learning/TLC5940
Except with three tlc's linked together.

So basically I'm just running an LED display with the tlc's (which, again works wonderfully all the time). And then I just try to run the sample "Hello World" lcd code and everything starts behaving unpredictably. Mostly I just see a row of boxes although several days ago I managed to get some garbage like "32[][]" and then the first word I coded...

I'm wondering, has anyone else has had any issues dealing specifically with combining the lcd display and the tlc5940 driver?

The TLC5940 has an SDI interface. Therefore the TLC5940 library probably references the wire library directly -or- has inherited large portions of it via copy/paste coding or uses the same tactics and techniques to deal with the same issues.

Looks like the shift register is my only solution then. Thanks for all your help! :slight_smile:

Has anyone had any more experience with this in the past year? I'm having the exact same problem.