PDA

View Full Version : can a pin become ground?



mashersmasher
04-30-2007, 04:30 AM
i have a bs2 and i was wondering if a pin can be set to ground. if so what is the command? and can it accept 12 volts without burning?

Franklin
04-30-2007, 05:12 AM
It cannot accept 12v! a transistor would be needed but the command is LOW

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

allanlane5
04-30-2007, 06:19 AM
The PIC the BS2 is based on has "protection diodes", which will allow it to recieve a 12 volt signal IF AND ONLY IF you put a 22 KOhm resistor in series with the signal.

And digital I/O can 'source' current and output a high voltage, or 'sink' current and provide a link to ground. But you have to do something to limit the current -- like put a resistor in series with the signal.

And the command to do that is "LOW <pin_Number>" (where <pin_number> is replaced by a number, like 0, 1, 2)