luigi_moran23
Newbie level 5
- Joined
- Mar 4, 2013
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,365
Please help me in programming my pic16f877a. I am having hard time working on the hardware part. The software was correct because it was running in the simulation in PROTEUS. Please give me a circuit for burning or sample assembly program for just a simple output to see if my pic16f877a still working. In pickit 2 program, I can read the microcontroller and then write the program to it but my problem is when I put source voltage to it the LED is not LIGHTING up. here is my code:
#include "p16f877.inc"
__CONFIG _CP_OFF & _WDT_OFF& _PWRTE_ON & _XT_OSC
org 0x00 ;reset memory
Main:
; select BANK1
org 0x00 ;reset memory
bsf STATUS, RP0
;bcf STATUS, RP1
; set port c as output
movlw b'00000000'
movwf TRISC ;tris C
;movlw b'11111111'
;movwf h'85'
; select bank 0
bcf STATUS, RP0
bcf STATUS, RP1
; turn on LEDs
LOOP:
movlw b'11111111'
movwf PORTC ;port C
goto LOOP
end
PLEASE help me with it. It will also be the one that will control my quadcopter. Thank you for your help.
#include "p16f877.inc"
__CONFIG _CP_OFF & _WDT_OFF& _PWRTE_ON & _XT_OSC
org 0x00 ;reset memory
Main:
; select BANK1
org 0x00 ;reset memory
bsf STATUS, RP0
;bcf STATUS, RP1
; set port c as output
movlw b'00000000'
movwf TRISC ;tris C
;movlw b'11111111'
;movwf h'85'
; select bank 0
bcf STATUS, RP0
bcf STATUS, RP1
; turn on LEDs
LOOP:
movlw b'11111111'
movwf PORTC ;port C
goto LOOP
end
PLEASE help me with it. It will also be the one that will control my quadcopter. Thank you for your help.