Carol, I've been having a bit of a play with your program, simplifying and rearranging it a bit, and I have it working on a 16F690 (I happened to have one handy!). I've added quite a few BANKSELs just in case - careful investigation could reveal that some of them are removeable. What it does is turn the LED on at the start, then every 30 seconds it flashes OFF for 1 DELAY time. I had to change to using Port C as that's where the LEDs are on the board I was using. I've removed the call to DELAY in the Main loop - it doesn't achieve anything. All the work is done in the ISR, which isn't ideal, but it does work! The potential problem is that calling DELAY in the ISR means that there could be a further interrupt while it's in the delay loop, although with the current timing this won't happen. Oh, and I don't think you were setting the Peripheral Interrupt Enable (PEIE) - this may have been the problem! :-) This is what I ended up with: ; *** PROCESSOR PIC16F873A ; *** INCLUDE P16F873A.inc PROCESSOR PIC16F690 INCLUDE "P16F690.inc" errorlevel -306 __config _XT_OSC & _WDT_OFF & _PWRTE_ON RADIX Dec ; Numbers are Decimal unless otherwise specified CBLOCK 0x20 ; Declare variable addresses LOOP1 LOOP2 CONTADOR W_TEMP STATUS_TEMP ENDC ; ================ ORG 000 CALL INIT GOTO MAIN ; ------------------------ ; TIMER1 INTERRUPTION ; ------------------------ ORG 004 MOVWF W_TEMP ; save off current W register contents SWAPF STATUS,W ; move status register into W register CLRF STATUS ; select Bank 0 MOVWF STATUS_TEMP ; save off contents of STATUS register BANKSEL PIR1 BTFSS PIR1,TMR1IF ; Was it a Timer1 Interrupt? GOTO EXIT ; No, skip out RELOAD ; Yes, process it BCF PIR1, TMR1IF ; Clear the interrupt indication BANKSEL CONTADOR DECFSZ CONTADOR ; Si el Contador es cero, ya pasaron los 30 segundos GOTO EXIT BANKSEL PORTC BCF PORTC,0 ; Turn LED OFF CALL DELAY ; Wait a bit BSF PORTC,0 ; Turn LED ON MOVLW 57 ; Deberia ir un valor de 57 MOVWF CONTADOR ; Reset the counter for 30 secs EXIT MOVF STATUS_TEMP,W ; Restore the environment MOVWF STATUS SWAPF W_TEMP,F SWAPF W_TEMP,W RETFIE ; ------------------------ ; INICIALIZACION ; ------------------------ INIT BANKSEL PORTA CLRF PORTA ; Initialize port A CLRF PORTB ; Initialize port B CLRF PORTC ; Initialize port C BANKSEL TRISA CLRF TRISA ; All pins port A output CLRF TRISB ; All pins port B output CLRF TRISC ; All pins port C output CLRF PIE1 ; Mask all peripheral interrupts except BSF PIE1,TMR1IE ; the timer 1 interrupt BANKSEL TMR1L CLRF TMR1L ; Clear the initial timer count CLRF TMR1H BANKSEL PIR1 CLRF PIR1 ; Clear peripheral interrupts Flags MOVLW B'00110001' ; Valor de Prescale = 8, Timer 1 Habilitado MOVWF T1CON BSF INTCON,PEIE ; Peripheral Interrupt Enable BSF INTCON,GIE ; Global interrupt enable. BANKSEL CONTADOR MOVLW 57 ; Load the Interrupt Counter for 30 seconds MOVWF CONTADOR ; ------------------------ ; FUNCTION OF PORT A PINS ; ------------------------ BANKSEL ADCON1 MOVLW 6 MOVWF ADCON1 ; All pins digital I/O BANKSEL PORTC BSF PORTC,0 ; Turn on LED connected to RC0 RETURN ; ---------- ; MAIN LOOP ; ---------- MAIN GOTO MAIN ; --------------- ; DELAY 250 mSec ; --------------- DELAY MOVLW 250 MOVWF LOOP1 OUTER MOVLW 200 MOVWF LOOP2 INNER NOP NOP DECFSZ LOOP2,F GOTO INNER ; Inner loop = 5 usec. DECFSZ LOOP1,F GOTO OUTER RETURN END I hope this is useful! Cheers, Howard Winter St.Albans, England -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist