Mihindu_gajaba
New Member
Hi , i wanna turn a led on and then off. and that should be in a loop ..
so i have written a code. is it correct and am i supporsed to to use a cristal. of can i use the internal clock i'm Using PIC16F84A
Please help Me.
code :
__CONFIG _CP_OFF & _WDT_OFF & _BOREN_OFF & _MCLRE_OFF & _LVP_OFF & _INTOSC_OSC_NOCLKOUT & _PWRTE_ON
bsf STATUS,5
movlw 00h
movwf TRISA
bcf STATUS,5
Start movlw 02h
movwf PORTA
movlw 00h
movwf PORTA
goto Start
end
so i have written a code. is it correct and am i supporsed to to use a cristal. of can i use the internal clock i'm Using PIC16F84A
Please help Me.
code :
__CONFIG _CP_OFF & _WDT_OFF & _BOREN_OFF & _MCLRE_OFF & _LVP_OFF & _INTOSC_OSC_NOCLKOUT & _PWRTE_ON
bsf STATUS,5
movlw 00h
movwf TRISA
bcf STATUS,5
Start movlw 02h
movwf PORTA
movlw 00h
movwf PORTA
goto Start
end