Re: expanding the TLC5940 library to channel dot correction and reading the status information

162 views
Skip to first unread message

Alex Leone

unread,
Mar 26, 2014, 1:39:59 PM3/26/14
to Casey Hare, tlc5940...@googlegroups.com

Hi Casey,

1) for individual DC control, see tlc_setDCfromProgmem in tlc_progmem_utils.h: https://code.google.com/p/tlc5940arduino/source/browse/trunk/Tlc5940/tlc_progmem_utils.h

It uses progmem (part of the program flash memory) so that the array of data doesn't take up RAM space.

2) I've never tried reading the error information. What I would do would be to hook up the MISO SPI pin on the arduino to the last tlc's data out, and then read the SPI data register after shifting a byte out, assuming you're using the SPI mode to talk with the tlc.

On Mar 26, 2014 10:17 AM, "Casey Hare" <case...@yahoo.com> wrote:
I just put these two questions up on the forums:

http://forum.arduino.cc/index.php?topic=228759.0
http://forum.arduino.cc/index.php?topic=228760.0

Thanks again for the library,
Casey




On 3/26/14, 9:35 AM, Casey Hare wrote:
Hello Acleone-

Thanks a ton for the TLC5940 library.  It's a great start for my project of individually controlling a ton of IR LEDs.

The library doesn't have two bits of functionality I need and I'm wondering if you have thoughts on expanding it.  I've not written libraries before, so I'm a bit out of my depth here, but I need this functionality so I'm going to dive in.

1) Individual control of the DC on each LED.

The setAllDC function is almost what I want, but I need control over each channel.  My plan would be to duplicate the setAll function but using the setAllDC format (and create a new data array like tlc_GSData, probably called tlc_DCData).

2)  Reading the status information output from Sout

I'd really like to know about open LEDs (LOD) and thermal shutdowns (TEF) through the serial port (this information is available for shifting out of Sout after an XLAT latch).  I assume this would involve shifting in a bunch of dummy (or duplicate) data after XLAT and reading the stream in through the MISO SPI port.

Have you tried either of these?  Do you know of anyone who has?  Do you foresee any pitfalls?  I've not done library development before so I'm hoping to not get myself into too much trouble here.

Thanks again for the library, it's a huge start in the right direction,
Casey


--


__________________________
This email sent via a "free" email service.
Be polite, advertisers and Big Brother are reading, too.

--


__________________________
This email sent via a "free" email service.
Be polite, advertisers and Big Brother are reading, too.
Reply all
Reply to author
Forward
0 new messages