Hello,
I am trying to blink an LED using the pic16F877A microcontroller and coding in assembly. The code looks fine to me but for some reason i am getting no output from the chip.
The above is the code i am using in MPLAB X. I build it and the .hex file is generated and then i just program the chip using a programmer.
Any help ywould be greatly appreciated
I am trying to blink an LED using the pic16F877A microcontroller and coding in assembly. The code looks fine to me but for some reason i am getting no output from the chip.
Code:
RESET_VECTOR CODE 0x0000 ; processor reset vector
INT_VECTOR CODE 0x0004 ; interrupt vector location
BSF 03h,5 ;go to bank 1
MOVLW 00h ;put 00000
MOVLW 85h ;move 00000 to TRISA
BCF 03h,5 ;go back to bank 0
Start movlw 02h ;00010
movwf 05h
Loop1 decfsz 20h,1
goto Loop1
decfsz 21h,1
goto Loop1
movlw 00h
movwf 05h
Loop2 decfsz 20h,1
goto Loop2
decfsz 21h,1
goto Loop2
goto Start
END
The above is the code i am using in MPLAB X. I build it and the .hex file is generated and then i just program the chip using a programmer.
Any help ywould be greatly appreciated