Pages: [1]   Go Down
Author Topic: Running LCD display and tlc5940 simultaneously  (Read 1096 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Yeah Arduino surely rocks !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello qijie and welcome to the forum.

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

Salute
Logged

Oregon USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 239
Yeah Arduino surely rocks !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And hello G_Man, nice to see you around smiley

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: http://code.google.com/p/arduinoshiftreglcd/ 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
« Last Edit: December 03, 2009, 07:57:42 pm by DanDare » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://www.arduino.cc/en/Tutorial/LiquidCrystal

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?
Logged

Oregon USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Madison, WI
Offline Offline
Newbie
*
Karma: 0
Posts: 25
No loafing.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: