4 7-Segment Displays mulitplexed to make a count down timer. HELP!!

Hi, I am new to Arduino and working on a project for a class in which I need to have 4 7-segment displays (common anode) multiplexed w/o the use of a shift register or similar device. It must all be done by code and the correct wiring. I have looked at many of the other posts and still cannot figure out what I am doing wrong. I have tried using the setup that others have used in making clocks and such to test my wiring and it doesn't work accordingly.

The wiring is set up such than the the segment pins come from outputs 0-6 and go through 1k resistors to the first digit. They are then 'daisy chained' to the other digits. It is done this way so that I only need to use 7 outputs for all four digits and then each digit is controlled by four other outputs.

Below is the code. It is adapted from several other sets of code I have found.

#define MIDDLE 0 // G
#define UPPER_L 1 // F
#define LOWER_L 2 // E
#define BOTTOM 3 // D
#define LOWER_R 4 // C
#define UPPER_R 5 // B
#define TOP 6 // A

int groundPins[7] = {0, 1, 2, 3, 4, 5, 6}; // G, F, E, D, C, B, A
int digitPins[4] = {7, 8, 9, 10};
int ON = LOW;
int OFF = HIGH;
int number[10][7];
int digit[4];

int hours = 12;
int minutes = 00;
int elapsedMinutes = 0;
int seconds = 0;
int secon;

unsigned long prevtime;

void setup()
{
initNumber();
for(int i=0; i < 7; i++)
{
pinMode(groundPins*, OUTPUT);*
_ digitalWrite(groundPins*, LOW); _
_
}_
_
for(int i=0; i < 4; i++) {_
_ pinMode(digitPins, OUTPUT);
digitalWrite(digitPins, HIGH);
}
}
void loop()
{
int n = 0;
unsigned long time = millis() - (elapsedMinutes * 60000);
seconds = (time / 1000);
if (seconds > 60)
{
seconds = 0;
minutes--;
elapsedMinutes++;
if (minutes >= 60) {
minutes = 0;
hours--;
if (hours > 12) {
hours = 1;
}
}
}
n = (hours * 100) + minutes;
setDigit(n);
}*_

void setDigit(int n)
{
* n = n % 2000;*
* digit[0] = n % 10;*
* digit[1] = (n / 10) % 10;*
* if ((digit[1] == 0) && (n < 10)) {*
* digit[1] = -1;*
* }*
* digit[2] = (n / 100) % 10;*
* if ((digit[2] == 0) && (n < 100)) {*
* digit[2] = -1;*
* }*
* digit[3] = (n / 1000) % 10;*
* if (digit[3] == 0) {*
* digit[3] = -1;*
* }*
}
void initNumber()
{
* number[0][MIDDLE] = OFF;*
* number[0][UPPER_L] = ON;
number[0][LOWER_L] = ON;
_ number[0][BOTTOM] = ON;_
number[0][LOWER_R] = ON;
number[0][UPPER_R] = ON;
_ number[0][TOP] = ON;
number[1][MIDDLE] = OFF;_

number[1][UPPER_L] = OFF;
number[1][LOWER_L] = OFF;
_ number[1][BOTTOM] = OFF;_
number[1][LOWER_R] = ON;
number[1][UPPER_R] = ON;
_ number[1][TOP] = OFF;
number[2][MIDDLE] = ON;_

number[2][UPPER_L] = OFF;
number[2][LOWER_L] = ON;
_ number[2][BOTTOM] = ON;_
number[2][LOWER_R] = OFF;
number[2][UPPER_R] = ON;
_ number[2][TOP] = ON;
number[3][MIDDLE] = ON;_

number[3][UPPER_L] = OFF;
number[3][LOWER_L] = OFF;
_ number[3][BOTTOM] = ON;_
number[3][LOWER_R] = ON;
number[3][UPPER_R] = ON;
_ number[3][TOP] = ON;
number[4][MIDDLE] = ON;_

number[4][UPPER_L] = ON;
number[4][LOWER_L] = OFF;
_ number[4][BOTTOM] = OFF;_
number[4][LOWER_R] = ON;
number[4][UPPER_R] = ON;
_ number[4][TOP] = OFF;
number[5][MIDDLE] = ON;_

number[5][UPPER_L] = ON;
number[5][LOWER_L] = OFF;
_ number[5][BOTTOM] = ON;_
number[5][LOWER_R] = ON;
number[5][UPPER_R] = OFF;
_ number[5][TOP] = ON;
number[6][MIDDLE] = ON;_

number[6][UPPER_L] = ON;
number[6][LOWER_L] = ON;
_ number[6][BOTTOM] = ON;_
number[6][LOWER_R] = ON;
number[6][UPPER_R] = OFF;
_ number[6][TOP] = ON;
number[7][MIDDLE] = OFF;_

number[7][UPPER_L] = OFF;
number[7][LOWER_L] = OFF;
_ number[7][BOTTOM] = OFF;_
number[7][LOWER_R] = ON;
number[7][UPPER_R] = ON;
_ number[7][TOP] = ON;
number[8][MIDDLE] = ON;_

number[8][UPPER_L] = ON;
number[8][LOWER_L] = ON;
_ number[8][BOTTOM] = ON;_
number[8][LOWER_R] = ON;
number[8][UPPER_R] = ON;
_ number[8][TOP] = ON;
number[9][MIDDLE] = ON;_

number[9][UPPER_L] = ON;
number[9][LOWER_L] = OFF;
_ number[9][BOTTOM] = ON;_
number[9][LOWER_R] = ON;
number[9][UPPER_R] = ON;
_ number[9][TOP] = ON;
}*_

