added timer/counter interrupt support