I'm currently programming my first ever project. Its a multimeter specifically desinged to be used to test solar panels, batterys and lanterns on buoys.
I need to have two buttons to control it. but i only have 1 external inturrupt available on the microcontroller. So i have used an external timer set to FFFF so that when the button is pressed the timer roles over and generates an interupt. as part of the ISR the timer is set back to FFFF.
However whenever i disable and reinable the timer the button must be pressed twice before it works. once to 'wake it up' it seems and once to acutally use it. I have managed to program all stages so that the button does not need to be disabled however upon start up of the unit when i enable all the timers and interupts the problem still ocurrs.
Does anyone have any suggestions on how to fix this? I would greatly appreciate any help.