Ethernet Shield and TLC5940NT

I Have a UNO with a TLC5940nt and the ethernet shield.

I've followed the following guide, http://blog.andrewwei.mu/?p=19 The TLC is nearly working with the rewiring, but it won't work unless I keep the TLC connected to However, it is still getting the blank from 10 instead of 8. any one have any ideas as to why? I've tried changing the SS pins in \hardware\arduino\variants\standard\pins_arduino.h. And it does change over and use pin 8, but it still doesn't work unless connected to pin 10 on the arduino.

Moreover, I cannot ping the ethernet unless its connected to pin 10 as well. If it is connected, I can ping it for a few minutes, but then it does eventually stop responding. Additionally, it will never allow me to use the website hosted by the sketch.

The shield and the tlc both work flawlessly when used independently.

I'm stumped now. Any ideas?

The TLC is nearly working with the rewiring, but it won’t work unless I keep the TLC connected to

Connected to what?

However, it is still getting the blank from 10 instead of 8. any one have any ideas as to why?

It? What is it? How does “it” get a blank? What does that mean?

I’ve tried changing the SS pins in \hardware\arduino\variants\standard\pins_arduino.h. And it does change over and use pin 8, but it still doesn’t work unless connected to pin 10 on the arduino.

Bad idea. The actual chip/slave select pin should be defined in your code or a library, not the core.

oops sorry! I was pretty tired when I wrote this.

"The TLC is nearly working with the rewiring, but it won't work unless I keep the TLC connected to the arduino board."

Pin 10 on the arduino is what the TLC5940 connects to for one of its wires. The blank, if i remember correctly, tells the TLC when to turn off the LED(s). Its not very important what the blank does in this case, just need to figure out how to get the pin changed to get it to start working properly.

Bad idea. The actual chip/slave select pin should be defined in your code or a library, not the core.

How could I go about doing that? I just followed what the tutorial said and it mostly worked so far, just this one pin and the tlc will be working. Then maybe the ethernet will, and if not, I can at least have one working and start on the other.

"The TLC is nearly working with the rewiring, but it won't work unless I keep the TLC connected to the arduino board."

When disconnected from the Arduino, what do you expect the TLC to do? My expectation is that it will do nothing. Yours, apparently, is different.

How could I go about doing that?

Look at the library. I don't know which one you are using. It appears, though, that you will need to edit ATmega_xx8.h to define the port name and pin number that each TLC pin is connected to, in such a way that you don't use Arduino pins 10, 11, 12, and 13. Not using pin 4 is probably a good idea, too.

PaulS:

"The TLC is nearly working with the rewiring, but it won't work unless I keep the TLC connected to the arduino board."

When disconnected from the Arduino, what do you expect the TLC to do? My expectation is that it will do nothing. Yours, apparently, is different.

Ahh yes, I should have been more clear. The TLC will not work unless connected to the BLANK wire from the TLC, to pin 10 on the arduino board. If i wire the BLANK wire from the TLC to arduino port 8, it does not function properly.

/** OC1B (Arduino digital pin 10) -> BLANK (TLC pin 23) */
#define BLANK_PIN    PB2
#define BLANK_PORT   PORTB
#define BLANK_DDR    DDRB

/** VPRG (Arduino digital pin 8) -> VPRG (TLC pin 27) */
#define DEFAULT_VPRG_PIN    PB0
#define DEFAULT_VPRG_PORT   PORTB
#define DEFAULT_VPRG_DDR    DDRB

would I just swap out the PB2, PORTB, and DDRB on the BLANK PIN for the PB0, PORTB, and DDRB on the VPRG pin? I've tried this already, and it didn't work, but I'll try again.

would I just swap out the PB2, PORTB, and DDRB on the BLANK PIN for the PB0, PORTB, and DDRB on the VPRG pin? I've tried this already, and it didn't work, but I'll try again.

You can't just swap them because you CAN NOT use pin 10. Or 11, 12, or 13.

I’m not using 11, 12, or 13. If I can’t swap it out, how else can I make the tlc BLANK work on pin 8 instead of of pin 10?

If I can't swap it out, how else can I make the tlc BLANK work on pin 8 instead of of pin 10?

I guess I have no idea what you mean by swap. My idea of swap involves exchanging things. Since what you showed was two separate pin uses, I though you meant that you wanted to make DEFAULT_VPRG_XXX and BLANK_XXX exchange values. That won't accomplish what you want, since that would put DEFAULT_VPRG_XXX on pin 10.

That's exactly what I want. To swap VPRG and BLANK. I just don't know how to accomplish it, cause everything I've tried, hasn't worked so far.

Tell me WHY you want VPRG to be on pin 10? That is one of the SPI pins that the Ethernet shield uses.

Hmmm, i thought it was 10,11,12, and 13 that the shield used. I want to use both, but I was trying just to get the TLC to work before tackling the next problem.

bumpity bump.

but I was trying just to get the TLC to work before tackling the next problem.

So, what exactly is the problem?

The Problem.. is the TLC5940 and Ethernet Shield do not work, because they both use arduino board pin 10. And I can't figure out how to get the TLC to use arduino board PIN 8, like many tutorials suggest, in order for them to not be competing for PIN 10 on the arduino board.

Hmmm, i thought it was 10,11,12, and 13 that the shield used. I want to use both, but I was trying just to get the TLC to work before tackling the next problem.

The Problem.. is the TLC5940 and Ethernet Shield do not work, because they both use arduino board pin 10.

Put the Ethernet shield in a drawer. Lock the drawer. Throw away the key.

When the TLC5940 works, you can pick the lock and get the shield back out. Until then, forget it. It doesn't even exist.

I've already done that.. Trying to figure out still how to get the TLC off of pin 10 though.

Trying to figure out still how to get the TLC off of pin 10 though.

Is it working on pin 10?

..Yes, it works off of pin 10. But i need to figure out how to change it to pin 8. Or if its impossible to do so, how to change the ethernet shield to other pins.

Or if its impossible to do so, how to change the ethernet shield to other pins.

You absolutely can not operate the ethernet shield off of other pins. Forget that. Pins 11, 12, and 13 are the SPI pins, and that is a hardware function that can not be delegated to other pins. The ethernet select pin is pin 10, and that is hardwired into the shield, and you can not change that, either.

So, you need to edit the BLANK_PIN definitions in the library file to use a free pin. I can't tell you what to change the values to because you haven't defined what free pins you have.