code question for car security application
Giuseppe
Posts: 51
Hey everyone. I have question on perhaps a possible command BS2 might have. I want to know if there it anyway to completely turn an I/O pin completely OFF. No HIGH or LOW on the pin, just no electric potential whatsoever for either polarity on it. I know you can turn something on and off (like an LED) by applying two LOW signals for each lead for off and one HIGH and one LOW signal for on. Is there to do something like "Insert Example Command" followed by "Example Pin Here"? I don't something like
OFF 14.
OFF 14.
Comments
Turn a pin into an Input, and both output drivers are disconnected. The input reciever has really high impedance (10 Megohm or so) but no applied voltage from the BS2.
Mind you, this make the input pin into an antenna, if nothing else is putting a voltage on that pin. But that sounds like what you're asking for.
Oh, I forgot to warn you -- each I/O pin has a "protection diode" to both high and low, which will 'clip' an input signal to 0 volts, or 5 volts (inside the BS2), if the input signal is lower than zero volts or higher than 5 volts.· However -- these diodes don't conduct much current before they are damaged.· Thus, if you ARE trying to read a 12-volt signal, you'll need a 22 Kohm resistor in series with that signal to prevent damage.·
Post Edited (allanlane5) : 1/2/2009 3:37:37 AM GMT
*Assume PIN definitions are already declared*
and for the opposite :
This code goes along with the bitmap image I attached. Perhaps I over complicated it. Ha because it seems like too much work to do a simple task. Any advice and comments would be greatly appreciated! Also, if this not the place to post stuff like this, I apologize and will next time post it in the appropriate thread.
*1/3/09*
I updated the circuit and I think I made it better. I took out the relays and just blocked the short at Vss and Vdd by diodes. I am also now protecting the transistors with diodes.
Post Edited (Giuseppe) : 1/3/2009 5:41:51 PM GMT