TLC5940 and Ethernet Shield using SPI

A bit (unusable without modification) code to illustrate what I mean:

byte saved_spcr = 0;
byte saved_spsr = 0;
byte tlc_spcr = 0;
byte tlc_spsr = 0;

void setup() {
  Ethernet.begin(...);
  saved_spcr = SPCR;
  saved_spsr = SPSR;
  Tlc.init(...);
  tlc_spcr = SPCR;
  tlc_spsr = SPSR;
}

void loop() {
  SPCR = saved_spcr;
  SPSR = saved_spsr;
  Ethernet.anyCall(...);
  SPCR = tlc_spcr;
  SPSR = tlc_spsr;
  Tlc.anyCall(...);
}

im not really sure what any of that is doing.
but i recently hooked up the tlc to the ethernet shield + mega like this:
50: tlc (VPRG) (actually went to gnd)
10: tlc(XERR) (not this)
51: tlc(SIN)
52: tlc(SCLK)
51: tlc(MOSI)
52: tlc(SCK)
53: tlc(SS)
11: tlc(XLAT)
12: tlc(BLANK)
9: tlc(GSCLK)
46: IRled
and nothing attached to the tlc was working. so maybe it is necessary to add some form of register call stuff or whatever that is

I explicitly told you that you must not connect pin 10 to XERR, I hope your "not this" means you haven't made that connection. Why is it still in the list?

In your list you still have two pins listed twice so my belief in that being the actual wiring is a bit lowered.

On which pin is SS located on your TLC?

Have you tried this configuration without the Ethernet shield? Does it work? What code are you using for your tests?

first off, I' d like to say thanks for helping me through this as this is my first time really dealing with SPI. so THANKS!

I explicitly told you that you must not connect pin 10 to XERR, I hope your "not this" means you haven't made that connection. Why is it still in the list?

i did not connect pin 10 to XERR for the reasons you mentioned before.

i have the tlc connected as such:
52: SCLK (25TLC)
51: SIN(26TLC)
12: BLANK(23TLC)
11: XLAT(24TLC)
9: GSCLK(18TLC)
per the BasicUse.pde with pinouts for Mega from library file

On which pin is SS located on your TLC?

yeah im not sure which actually. i guess according to my list in my other post, i guess it should be 53 but im not sure if i actually have it connected, ill have to check when i get home.

Have you tried this configuration without the Ethernet shield? Does it work? What code are you using for your tests?

I have not tried it without the ethernet shield, as the mega gets commands over udp. i can however send similar commands via serial so i will have to try that as well when i get home.
The code used is the code listed in like the third posting or so. It's kind of long so I won't post it again.

Again, thank you very much!

yeah im not sure which actually. i guess according to my list in my other post, i guess it should be 53 but im not sure if i actually have it connected, ill have to check when i get home.

I wrote that because there is no SS pin on the TLC but you had it in the list of connections.
That may be a problem because writing to the Ethernet shield may interfere with the TLC as it will be listening too. I had the same problem with a WS2801 LED strip being controlled by the SPI hardware (for speed reasons) together with an Ethernet shield. I solved it by creating an SS: I interrupted the SCLK line and inserted a transistor which was controlled by the new SS pin. As long as the TLC doesn't get a clock signal it's not expecting any data to be received on the MOSI line.

thanks for the idea. but it seems i might not have to do that, as the tlc seems to be working fine now with the ethernet shield receiving udp packets as commands.
but just for knowledge, could you elaborate a little more on how you would connect the transistor for the SS stuff?

I just use the transistor to disrupt the clock (SCKL) line. As soon as no clock impulses get to the non-SPI compliant chip (a WS2801 in my case) it won't react on any change on the data (MOSI) line.