Arduino +Sparkfuns 4-digit 7-segment 16pin display

I just received the following 2 4-digit, 7-segment displays from sparkfun:

The only difference between the 2 is the color and the voltage is 2.1V vs 3.4V.

So normally, a quick google search yields me pages of guidance, tutorials, schematics, and code. I can't seem to find much on these displays, I suppose they are relatively new.

Has anyone successfully been able to use these displays? If so, can you please supply your code, a schematic, and/or advice/tips?

Any help is greatly appreciated!!

Hi.

I was about to send the same post as you...

Did someone successfully used these 4digit 7segment 16 pin displays ?

Thanks.

Jérémy

Don't have one, but looks easy enough. Connect the common anode digits contacts through transistors to individual arduino pins. Connect the seven segments (A - G) and the decimal contact through resistors to arduino pins. If you want to use the colon and/or apostrophe, connect the cathode through a resistor to +5 and the anode to an arduino pin.

Takes a bunch of pins of course. You could use shift registers if you want.

Look in the forum for threads on driving seven segment displays. You are multiplexing (one digit at a time). You drive a digit pin high (which drives the anode low). You drive the segment pins high to light a segment. You pause, drive the anode pin low, and move on to the next digit. You might use 100hz, so each digit is on for 2.5ms

If you use the colon/apostrophe, drive it during one of the digits, so it has the same on time as a digit.

In case you missed it, the PINOUTS IN THE DATASHEET IS WRONG! You can get the correct pinout from SparkFun's product page.

I'm a n00b too and I was able to get it to work using the corrected info. As brtech said, I just wired up Arduino digital pins 0 thru 6 to drive segments A thru G (via 1K resistors), and pins 10 thru 13 to drive the digits.

Before someone yells at me, I know, I know... it is terribly wasteful to use so many Arduino pins to drive this display directly. In "real life" one should use a 7-segment display driver.

Here are the two sketches that I saved while playing with it last week. I have since disassembled the circuit so I can't test it now. It should work. :slight_smile:

This one simply tests each digit in turn (no multiplexing). I used this sketch to test that I've wired everything up correctly before I worked on trying to get them all lit up "at the same time".

/*
  Testing SparkFun's 4-digit 7-Segment Display (Blue)
 */

int segmentA = 0;
int segmentB = 1;
int segmentC = 2;
int segmentD = 3;
int segmentE = 4;
int segmentF = 5;
int segmentG = 6;
int segmentP = 7;

int digit1 = 10;
int digit2 = 11;
int digit3 = 12;
int digit4 = 13;

/*
10 digits:
 Each defines which segments should be on/off for that digit: A,B,C,D,E,F,G,P
 */
byte numbers[10] = 
{
  B11000000, // 0
  B11111001, // 1
  B10100100, // 2
  B10110000, // 3
  B10011001, // 4
  B10010010, // 5
  B10000010, // 6
  B11111000, // 7
  B10000000, // 8
  B10010000  // 9
};

void setup()
{
  pinMode(segmentA,OUTPUT);
  pinMode(segmentB,OUTPUT);
  pinMode(segmentC,OUTPUT);
  pinMode(segmentD,OUTPUT);
  pinMode(segmentE,OUTPUT);
  pinMode(segmentF,OUTPUT);
  pinMode(segmentG,OUTPUT);
  pinMode(segmentP,OUTPUT);

  pinMode(digit1,OUTPUT);
  pinMode(digit2,OUTPUT);
  pinMode(digit3,OUTPUT);
  pinMode(digit4,OUTPUT);
}

void loop()
{
  for (int digitPosition=0; digitPosition < 4; digitPosition++)
  {
    digitalWrite(digit1 + digitPosition,HIGH);

    for (int numIndex=0; numIndex <= 9; numIndex++)
    {
      int number =  numbers[numIndex];
      digitalWrite(segmentA, bitRead(number, 0) );
      digitalWrite(segmentB, bitRead(number, 1) );
      digitalWrite(segmentC, bitRead(number, 2) );
      digitalWrite(segmentD, bitRead(number, 3) );
      digitalWrite(segmentE, bitRead(number, 4) );
      digitalWrite(segmentF, bitRead(number, 5) );
      digitalWrite(segmentG, bitRead(number, 6) );
      digitalWrite(segmentP, bitRead(number, 7) );
      delay(200);
    }

    digitalWrite(digit1 + digitPosition,LOW);
  }
}

I am not sure if this is the best way to multiplex a 4-digit 7-segment display, but this is what I came up with. It displays 4 digits counting up as seen in the photo above.

/*
  Testing SparkFun's 4-digit 7-Segment Display (Blue)
 */

int segmentA = 0; // Segments A thru P == pins 0 thru 7
int digit0 = 10; // Digits 3 thru 0 == pins 10 thru 13 (0 is LEFT most digit)

/*
10 digits:
 Each defines which segments should be on/off for that digit: A,B,C,D,E,F,G,P
 */
byte numbers[10] = 
{
  B11000000, // 0
  B11111001, // 1
  B10100100, // 2
  B10110000, // 3
  B10011001, // 4
  B10010010, // 5
  B10000010, // 6
  B11111000, // 7
  B10000000, // 8
  B10010000  // 9
};

void setup()
{
  for (byte segment = 0; segment < 8; segment++)
    pinMode(segmentA+segment,OUTPUT);

  for (byte digit = 0; digit < 4; digit++)
    pinMode(digit0+digit,OUTPUT);
}

int perDigitTime = 100;
int digitPosition = 1;  // Start anywhere but zero so we won't crash when we try to turn off previous digit.
unsigned long previousMillis = 0; 

int value = 0;
int powerOfTen[] = {
  1,10,100,1000};

void RefreshDisplay()
{
  digitalWrite(digit0 + digitPosition, LOW);  // Turn off previous digit

  digitPosition++; 
  if (digitPosition > 3) digitPosition = 0;

  int digitValue = value % powerOfTen[ digitPosition+1 ] / powerOfTen[digitPosition];
  int number =  numbers[ digitValue ];
  
  if ((number > 0) || (value < powerOfTen[ digitPosition+1 ]))
  {
  for (byte seg = 0; seg < 8; seg++)
    digitalWrite(segmentA+seg, bitRead(number, seg) );

  digitalWrite(digit0 + digitPosition, HIGH);
  delay(4);
  }
}

void loop()
{
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > perDigitTime)
  {
    previousMillis = currentMillis;
    value++;
  }

  RefreshDisplay();
}

I'd be happy to try to answer your questions if this is still unclear.

Hi All.

After my fisrt post, I got deeper in the net and found some example here : Archives | Project Lab.

I managed to use the display. Here is the code and a picture of the "beast" with pins explanation (actually, it only displays 1 2 3 4 but from my point of view a good example to understand how it works).
(Note : I can't manage to post a picture. If someone explain me how to do it, i'll post the picture...)

The code does not use decimal points and colons but as soon as you will have understand the code, you will agree that it is easy to add.

A question for hari : I don't understand why you got so many resistances ? I only used 1 resistance per digit positive entry (not for A, B, C, D, E, F, G...). Is it a mistake ?

If any questions, feel free.

Jérémy

------------------ CODE TESTED OK ------------------------
// These are indexes into the groundPins array
#define G 6
#define F 5
#define E 4
#define D 3
#define C 2
#define B 1
#define A 0

int groundPins[8] = {0, 1, 2, 3, 4, 5, 6, 7};
int digitPins[4] = {8, 12, 10, 11}; // positive voltage supply for each of the 4 digits
int ON = HIGH;
int OFF = LOW;
int number[10][7]; // holds information about which segments are needed for each of the 10 numbers
int digit[4]; // holds values for each of the 4 display digits

void setup()
{
// Fill the numbers array
initNumber();
// Set ground pin to output/high
for(int i=0; i < 8; i++)
{
pinMode(groundPins*, OUTPUT);*
_ digitalWrite(groundPins*, HIGH);_
_
} // end for(int i=0; i < 8; i++)*_

* // Set digit pin to output/low*
* for(int i=0; i < 4; i++)*
* {*
_ pinMode(digitPins*, OUTPUT);
digitalWrite(digitPins, LOW);
} // end for(int i=0; i < 2; i++)*_

} // end void setup()
void loop()
{
* digit[0] = 1;*
* digit[1] = 2;*
* digit[2] = 3;*
* digit[3] = 4;*
* DisplayNumber();*

} // end void loop()
void DisplayNumber()
{

* for(int g=0; g < 7; g++)*
* {*
* digitalWrite(groundPins[g], LOW);*
* for(int i=0; i < 4; i++)*
* {*
_ if (digit < 0)
* {
continue;
}
digitalWrite(digitPins, number[digit][g]);
}
// delay(getDelay());
delay(1); // Don't understand why I Have to set a delay*

* digitalWrite(groundPins[g], HIGH);
}*_

} // end void DisplayNumber()
int getDelay() {
* if (millis() > 10000) {*
* return 0;*
* } else {*
_ return (int) (((10000 - millis()) / 10000.0) * 125);
* }
}
void initNumber()
// Fill an array (declared as global variable) with high/low values for numbers*

{
* number[0][G] = OFF;
number[0][F] = ON;
number[0][E] = ON;
number[0][D] = ON;
number[0]
```c*_

* = ON;
 number[0][B] = ON;
 number[0][A]     = ON;

number[1][G]  = OFF;
 number[1][F] = OFF;
 number[1][E] = OFF;
 number[1][D]  = OFF;
 number[1][C] = ON;
 number[1][B] = ON;
 number[1][A]     = OFF;

number[2][G]  = ON;
 number[2][F] = OFF;
 number[2][E] = ON;
 number[2][D]  = ON;
 number[2][C] = OFF;
 number[2][B] = ON;
 number[2][A]     = ON;

number[3][G]  = ON;
 number[3][F] = OFF;
 number[3][E] = OFF;
 number[3][D]  = ON;
 number[3][C] = ON;
 number[3][B] = ON;
 number[3][A]     = ON;

number[4][G]  = ON;
 number[4][F] = ON;
 number[4][E] = OFF;
 number[4][D]  = OFF;
 number[4][C] = ON;
 number[4][B] = ON;
 number[4][A]     = OFF;

number[5][G]  = ON;
 number[5][F] = ON;
 number[5][E] = OFF;
 number[5][D]  = ON;
 number[5][C] = ON;
 number[5][B] = OFF;
 number[5][A]     = ON;

number[6][G]  = ON;
 number[6][F] = ON;
 number[6][E] = ON;
 number[6][D]  = ON;
 number[6][C] = ON;
 number[6][B] = OFF;
 number[6][A]     = ON;

number[7][G]  = OFF;
 number[7][F] = OFF;
 number[7][E] = OFF;
 number[7][D]  = OFF;
 number[7][C] = ON;
 number[7][B] = ON;
 number[7][A]     = ON;

number[8][G]  = ON;
 number[8][F] = ON;
 number[8][E] = ON;
 number[8][D]  = ON;
 number[8][C] = ON;
 number[8][B] = ON;
 number[8][A]     = ON;

number[9][G]  = ON;
 number[9][F] = ON;
 number[9][E] = OFF;
 number[9][D]  = ON;
 number[9][C] = ON;
 number[9][B] = ON;
 number[9][A]     = ON;
}
---------------------------------------------------------------

_```*_

Hey guys,

Wow, I posted this a while back and didn't think any responses were coming. Thanks to everyone who contributed!

I've managed to resolve my issues with this display and it's working nicely now.

I also have this working with an 8-bit shift register (http://www.sparkfun.com/datasheets/IC/SN74HC595.pdf also from SparkFun). So this might be of interest for you guys if you wanna use less arduino pins.

Please note: since my project involves temperature readings, this code is specifically for displaying temperature so digit 4 can be a 'C' or an 'F' and there are no decimals.

Here is the code along with pin descriptions. I welcome any suggestions/questions/comments so please feel free to post:

/*

4 Digit 7 Segment display from Sparkfun
http://www.sparkfun.com/commerce/product_info.php?products_id=9480
 1: Digit 1         16: B
 2: Digit 2         15: G
 3: D                 14: A
 4: Colon Anode         13: C
 5: E                 12: Colon Cathode
 6: Digit 3         11: F
 7: Decimal Point  10: Apostrophe Anode
 8: Digit 4         9:  Apostrophe Cathode
 
8 Bit Shift Register

 1: display's B    16: 5V    
 2: display's C    15: display's A
 3: display's D    14: arduino's dataPin
 4: display's E    13: Gnd
 5: display's F    12: arduino's latchPin
 6: display's G    11: arduino's clockPin
 7: display's DP   10: 5V
 8: Gnd            9:  none
 
 *************
 Display's Cathode goes to ground via resistor
 Display's Anode goes to digital out
 Digit pins go to digital out via resistor
 Segment pins (A-G) go to digital out or shift register out (0 is on)

original shift reg code:
http://arduino.cc/en/Tutorial/ShftOut13

helpful schematic:
http://www.modxhost.com/595and4021.jpg

*/


int latchPin = 8;  //Pin connected to ST_CP of 74HC595 (aka RCLK)
int clockPin = 12;  //Pin connected to SH_CP of 74HC595 (aka SRCLK)
int dataPin = 11;  //Pin connected to DS of 74HC595 (aka SER)

int digit1Pin = 5;  //can't use pin 1 since it's TX?
int digit2Pin = 2;
int digit3Pin = 3;
int digit4Pin = 4;

byte data;
byte dataArray[13];

const int MINUS_IDX = 10;
const int CELCIUS_IDX = 11;
const int FARENHEIT_IDX = 12;

void setup(){
  pinMode(digit1Pin, OUTPUT);
  pinMode(digit2Pin, OUTPUT);
  pinMode(digit3Pin, OUTPUT);
  pinMode(digit4Pin, OUTPUT);
 
  pinMode(latchPin, OUTPUT);

  Serial.begin(9600);

  //      A
  //    F   B
  //      G
  //    E   C
  //      D   dp (H)
  //
  //  In binary representation, right most digit is A
  
  dataArray[0] = B11000000;
  dataArray[1] = B11111001;
  dataArray[2] = B10100100;
  dataArray[3] = B10110000; 
  dataArray[4] = B10011001; 
  dataArray[5] = B10010010; 
  dataArray[6] = B10000010; 
  dataArray[7] = B11111000; 
  dataArray[8] = B10000000; 
  dataArray[9] = B10010000; 
  
  //temperature specific characters
  dataArray[MINUS_IDX] = B10111111;  // minus sign
  dataArray[CELCIUS_IDX] = B11000110;  // C
  dataArray[FARENHEIT_IDX] = B10001110;  // F
   
}

void loop(){

  setTemp(-23, 'C');
  
    //setDigit(digit1Pin, 3);
    //setDigit(digit2Pin, 4);
    //setDigit(digit3Pin, 5);
    //setDigit(digit4Pin, 6);
}

void setTemp(int temp, char scale){
  //temp must be between -99 and 999 in either scale to fit the display 
  //put in a check here later
  boolean negative = false;
  if (temp < 0)
    negative = true;
  temp = abs(temp);
  
  if (scale == 'F'){
    setDigit(digit4Pin, FARENHEIT_IDX);
  } else if (scale == 'C'){
    setDigit(digit4Pin, CELCIUS_IDX);
  }
  
  setDigit(digit3Pin, temp % 10);
  temp /= 10;
  if (temp >= 1){
    setDigit(digit2Pin, temp % 10);
    temp /= 10;
    if (temp >= 1){
      setDigit(digit1Pin, temp % 10);
    }
  }
  if (negative){
    setDigit(digit1Pin, MINUS_IDX); 
  }
}

void setDigit(int digitPin, int value){
  
    digitalWrite(latchPin, 0);
    shiftOut(dataPin, clockPin, dataArray[value]);  
    digitalWrite(latchPin, 1);
    
    digitalWrite(digitPin, HIGH);
    delay(1);
    digitalWrite(digitPin, LOW);   
}


void shiftOut(int myDataPin, int myClockPin, byte myDataOut) {
  // This shifts 8 bits out MSB first, 
  //on the rising edge of the clock,
  //clock idles low

  //internal function setup
  int i=0;
  int pinState;
  pinMode(myClockPin, OUTPUT);
  pinMode(myDataPin, OUTPUT);

  //clear everything out just in case to
  //prepare shift register for bit shifting
  digitalWrite(myDataPin, 0);
  digitalWrite(myClockPin, 0);

  //for each bit in the byte myDataOut[ch65533]
  //NOTICE THAT WE ARE COUNTING DOWN in our for loop
  //This means that %00000001 or "1" will go through such
  //that it will be pin Q0 that lights. 
  for (i=7; i>=0; i--)  {
    digitalWrite(myClockPin, 0);

    //if the value passed to myDataOut and a bitmask result 
    // true then... so if we are at i=6 and our value is
    // %11010100 it would the code compares it to %01000000 
    // and proceeds to set pinState to 1.
    if ( myDataOut & (1<<i) ) {
      pinState= 1;
    }
    else {      
      pinState= 0;
    }

    //Sets the pin to HIGH or LOW depending on pinState
    digitalWrite(myDataPin, pinState);
    //register shifts bits on upstroke of clock pin  
    digitalWrite(myClockPin, 1);
    //zero the data pin after shift to prevent bleed through
    digitalWrite(myDataPin, 0);
  }

  //stop shifting
  digitalWrite(myClockPin, 0);
}

By the way,
Like jeremytsl, I also used 1 resistor per digit instead of 1 per segment. I'm not entirely sure but I think you can get away with that.

You want one resistor per segment, not per digit.

You are multiplexing digits: one digit at a time
You are parallelling segments: 1 to 7 segments at a time

You want the same current through each segment, no matter how many segments you drive.

So, you put a resistor per segment.

If you had a resistor per digit, then you would have lower current per segment with an 8 (all segments driven) then with a 1 (2 segments driven). This would show up as different brightness for different numbers.

With a resistor per segment, each segment has the same current, no matter how many of them are lit.

You all are driving the digits directly. That is okay as long as the resistor value is high enough. You need the current through the digit (which is the sum of the current through each segment) to be less than 40 ma).

To drive this at high brightness, you would use something in the range of 220-470 ohms per segment, but that would be much more than 40 ma per digit. With 1K @ 5V, you have max 5 ma per segment, and 8*5 = 40 ma per digit, so you are okay.

If you used smaller series resistors on the segment drives, you would need to buffer the Arduino output with a transistor.

if you were to use something else to drive the digits (shift register), that 40 ma may not work. Some shift registers can't sink 20 ma per segment either.

Thanks for the resistance / segment explanation.

I was using 1kOhms with 5V which explains I did not see the difference (I am lucky :slight_smile: )

Have a nice day.

Jérémy

Write up some code that switches a digit back and forth between "1" and "8". I think you will see a brightness difference. "1" will be brighter than "8".

brtech,
Thanks for answering Jeremytsl question about the resistor.

jeremytsl,
Wow, the wiring on that clock you have on your blog is so much more compact than my breadboard. Nice...

ninjamastr,
Your code for figuring out the value of each digit is much easier to understand than my power of ten array.

I think this is part of what makes the Arduino cool. There's a lot of sharing going on.

hari,
you're so right, the arduino community is amazingly helpful. Our projects could combine to form some sort of super voltron clock display robot.

brtech,
thanks for breaking this down for us. Your explanation makes sense and I will experiment with changing digits and observing brightness.

I don't fully understand the 2nd part of your explanation tho, please bare with me and my questions:

You all are driving the digits directly. That is okay as long as the resistor value is high enough. You need the current through the digit (which is the sum of the current through each segment) to be less than 40 ma).

