PIC doesn't start witout scope


Closed Thread
Results 1 to 12 of 12
  1. #1

    Default PIC doesn't start witout scope

    16F876A, I have a 1500 uf cap in front of an AP1084 5v regulator. On the 5v side, I have a 470uf cap. There are 24 1/4hp motors on the 12v side. They create alot noise so thats why I run the large value caps. Here is the deal, on power-up, quite often a PIC doesn't start. I couldn't figure out what was going on. Then I thought I needed to reprogram PIC, as soon as I connected the programmer, the PIC started. The next time it happened, I thought I would trace things out with my scope. As soon as I touch the scope lead to the MCLR pin, the PIC started again. Once it starts, it will keep going. I would say 75% of the time, I need to jump start with my scope.

    Any ideas? What is happening to MCLR when I touch it with my scope? Maybe a cap on the MCLR line?
    Thanks
    Toby

  2. #2
    Join Date
    Jan 2007
    Location
    Portland Oregon
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Schematic?

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Here you go
    Attached Images Attached Images

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    What happens if you turn the MCLR diode around?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    What happens if you turn the MCLR diode around?
    Good call Dave. Is MCLR even a needed function ? Perhaps turn it off in the configs. . . just thinking out loud, if you are controlling motors, maybe an E-STOP and full reset would be safer ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    MCLR OFF is not an option for that part. Would be nice if it was...

    Agreed about the full reset. Could save some problems down the road.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Good call Dave. Is MCLR even a needed function ? Perhaps turn it off in the configs. . . just thinking out loud, if you are controlling motors, maybe an E-STOP and full reset would be safer ?

    Good catch. Yes, Tobias definetely needs to turn that diode around or it won't work. He can even damage other components in his circuit with the ~12V going to Vpp from the programmer.

    I have a design with a 16F727 where I use a diode and a 4.7k resistor connected to MCRL. Now, reading Joe_S post I just realized that I don't really need this two extra components in my design. In the 16F727 you can configure pin 1 as MCRL or as RE3.

    Robert

  8. #8


    Did you find this post helpful? Yes | No

    Default schematic screwup

    Guys I appreciate the input and I realize that I have the diode drawn backwards in the schematic compared to the board. The PIC doesn't even program if the diode is backwards.

    The question I have is what happens when I touch the MCLR line with the scope? When I do that, the PIC starts up. Thats the weird deal. I am back at my office now and am going to swap out diodes. Maybe there is just a problem with the diode.

    I will let you know what I find.

    Thanks again

  9. #9
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Tobias View Post
    Guys I appreciate the input and I realize that I have the diode drawn backwards in the schematic compared to the board. The PIC doesn't even program if the diode is backwards.

    The question I have is what happens when I touch the MCLR line with the scope? When I do that, the PIC starts up. Thats the weird deal. I am back at my office now and am going to swap out diodes. Maybe there is just a problem with the diode.

    I will let you know what I find.

    Thanks again
    Yes, that's weird. Sometimes I forget to remove the programmer from my circuit and when the programmer is off and connected to the circuit my PIC won't work. So, in order to make my PIC work I need to either turn the programmer on or disconnect it from the circuit.

    In your case, what voltage are you feeding MCRL with? Are you sure you are getting this voltage at MCRL? Try replacing the 4.7k resistor also. Try connecting an inductor in series with the 4.7k resistor or a 0.1uF capacitor from MCRL to ground close to the MCRL pin to eliminate posible noise.

    Robert

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Hi,

    the 876 is not so easy with its reset pin ... I have numerous examples ...

    I always use MC33064P5 TO92 supply supervisors and never have any power up problem.

    a good habit is always enable the Brownout option ... 75% of problems off !!!

    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 " !!!
    *****************************************

  11. #11
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    I have not checked the data sheet, Does this PIC have PWRTE available, and is there ANYTHING else on that circuit which could pull the line to less than VDD ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  12. #12


    Did you find this post helpful? Yes | No

    Default

    VDD/5v is going to MCLR. The hard thing is I can't figure out the 'state' of the pin when it doesn't start because right when I touch the scope to the MCLR line the damn thing starts, lol.


    Quote Originally Posted by rsocor01 View Post
    Yes, that's weird. Sometimes I forget to remove the programmer from my circuit and when the programmer is off and connected to the circuit my PIC won't work. So, in order to make my PIC work I need to either turn the programmer on or disconnect it from the circuit.

    In your case, what voltage are you feeding MCRL with? Are you sure you are getting this voltage at MCRL? Try replacing the 4.7k resistor also. Try connecting an inductor in series with the 4.7k resistor or a 0.1uF capacitor from MCRL to ground close to the MCRL pin to eliminate posible noise.

    Robert

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