TLC5940 Bible

I just came across this -https://sites.google.com/site/artcfox/demystifying-the-tlc5940 - the guy has spent a lot of time writing what must be the definitive guide to TLC5940 chips, and thought I'd flag it in case anyone else would find it helpful.

He does unfortunately use the h/w clock out from a bare ATMega chip, which from what I understand isn't available on the arduino, but it's worth a read anyway just for the general approach to solving a programming (or indeed any!) problem.

Clock out is available on D8:
CLKO, Divided System Clock: The divided system clock can be output on the PB0 pin. The divided system clock
will be output if the CKOUT Fuse is programmed, regardless of the PORTB0 and DDB0 settings. It will also be output during reset.

markvr:
He does unfortunately use the h/w clock out from a bare ATMega chip, which from what I understand isn't available on the arduino, but it's worth a read anyway just for the general approach to solving a programming (or indeed any!) problem.

The CLK0 signal comes out on PB0 which is Arduino Pin 8.

Ah thanks both. I read somewhere in his book/site (which of course I can't find now...) that it was better to use a "bare" ATMega chip because the arduino didn't breakout the clock output.

I wonder why the "standard" Arduino library at Google Code Archive - Long-term storage for Google Code Project Hosting. use it? The wiring schematic for that is:

    Basic Pin setup:
    ------------                                  ---u----
    ARDUINO   13|-> SCLK (pin 25)           OUT1 |1     28| OUT channel 0
              12|                           OUT2 |2     27|-> GND (VPRG)
              11|-> SIN (pin 26)            OUT3 |3     26|-> SIN (pin 11)
              10|-> BLANK (pin 23)          OUT4 |4     25|-> SCLK (pin 13)
               9|-> XLAT (pin 24)             .  |5     24|-> XLAT (pin 9)
               8|                             .  |6     23|-> BLANK (pin 10)
               7|                             .  |7     22|-> GND
               6|                             .  |8     21|-> VCC (+5V)
               5|                             .  |9     20|-> 2K Resistor -> GND
               4|                             .  |10    19|-> +5V (DCPRG)
               3|-> GSCLK (pin 18)            .  |11    18|-> GSCLK (pin 3)
               2|                             .  |12    17|-> SOUT
               1|                             .  |13    16|-> XERR
               0|                           OUT14|14    15| OUT channel 15
    ------------                                  --------

Possibly because you would need to modify the Arduino fuses, which is probably a bit tricky for the average person (including me!)

markvr:
I wonder why the "standard" Arduino library at Google Code Archive - Long-term storage for Google Code Project Hosting. use it?

Because:
a) You have to set fuse bits to enable it.
b) You don't need it - the Mega328 is perfectly capable of putting a clock signal on other pins (which is what the TLC library does).

my 5940's are on the way! glad i found this now!

and a fellow bristol person :slight_smile:

markvr:
and a fellow bristol person :slight_smile:

hi!! kingswood atm and moving to stockwood if all goes well!

Whitehall / Easton myself :slight_smile: Maybe we should form a TLC5940 survivors group....although that assumes I manage to solve my analog sampling issues... - TLC5940 and Audio sampling - LEDs and Multiplexing - Arduino Forum