>> Temp var TMR1H

possibly part of the problem ... this gets redeclared each time through the "loop". You might want to move it up above where your other declaration resides.