Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Arduino Mega 2560 with 2 x TLC5940

Status
Not open for further replies.

boylesg

Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
I have these connected up on my breadboard.

Connection of the two TLC5940s is pretty straight forward.

But connection of these to my arduino Mega is giving me problems.

I am using this library in the arduino development environment: https://code.google.com/p/tlc5940arduino/

I have connected up the TLC5940s according to this: https://code.google.com/p/tlc5940arduino/wiki/ArduinoMegaHardwareSetup

However my test LEDs are not lighting up at all.

In tlc_config.h there is this:



Code:
/** Determines how long each PWM period should be, in clocks.
    \f$\displaystyle f_{PWM} = \frac{f_{osc}}{2 * TLC\_PWM\_PERIOD} Hz \f$
    \f$\displaystyle TLC\_PWM\_PERIOD = \frac{f_{osc}}{2 * f_{PWM}} \f$
    This is related to TLC_GSCLK_PERIOD:
    \f$\displaystyle TLC\_PWM\_PERIOD =
       \frac{(TLC\_GSCLK\_PERIOD + 1) * 4096}{2} \f$
    \note The default of 8192 means the PWM frequency is 976.5625Hz */
#define TLC_PWM_PERIOD    8192

So the pin 18 of the TLC5940 connected to digital pin 9 of my arduino mega should be oscillating at 0.9kHz.

However if I measure digital pin 9 of my arduino mega with my multimeter in frequency mode there is no oscillation.

If however I measure digital pin 12, which is connected to the BLANK pin of the TLC5940, then I find IT is oscillating at 0.9kHz.

So has anyone used this library previously and knows what the proper pin connections for an arduino mega should be.

Clearly the GSCLK pin of the TLC5940 should be connected to digital pin 12 and not digital pin 9 of the arduino.

But what about the other TLC5940 pins? Which are the correct pins on an arduino mega for these?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top