now it is working with the following code. But is it ok 80% duty cycle i mean 8ms? or it should be low?
processor PIC16F819
#include <p16f819.inc>
__CONFIG _CP_OFF & _WRT_ENABLE_OFF & _CPD_OFF & _CCP1_RB2 & _LVP_OFF & _BODEN_ON & _MCLR_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_IO
J equ 20h
K equ 21h
org 0
goto main
main:
banksel OSCCON
movlw B'01110000'
movwf OSCCON
banksel TRISB
movlw B'00000000'
movwf TRISB
banksel PORTB
Flasher:
bcf PORTB , 1
call delay10ms
bsf PORTB , 0
call delay8ms
nop
nop
bcf PORTB , 0
call delay10ms
bsf PORTB , 1
call delay8ms
goto Flasher
fin:
goto fin
delay2ms:
movlw D'2'
movwf K
clrf J
delay1:
nop
decfsz J , f
goto delay1
delay2:
nop
decfsz J , f
goto delay2
decfsz K , f
goto delay1
return
delay8ms:
movlw D'8'
movwf K
clrf J
delay11:
nop
decfsz J , f
goto delay11
delay22:
nop
decfsz J , f
goto delay22
decfsz K , f
goto delay1
return
end