Trying to convert a 32bit register containing the current time of day in seconds into hours(24), min, sec format.
Using this causes time_calc to explode at the hours = (time_calc/3600) line.
hours = (time_calc/3600); //load up the hours time_calc = (time_calc - (hours*3600)); minutes = time_calc/60; //load up the minutes time_calc = (time_calc - (minutes*60)); seconds = time_calc;
time_calc has a value of 71166 going into this. After the 1st line hours goes to 19, which is correct, but time_calc goes to 181272576. I cant figure out why that's happening.