i am using PIC controller which senses a digital input through a switch. switches are pulled up to 5 volts. (PIC requires gnd voltage to sense the digital sensor). i want overcurrent protection for that switch (in case of short circuit). can i use LM317 as a switch which also gives constant current to pic input pin? or any other circuit that i can use for this project.
thank u in advance.
i hav attached the basic ckt. when switch is open pic pin is at +5v and when switch is closed pic pin is gnded. i want the protection in case when switch is closed and smbody short gnd with +5v / +12v then my power supply ckt is burned so i want overcurrent protection at the input switch.