Changing hardware setup of TLC5940

Gday to you all guys.

Here is the thing:

We doing some project that requires me to activate 16 leds,we choose TLC5940 to expand our legs for LEDS.

All is good? Wrong :(

Our project uses interrupts ,so legs 2 and 3 in our Due are occupied.But in TLC5940 setup,I need to connect leg 3 of Arduino Duemilanovue to GSCLK . Is it possible to somehow change the GSCLK input to other leg?How do we do it? What the hell does it even does,maybe we don't actually need it?

Thanks in advance.

berdan: Our project uses interrupts ,so legs 2 and 3 in our Due are occupied.But in TLC5940 setup,I need to connect leg 3 of Arduino Duemilanovue to GSCLK .

Do you have a Due, or a Duemilanove? They are quite different boards.

Yes,my bad.Offcourse it is Duemilanove.Novice here :disappointed_relieved:

I connected it exactly the way it is pictured here : https://code.google.com/p/tlc5940arduino/

Only the GSLCK is my problem....Arduino pins 2 and 3 are occupied by my other functions that uses interrupts to count pulses. Then I light amount of leds proportional to that number.That is where TLC5940 comes in,we have 16 leds to light. What should I do with this GSCLK pin?

That's not an easy thing to fix. GSCLK is attached to the output of a hardware timer so you can't just reassign it. You'll have to hack the TLC library. Moving the GSCLK to pin 11 (OC2A) should be easy, but you'll have to switch to bit-banging the data instead of using SPI (easy - the library supports it).

The other option is to move your interrupts. Any Arduino pin can be used as an interrupt, just not with "attachInterrupt()". Do you really need interrupts anyway?

Hmm,I guess the first solution is out of problem,I need to solve this problem fast,and given I couldn't understand word of what you say ,and probably it would took me some time to figure it out..Its out of the question .

Well,we do need the interrupts,we use them both to count pulses for different purposes,it needs to be as fast as possible ,precise and not to interfere with each other (one is velocity meter,other is revolution meter from engine computer). Other solution as digital read will not yield precise data .

So,is the solution for declaring other legs as interrupt pins is easier ? How one does it ?

P.S: Muchos obligados :)

berdan: So,is the solution for declaring other legs as interrupt pins is easier ? How one does it ?

http://code.google.com/p/arduino-pinchangeint/