use of tlc5940 library

Hello,
I am running an Arduino uno rev.3 coupled with a PracticalMaker PWM shield in order to control 32 DC motors.
The shield is composed with two tlc5940 chips and offers 32 PWM outputs (16 for each of the tlcs).
I got a problem in programming the set with the tlc5940 library.
I work with the Arduino 1.0.1 IDE on Mac OS 10,6,8.

I have a test setup of 32 3V leds hooked up to the 32 outputs of the shield. As well as a program designed to blink successively the 32 leds.
The circuits and leds have been carefully tested and retested. Everything is powered through the Arduino external power by a wall converter 6V /1 A.

#include <Tlc5940.h>
 const int M = 2000; //Max Power for the concerned output
 const int m =0; //Min Power for the concerned  output
 int nLeds = 16;//Number of Leds , 32 when running with 32 leds
  int initialValue = M;

void setup (){
  Tlc.init(initialValue);
  Serial.begin(9600);
  delay(2000);
 Tlc.setAll(0);
  Tlc.update();
  delay(2000); }

void loop() { 
  for(i=0;i<nLeds;i++) {
  Tlc.clear();
  Tlc.set(i,M);
  Tlc.update();
  delay(1000);}
 delay(1000);}

When I run the program with only 16 leds, everything goes perfectly. When I have 32 leds, the first 16 leds continue to blink normally while the 16 others do not comply with the orders.
This makes me think that the trouble might come from the fact that there is in the tlc5940 library a subroutine called tlc_config.h, giving a default value of 1 to the number of Tlc's chained together. (In the Powermaker PWM shield, there are two Tlcs.)
In effect, I have seen in a post by Alex Leone the following advice :
/* NUM_TLCS is defined in "tlc_config.h" in the
library folder. After editing tlc_config.h for your setup, delete the
Tlc5940.o file to save the changes. */

I cannot succeed inserting the updated tlc_config.h (with NUM_TLCS = 2)
into the tlc5940 library.

Thanks for any advice.

I cannot succeed inserting the updated tlc_config.h (with NUM_TLCS = 2)
into the tlc5940 library.

Why? On what operating system? What messages appear?

Thankx for answering

As I wrote it, I am working with the Arduino 1.0.1 IDE on Mac OS 10,6,8.
No special message.
I can access the tlc_config.h if I add tlc_config h to an existing sketch using the "add file" order in the sketch menu.
I can then modify the numbers of TLCS to 2 and save the existing sketch. But I do not understand the AlexLeone instruction to delete the Tlc5940.0 file.

With the new sketch which has now two windows, I fear that the number of Tlcs is not modified since I have not deleted teh Tlc5940.o file that I cannot see anywhere.

Hope to be clear

Adding the header file to your sketch does not affect the header file used by the Tlc5940.cpp file. You need to modify the tlc_config.h file in the libraries directory.

Yes, but here lays exactly the problem.
I have no direct access to the tlc_config.h subroutine.
When I try to open it directly through the file menu with the order "open a file" the config.h is not accessible...
Do you have any idea about the precise procedure to be used for this modification of the tlc library ?

marcusC:
When I try to open it directly through the file menu with the order "open a file" the config.h is not accessible...

Open it in any text editor like TextEdit.

Thank you so much James,

More details for those who might have the same problem (with the OS X operating system at least) :
It works perfectly as soon as the file tlc_config.h (inside the uploaded Tlc5940 folder) is opened by TexEdit and not by Arduino IDE.(Command +I).
In TextEdit the modification can be made and registered.
Returning to a file openable by Aduino IDE (Command +I again) everything is in order.

marcus

Hello!! Good evening, I write to request support.I am working with on arduino and one Tlc5940.
I need to work the pwm to a frequency from 2 to 4 Hz.
It´s a very low frequency for them 970Hz that come for default, I modifying the librery Tlc5940.h in the
part of tlc_config.h modifying the value of TLC_PWM_PERIOD and TLC_GSCLK_PERIOD but the allowed maximum is 65535 (decimal) = 4bits, and only I reach 122Hz.
A detail that I am called myself the attention is that on having modified the prescaler (at my sketch) the output is not employed adequately. Does someone know of some method to achieve this? THANKS!!!