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
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
Yes, you can. Output pins are the ones to create trouble when connected together.
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.
@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.
George
Doing it fast, won't have issues with R-M-W ?
Ioannis
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?
Bookmarks