5 X TPIC6B595 for common anode 7 seg - No multiplexing

Hi,

using this code to display 0.00 using 5X TPIC6B595 shift registers -hooked up to 5X 9V 7 seg display units. The code works fine. the display shows up. however - the leftmost "0." is duller than the one in the middle, and the middle duller than the rightmost . I am using common anode displays. I have 12V going to common anode pin. I have correct resistors going to each sink to give me a perfect 20ma for each segment. Is the only way to get these segments the same brightness to multiplex?

Ive attached the datasheets- and also a diagram of my setup (which isnt mine - it just shows only three displays and i'm using 5 - also ignore the 15V and the resistor values)

//======================================CONSTANTS++++++++++++++++++++++++++++++++++++++++++

const byte numTable[] =
{
  B11111100,  //numeral 0
  B01100000,  //numeral 1
  B11011010,  //numeral 2
  B11110010,  //numeral 3
  B01100110,  //numeral 4
  B10110110,  //numeral 5
  B10111110,  //numeral 6
  B11100000,  //numeral 7
  B11111110,  //numeral 8
  B11110110  //numeral 9
};

const int _7segCLK = 13;           //Connected to TPIC pin 13: SRCLK (aka Clock)
const int _7segLATCH = 10;          //Connected to TPIC pin 12: RCLK (aka Latch/load/CS/SS...)
const int _7segOE = 9;          //Connected to TPIC pin 9: OE (Output Enable)
const int _7segDOUT = 11;          //Connected to TPIC pin 3: SER (aka MOSI)

//======================================VARIABLES++++++++++++++++++++++++++++++

int x=1;

void setup(){

  pinMode(_7segCLK,OUTPUT);
  pinMode(_7segLATCH,OUTPUT);
  pinMode(_7segDOUT, OUTPUT);
  pinMode(_7segOE, OUTPUT);
clear_7segA();  
}


//======================================
void loop(){
    if (x==1){
    sendZeroes7seg(); //sends "0.00" to 7 seg display  
    x+=1;
    }
  
  
}

//======================================


void sendZeroes7seg(){ //sends "0.00" to 7 seg display

      digitalWrite(_7segLATCH,LOW);    //Tells all SRs that uController is sending data
      shiftOut(_7segDOUT,_7segCLK,LSBFIRST,numTable[0]);
      shiftOut(_7segDOUT,_7segCLK,LSBFIRST,numTable[0]);
      shiftOut(_7segDOUT,_7segCLK,LSBFIRST,B11111101); //numeral 0 with dp
      shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0); //blank
      shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0); //blank
      digitalWrite(_7segLATCH,HIGH); 
 
  }
  

//========================================

void clear_7segA(){
  //clears the display
  digitalWrite(_7segOE,LOW);        
  digitalWrite(_7segLATCH,LOW);    
  shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0); 
  shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0);
  shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0);
  shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0);
  shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0);
  digitalWrite(_7segLATCH,HIGH);     
 

}
//========================================

red 7 seg kingsbright.pdf (120 KB)

Just need to add that there are 2 common anode pins.... per 7seg unit - do both need to be connected to 12v? also the arduino mega is connected through the barrel socket to the 12v battery. I then use the vin pin out of the mega into a 12v rail- then take 5 cables off this into the common anode pin of each display.

If you take out that x +=1

void loop()
{
  if (x==1)  // and it WILL because you have:   int x = 1;
  {
      sendZeroes7seg(); //sends "0.00" to 7 seg display  
      // delay (500);
  }
}

what then?

If you're not multiplexing, why do you need to clear the display? Just add another entry in your table
const byte numTable[] =
with all segments = 0 so none are turned on.
B00000000, // blank

You should connect up all the GND pins on the TPIC6B595s. They help with cooling and also distribute the current being sunk.
I can only imagine the display looks odd because data is constantly being sent thru the shift registers?
What happens if you add some delay after the Latch pin goes high?

I drive up to 12 digits made of 3-LED segments with this board and have not seen an issue with varying brightness.
http://www.crossroadsfencing.com/BobuinoRev17/

CrossRoads:
If you're not multiplexing, why do you need to clear the display? Just add another entry in your table
const byte numTable[] =
with all segments = 0 so none are turned on.
B00000000, // blank

thsankyou for the reply!

  • I have a sub routine listed in setup that clears all 5 segments on startup. clear_7segA() ...I assumed i would need this to get rid of any residual data in the shift registers.

I suppose what im trying to clarify it that if I have 5 shift registers hooked up as shown in the schematic - and i send only this part of the code once.....

digitalWrite(_7segLATCH,LOW); //Tells all SRs that uController is sending data
shiftOut(_7segDOUT,_7segCLK,LSBFIRST,numTable[0]);
shiftOut(_7segDOUT,_7segCLK,LSBFIRST,numTable[0]);
shiftOut(_7segDOUT,_7segCLK,LSBFIRST,B11111101); //numeral 0 with dp
shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0); //blank
shiftOut(_7segDOUT,_7segCLK,LSBFIRST,0); //blank
digitalWrite(_7segLATCH,HIGH);

should the 3 rightmost digits of the five show "0.00" in equal brightness? Because mine doesnt. the rightmost is brighter than the middle and brighter still than the leftmost. I have brought the latch low. Ive grounded the correct segments. then brought it high.I thought- as i am not multiplexing I would have and equal 20ma running through each grounded segment. ive only connected one of the common anode pins per unit. I have all the ground pins on the TPIC6B595's grounded. I have caps across the vss on each tpic. Ive got a 10k resistor on the first tpic G(OE) pin, but not on the others as per the attached schematic.