Hi Adak,

I have solved it myself, here is the code which worked (I did remember to change the name of the array - I have a few arrays in my code (as you have probably realised, this is a small module) and it helps me to see which one is which.

Code:
for(lc_count = 0;lc_count < 5; lc_count++) 
    {
        hour_tmp = hours_array[i] - '0';
        hour_tmp *= array_mult;
        hourCount = hourCount + hour_tmp;
        array_mult *= 10;
        --i;
    }
My compiler didn't like using i as a loop control parameter (the compiler is an ARM Cortex M3 compiler from Raisonance), it just never exited the loop and made hourCount invalid when i went undefined.

Thanks again for all your help

--dave