pic 16f877a mclr problem

Thread Starter

rlaybourn

Joined May 22, 2011
4
I have a pic 16f877a . when wire it with a 3k resistor pull up on the mclr pin it will not start . it will only start if either i directly connect the mclr pin the the positive supply rail or connect it using a tiny pull up resistor , something like about 100 ohms. Does anyone know why the chip would be behaving in this strange way ? . there are not other connections to that pin at all
 

debjit625

Joined Apr 17, 2010
790
Have you turn on the Power On Reset configuration bit ? if no then do it and use a 10K pull up resistor on MCLR pin.

If you still have problems, then post the schematic,configuration settings and give us some details on what type of power supply you are using.

Good luck
 

Markd77

Joined Sep 7, 2009
2,806
This may be a possible solution:
It's also worth checking the connection to the VDD pin. It's possible for the PIC to run with the VDD pin unconnected if any of the inputs including MCLR are at 5V. If there was a high resistance from 5V to this pin then the PIC wouldn't run which would give the symptoms you describe.
 

Attachments

ErnieM

Joined Apr 24, 2011
8,377
...It's possible for the PIC to run with the VDD pin unconnected if any of the inputs including MCLR are at 5V.
Minor point: since the MCLR pin also supplies the (>5V) Vpp voltage for programing it does not have the ESD diode to sneak in power. Most all other pins do have these diodes.
 

Thread Starter

rlaybourn

Joined May 22, 2011
4
Thanks for the replys. Is the power on reset configuration bit in the fuses because there only appear to be. WDT = off BODEN = on Code protect = disabled , debug = off code protect eep = disabled , pwrite = on lvp = off flash protect = on , oscillator = hs . I cant see anything about power on reset . I checked the vdd connections and all seems fine there . The chip is powered from an L7805CV regulator. I had not noticed this problem till now as i normally just tie mclr straight to the supply rail
 

ErnieM

Joined Apr 24, 2011
8,377
Well this is interesting. The MCLR/VPP pin has no config setting as this pin ALWAYS has those functions. That's a new feature to me.

So forget config settings, they ain't there so that part is good. Low voltage programming LVP is off so you're doing good ole VPP programming so that isn't the issue either.

Your MCLR circuit does differ from the Microchip recomendations. While I would expect it to still work you may wish to peek at Section 14.4 and use their recommended circuit (you loose the diode and add a small series resistor).

Since you noted the resistance here matters perhaps this pin got damaged. Do you have another PIC to substitute?
 

t06afre

Joined May 11, 2009
5,934
What kind of programmer do you use. Programmers like the PICKIT 2/3 take control over the MCLR pin. You can use MPLAB to toggle this pin high/low.
 

ErnieM

Joined Apr 24, 2011
8,377
What kind of programmer do you use. Programmers like the PICKIT 2/3 take control over the MCLR pin. You can use MPLAB to toggle this pin high/low.
Excellent! That would fit the low resistance required to overdrive the programmer's pull down.

Example: the PicKit2 has a 1K series resistor there on the pull down FET to ground so you need to pull up off the 1K.

I don't think it wold damage any programmer designed as the PicKit, just make the target not function.
 

Thread Starter

rlaybourn

Joined May 22, 2011
4
looks like it was a damaged chip although i have no idea how it got damaged. I dug out another chip i had that i had been using to test ideas on and suddently the mclr pin works like it should
 

blah2222

Joined May 3, 2010
582
Hello, I have been using the PICKIT3 and I have come across this little subtlety of the MCLRE configuration for the demo lessons.

I have the PIC18F45K20 44pin demo board and have noticed that for all the demos, I have to TURN OFF the MCLRE configuration for my board to work. MPLAB says that it programs but no LEDs light up until I make sure that MCLRE is OFF.

I also noticed that this pin on the board is connected to pin 1 on the PICKIT3 programmer.

If you wouldn't mind, I would just like to have a better explanation of what is going on when the MCLRE config is ON. The datasheet says that when MCLRE is '0' (OFF) then the pin acts as a digital input (only). It also mentioned something about a POWER-ON RESET... but I am having a major brain fart and can't put the pieces together.

It seems that the board gets programmed in both cases of MCLRE being ON or OFF, but when it is ON ('1'), the board does not get power from the programmer? Is that correct?

Any advice on this would be great. Thanks!
 
Top