PIC as Momentary Switch

Started by burningman, March 27, 2009, 11:29:56 PM

Previous topic - Next topic

burningman

I've programmed a PIC to act as a momentary switch (shorting to gnd), allowing me to increment stored programs on a non-midi device. I was wondering if I can simply interface the port of the PIC with a stereo jack or if there are any hazards to the equipment/PIC in this setup?
Thanks.

iaresee

To be safe you may want to put it behind an isolating buffer of some kind. If you got any kind of current or voltage on the line be accident you might zap the PIC.

ElectricDruid

If it's a short-to-ground output you're after, I'd feed the PICs port pin to the base of a transistor, and then use the transistor's collecter/emitter to provide the short to ground. This will allow the PIC to comfortably handle larger voltages than its supply rails (+5V usually) and provides a bit of buffering. PICs are cheap, but it's probably still cheaper to fry transistors!

T.


R.G.

Unless the PIC is also powered by the unit it's controlling, I'd use a transistor-output optocoupler. That ensures that any differences in power supply ground won't kill the PIC.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.