> anyone have some code that shows ALL the pieces to generate a TMR0 interupt > on > rollover? Here are the relevant sections of code that runs on a 16C66: ; ; Set up the timer 0 configuration. This will be used to generate ; pixel clock interrupts. ; dbankif option_reg movlw b'10001000' ; 1------- port B pullups disabled (port B used for output) ; -X------ RB0 interrupt edge select ; --0----- timer 0 source is instruction clock ; ---X---- timer 0 external clock edge select ; ----1--- prescaler assigned to watchdog timer ; -----XXX prescaler value movwf option_reg ; ; Enable interrupts. Interrupts will be globally enabled, but the timer ; 0 interrupt is not enabled. This will be done by the ROTATION routine ; at the next rotation tick. ; dbankif tmr0 clrf tmr0 ;leave maximum time until next timer 0 interrupt dbankif intcon clrf intcon ;clear any pending interrupt flags bsf intcon, gie ;globally enable interrupts ; ; Enable the timer 0 interrupt. ; bsf intcon, t0ie ;make sure timer 0 interrupts are enabled ***************************************************************** Olin Lathrop, embedded systems consultant in Devens Massachusetts (978) 772-3129, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu