Author Topic: "state" of a pic pin when pic is off  (Read 7840 times)

0 Members and 1 Guest are viewing this topic.

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
"state" of a pic pin when pic is off
« on: October 12, 2011, 09:44:05 am »
I know this will be a tough one, but does u-chip guarantee that pins will have a certain state when the pic is off ? It would be helpful if my PWM output pin when high impedance when the pic is not powered but i think maybe I'm hoping for a bit much ?
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: au
Re: "state" of a pic pin when pic is off
« Reply #1 on: October 12, 2011, 10:15:34 am »
That is a very interesting question. I am thinking a dso and dmm could answer the question, just program the output pins and see what happens when you power it off.

regards
Testing one two three...
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #2 on: October 12, 2011, 10:16:51 am »
yea, i suppose so, I just wondered if micro chip gave any specific data on the situation to avoid fluke ocurances
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1046
  • Country: fi
Re: "state" of a pic pin when pic is off
« Reply #3 on: October 12, 2011, 10:40:06 am »
Remember that ESD protection diodes are still there, so if you apply voltage to an IO-pin when the device is powered off, you can inadvertently power your MCU via an IO-pin.

Regards,
Janne
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #4 on: October 12, 2011, 11:45:49 am »
well any voltage applied will be through a high value resistor, if it were to start the pic that would be great
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: au
Re: "state" of a pic pin when pic is off
« Reply #5 on: October 12, 2011, 12:08:08 pm »
If you apply voltage to a pin, you may power up the pic however you can easily blow the pin io by sinking to much current (done it myself). I generally use a weak pulldown resistor on the output so the output is known when it is powered down, if required.

Regards
Testing one two three...
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 2054
  • Country: us
Re: "state" of a pic pin when pic is off
« Reply #6 on: October 12, 2011, 02:45:22 pm »
DC or AC impedance?  At low voltage, the impedance is high but not super high, given by the diode characteristic.  As the voltage applied to the output pin increases, the diode starts to conduct, and the DC impedance drops.  When the current is high enough to turn on the chip, the DC resistance starts going up again, but AC signals get to see the decoupling capacitor.

If you really need high impedance when the circuit is off, you may need to use an external circuit like a relay or an open-collector driver.
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #7 on: October 12, 2011, 02:48:56 pm »
well I'm interested in the DC impedance 0-3V range so from what you say it will be high, that's good, yes i can use a buffer of some sort
 

alm

  • Guest
Re: "state" of a pic pin when pic is off
« Reply #8 on: October 12, 2011, 02:58:50 pm »
Most vendors specify that no voltage should be applied to any of the other pins if the chip is not powered, so I would assume this unless the datasheet explicitly states otherwise.
 

Offline Bambur

  • Regular Contributor
  • *
  • Posts: 67
Re: "state" of a pic pin when pic is off
« Reply #9 on: October 13, 2011, 09:14:16 am »
Most vendors specify that no voltage should be applied to any of the other pins if the chip is not powered, so I would assume this unless the datasheet explicitly states otherwise.

True. Applying any voltage to I/O pin when VDD is off may result in SCR-latchup and chip damage. Be aware ;)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7515
  • Country: nz
Re: "state" of a pic pin when pic is off
« Reply #10 on: October 13, 2011, 09:40:57 am »
I dunno if this helps, but most (if not all) micros go high-z on i/o pins when you hold them in a reset state.

(The only exception might be the programming output pins on some micros)
« Last Edit: October 13, 2011, 09:45:24 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #11 on: October 13, 2011, 10:17:44 am »
I dunno if this helps, but most (if not all) micros go high-z on i/o pins when you hold them in a reset state.

(The only exception might be the programming output pins on some micros)

so your saying keep the micro powered and use the MCLR pin to turn it on and keep the pins on high Z, that is something I had consicered, infact the other way around this is to just use a mosfet to pull the the MCLR low when it sees the same voltage i was going to put onto the output to kick start the circuit (boot it)
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: "state" of a pic pin when pic is off
« Reply #12 on: October 13, 2011, 01:41:39 pm »
If you don't mind it drawing a tiny bit of power all the time, why not put it in sleep mode and have it wake up by some external signal?
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #13 on: October 13, 2011, 01:54:56 pm »
that would be ideal, I'm looking into finding a low quiescent current regulator as this project is powered off a car battery
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: "state" of a pic pin when pic is off
« Reply #14 on: October 13, 2011, 02:00:09 pm »
that would be ideal, I'm looking into finding a low quiescent current regulator as this project is powered off a car battery

