problems on power up of PIC


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2005
    Posts
    28

    Default problems on power up of PIC

    Hi all

    I have a project using the PIC 16F876A. I'm having a problem with that appears to be the program memory resetting or erasing randomly on power up.

    I'm using a wall wart at 12 vdc to power up the system. An LM340AT produces 5v for the processor, which is fed through an on-off toggle switch to the PIC. I have a .1mfd decoupling cap between +5 and ground at the PIC.

    I program the chip, and the device works fine. Power it on or off several times OK. Then it will cease working. Using my Epic programmer and Micrcode studio plus to verify the program it shows either all 0s of 3FFF instead of program. Device reprograms OK. Ive tried different chips witrh same result. Problem seems worse if I leave the switch on and unplug and plug the 12V power supply, which makes me suspect transients.

    I have MCLR tied to 5V with a 3.3k resistor.

    Any ideas or power supply design tips greatly appreciated! This problem is a project killer!

    Thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi dmairspotter,

    I think you may want to put a few more capacitors on your circuit. Put a 10uF on both sides of the voltage regulator along with .1uf caps. Put a .1uf from MCLR to ground. Then try your power off and on again and see if this doesn't clear things up for you. It probably wouldn't hurt to also put a 100uf on th inout side of the voltage regulator also.

    BobK

  3. #3
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default LVP Mode ? ?

    Hi dmairspotter,

    Do you think the power-up sequence might be accidentally putting the 16F876A into the "Low Voltage Program" mode. Then programming garbage into the PIC.

    Make sure to turn the "Low Voltage Program" option off when you program the 16F876A

    PIC16F87XA FLASH Memory Programming Specification
    http://ww1.microchip.com/downloads/e...Doc/39589b.pdf

    See: 2.4.1 LOW VOLTAGE ICSP PROGRAMMING MODE
    When RB3 is driven to VDD from ground, the PIC16F87XA device enters Programming mode.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dmairspotter

    I have MCLR tied to 5V with a 3.3k resistor.
    I tend to use 10K for pull up resistors.. don't know if that makes much difference but might be worth a try

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink some ideas ...

    Quote Originally Posted by dmairspotter
    Hi all

    I have a project using the PIC 16F876A. I'm having a problem with that appears to be the program memory resetting or erasing randomly on power up.


    Any ideas or power supply design tips greatly appreciated! This problem is a project killer!

    Thanks
    Hi,Dmair

    I use Pics abord R/C systems ... supply is always "not so good , yeah ..." I then solved the problem with an external Brown out device like MC 33064P5 ...

    No more startup, cutout or "glitches" problems ... cause reset is strongly tied low until Power is in the correct range !!!

    In your explanation ... I didn't see any "big" capacitor ( > 200µF )... between Reg and PIC. ... just an idea ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Oct 2005
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    Thanks for all the input. I did try some small (.1-.2 mF) caps at the in and out of the reg. On the in side, seemed to help. On the out, seemed to aggravate the problem. I will check the LV programming and try adding some more/bigger caps. Thanks again.

Similar Threads

  1. Xtal speed vs PIC power
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th January 2010, 19:55
  2. Problems Upgrading from Demo to Pic Basic and MCS-Plus
    By wadebbi in forum mel PIC BASIC
    Replies: 3
    Last Post: - 10th November 2007, 23:38
  3. Damn these low power PIC and other Microcontrollers
    By keithdoxey in forum Off Topic
    Replies: 8
    Last Post: - 12th November 2006, 21:52
  4. Controlling power to a PIC with another PIC
    By jswayze in forum Off Topic
    Replies: 3
    Last Post: - 28th May 2005, 19:44
  5. Waking a sleeping PIC
    By anj in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th May 2005, 01:51

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts