PDA

View Full Version : Are Pic pins normally LOW when the PIC is un-powered??



Heckler
- 21st February 2014, 17:25
Hey group,

Are PIC pins normally low (tied to ground) when the PIC is un-powered?

I have an LED tied to my PIC and then through a resistor to +12v.
I was planning on having the PIC supply a LOW to light the LED.

But I am finding that my LED lights even when the PIC is not powered.
Is that normal?

The PIC is an 12F1822.

Archangel
- 21st February 2014, 20:57
Sounds like it is "Back Feeding" power into the PIC. Backfeeds can blow the PIC

pedja089
- 21st February 2014, 21:09
Hm, LED from PIC to +12V? Isn't that weird?
PIC operate at 5.5V maximum.

Archangel
- 21st February 2014, 22:35
With appropriate dropping resistor under load voltage will be correct, but when pic pin is hi Q . . .

Heckler
- 21st February 2014, 23:31
Yeah, I have the PIC running off of 5V for Vdd.
I did the calculation for the LED current limit resistor to take into account the 12V (using a 2700 ohm resistor) for approx 5ma LED current.

I thought the PIC could just be a source of Gnd (LOW) when I wanted to turn the LED on.

I had assumed that the port pins would be in a High Impedance state when powered down, and until configured otherwise.
Guess I'll have to insert a transistor in the ckt to control the LED.

Anybody else had any experience with how the I/O pins behave when the PIC is powered down??

thanks

Heckler
- 21st February 2014, 23:56
Now that I think about it...

Even if the pins were high impedance while powered down, the way I had wanted to supply ground (LOW) to light the LED would not have worked because when I wanted to turn the LED off, by making the pin HIGH, that HIGH (5 V) would still have been lower (with respect to the +12V) and so the LED would have seen +7v across it.

Back to the drawing board:o

amgen
- 22nd February 2014, 00:49
With pic powered down, I don't think you can supply voltage/current to most all pins. The limit diodes direct the current back to Vdd powering up the device and probably not run the program properly.... per Archangle.
don

falingtrea
- 24th February 2014, 19:53
Most pins on a PIC can drive hi efficiency LEDs directly. Either connect the LED to 5V instead of 12V, or flip the LED and connect it to ground. Size the resistor for 3-5 mA of current at 5V.

AvionicsMaster1
- 24th February 2014, 21:20
I'm away from my computer with a schematic drawing program so I hope this conveys my idea adequately. With no power to the PIC the LED would be powered on by the 12VDC thru resistor to ground. When PIC is powered a HIGH of more than 3ish VDC at the PIC pin would be enough to turn the LED off. The diode to the PIC would protect the PIC from sinking or sourcing current from the 12VDC source.

12VDC
|
Resistor
|
K--Diode-A---PIC pin
|
LED
|
Ground

I hope I'm using some semi-solid logic in this idea but if this isn't a good idea please let me know.

amgen
- 24th February 2014, 23:46
with what you describe, the LED won't turn off.... 3vdc'ish on led from pic will just light the LED. There are small (6 or 8 pin) normally-closed (form B) solid state relays, then the PIC energizes the SSR to turn off the led.

7256
don

AvionicsMaster1
- 25th February 2014, 02:04
OOps! Sounded good when I wrote it. I hope I get it right next time. Sorry about that.