Car tachometer, optocoupler/interrupt questions

Ah, one more thing: I don't need to declare anything as volatile, do I?

The only variable used in both the ISR and the main loop is ScaledRPM, but since it's only modified in the ISR, and only read in the main loop, it doesn't need to be volatile, correct?

And although PulseStartTime is a global variable, it isn't touched outside the ISR so it doesn't need to be volatile either.

I could also make RPM a local variable, since it's only used in RPMPulse().

This is where I am assuming the above is true:

int ScaledRPM; //Only modified inside ISR, only read outside ISR
unsigned long ledData; //Variable to be shifted out
unsigned long PulseStartTime; //Only read/modified inside ISR
int latchPin = 8; //Shift register latch pin
int clockPin = 12; //Shift register clock pin
int dataPin = 11; //Shift register data pin


void setup()
{
 pinMode(latchPin, OUTPUT);
 pinMode(clockPin, OUTPUT);
 pinMode(dataPin, OUTPUT);
 attachInterrupt(0, RPMPulse, RISING); // Attaches interrupt to Digi Pin 2
 //Serial.begin(9600);
 
}

void RPMPulse()
{
unsigned long t=micros();
//250 x 24 = 6,000 RPM so we can safely assume:
//Anything over 20,000 RPM is bounce

if ( ( t-PulseStartTime)< 50 )
  return;

unsigned long PulseTime = t - PulseStartTime; // Gets pulse duration
unsigned long RPM = 60000000/PulseTime;       // Calculates RPM 
    
ScaledRPM = RPM/250; 
PulseStartTime=t;
} 

void loop()
{
  //Serial.println(ScaledRPM);
ledData = (1 << ScaledRPM) - 1;
shiftOut(dataPin, clockPin, LSBFIRST, ledData); 
shiftOut(dataPin, clockPin, LSBFIRST, ledData >> 8); //Bitshifting because shiftout only sends 1 byte at a time
shiftOut(dataPin, clockPin, LSBFIRST, ledData >> 16); 
delay(200);                  // 1 sec delay for debugging output
}