TLC5940 + DMXSerial + arduino

i am using an arduino mini pro 5v.

i successfully test-run the arduino DMXSerial library: http://www.mathertel.de/Arduino/DMXSerial.aspx

i also got the TLC5940 library working well: http://code.google.com/p/tlc5940arduino/

my problem is that when combining the two i get flicker in the LEDs. And i can;t figure out if it is because the two libraries interfere somehow or ???

does anyone have an idea why this happens?

thx.

now it works with the code below.

i think the flicker happens when the R(IREF) resistor was too low (470 ohm) and allowed too much current to be sinked.

in my setup i am using a higher current (350 mA) led and have it connected to 8 or so TLC channels.

s.

//using arduino pins 0 and 1 for serial com via dmx
#include <DMXSerial.h>
//attached a 2.5 k between pwm pin and vcc
#include "Tlc5940.h"

int minLimit = 0; //2300;
int maxLimit  = 4080;

void setup () {
  DMXSerial.init(DMXReceiver);


  Tlc.init();

}


void loop() {

  unsigned long lastPacket = DMXSerial.noDataSince();

  if (lastPacket < 5000) {

    for (int channel = 0; channel < NUM_TLCS * 16; channel ++) { 
     
      int temp_fadeValue = map(DMXSerial.read(channel+1),0,255,minLimit,maxLimit);
      Tlc.set(channel,temp_fadeValue);
    }

  } 
  else {
  }

 Tlc.update();
}

void setAll_leds(int fadeValue){
  for (int channel = 0; channel < NUM_TLCS * 16; channel ++) { 
    Tlc.set(channel,fadeValue);
  }
  Tlc.update();
}
// End.