Nick Veys wrote: > > Been trying to get a timer to fire off on my 16F870 for a while now... > > I tried TMR0 since I had experience setting it on from my 16F84a. Here > are the steps I take: > > Set up TMR0 configuration stuff, prescalar, etc. (watchdog disabled of > course) > Enable T0 interrupt > Enable Global Interrupts This should work... org 0h ; startup vector = 0000 goto Start org 4h ; save registers etc. bcf INTCON,T0IF ; do something ; restore registers retfie ; ; ---------- ; CODE START ; ---------- ; Start ; port setups etc. bsf STATUS,RP0 movlw b'10000000' movwf OPTION_REG ; prescale = 1:2 = TMR0 = INT bcf STATUS,RP0 ; ram page 0 clrf PCLATH clrf TMR0 clrf INTCON bsf INTCON,T0IE bsf INTCON,GIE here nop ; jumps to IRQ on TMR0 overflow goto here -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body