Jon, Something like this? Untried, hope that it helps Org 0x00 Goto Init Org 0x04 DECFSZ LED_COUNT GOTO INTERRUPT_END Turn_off_led BCF INTCON, T0IE ; Disable Timer0 interrupt INTERRUPT_END BCF INTCON, T0IF ;clear the overflow bit Retfie ;end interrupt vector Init ;Set up Timer0 MOVLW b'10000111' MOVWF OPTION_REG ; Prescaler 1:256 ; With 4MHz X-tal this will give ; a interrupt 65,536 ms after TMR0 ; is enabled Main ; Do your stuff Turn_on_led MOVLW .7 ; The length for sync led ; 7 x 65ms = 455 ms MOVWF LED_COUNT CLRF TMR0 ; Clear Timer0 reg BSF INTCON, T0IE ; Enable TMR0 interrupt GOTO Main HŠlsningar/ Regards, Bjarne Nebelong Manager Electrical Design BINDOMATIC¨ mailto:bjarne.nebelong@bindomatic.se +46-(0)8 709 58 46 To the PIC folks-- I need a little bit of help. I'm realitvely new to PICs, even newer to their interrupts. i'm writing a bit of code that needs to flash a "sync" LED on a PIC16C74A using MASM (no basic/c stuff). The problem is the sync is too fast and barely visible. I can't sacrifice the processing speed (i.e., don't want to insert a NOP delay or the like), so i want to have timer0 count-up and trigger an interrupt that cuts the LED off. Essentially when the code gets a sync -- it'll turn on the LED and start the timer. If another sync arrives before the timer expires, the sync will simply reset the timer. When the timer expires, it just turns off the LED. (the LED is a pin on portD). Simple enough, but it aint workin'. The question: can someone run me through (pseudo or code snip-its) what needs to be done to setup a timer0 interrupt? Thanks. Here's my little test setup now (code from memory, not cut/paste) org 0x00 ;reset vector goto main org 0x04 ;interrupt vector turn off led BCF INTCON, T0IF ;clear the overflow bit retfie ;end interrupt vector ;sample code that should generate interrupt main: turn on LED BCF INTCON, T0IF ;clear overflow bit CLRF TIMER0 ;reset timer0 BSF INTCON, GIE ;enable inerrupts BSF INTCON, T0IE ;enable timer0 interrupt ;do stuff that just loops quitely, waiting for UART input on ;RX line via polling ;end of sample code The LED should be getting turned of after the timer0 rolls from 0xFF to 0x00? Right? The LED never turns off. Thanks for any help. --jon