How did you figure out this 40ma limit? The description on SF.com says "max forward current of 20mA"

If you used smaller series resistors on the segment drives, you would need to buffer the Arduino output with a transistor.

What would happen if you didn't, and your current on each digit exceeds 40ma? Would the LED's burn out?

if you were to use something else to drive the digits (shift register), that 40 ma may not work. Some shift registers can't sink 20 ma per segment either.

This part concerns me since I'm using a shift register (74HC595). What would you recommend I do? I've looked over the datasheet, but it makes little sense to me.

it says "+/- 6ma Output Drive at 5 V". Does that mean it's giving me 6ma per segment without any resistors?

Thanks in advance

40 ma is the max output of an Arduino pin, and you can't drive ALL of them at the same time at 40 ma.

If you go over it, you might burn out the microprocessor.

The 20 ma is the max current per segment i believe. if you lit 8 segments at 20 ma, the digit would need 160ma. Way more than the Arduino can supply. A cheap npn transistor could do that tho.

The datasheet is a bit weird, but yes, 6ma is what their typical output current is going to be. You can light a segment with that (not a digit), with the right value resistor, but the display won't be anywhere near as bright as it would closer to 20 ma per segment. With this device driving an LED, you can tolerate the output voltages getting a bit out of spec, so you might push that 6 ma a bit. 8ma probably works, maybe even 10.

