pic 16f877a mclr problem

Discussion in 'Embedded Systems and Microcontrollers' started by rlaybourn, Jun 29, 2011.

  1. rlaybourn

    Thread Starter New Member

    May 22, 2011
    4
    0
    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
     
  2. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    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
     
  3. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
    [​IMG]
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    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.
     
  5. rlaybourn

    Thread Starter New Member

    May 22, 2011
    4
    0
    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
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    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?
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    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.
     
  9. rlaybourn

    Thread Starter New Member

    May 22, 2011
    4
    0
    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
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    OK, well, do-do happens.

    Glad you got it to work!
     
  11. blah2222

    Well-Known Member

    May 3, 2010
    554
    33
    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!
     
  12. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Go git yer own thread !
     
  13. blah2222

    Well-Known Member

    May 3, 2010
    554
    33
    Hm... I thought that it would be better to ask a relevant question in a ready-made thread, rather than make a new one to keep things together, but ok...
     
Loading...