4 nos 7 Segment LED with 2 nos 74HCT595

I am using the Multifunction Shield Here It has many useful code and one such is the code to control 4 LED 7 seg display with 2 nos 74595 shift registers. I now want to adapt the same circuit for a larger display as a standalone ... but have not been able to figure out a compact code to do it. I just want to display integers from 0 to 9999. I did study the MFS.Write() code in the CPP file but was not able to follow the logic fully... Is there any tutorial or code to explain how this is done. ( The basic serial shift part is clear )
74HCT595 4 digit.PNG

What you ask is not clear.

What is different between the 4 digits the multifunction shield is controlling, and the 4 digits you want to control now?

Concept-wise, they should be the same.
One shift register gets loaded with segment information, the 2nd shift register enables one of the digits so the segments turn on/off.
A couple of milliseconds pass.
The 2nd shift register disables the digits.
Repeat for the next digit.

If the "larger display" needs higher voltage, or more then 8 or mA per segment, then a MIC5891 can be used to supply high voltage to the common anodes of a display, and a TPIC6C595 or TPIC6B595 can be used to sink current from the segments.
Both parts,0.1uF caps, and current limit resistors are available at Digikey.com or Mouser.com

Don't forget to use current limit resistors with each segment.

Thanks CrossRoads for the logical concept... helps to understand.

Got the required code which is simple to follow :

/* Define shift register pins used for seven segment display */
#define LATCH_DIO 4
#define CLK_DIO 7
#define DATA_DIO 8
 
#define Pot1 0
 
/* Segment byte maps for numbers 0 to 9 */
const byte SEGMENT_MAP[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0X80,0X90};
/* Byte maps to select digit 1 to 4 */
const byte SEGMENT_SELECT[] = {0xF1,0xF2,0xF4,0xF8};
 
void setup ()
{
Serial.begin(9600);
/* Set DIO pins to outputs */
pinMode(LATCH_DIO,OUTPUT);
pinMode(CLK_DIO,OUTPUT);
pinMode(DATA_DIO,OUTPUT);
}
 
/* Main program */
void loop()
{
int PotValue;
PotValue = analogRead(Pot1);
Serial.print(“Potentiometer: “);
Serial.println(PotValue);
/* Update the display with the current counter value */
WriteNumberToSegment(0 , PotValue / 1000);
WriteNumberToSegment(1 , (PotValue / 100) % 10);
WriteNumberToSegment(2 , (PotValue / 10) % 10);
WriteNumberToSegment(3 , PotValue % 10);
}
 
/* Write a decimal number between 0 and 9 to one of the 4 digits of the display */
void WriteNumberToSegment(byte Segment, byte Value)
{
digitalWrite(LATCH_DIO,LOW);
shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_MAP[Value]);
shiftOut(DATA_DIO, CLK_DIO, MSBFIRST, SEGMENT_SELECT[Segment] );
digitalWrite(LATCH_DIO,HIGH);
}

Got it from here : HERE

Thanks... so far have never used the shiftOut() function. Simplifies code greatly !!