Hi,
I am powering my PIC from USB with 470 uF capacitots of 5 and 0 volts. I am also using 970 Ohm resistor for POR. with two seven segments connected. I programmed my PIC with ICSP. using this code:
PROCESSOR 16f877a
#include "p16f877a.inc"
org 0x00
movlw 0x00
movwf TRISC
movlw 0x00
movwf PORTC
movlw 0x00
movwf TRISD
movlw 0xFF
movwf PORTD
end
my seven sgment should show seven on display instead it shows one. some time random LEDs are glowing. some time none of the LED works. seems like PIC is not programmed properly. But I tried reprogramming it successfully. At least it shows program successful when I program it. Can any one tell me if I am missing any thing. I also have crystals with right capacitors. My power pins are connected properly. PLease help
I am powering my PIC from USB with 470 uF capacitots of 5 and 0 volts. I am also using 970 Ohm resistor for POR. with two seven segments connected. I programmed my PIC with ICSP. using this code:
PROCESSOR 16f877a
#include "p16f877a.inc"
org 0x00
movlw 0x00
movwf TRISC
movlw 0x00
movwf PORTC
movlw 0x00
movwf TRISD
movlw 0xFF
movwf PORTD
end
my seven sgment should show seven on display instead it shows one. some time random LEDs are glowing. some time none of the LED works. seems like PIC is not programmed properly. But I tried reprogramming it successfully. At least it shows program successful when I program it. Can any one tell me if I am missing any thing. I also have crystals with right capacitors. My power pins are connected properly. PLease help