Many shift register and many displays

Hello,

So I have been working on a project to display data onto seven segment displays. I have already wired up 2 four digit seven segment displays with 2 shift registers 74HC595 and gotten it to display the number that I wanted it to using the library ShiftDisplay.h Horray! however for my project I would like more displays (1 display to me is 2 seven segments connected together controlled by 3 pins clock latch data) somewhere around 6. I am using an arduino mega and I would like to get 6 displays up showing completely different numbers but using the library I am I can't distinguish between multiple different displays. I was wondering if you guys knew of a way to do this or a better way I should do this.

here is an example code of it working for one display

#include <ShiftDisplay.h>
ShiftDisplay display(9,10,8,COMMON_CATHODE,8);

void setup() {
}

void loop() {
  display.show(12345678,1000,ALIGN_LEFT);
}

Use a MAX7219 and 8 common cathode displays, each MAX7219 can control 8 digits with just 3 control signals from the Arduino, and they can be daisychained.

Or daisychain the 74HC595s, one shift register per display. Clock & latch go to all shift registers, dataout goes to 1st in the chain, its dataout goes to the next data in, etc. Don't forget 0.1uF cap on each 595' VCC pin to Gnd.

ShiftDisplay display(9,10,8,COMMON_CATHODE,8);

Magic numbers suck. What do the 9, 10, 8, and 8 mean?

If they are (or include) the clock pin and the data pin, then each instance of the class controls one of your display devices (the shift registers and 7 segment displays).

Create multiple instances of the class - one for each display device.

CrossRoads:
Use a MAX7219 and 8 common cathode displays, each MAX7219 can control 8 digits with just 3 control signals from the Arduino, and they can be daisychained.

Or daisychain the 74HC595s, one shift register per display. Clock & latch go to all shift registers, dataout goes to 1st in the chain, its dataout goes to the next data in, etc. Don't forget 0.1uF cap on each 595' VCC pin to Gnd.

I have recently been looking into MAX7219 but I don't know to much about them. Is there a limit to the number of max7219 8 digit displays I can control and do you know a good place for me to get them from, The project I'm working on is for school so It would be nice to not have to wait over a month to get them.

PaulS:

ShiftDisplay display(9,10,8,COMMON_CATHODE,8);

Magic numbers suck. What do the 9, 10, 8, and 8 mean?

If they are (or include) the clock pin and the data pin, then each instance of the class controls one of your display devices (the shift registers and 7 segment displays).

Create multiple instances of the class - one for each display device.

I'm sorry yes they are clock latch and data pins

ShiftDisplay display(clock,latch,data,COMMON_CATHODE,num_of digits)
display.show(number to display,display for x miliseconds,what side to align the numbers on)

but the code doesn't let me write another ShiftDisplay statment