Want to drive 7 RGB strips using several TPIC6C595

Bear with me, I'm not a EE and I have to google the functions for most ICs.

Came across a color switching a 15 segment common anode RGB LED circuit on instructables using 6 pairs of 74HC595 and ULN2803 drivers. I got it to work on a breadboard, but I want to switch it up and use 3 TPIC6C595 registers to drive 7 segments. I've read that the two are interchangeable, but I can't get the TPIC to sink the LEDs. I found the original project, called RainBoard, http://www.instructables.com/id/RainBoard-RGB-LED-Rainbow-Fader, but it hasn't had any comments in over a year and my kid keeps asking when her light will be done. :sweat_smile:

I've mapped the pinout differences between the 74HC595 and the TPIC6C595 and made the adjustments on the breadboard, but still no luck.

Any help would be appreciated.

Here's the pinout mapping I came up with: 7C-TPIC 1 - 4 2 - 5 3 - 6 4 - 11 5 - 12 6 - 13 7 - 14 8 - 16 9 - 9 10 - 7 11 - 15 12 - 10 13 - 8 14 - 2 15 - 3 16 - 1

The original code uses ShiftPWM library, but I've seen other TPIC examples using SPI.

I always use SPI, and then put a PWM signal on OE for brightness control.
This is 7-segment displays, use TPIC6B595 outputs to drive R-G-B of the strip with + of strip to +12.

Thank you very much, I appreciate it! I built the circuit as described. I now need to rewrite the code to use SPI. If I have any issues, I'll bring them up here.

Crossroads...do you have any example code that runs on that circuit you posted? I'm pretty sure I need to use SPI.transfer() to send 4 bytes (1 per TPIC), but the API only mentions sending 1 byte .

'x' shift registers, 'x' bytes:

digitalWrite (ssPin, LOW);
SPI.transfer(dataArray[0]);
SPI.transfer(dataArray[1]);
SPI.transfer(dataArray[2]);
SPI.transfer(dataArray[3]);
digitalWrite (ssPin, HIGH);

Don't forget something like:

analogWrite (pwmPin, brightnessLevel);

if you're not connecting the OE pin to Gnd.

With PWM, I was able to smoothly shift from one color to the next. How can i use SPI and digitalWrite to output RGB colors? Only HIGH and LOW are available using SPI, correct? My idea for a workaround was to cycle through RGB values preset in an array. I'm throwing smooth fade out the window right now. I'd be happy if I can just get the seven colors to cycle.

#include  //Include SPI library

const int TPICNUM = 4; //Number of TPIC6C595 shift registers

//SPI Library predefined defaults: 11 = MOSI, 12 = MISO, 13 = CLK
const int ssPin = 10;   //SPI Slave Select

/*
const byte RED[] = {255, 0, 0}; 
const byte ORANGE[] = {83, 4, 0}; 
const byte YELLOW[] = {255, 255, 0}; 
const byte GREEN[] = {0, 255, 0}; 
const byte BLUE[] = {0, 0, 255}; 
const byte INDIGO[] = {4, 0, 19}; 
const byte VIOLET[] = {23, 0, 22};
*/

const byte ROYGBIV[7][3] = { {255, 0, 0}, {83, 4, 0}, {255, 255, 0}, {0, 255, 0}, {0, 0, 255}, {4, 0, 19}, {23, 0, 22} };


byte dataArray[TPICNUM];

void setup ()
{
  pinMode(ssPin, OUTPUT);
  SPI.begin ();
}  // end of setup

void loop ()
{
  digitalWrite (ssPin, LOW);
  for (int i = 0; i < TPICNUM; i++){
    //need to call subroutine to choose next color
    SPI.transfer(dataArray[i]);
  }
  digitalWrite (ssPin, HIGH);
  delay (20);
}  // end of loop

Investigate the shiftPWM library. It was created just for this purpose.