Pic getting part power from Analog Port


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    Am I crazy thinking that this shouldn't have been something I had to fight with? There is a possibility that the pic will have voltage on the analog pin before Vdd when the entire circuit is powered up,
    Nope, you're not crazy. This is very typical of MCUs, FPGAs, and in particular ADCs. The inputs are diode protected (from datasheet "I/O pins have diode protection to VDD and VSS"), so if you apply power to the I/Os before applying power to the "core" guess what. You run the chance of reverse biasing the protection diode, and thus biasing the device through the I/Os.

    The best approach would be to not apply power to the I/Os before applying power to the "core" (i.e. make sure there is no possibility "that the PIC will have voltage on the analog pin before Vdd when the entire circuit is powered up"). This is sometimes inevitable, in which case you have to work around it. Buffering the I/Os is always the second best option. As an example, for the digital I/Os of an MCU you can use logic buffers (gates, latches, etc) which get turned on by the MCU after it has been powered-on; this way the I/Os are effectively buffered from the external world (sometimes series resistors could do the trick - but you never know). For analog I/Os you could use OPAMPs (again, which get turned on by the MCU). These are just suggestions, and I'm sure there will be others. But the main thing is that you are not going crazy, and this is something which has been tackled before time and time again.

  2. #2
    Join Date
    Apr 2009
    Location
    Boise, Id
    Posts
    44


    Did you find this post helpful? Yes | No

    Talking

    Thanks for the information, I don't feel like I'm crazy any more, sounds like it's a problem some of you have experienced before. I attached a simple block diagram of the circuit I have. There is more circuit to build, but I need to get this part working and be able to handle low voltage and brown outs and recover without a glitch.

    To sum up what I understand so far: If power is removed from the Pic, but power remains on the I/O pins, the pic will become reverse biased. This puts the Pic into a Brown out stage. The default BOR setting for the pic was 2 volts. Since there was greater than 2 volts still on Vdd, the Brown Out Reset was not "reset". Changing the BOR setting to 4 volts in the include file seems to mostly fix this issue.

    To completely fix the problem, I need to add an additional circuit. The pic will control the circuit so when the Pic is powered down it will shut off the rest of the circuit, removing voltage from the Pics I/O pins. Also, there will not be any voltage on the I/O until the Pic Powered up and turns it on.

    Let me know if I have this correct. I'm using some Opto relays and Opto Isolators in other parts of my circuit. I could add those to the inputs and have the Pic control those to remove voltage from the I/O's. Might be over kill but I have them and would be easy to implement.

    Thanks again for the help
    Shane
    Attached Images Attached Images  

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    To completely fix the problem, I need to add an additional circuit. The pic will control the circuit so when the Pic is powered down it will shut off the rest of the circuit, removing voltage from the Pics I/O pins. Also, there will not be any voltage on the I/O until the Pic Powered up and turns it on.
    yup sounds right to me. Then you just need to choose the best solution for you, there's a load of possibility, from relay, to "digital switches", Mosfets, opamp buffers, and so on.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Talking

    I have a set that had about the same problem
    I cheated and changed the power switch out for one that is double throw
    one set of contacts controls the power the other open the circuit going to the
    problem pin
    not the way a pro would have done it but works for me
    chow
    " be nice it's people like me that make people like you look smart"
    yes I read the datasheet, of the 300 pages I understood 10

  5. #5
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Default

    Another way is to leave the power on permanently, and with the switch, ground out the MCLR and hold the PIC in reset. This will force the PIC into a sleep mode.

    May not be suitable for your application, but its worth looking at a problem from more than one angle!

    Tim.

Similar Threads

  1. Xtal speed vs PIC power
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th January 2010, 20:55
  2. pic18f analog comparator problem
    By david.silaghi in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th May 2009, 10:38
  3. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 18:25
  4. PIC powered by capacitor for 0,5 second
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 25th August 2007, 10:23
  5. pic part models for electronic workbench
    By vacpress in forum Off Topic
    Replies: 0
    Last Post: - 17th January 2007, 23:42

Members who have read this thread : 0

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