Blinking LED
;Copy this codes and assemble
;///Program starts here///
; Connect your led to Portb,0
list p=16f877A
#include <p16F877A.inc>
bsf STATUS,RP0
clrf TRISB ; all TRISB pins OUTPUT
bcf STATUS,RP0
main
bsf PORTB,0 ; Led connected PB0
call Wait1_sec
bcf PORTB,0
call Wait1_sec
goto main
call Wait1_sec
cblock
d0
d1
d2
endc
Wait1_sec ;!!! 1sec for 4mhz XTAL !!!!
movlw 0x08 ; You OSC is not indefinite , i'm sorry
movwf d0 ; please tell me
movlw 0x2F
movwf d1
movlw 0x03
movwf d2
Delay_0
decfsz d0, f
goto $+2
decfsz d1, f
goto $+2
decfsz d2, f
goto Delay_0
goto $+1
return
end
;//// THE END ////
;This way is very strong, keep your hair on CSS ....