I am unable to flash a led on the PIC16F88 :( I add this simple sample program - please help me where I am going wrong... Thanks Francois list p=16f88 ; list directive to define processor #include ; processor specific variable definitions ;errorlevel -302 ; suppress message 302 from list file ;Program Configuration Register 1 __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_ON & _PWRTE_OFF & _WDT_OFF & _XT_OSC ;Program Configuration Register 2 __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF #Define Led PORTB,2 ;pin8 Counter equ 0x22 CounterA equ 0x23 CounterB equ 0x24 CounterC equ 0x25 w_temp EQU 0x71 ; variable used for context saving status_temp EQU 0x72 ; variable used for context saving pclath_temp EQU 0x73 ; variable used for context saving ;********************************************************************** ORG 0x000 ; processor reset vector goto setup ; go to beginning of program ORG 0x004 ; interrupt vector location movwf w_temp ; save off current W register contents movf STATUS,w ; move STATUS register into W register movwf status_temp ; save off contents of STATUS register movf PCLATH,W ; move PCLATH register into W register movwf pclath_temp ; save off contents of PCLATH register ; isr code can go here or be located as a call subroutine elsewhere movf pclath_temp,w ; retrieve copy of PCLATH register movwf PCLATH ; restore pre-isr PCLATH register contents movf status_temp,w ; retrieve copy of STATUS register movwf STATUS ; restore pre-isr STATUS register contents swapf w_temp,f swapf w_temp,w ; restore pre-isr W register contents retfie ; return from interrupt ;********************************************************************** setup bcf INTCON, GIE BANKSEL CMCON movlw 0x07 movwf CMCON ; CMCON=07h set comperators off BANKSEL OPTION_REG ; CMCOM=5 set single comparator RA1=Vin-, RA2=Vin+(ref) bsf OPTION_REG, 7 ; Disable Pull-Ups on PORTB RBPU (OPTION_REG<7>). bcf SSPCON, SSPEN bcf RCSTA, SPEN BANKSEL PORTA ; Select bank of PORTA CLRF PORTA ; Initialize PORTA by ; clearing output ; data latches. BANKSEL ANSEL ; Select Bank of ANSEL MOVLW 0x00 ; Configure all pins MOVWF ANSEL ; as digital inputs. MOVLW b'11111111' ; Value used to ; initialize data ; direction. MOVWF TRISA ; BANKSEL PORTB ; Select bank of PORTB movlw 0x00 movwf PORTB ; Initialize PORTA by ; clearing output ; data latches. MOVLW B'11111011' ; Value used to ; initialize data ; direction. MOVWF TRISB ; main bsf Led call Delay_1s bcf Led call Delay_1s goto main ;PIC Time Delay = 1.00s with Osc = 4.000000 MHz Delay_1s movlw D'6' movwf CounterC movlw D'24' movwf CounterB movlw D'168' movwf CounterA loop_1s decfsz CounterA,1 goto loop_1s decfsz CounterB,1 goto loop_1s decfsz CounterC,1 goto loop_1s return END -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist