Connect with us

pic input/outputs

Discussion in 'Microcontrollers, Programming and IoT' started by jerk, May 19, 2017.

Scroll to continue with content
  1. jerk


    Oct 13, 2010
    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)?
  2. Minder


    Apr 24, 2015
    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?
  3. jerk


    Oct 13, 2010
    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. [​IMG]

    Last edited: May 22, 2017
  4. Minder


    Apr 24, 2015
    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.

    Attached Files:

  5. Tha fios agaibh

    Tha fios agaibh

    Aug 11, 2014
    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: May 25, 2017
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day