Leonardo+TLC5940+Ethernet Shield

Hi,

Im new to this forum so hallo.

I'm planing a project and need to know if this setup is possible.
This shield should work for Leonardo http://arduino.cc/en/Main/ArduinoEthernetShield. The problem is that the TLC5940 need the pins 10, 9, 5 aswell as the SCK and MOSI pins on the ICSP header. TLC5940 e Arduino | Collegamenti per utilizzare il TLC5940 c… | Flickr
The ethernet shield also needs the ICSP header and pin 10.
I think that pin 10 is the problem. Can i remap it? Use bit banging?

Tanrek

The TLC5940 allows for "bit banging" on the non-SPI ports. In fact, I think that is how it defaults.

So i dont have to change anything? Sorry im new to this.
Do i have to do something similar to this?
http://forum.arduino.cc/index.php/topic,22111.0.html

Thanks

As I understand it pin 10 is used by the ethernet shield to select the W5100. So i could use another pin for that purpose?

Sorry I should have clarified, the TLC5940 library. The chip itself doesn't care how the signals come in.

Pin 10 is typically a chip select for SPI, which is a very loose protocol.

You could use a pin other than 10 with the TLC using the library's SPI mode, but you would have to modify the pinouts/ATmega_xx8.h file to change the "BLANK" pin to something else. The pins are defined by the library as hard coded bits to the ports on the ATmega328.

The tutorial you linked to has it's own way to working, maybe its best just to follow that.

Regarding the following diagram I could use Pin 11 for BLANK on the TLC, right?
So that pin 10 is available for the ethernet shield.
http://www.pighixxx.com/pgdev/Temp/leonardov2.png

The Leonardo uses the ATmega32U4 and it is nice that is has the SPI separated so the tutorial would be kind of over kill.

So it looks like i just can hook up everything...look here:
http://forum.arduino.cc/index.php?topic=112349.0

They say since the ethernet shield and leonardo communicate over the ICSP header pins 10-13 are free to use.
I will give it a try.

Thank you.

Tanrek

Good point, completely blanked on the fact you're using the Leonardo.

However, I am pretty sure you still need to setup the library to bit-bang instead of using SPI mode, since 10-13 aren't the SPI pins on the Leonardo.

Cant I just use the SCK and MOSI from the ICSP for the SCLK and SIN of the TLC? Is it a problem that the shield is also using it?
The other pins (10,9 and 5) are not being used by the ethernet shield so, no problem.

I know one way to find out...

Try it out...I just need to get an ethernet shield then i will write if it worked.
Thank you!

I think you're safe to try. There's a way to make them all work together, maybe a little trial and error is necessary.

Did anything ever come of this? I'm trying to do the exact same thing, but can't sort out how to get the Leonardo Bit-Banging to the TLC5940. If you've figured out how to get that step working, I'd love to know :slight_smile: