Maker Pro
Maker Pro

pic input/outputs

jerk

Oct 13, 2010
16
Joined
Oct 13, 2010
Messages
16
I don't realy understand where are pins connected when either input/output is set or when output is set as 1 or 0.
Does mcu have current limiting resistor when pin is set to input or must an externaly be addes? What is the current limit for input pin (I know for output is 25 or 50 mA)?

Can a 5V pnp be controled directly via output pin?
Can a pfet be controled directly (mcu sinking pfet base current)?
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
Most have weak pull up's capability, but customarily a external pull up is used.
I use a logic level mosfet for any output that requires current.
A 2n7000 is useful for starters.
Inputs are high impedance.
Do you have a particular micro No?
M.
 

jerk

Oct 13, 2010
16
Joined
Oct 13, 2010
Messages
16
I know for pull ups, they are user selected on INPUT pins. They connect input pin to Vdd via 100k resistor. I know that for otput there are no current limiting resistor so user should extrenaly limit the current.

My question is about ground connection. When pin is set as input it should be connected to the Vss in order to make a circuit. So can I bring 5V directly to the input pin with no limiting resistor?
And if I want to control PNP could I do that or not? Base of PNP in this case should be connected to the ground via a base resistor. Can PIC do that or not, since pin is connected to the Vss only when pin is input?
When pin is output it is connected to Vdd when set to logic 1 or not connected to anything when set as logic 0. Is this right?

Below is some examples I found on the internet. I don't know if that is the internal schematics for PIC I/O pins, but that is what I wanted to know.
can we say 1st figure on the left is OUTPUT set to logic 0, right is INPUT with pull up enabled
and on the 2nd figure on th left is OUTPUT set to logic 1, right is INPUT.
SinkingOutput.png


SinkingInput.png
 
Last edited:

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
. So can I bring 5V directly to the input pin with no limiting resistor?
And if I want to control PNP could I do that or not? Base of PNP in this case should be connected to the ground via a base resistor. Can PIC do that or not, since pin is connected to the Vss only when pin is input?
When pin is output it is connected to Vdd when set to logic 1 or not connected to anything when set as logic 0. Is this right?

Why would you need to connect 5v direct?
Mosfet are usually preferred now as they do not impose the low impedance to an output that Bi-polar do.
M.
 

Attachments

  • FET2n7000.pdf
    831 KB · Views: 40

Tha fios agaibh

Aug 11, 2014
2,252
Joined
Aug 11, 2014
Messages
2,252
Yes, you could have a PNP driven by the output of a sinking output but you'll need a limiting base resistor.

Yes, the examples essentially show the internal schematic of each I/O pin (terminal).

When logic for the sinking output in fig 1 is true (or 1), the internal NPN transistor switches on essentially pulling the output pin to ground which in turn makes the sourcing input module (on the right) go high (or 1)

Conversely, If logic (same example fig 1) of sinking output is low (or 0) the sourcing input remains low.
 
Last edited:
Top