list p=18F1320 include CONFIG OSC=INTIO2,WDT=OFF,MCLRE=ON,LVP=OFF cblock 0x00 d1,d2,d3 endc org 0x0000 init bsf OSCCON,IRCF2 ;set to 8MHz clock bsf OSCCON,IRCF1 bsf OSCCON,IRCF0 clrf TRISA clrf TRISB clrf LATA clrf LATB main bsf LATB,0 call ledon call Delay bcf LATB,0 call ledoff call Delay bsf LATB,1 call Delay bcf LATB,1 call Delay bsf LATB,2 call Delay bcf LATB,2 call Delay bsf LATB,3 call Delay bcf LATB,3 call Delay bsf LATB,4 call Delay bcf LATB,4 call Delay bsf LATB,5 call Delay bcf LATB,5 call Delay goto main ledon bsf LATA,0 bcf LATA,6 bsf TRISA,7 return ledoff clrf LATA clrf TRISA return Delay movlw 0x23 ;2 second delay movwf d1 movlw 0xb9 movwf d2 movlw 0x09 movwf d3 Delay_0 decfsz d1,F goto $+6 decfsz d2,F goto $+6 decfsz d3,F goto Delay_0 return end