Leaves the mainloop???


Closed Thread
Results 1 to 40 of 46

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    my main question is ... Why having chosen such " monster size " mosfets ???

    1) Imagine some kind of Halogen lights as a load: the inrush current can easily overload the switching supply ...

    2) have a look to the pic voltage regulator : no big caps around it ... so, no supply weakness could be dampened. ( switching supplies ALWAYS have load response time - enough to lead to a pic reset )

    as everyting fine without heavy load , it's correlated to load inrush current ...

    just need a test, powering the Pic with a small "Duracell" battery - say 4v5 - and the load with that big power supply ...
    ************************************************** ***********************
    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 " !!!
    *****************************************

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    Sure you have a good point on that.

    Again, a scope can show all these problems, nail them down for good. Either Power supply or output or anything else.

    Ioannis

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    Just a shot in the dark; when I design a power supply for my PICs, I isolate the 5v (or 3.3 or whatever) regulator with a 10 ohm resistor from 12v (or whatever) and place a 10 uF and 0.1 uF cap on the regulator input side. Then I put a 100 uF and 0.1 uF (and sometimes a 0.01 uF) parallel caps on the output side (5v side) of the regulator. In addition, there will be some distance between the regulator and the PIC. The VCC pin(s) get(s) an additional 0.1 uF cap to help filter any spikes. These larger electrolytic power supply caps add reserve when a brief power drain occurs, and the small disc caps filter noise. Microchip has released numerous Application Notes regarding power supply filtering and the importance of it. Just for kicks & giggles, give additional power supply caps a try and see if anything changes.

    [I have a large periodical table of elements I hang in my work area. I write often-used formulas there, as well as a resistor color band chart. I made a note to "Add more filter caps" and "Add more test points on PCBs" on my table because of issues I've had in the past.]

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    Quote Originally Posted by mpgmike View Post
    Just a shot in the dark; when I design a power supply for my PICs, I isolate the 5v (or 3.3 or whatever) regulator with a 10 ohm resistor from 12v (or whatever) and place a 10 uF and 0.1 uF cap on the regulator input side. Then I put a 100 uF and 0.1 uF (and sometimes a 0.01 uF) parallel caps on the output side (5v side) of the regulator. In addition, there will be some distance between the regulator and the PIC. The VCC pin(s) get(s) an additional 0.1 uF cap to help filter any spikes. These larger electrolytic power supply caps add reserve when a brief power drain occurs, and the small disc caps filter noise.
    totally agree and in an automotive enviro would make that 10 ohm R a RFC .
    also for high current switched loads pcb layout and wiring design are crucially important


    I have a suspicion about what the problem is, but I can't confirm it without knowing more detail. I'm not going to go out of my way on this just for the chance to learn later that that's not actually the problem and the goal posts have moved again.
    Warning I'm not a teacher

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    Another trick you might try is to initialize your SFRs, but put a PAUSE 100 before activating anything. This will give time for the power supply to stabilize. You said if you turn it off and turn it on again it works. This would skip the first turn on and jump to the one that works.

Similar Threads

  1. Time taken to do mainloop
    By Gerald in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th March 2023, 14:16
  2. Outside the Mainloop
    By pescador in forum General
    Replies: 10
    Last Post: - 26th April 2016, 17:34

Members who have read this thread : 2

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