Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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,888
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!
 

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top