PIC pin "interface".

Status
Not open for further replies.

izua

Member level 3
Joined
Oct 31, 2006
Messages
63
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,880
I need an "interface" so to say, for the PIC pins, though I might use it at something else too.
Basically, it should have a led and a button.
If the pin is an output, the led should light up depending on the pins state. Pushing the button wouldn't affect it, nor make any problems.
If the pin is an input, the button will 'set' a state on the pin (though it's incorectly said this way). So if i'll press the button, the pin will be read as a value. If it's depressed, another value will be read. The PIC also has configurable (weak) pull up resistors. It would be nice if the led would light up too, when the button is pressed (or another led, for the instance)

I've tried designing a few circuits, but everytime the button is either shorting the pin when it's an output, or it's not setting a value at all when it's an input. any help? thanks!
 

Use 2 pins one as input, one as output.
I dont think you can do this with one pin.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…