tlc5916 refusal

Hi all,

I’m a newbie with arduino and electronics and after some basics started to play around with LEDS and shift registers.
The 74HC595 shift register i got with my starter pack works nice and as expected. However, when trying to do the same with a tlc5916 shift register (i’ve got several and want to daisy chain them) I can’t even get one single led working. I’m doing something completely wrong and can’t figure out what it is.

I read that the tlc5916 sinks current instead of sourcing it like the 74HC595. So i switched my standard red 5mm LED’s around: The cathodes connected to the tlc’s output ports 1-4. To no avail.

I’ve attached a photo of my setup.

-4 standard 5 mm led’s are connected to Out 0-4 (with their cathodes to the TLC, anodes to 5v)
-Resistor (330ohm) connected to R-EXT and ground

  • datapin on 2 (SDI) to arduino port 4 (green lead on photo)
  • clockpin on 3 (CLK) to arduino port 6 (yellow lead)
  • latchpin on 4 (LE(ED1) to arduino port 5 (blue lead on photo)
    the tlc is supplied 5v via the arduino and both GND and output port (OE(ED2) are grounded.

The program i’m running on the arduino is very basic, it worked fine with the 74HC595.

int latchPin = 5;
int clockPin = 6;
int dataPin = 4;

byte leds = 0;

void setup() 
{
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
}

void loop() 
{
  leds = 0;
  updateShiftRegister();
  delay(100);
  for (int i = 0; i < 8; i++)
  {
    bitSet(leds, i);
    updateShiftRegister();
    delay(100);
  }
}

void updateShiftRegister()
{
   digitalWrite(latchPin, LOW);
   shiftOut(dataPin, clockPin, LSBFIRST, leds);
   digitalWrite(latchPin, HIGH);
}

I rebuilt the circuit several times and also tried another shift register in case it was broken. No luck.
Where am I going wrong?

tlc.gif

Hi bokito,

The tlc chip is a much more sophisticated chip inside than the '595. A sketch written for the '595 won't necessarily work at all for the '5916.

There are probably tutorials and example sketches for the chip out there, but not on the Arduino playground. Have a google for those.

I can see an error in your photo. Your resistor setting the current (Rext) has both its legs in the same strip of the breadboard. You are shorting the Rext pin to ground.

Also, as the chip multiplies up the current flowing through Rext by a factor to drive the leds, you probably want a value of more like 1K rather than 330R.

Paul

Thnks Paul,

I overlooked the wiring error. Fixed it and downloaded Elco Jacobs PWM library for RGB leds. Wiring had to be on other Arduino ports for SPI. Changed data to 11 and Clock to 13. I got it working! :) Next up is trying to daisy chain the tlc's.