You shouldn't use pins 0 and 1 for digital I/O because you are usually better server using Serial.print() for debug output. Note that you can use the analog input pins for digital I/O: A0=14, A1=15,... A5=19

Perhaps you can get some hints from my 4-digit timer:

// Bit maps for the seven segment display
const unsigned char Segments[] =
{
  0b11000000, // 0
  0b11001111, // 1
  0b10100100, // 2
  0b10000110, // 3
  0b10001011, // 4
  0b10010010, // 5
  0b10010000, // 6
  0b11000111, // 7
  0b10000000, // 8
  0b10000011, // 9
};


// List of digit select lines, least significant digit first
const unsigned char DigitPins[4] = {
  14, 2, 3, 4};  // Anodes (HIGH for on, LOW for off)

const unsigned char SegmentPins[] = {5,6,7,8,9,10,11,12};  // Cathodes (LOW for on, HIGH for off)


void setup()
{
  for (int i=0; i<4; i++)
  {
    pinMode(DigitPins[i],OUTPUT);
    digitalWrite(DigitPins[i],LOW);
  }

  for (int i=0; i<8; i++)
  {
    pinMode(SegmentPins[i],OUTPUT);
    digitalWrite(SegmentPins[i],HIGH);
  }

  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
}

void loop()
{
  // Get time since last reset
  unsigned long hundredths = millis() / 10;
  unsigned long seconds = hundredths / 100;
  unsigned long minutes = seconds / 60;
  int hours = minutes / 60;
  int clock;

  // Display minutes:seconds up to 100 minutes, then hours/minutes
if (seconds < 100)
    clock = (seconds % 100) * 100 + (hundredths % 100);
else
if (minutes < 100)
    clock = (minutes % 100) * 100 + (seconds % 60);
  else
    clock = (hours % 100) * 100 + (minutes % 60);

  // Clear all segments before enabling a digit
  for (int s=0; s<8; s++)
  {
    digitalWrite(SegmentPins[s],HIGH);
  }

  // Display each digit, right to left
  for (int i=0; i<4; i++)
  {
    
    // Peel a digit off the low end of the number
    int digit = clock % 10;
    clock /= 10;
    
    // Blank the MSD if it is zero
    if (i==3 && digit == 0)
    {
      for (int s=0; s<8; s++)
        digitalWrite(SegmentPins[s],HIGH);
    }
    else
    {
      // Display the digit on the seven segments
      unsigned char segments = Segments[digit];
      for (int s=0; s<8; s++)
      {
        digitalWrite(SegmentPins[s], segments & 1);
        segments >>= 1;
      }
    }


    if (seconds < 100)
    {
      // Steady decimal point when showing seconds and hundredths
      digitalWrite(12, HIGH);
      digitalWrite(13, LOW);

    }
    else
    if (minutes < 100)
    {
      // Steady colon when showing minutes and seconds
      digitalWrite(12, LOW);
      digitalWrite(13, LOW);

    }
    else
    {
      // Make the colon blink each second
      digitalWrite(12, seconds & 1);
      digitalWrite(13, seconds & 1);
    }

    // Turn on the digit briefly
    digitalWrite(DigitPins[i], HIGH);  // Select one digit
    delay(3);
    digitalWrite(DigitPins[i], LOW);
  }
}

You need to do two things

  1. modify that post and put code tags round the code.
  2. post your schematic you description of your circuit sounds wrong.

Thank you John. Your code really helped me figure things out. So far things are on track now. I will post back if I have anymore questions. Which I inevitably will.

Thanks again,
Ben