But keep in mind that you will be driving all 8 segments from one 595. the max continuous current you can source/sink from the device is 70ma. 8 x 6 = 48, so you are okay there. Trying to run 8 x 10 ma wouldn't work. 8 x 8 is 64, pretty close to the limit.

Boy, do I have a lot to learn about electronics.

Thanks brtech for shedding some light on this stuff.

I picked up one of those (the blue ones) and i'm looking for a driver for it. I can't seem to find any decent digit multiplexing ICs for a CA display.

SAA1064 does pretty much everything I want it to (I2C, self multiplexing, small programing footprint, little processor overhead) but I don't figure I can get it working with that display (at least not for 4 unique digits).

I don't want to go with a BCD unless it'll output Hex as well (can't remember the proper name for them).

I figured out a decient solution using 4x 8 bit shift registers, a 4 bit (or and multiple of 4) an 8 channel mux, a few transistors and an oscillator.

Thus far, octopart has failed me in my search for a 7-segment 4 digit(+) driver w/ CA. Can I just use a chip made for CC and use some transistors?

I've used the STLED316S LED driver in several projects with good results. It's inexpensive and can drive up to 6 common anode digits plus 8 additional discrete LEDs with brightness control. It can also read from up to 16 tactile switches. I'm currently developing an alarm clock shield using this chip - I hope to post details soon. I've written a library for the chip I plan to share. It's only available in an SMT package but you could always put one on a breakout board if that's a problem.

Can anyone please help me get hari's code working with my 4 digit 7 segment display?

It is almost the same as sparkfun's except the pins are in a different configuration.

Here is the pin configuration:
1-8 on bottom (left to right)
9-16 on top (right to left)

Thanks!

bump

Pinout is not the only difference. Your display is common Cathode and my SparkFun display is common Anode. So basically wherever the code sets pin to HIGH it needs to set it LOW and vice versa. I only had to make 4 changes to the code and I've highlighted them yellow. That should work. Good luck!

/*
  WAS: Testing SparkFun's 4-digit 7-Segment Display (Blue)
  NOW: Altered for GmDude66 for H.LTC.4727
 */

int segmentA = 0; // Segments A thru P == pins 0 thru 7
int digit0 = 10; // Digits 3 thru 0 == pins 10 thru 13 (0 is LEFT most digit)

/*
[glow]Change#1 Added wiring guide for your H.LTC.4727[/glow]

W I R I N G   G U I D E

=== Common Cathode digits ===
Arduino  Display  Digit
  10        1       0 Leftmost
  11        2       1
  12        6       2
  13        8       3 Rightmost
  
=== Anode Segments ===
Arduino  Display   Segment
   0       14         A
   1       16         B
   2       13         C
   3       3          D
   4       5          E
   5       11         F
   6       15         G
*/

/*
10 digits:
 Each defines which segments should be on/off for that digit: A,B,C,D,E,F,G,P
 */
byte numbers[10] =
{
  B11000000, // 0
  B11111001, // 1
  B10100100, // 2
  B10110000, // 3
  B10011001, // 4
  B10010010, // 5
  B10000010, // 6
  B11111000, // 7
  B10000000, // 8
  B10010000  // 9
};

void setup()
{
  for (byte segment = 0; segment < 8; segment++)
    pinMode(segmentA+segment,OUTPUT);

  for (byte digit = 0; digit < 4; digit++)
    pinMode(digit0+digit,OUTPUT);
}

int perDigitTime = 100;
int digitPosition = 1;  // Start anywhere but zero so we won't crash when we try to turn off previous digit.
unsigned long previousMillis = 0;

int value = 0;
int powerOfTen[] = {
  1,10,100,1000};

void RefreshDisplay()
{
[glow]  //Change#2 (Your display is common Cathode, so to turn OFF a digit, we need to set it to +5)[/glow]
  digitalWrite(digit0 + digitPosition, [glow]HIGH[/glow]);  // Turn off previous digit

  digitPosition++;
  if (digitPosition > 3) digitPosition = 0;

  int digitValue = value % powerOfTen[ digitPosition+1 ] / powerOfTen[digitPosition];
  int number =  numbers[ digitValue ];
  
  if ((number > 0) || (value < powerOfTen[ digitPosition+1 ]))
  {
  for (byte seg = 0; seg < 8; seg++)
    digitalWrite(segmentA+seg, [glow]1 - [/glow]bitRead(number, seg) ); [glow]// Change#3 added "1-" to invert the bit for your common Cathode display[/glow]

  digitalWrite(digit0 + digitPosition, [glow]LOW[/glow]);  [glow]//Change#4 LOW will turn this digit on.[/glow]
  delay(4);
  }
}

void loop()
{
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > perDigitTime)
  {
    previousMillis = currentMillis;
    value++;
  }

  RefreshDisplay();
}

Thank you!

The display works perfectly now!

One more question: how would I go about getting the colon to stay lit all the time?

EDIT: Just combined your code along with ninjamastr's code to get this display working with my 74HC595