Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help PIC16F84A

Status
Not open for further replies.

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
 
I suggest you lose the antique 16F84, and use a more modern device - and my first tutorial does exactly what you want, using the F84's replacement, the 16F628 - it would be trivial to convert to the 84 if you really had to.
 
between movwf PORTA & movlw 00h you must have a delay.and i think there is a porb with your fuses.16f84a doesn't have internal osc.
 
aristos said:
between movwf PORTA & movlw 00h you must have a delay.and i think there is a porb with your fuses.16f84a doesn't have internal osc.


hey are you sure , that means i have to use an external osc ( Crystal )
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top