Hi David, If you want a fail-safe circuit; a) Using a single switch to keep wires shorted out have a problem. Imagine a bump at the launching box and the switch bounces its contact... "fire in the hole". b) Imagine the pull up resistor opens or the return wire goes short into the ground (as you preview)... "no fire in the hole at all". c) Use a double switch as a better solution. Use a "Single Pole, Dual Toggle Switch", you can find it easily at any Radio Shack, or worse, at any Home Depot, as "3-way Switch" wall lamp switch. Connect the Switch Common to Ground, and two PIC port pins with pull-up resistors. In stopped condition, port pin (A) is UP and (B) is DOWN (by the switch). At the launch command, the switch reverts to (A) DOWN and (B) UP. Upon this *double* safety it is impossible to the PIC launch the rocket if one of the wires screws up. It requires a total inversion of state in two pins, what is very difficult to happens by mistake or simple accident, not even bounce since the switch needs to toggle completely to revert state on both pins. Want to make it safer? Include two 1µF capacitors to ground at each one of the PIC port pin... it will create a little "launch delay". Wagner Lipnharski. David Olson wrote: > > Francisco, thanks for the reply, > > OK. Does your schematic show R1 in addition to the resistor network? Are you > saying that I should limit the current running up to (and through) the > switch as well as a resistor in series with the pin? If I interpret your > ASCII schematic (which I'm terrible at) this is pulling the pin low when the > switch is closed. I want to push the pin high when the switch is closed. > Because my switches are located at the end of a cable where there can be > chafing and other wire nastiness, I need the pin to be low until told > otherwise. > > Here's the situation: Let's say my PIC controls the firing of missiles and > the button to do so is located remotely. If I get a short to ground, I don't > want a missile to fire. I've got some safeguards in my code but, I'm > thinking that I'll keep the low until forced high is the right approach. The > most common short condition that I think I'll have is a short to ground and > not two switch wires crossed. This also means that I've got 1 5v wire and 3 > wires to the pins instead of 3 5v wires to the pins and a ground. > > Then again, I could be wrong. Good thing this isn't a missile firing > application ;) > > -DO > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@mitvma.mit.edu]On Behalf Of Francisco Armenta > > Sent: Tuesday, January 25, 2000 11:52 AM > > To: PICLIST@mitvma.mit.edu > > Subject: Re: [OT] Pulldown size > > > > > > David the pin can sink 25 ma, but you must be limited the current to > > less that 25 ma (whit a series resistor). > > > > example +5V > > | > > < RNWK > > R1 > > > pic pin ___--------/\/\/\---|---| > > | > > |_ SWITCH > > | > > | > > | > > _ (GND) > > > > Francisco > > David Olson wrote: > > > > > > I've got some switches externally located off my PIC board > > (about 2 feet) > > > and I'm purposely driving my port pins high when the switches are closed > > > (due to the fact that I don't want a short to give me an > > unwanted trigger) > > > and I'm not sure how to size the pulldown resistors. I'm > > thinking of using a > > > resistor network since I need 8 resistors. Most of the networks > > are or about > > > 1/16 or less in wattage. If a pin can sink 25ma, is that what I need to > > > consider in my power calculations? 5v X .025 is close to 1/8 watt. > > > > > > I'm locating the resistors on the PIC board and not with the switches. > > > > > > -DO