Hi All, My first project with the PIC16F87X doesn't work. I am simply trying to do a conversion A/D in the PORTA0 and show it in PORTB with leds.Also a led blinking in the PORTC6 using TMRO overflow. I'm using a 4MHZ cristal. See my Codes below. #DEFINE LED PORTC6 list p=16f873 include "p16f873.inc" __CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_OFF & _XT_OSC & _WRT_ENABLE_OFF ;---------------------------------------------------- ; Start at the reset vector org 0x000 Start: clrf PORTA clrf PORTB clrf PORTC bsf STATUS,RP0 movlw B'00000111' ;TMR0 prescaler, 1:256 movwf OPTION_REG movlw b'00000001' ;PA0=IN movwf TRISA movlw b'00000000' movwf TRISB ;PB=OUT movlw b'00000000' ;PC=OUT movwf TRISC movlw b'00001110' ;VREF+ VDD E VREF- VSS, PORTA0 A/D IN movwf ADCON1 bcf STATUS,RP0 ;Fosc/8, A/D ON movlw b'01000001' movwf ADCON0 MAIN: clrf TMR0 btfss INTCON,T0IF ;Wait for Timer0 to timeout goto $-1 bcf INTCON,T0IF btfss LED goto LED_ON bcf LED goto SET_AD LED_ON: bsf LED SET_AD: bsf ADCON0,GO ;Start A/D conversion Wait: btfss PIR1,ADIF ;Wait for conversion to complete goto $-1 movf ADRESH,W ;Write A/D result to PORTB movwf PORTB goto MAIN I would appreciate it if someone could make a suggestion. Thanks in advanced. Anbar.