Still no go :( Here's what I have verbatim: *************************************************************** org 0 goto MAIN org 4 ISR MOVWF W_TEMP ;Copy W to TEMP register SWAPF STATUS,W ;Swap status to be saved into W CLRF STATUS ;bank 0, regardless of current bank, Clears IRP,RP1,RP0 MOVWF STATUS_TEMP ;Save status to bank zero STATUS_TEMP register MOVF PCLATH, W ;Only required if using pages 1, 2 and/or 3 MOVWF PCLATH_TEMP ;Save PCLATH into W CLRF PCLATH ;Page zero, regardless of current page bcf INTCON,T0IF MOVF PCLATH_TEMP, W ;Restore PCLATH MOVWF PCLATH ;Move W into PCLATH SWAPF STATUS_TEMP,W ;Swap STATUS_TEMP register into W ;(sets bank to original state) MOVWF STATUS ;Move W into STATUS register SWAPF W_TEMP,F ;Swap W_TEMP SWAPF W_TEMP,W ;Swap W_TEMP into W retfie ;----------------------------------------------------------------------- ----------------- ; Mainline ;----------------------------------------------------------------------- ----------------- MAIN BANK1 ; set up registers movlw 0x85 ; W <- 1000 0101 movlw OPTION_REG ^ 0x80 ; set OPTION_REG (prescalar=64, no _RBPU) BANK0 clrf TMR0 clrf INTCON bsf INTCON,T0IE bsf INTCON,GIE ; VARIOUS VARIABLE INITIALIZATION LCD_INITIALIZATION ; setup the LCD for us... LCD_CLEAR ; clear it out TESTLOOP DELAY_MILLI 100 movf TMR0,w call LCD_OUT_DATA LCD_PRINT 'A' ; LCD_CLEAR goto TESTLOOP *************************************************** Cut and dry, once everything is set up, I output the TMR0 value (comes out in HEX) to my LCD, along w/a test character to make sure it's alive. The HEX changes with every startup, but never changes during my looping, I always get some random HEX value, and an 'A' printed... I've also tried adding a variable, having the ISR increment that variable, and outputting THAT instead on TMR0, in which case that variable always outputs 0x00 since I initialize it in the beginning... :( I don't get it, it should be super simple! > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Tony Nixon > Sent: Tuesday, August 28, 2001 8:42 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: 16F870 TimerX Problems > > > 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 > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu