Help with controlling TLC5940 through serial?

Hi everyone!

Im having difficulties understanding how to pass the serial data from the computer to the TLC5940 chip.

My setup is a computer connected to an arduinoand the the arduino to the tlc5940 chip.

And i am able to get the different examples from the tlc5940 libary for the arduino working.

But i can´t get my head around how to control the outputs of the chip from the serial sent from the computer to the arduino.

Any ideas or guidance are highly appreciated.

ps. What i am trying to achieve is to have processing sending serial data to the arduino controlling the outputs of the tlc5940 chip. ds. :wink:

Best regards Niklas

Hi again
I realized that maybee my post was a little vage.
Ive followed the setup on this page.
http://www.arduino.cc/playground/Learning/TLC5940

I have set it up with 16 leds one on each output and i am able to run the different example animations that comes with the libary tlc5940.

I am speaking of the sketches that you are able to upload to the arduino to control the tlc5940 chip. But what i am seeking is to be able to control it from the computer through the usb connection on the arduino.

This goal exceeds my knowledge :-/ so any help are highly appreciated.

best regards Niklas

But what i am seeking is to be able to control it from the computer through the usb connection on the arduino.

So what you need to do is to write a program that receives messages on the serial port, looks at those messages and then decides what to do with the TLC chip.

Therefore look into the serial communications bit and how to pass bytes. One example is to use the monome protocol, for an example of this see my project:-
http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html

Grumpy_Mike, do you think it is possible to address the TLC straight from processing through Firmata? I can't find a way, though it seems so logic for it to be possible.
Thanks

No, because the Firmata software knows nothing about the TLC chip. The chip has to be kept being fed with signal pulses to keep it going. In the TLC library this is done by setting a timer to automatically do this.

This is too fast to do as a command down the serial line and also it would swamp any other communications.

Thanks, I was reading into examples like
http://processing.org/discourse/yabb2/YaBB.pl?num=1257240376
but it's so slow that I cant believe there isn't anything quicker, would you have a direction to look into? To be more specific, for example updating 24 outputs on the TLC 20 times a second or so? Thanks