pic input/outputs

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

  1. jerk

    jerk

    Joined:
    Oct 13, 2010
    Messages:
    16
    Likes Received:
    0
    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)?
     
    jerk, May 19, 2017
    #1
    1. Advertisements

  2. jerk

    Minder

    Joined:
    Apr 24, 2015
    Messages:
    2,103
    Likes Received:
    438
    Location:
    Canadian Midwest
    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.
     
    Minder, May 19, 2017
    #2
    1. Advertisements

  3. jerk

    jerk

    Joined:
    Oct 13, 2010
    Messages:
    16
    Likes Received:
    0
    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]

    [​IMG]
     
    Last edited: May 22, 2017
    jerk, May 22, 2017
    #3
  4. jerk

    Minder

    Joined:
    Apr 24, 2015
    Messages:
    2,103
    Likes Received:
    438
    Location:
    Canadian Midwest
    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.
     

    Attached Files:

    Minder, May 22, 2017
    #4
  5. jerk

    Tha fios agaibh

    Joined:
    Aug 11, 2014
    Messages:
    1,196
    Likes Received:
    347
    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
    Tha fios agaibh, May 25, 2017
    #5
    1. Advertisements

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.
Similar Threads
  1. Steve Sousa

    PIC outputs driving relays directly?

    Steve Sousa, Oct 3, 2003, in forum: Electronic Design
    Replies:
    2
    Views:
    935
    Steve Sousa
    Oct 8, 2003
  2. meld_das@yahoo.com

    Is it safe to parallel PIC chip outputs

    meld_das@yahoo.com, Apr 7, 2007, in forum: Electronic Basics
    Replies:
    10
    Views:
    674
    meld_das@yahoo.com
    Apr 11, 2007
  3. Peter S. May

    Using 74xx574 D FF to expand PIC outputs

    Peter S. May, Jul 16, 2007, in forum: General Electronics
    Replies:
    1
    Views:
    1,122
  4. Peter S. May

    Using 74xx574 D FF to expand PIC outputs

    Peter S. May, Jul 16, 2007, in forum: Electronic Design
    Replies:
    53
    Views:
    1,394
    Mike Silva
    Jul 19, 2007
  5. Jan Panteltje
    Replies:
    11
    Views:
    1,230
    Jan Panteltje
    Jan 10, 2008
  6. Jim
    Replies:
    9
    Views:
    3,454
  7. sherazi
    Replies:
    2
    Views:
    479
    (*steve*)
    Jul 11, 2011
  8. Tom Núñez

    Arduino momentary input to turn on consecutive outputs

    Tom Núñez, May 21, 2016, in forum: Microcontrollers and Programming
    Replies:
    5
    Views:
    338
    DatLe
    Jun 1, 2016
Loading...