'This is a simple counter program using timer interupt. counter var word clear 'Clear all variables SETTMR1 TMR1INT1 ' Set timer1 mode ONINTERRUPT TMR1INT,mytimer 'Where do we want to go on the timer interupt enable TMR1INT 'Turn on the interupt 'main loop just to display the data main debug ["counter=",dec counter,10,13] pause 100 goto main 'This is where we go on and interupt. mytimer: counter = counter +1 resume ' this is how we exit an interupt