pic16F877A not functioning

Thread Starter

daredavel

Joined Feb 22, 2010
32
ahhh..ok.. u mean the CONFIG sir?..

this one:
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC

it will be like this then:
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _MCRL_OFF & _XT_OSC
 
Looks fine. Is MCLR pulled up to Vdd (preferably with a resistor)?
Usually, you pull MCLR to Vdd/Vcc using a 10k resistor - particularly if you are using an ICSP programmer.

Are you certain that the crystal itself is good?

They are rather fragile. If they have been dropped on a hard surface from more than a foot or so height, the crystal can break loose from it's mountings. You can break a crystal by using the wrong type of diagonal cutters when trimming excess lead lengths, or using the cutters improperly. Proper cutters have their blades designed so that any sudden shock is on the side away from the component.

__________________
 
Last edited by a moderator:

Thread Starter

daredavel

Joined Feb 22, 2010
32
Here's the code and schematic sir!

MCLR is pulled up by a 10k resistor sir..and what are the symptoms if the xtal is broken/damage sir?

 

Attachments

retched

Joined Dec 5, 2009
5,207
If the XTAL is broken, you will not get a clock cycle. No clock cycle, then the PIC wont do a thing. It waits for clock hits to read the instructions in time.

No XTAL = No program running
 
Top