|
 |
On 5/25/2010 7:08 AM, Invisible wrote:
> I guess it's the way most books refer to circuits as "on" or "off".
> Usually if something is "on" it means it's connected to a power source,
> and if it's "off" then it isn't connected. That's how, e.g., a light
> switch works. It doesn't connect the output to the other pole when you
> turn it off, it just doesn't connect it to *anything*.
Strange... Here's how my mind worked when I encountered the floating
gate = high issue, and not truly realizing logic zero really needs to be
tied to ground:
First I checked the data sheet, and found the information that a
floating input would be interpreted as high. Then I stared at my dip
switch and lamented the fact that it wasn't a SPDT switch. The I
searched the electronics websites for SPDT dip switches, and came up
frustratingly empty. Then started thinking to myself, "How can I make
this work if I only have a SPDT switch" after staring at the circuit I
thought to myself, well, if I connect it to ground with a suitable
resistor, then that should allow the chip to see ground without dumping
tons of current through the switch when its in the on position.
I tried it, and with some trepidation flipped the tiny switch to the on
position and ... it worked just as it was supposed to!
Then I go an research after the fact, playing with the circuit
simulator, and prodding various things in it to find out that yes,
indeed, it does do what I thought it would do. and it makes sense. With
no current from the positive rail, the gate's input can source to
ground. While a voltage is on the positive rail, the gate sinks some of
the current. Exactly what I needed.
A bit more research later and I discovered if I had read a tutorial on
working with logic gates, I would have known about this solution, and
it's called a pull-down or pull-up resistor, depending on which rail it
hooks to.
:)
--
~Mike
Post a reply to this message
|
 |