If you can make sure it's input voltage doesn't go above 16 V. an LT6003CS5 would do it.
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #15 on: October 13, 2011, 02:05:18 pm »
hm I suppose i could, it's for an automotive use so I am a bit concerned about any spikes etc but i suppose if I put some filtering in front of it it should be ok,
 

alm

  • Guest
Re: "state" of a pic pin when pic is off
« Reply #16 on: October 13, 2011, 04:44:08 pm »
Wouldn't it make sense to use a more robust regulator designed for the nasty automotive environment? Even the continuous voltage is fairly close to 16V, let alone spikes and all the other garbage encountered in automotive electronics.

Is quiescent current such an issue? It's not like it has to run for a year on an CR2032 cell. What's the self discharge of a car battery like?
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #17 on: October 13, 2011, 06:49:49 pm »
Well it does not have to be so low, I think up to 1mA is fine
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: "state" of a pic pin when pic is off
« Reply #18 on: October 13, 2011, 08:02:42 pm »
How about one of these: http://www.maxim-ic.com/datasheet/index.mvp/id/6336

"The device operates from a +3.5V to +30V input voltage, delivers up to 200mA of load current, and consumes only 20µA of quiescent current at no load. The input is +45V transient tolerant"
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #19 on: October 13, 2011, 08:48:09 pm »
that looks perfect, price isn't bad either
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 12107
  • Country: gb
    • Mike's Electric Stuff
Re: "state" of a pic pin when pic is off
« Reply #20 on: October 17, 2011, 09:44:47 am »
It will typically be equivalent to a high impedance with a pair of inverse-connected diodes to ground (as the Vdd rail will effectively be at ground). Any current applied to the pin will be fed to Vdd via the ESD diode, so depending on what else is connected to Vdd, it may start to power things up, but due to the limited current available it could misbehave in various ways and so not a good idea to rely on to do anything useful. It is also important to have a good brownout reset, as without it, the marginal supply to the pin may get the MCU in to a wierd state which persists when proper power appears. 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14476
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: "state" of a pic pin when pic is off
« Reply #21 on: October 17, 2011, 11:35:19 am »
well I am looking at feeding a few volts via a 10-100K resistor, there is the gate of a mosfet connected to the pin so this should be powered at >3V anyhow that will signal the rest of the circuit to start
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2020
  • Country: us
Re: "state" of a pic pin when pic is off
« Reply #22 on: November 08, 2011, 12:07:10 am »
Remember that ESD protection diodes are still there, so if you apply voltage to an IO-pin when the device is powered off, you can inadvertently power your MCU via an IO-pin.

Regards,
Janne

Yep, figured that out the hard way. One day I was wondering what the heck was going on then I plugged my USB to TTL serial converter to my PIC-based project. It supplied around 3.7 volts out of the 5V TX line. It was enough to dimly light the power LED, but it couldn't make the PIC work because I had the brownout reset activated so it would go into reset mode at 4.5V.
« Last Edit: November 08, 2011, 12:09:05 am by ivan747 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 13855
  • Country: gb
  • 0999
Re: "state" of a pic pin when pic is off
« Reply #23 on: November 08, 2011, 05:47:04 pm »
The LM2936-5.0 is a good regulator: low quiescent current and low drop-out but it's limited to only 50mA.

What's the operating frequency? You could just connect a resistor in series with the IO pin.
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2020
  • Country: us
Re: "state" of a pic pin when pic is off
« Reply #24 on: November 09, 2011, 07:08:49 pm »
If you really care about power consumption, you can use some spike-proof 9V or 12V linear regulator and connect it's output to a switching regulator to get the voltage down to 5V or 3.3V. Texas Instruments and Maxim have some good switching regulators in non-evil packages like SOT-23 and SOIC.

You can also omit the linear regulator and use the classic MC34063 with some heavy filtering and spike protection. Remember it can stand 40V at the input, so spikes won't kill it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf