Checking battery voltage with ADC and interrupts - which way is best? Here are some stripped down versions of the two different programs I am deciding between.

In version one, my state machine is called within the interrupt:

void TimerInterrupt(void)
{
    int battery_voltage;

    StartADC();

    while(ADCrunning){}

    battery_voltage = ADC_value * scale_factor;

    BatteryStateMachine(battery_voltage);
}

void main (void)
{
    StartTimer();

    while(1){}
}


In version two, the interrupt populates a global variable, and my main program has a while loop wherein a function is called whenever that global variable changes:

int battery_voltage;

void TimerInterrupt(void)
{
    StartADC();

    while(ADCrunning){}

    battery_voltage = ADC_value * scale_factor;
}

void main (void)
{
    int old_battery_voltage;

    StartADC();

    while(ADCrunning){}

    old_battery_voltage = ADC_value * scale_factor;

    StartTimer();

    while(1){
        if (battery_voltage == old_battery_voltage){}
        else {
            BatteryStateMachine(battery_voltage);
        }
    }
}


What are the questions I need to ask in order to determine which of these is better for my requirements? Or is one of these methods already clearly superior to the other, and I just don't know it?
First rule when using microcontrollers is:

Do as little as you can in the interrupt function!

Explanation:
Consider having 10 or 100 interrupts configured. Each interrupt function will take 100 or 200 ms to deal with. (Sounds quite low, but when you have a bigger project with a big controller this might be possible)

Then 4 or 5 interrupts will arise and you have to configure the priorities all with priorities that are (maybe) included in microcontroller hardware.

If you don't have this hardware priorities (I this the small Microchip's don't have these?) you can't handle priorities.

Second thing: I don't know which microcontroller you use, but I think it has a flag that shows if the ADC is finished. Use this for ADCrunning (you don't show where you define it).

So my approach would be:

 volatile bool startADC;   // edit: you can use a struct, if there will be too many flags

void TimerInterrupt(void)
{
    startADC = true;
}

void main (void)
{

    int battery_voltage;
    int old_battery_voltage;

    battery_voltage = 0;
    old_battery_voltage = -1;

    StartTimer();

    while(1){
        if (startADC = true) {
            StartADC();
            startADC = false;
        }

        // use the flag as mentioned above 
        if (ADCFinished = true) {
            // you might think of using the scale factor 
            battery_voltage = ADC_value * scale_factor;
            ADCFinished = false;
        }

        // use unequal instead of the "== else"-construct
        if (battery_voltage != old_battery_voltage) {
            BatteryStateMachine(battery_voltage);
            old_battery_voltage = battery_voltage; // you need this here?
        }
    }
}