Hi all. I was looking at controlling some TLC5940's over local network but I have just discovered that it won't work.

I have searched quite extensively on this topic and found a few bits of info, but none seem relevant with the newer versions of the IDE and TLC library.

I 'think' I need to just edit the tlc_config.h file, set to bit bang mode and specify the pin changes, but Im not 100% so could anyone clarify? I'm not sure how to change the pins or the format the definition should be in?

Looking at the Ethernet information, I will need to free up pins 11,12,13 which means moving SIN & SCLK (TLC5940) to other arduino pins.

The Arduino TLC5940 Library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Arduino TLC5940 Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with The Arduino TLC5940 Library. If not, see <http://www.gnu.org/licenses/>. */

#ifndef TLC_CONFIG_H#define TLC_CONFIG_H

#include <stdint.h>

/** \file Configuration for the Arduino Tlc5940 library. After making changes to this file, delete Tlc5940.o in this folder so the changes are applied.

/** Number of TLCs daisy-chained. To daisy-chain, attach the SOUT (TLC pin 17) of the first TLC to the SIN (TLC pin 26) of the next. The rest of the pins are attached normally. \note Each TLC needs it's own IREF resistor */#define NUM_TLCS 1

/** Determines how data should be transfered to the TLCs. Bit-banging can use any two i/o pins, but the hardware SPI is faster. - Bit-Bang = TLC_BITBANG - Hardware SPI = TLC_SPI (default) */#define DATA_TRANSFER_MODE TLC_SPI

/* This include is down here because the files it includes needs the data transfer mode */#include "pinouts/chip_includes.h"

/* Set DATA_TRANSFER_MODE to TLC_BITBANG and change the pins below if you need to use different pins for sin and sclk. The defaults are defined in pinouts/ATmega_xx8.h for most Arduino's. */

The reason why they don't work on the same pins is because SPI is an actual interface protocol. The reason the library uses those pins is because it can switch them faster as they are designed for the SPI interface. The TLC is not actually an SPI device. If it was communicating over SPI you would be able to use all the same pins with the exception of pin 10 which is the select pin which has to be unique to each device. This means that 1 device uses 4 pins, 2 devices use 5 pins, 3 use 6 pins. Look up SPI on wiki if you want to learn more.

Sadly it won't work as PIN10 is required by the shield and the TLC. I tried to change pin 10 to pin 7 in the pinout section of the TLC library but it won't work. I wonder if the shield CS pin could be changed? I did some searching and came up with this http://arduino.cc/forum/index.php/topic,133481.15.html looks like it cant be moved as it is something to do with the timer?

I can't really understand what would need to be done in software to move the TLC blank pin

I'm not 100% sure what it does, I think it might clear the array at the end of the 4096 loop? Like I said I tried to re-assign it in the pinout section of the library but it didn't work and I read somewhere about it using a timer on pin12 so can't be moved?

SS will be set to output as to not interfere with SPI master operation. If you have changed the pin-outs and the library doesn't seem to work or works intermittently, make sure this pin is set correctly. This pin will not be used by the library other than setting its direction to output. */

Therefore you should just be able to connect both to pin 10 and everything should still work

I started off by stripping down a sketch to control the TLC and a second one to serve a simple webpage with on/off buttons for a digital output. Both of these work fine on their own with all the hardware connected together (Arduino pin 10 being shared by the TLC & Ethernet shield).

I since they were working, I combined them together and tested. The TLC output & arduino pin 7 turn on fine from the webpage, but when I tell it to turn off the arduino hangs and I get a 404 error on the web browser?

I thought this must be a conflict on arduino PIN10 between the shield and TLC so I tried to change the pin mapping in the xx8 pinout file of the TLC lib to PB0 (pin 9 is in use by the TLC already) but I get no output from the TLC, but if I connect the blank pin back to pin 10 then it sill works?

Anyone have an idea how to move the TLC BLANK pin? Ideally I would like to move it to pin 8. I have tried changing the definitions in the relevant pinout file in the TLC library but it just does not want to work on any pin other than 10?