>Alan B. Pearce Wrote >Note that the BANK macro does not set the bits for using the FSR banking. >This is a separate bit from the normal bank bits. If you use Olin's macros >he has a separate macro to deal with this, I do not know if there is an >MPLAB macro to do so. > >Second, using the FSR like this is not a normal way of doing the register >loading during initialisation. There are instances where it could be >classed >as "normal", but in this case you are using about twice the number of >instructions to achieve something. the code above is easier done as >follows: - > > BANK0 > MOVLW b'00000000' ; 1:1 prescale, 1mS rollover > MOVWF T1CON ; initialise Timer1 I tried using the method above and just a CLRF T1CON and I still can not get the timer to run. I used a pin on port c as a flag and I found that by not using the indirect FSR addressing the routine would execute completely. But the timer would not run. Here it is now INIT_TIMER1 BANK0 MOVLW 0x00 MOVWF T1CON ; 1:1 prescale, 1mS rollover, FOsc/4 MOVLW 0x78 ;1ms Delay MOVWF TMR1L ; initialize Timer1 low MOVLW 0xEC ;1ms Delay MOVWF TMR1H ; initialize Timer1 high YUI BCF PIR1,TMR1IF ; ensure flag is reset BTFSC PIR1,TMR1IF GOTO YUI QWE BSF PIE1,TMR1IE ;Turns on overun interrupt BTFSS PIE1,TMR1IE ;This bit will not set GOTO QWE DFG BSF T1CON,TMR1ON ; turn on Timer1 module BTFSS T1CON,TMR1ON GOTO DFG RETURN ; return from subroutine I tired setting a pin in my Timer ISR but I never see it go high, so I think the timer is not generating an interrupt. But yet the bits are set for it to generate an interrupt in my initialization code. Any other ideas or possible gotchas I could be missing? Charles Roberts II -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist