Output directly to input?

+ Reply to Thread
Results 1 to 8 of 8
  1. #1

    Default Output directly to input?

    I've never done it before, so it pays to ask. If I configure 2 pins on a pic, one to output the other to input, can they be connected directly to each other? Maybe standard practice would be to use a resistor or maybe a diode between?
    -- thanks

  2. #2
    Join Date
    Nov 2005
    Bombay, India

    Default Re: Output directly to input?

    Yes, you can. Output pins are the ones to create trouble when connected together.

  3. #3

    Default Re: Output directly to input?

    Yes. A while back I tied the HPWM output to an input and programmed it to make all my output ports go high and low with the input. I had multiple outputs at the same frequency as the HPWM.

  4. #4

    Default Re: Output directly to input?

    @Peter I was just about to ask why do that and you answered.

    @Micheal If pins are on the same Port, write to the whole TRIS in one go ie. don't set up individual pins as output/input. BTW pins default to input.

  5. #5
    Join Date
    Nov 2003

    Default Re: Output directly to input?

    Doing it fast, won't have issues with R-M-W ?


  6. #6
    Join Date
    Apr 2014

    Default Re: Output directly to input?

    The only advantage I can see is if you have a pin-specific function that requires a hardware input, and cannot be connected with software -- perhaps a Comparator. The newer PIC offerings more and more allow inputs to special functions to be tied to outputs of other functions through software gating/muxing.

    What are you ACTUALLY trying to accomplish? Would you be open to using a different PIC if it made more sense?

  7. #7

    Default Re: Output directly to input?

    I have a tactile switch going low on an input but thought I'd add a remote control. So I'll sense the infrared remote on another input pin, just looking for any button press, if that pin goes low (with a pull up attached) (any button press will make the receiver go low) then I'll have a normally high output pin go low for a few secs and this output will be connected to the switch input pin. Breadboarded it and it works fine. Did use a 1K between the pins.

    Bought one of these real cheap HX1838 remotes off ebay (<2 bucks).

    Has anyone had experience with these? Seems to me years ago when I built an infrared pair with a module, it was problematic but this is working great. Wondering if it may have any sunlight issues and false triggering on the receiver. so far, no problem.

  8. #8

    Default Re: Output directly to input?

    Yes Ioannis I would expect it would have issues at high speed. It was an experiment at low speed just to see if a PIC could "mirror" an output on multiple pins.

Similar Threads

  1. Input and Output on same Port
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th November 2008, 19:46
  2. Input Output interface
    By aratti in forum Schematics
    Replies: 2
    Last Post: - 5th November 2008, 22:36
  3. input output code
    By pitufo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th August 2008, 20:57
  4. Input / output using same pin
    By leonel in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th March 2007, 22:19
  5. Using 4 input to control 10 output
    By cibotsan in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th November 2004, 13:08

Members who have read this thread : 13

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts