Why is BS so gay?
Archiver
Posts: 46,084
What ??
Original Message
From: "dcalotta" <dave@c...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, May 21, 2003 7:55 PM
Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> 0=on and 1=off, sometimes. wtf?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Original Message
From: "dcalotta" <dave@c...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, May 21, 2003 7:55 PM
Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> 0=on and 1=off, sometimes. wtf?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Comments
Original Message
> Depends on whether the pin is pulled high or low to switch.
> At least I'm guessing that's what you were asking?!?
> 0=on and 1=off, sometimes. wtf?
At least I'm guessing that's what you were asking?!?
Original Message
From: dcalotta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZE6AcKzJvog9uTNyQ6Vk8vL6URt5ic2Qfb8y7k22yKttwl03pOJPs8DBQNAiQ60gD1uGlRGyvO6YJg]dave@c...[/url
Sent: 21 May 2003 12:55
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
0=on and 1=off, sometimes. wtf?
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
and this offends you so strongly -- you could write something like this:
ON con 0
OFF con 1
LED var pin9
LED=OFF
Of course, you might have cases where you have somethings that turn on
with a 1 and some with a 0, in which case you might like to write:
ON con 1
nON con 0
OFF con 0
nOFF con 1
nLED var pin9 ' inverted LED
LED var pin8 ' positive LED
nLED=nON
LED=ON
Etc.
Al Williams
AWC
* Free standard shipping this week only
http://www.al-williams.com/awce
>
Original Message
> From: dcalotta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WBflhr1lWeeK8_ypzo9pmL4Y9nxZ6tqqWV-SsTxOJDB03Bxj0swFUtMv89cMr9vFRfAp8oWkvge9]dave@c...[/url
> Sent: Wednesday, May 21, 2003 6:55 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
>
>
> 0=on and 1=off, sometimes. wtf?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
habit, I believe, developed because many devices can sink more current than
they can source.
One note on the example code below: ON is a keyword in PBASIC 2.5 and will
cause a compiler conflict. I have modified my programs like this:
IsOn CON 0
IsOff CON 1
-- Jon Williams
-- Parallax
In a message dated 5/21/2003 7:41:59 AM Central Standard Time,
alw@a... writes:
> Assuming you have an LED, for example, wired up to turn on when low --
> and this offends you so strongly -- you could write something like this:
>
> ON con 0
> OFF con 1
> LED var pin9
>
> LED=OFF
>
> Of course, you might have cases where you have somethings that turn on
> with a 1 and some with a 0, in which case you might like to write:
>
> ON con 1
> nON con 0
> OFF con 0
> nOFF con 1
>
> nLED var pin9 ' inverted LED
> LED var pin8 ' positive LED
>
> nLED=nON
> LED=ON
>
> Etc.
>
> Al Williams
> AWC
> * Free standard shipping this week only
> http://www.al-williams.com/awce
>
>
>
>
> >
Original Message
> >From: dcalotta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=BBKhBtpTrER69wTmMxujr6JnmOtyZBr_O88qQBNQaRygFyTQfe83y7wXphaAsajuaQU-_7Nb__-A]dave@c...[/url
> >Sent: Wednesday, May 21, 2003 6:55 AM
> >To: basicstamps@yahoogroups.com
> >Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> >
> >
> >0=on and 1=off, sometimes. wtf?
[noparse][[/noparse]Non-text portions of this message have been removed]
tOn, tOff (for non-inverted). I guess I will have to start looking at
2.5 :-)
Al Williams
AWC
* Free standard shipping this week only
http://www.al-williams.com/awce
>
Original Message
> From: jonwms@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=-uwLj_uxqNFarNZHZyE50_SL_igRo1AtWS9fLSHefspb-T6z6uBcxBJi92Fc-_a2JsSLbkI9pWvt]jonwms@a...[/url
> Sent: Wednesday, May 21, 2003 8:18 AM
> To: basicstamps@yahoogroups.com
> Subject: Re: [noparse][[/noparse]basicstamps] Why is BS so gay?
>
>
> As Al points out, we often wire LEDs to turn on when with a
> low signal. This
> habit, I believe, developed because many devices can sink
> more current than
> they can source.
>
> One note on the example code below: ON is a keyword in PBASIC
> 2.5 and will
> cause a compiler conflict. I have modified my programs like this:
>
> IsOn CON 0
> IsOff CON 1
>
> -- Jon Williams
> -- Parallax
>
>
> In a message dated 5/21/2003 7:41:59 AM Central Standard Time,
> alw@a... writes:
>
> > Assuming you have an LED, for example, wired up to turn on
> when low --
> > and this offends you so strongly -- you could write something like
> > this:
> >
> > ON con 0
> > OFF con 1
> > LED var pin9
> >
> > LED=OFF
> >
> > Of course, you might have cases where you have somethings
> that turn on
> > with a 1 and some with a 0, in which case you might like to write:
> >
> > ON con 1
> > nON con 0
> > OFF con 0
> > nOFF con 1
> >
> > nLED var pin9 ' inverted LED
> > LED var pin8 ' positive LED
> >
> > nLED=nON
> > LED=ON
> >
> > Etc.
> >
> > Al Williams
> > AWC
> > * Free standard shipping this week only
> > http://www.al-williams.com/awce
> >
> >
> >
> >
> > >
Original Message
> > >From: dcalotta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FFd2vzglKHZFOm00zifMVBobVUndNGOTbiRjzLhqT-RochAhAqwDKK1Rt1h9QzVA-rrz-a_d7TD_RQE]dave@c...[/url
> > >Sent: Wednesday, May 21, 2003 6:55 AM
> > >To: basicstamps@yahoogroups.com
> > >Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> > >
> > >
> > >0=on and 1=off, sometimes. wtf?
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
voltage and current, and as other posts have
mentioned -- chips tend to be able to sink (take
in) more current than they can source (put out).
If you have an LED with one end tied to +5,
a 470 ohm current limiting resistor, and
then the Stamp pin, then you will turn
ON the LED with a LOW on the stamp. Thus
a 0 voltage selected leads to current flow
'on'.
In code comments, I tend to call this
'active low logic', where 0 results in
an ON state in some device.
If the LED was tied to Ground, then you'd
have 'active high logic', and a high on
the BS2 pin WOULD drive the LED 'on'. Note
that the BS2 is rare in that it can do this,
most processors can't source as much current
as the BS2 module can.
So that's why it's sometimes "Low == ON", and
other times "High == ON".
--- In basicstamps@yahoogroups.com, "dcalotta" <dave@c...> wrote:
> 0=on and 1=off, sometimes. wtf?
current when a negative is provided; sinking current when a positive is
provided???
jonwms@a... wrote:
>
> As Al points out, we often wire LEDs to turn on when with a low signal. This
> habit, I believe, developed because many devices can sink more current than
> they can source.
>
> One note on the example code below: ON is a keyword in PBASIC 2.5 and will
> cause a compiler conflict. I have modified my programs like this:
>
> IsOn CON 0
> IsOff CON 1
>
> -- Jon Williams
> -- Parallax
>
> In a message dated 5/21/2003 7:41:59 AM Central Standard Time,
> alw@a... writes:
>
> > Assuming you have an LED, for example, wired up to turn on when low --
> > and this offends you so strongly -- you could write something like this:
> >
> > ON con 0
> > OFF con 1
> > LED var pin9
> >
> > LED=OFF
> >
> > Of course, you might have cases where you have somethings that turn on
> > with a 1 and some with a 0, in which case you might like to write:
> >
> > ON con 1
> > nON con 0
> > OFF con 0
> > nOFF con 1
> >
> > nLED var pin9 ' inverted LED
> > LED var pin8 ' positive LED
> >
> > nLED=nON
> > LED=ON
> >
> > Etc.
> >
> > Al Williams
> > AWC
> > * Free standard shipping this week only
> > http://www.al-williams.com/awce
> >
> >
> >
> >
> > >
Original Message
> > >From: dcalotta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_UtAqRFpaIOF8PM4P5lkNCLc-DAFKnXixuClm7PXSeqnX9pzavdT4nSmypKVD6ya1x8Ux3PR3X9Wfw]dave@c...[/url
> > >Sent: Wednesday, May 21, 2003 6:55 AM
> > >To: basicstamps@yahoogroups.com
> > >Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> > >
> > >
> > >0=on and 1=off, sometimes. wtf?
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Yes, electron flow IS from negative to positive, but
back when they were discovering electricity, they
didn't know that. So they defined 'Charges' and
'Current Flow' from positive to negative. Positive
current flows from the positive terminal of a
voltage source to the negative terminal. That
is the convention, and how it is defined.
In TTL circuitry, they defined +5 volts as the
standard positive voltage, and 0 volts as
'ground'. I suppose what really happens is
that electrons come creeping up out of 'ground'
under the stimulus of the voltage differential
between ground and +5, and so you get a
negative current flow of negative charges, which
results in a positive current flow the other
way. While you can think this way if you want,
there's a lot of literature written assuming you
(and everyone else) thinks the other way. You
are adding an enormous confusion factor.
So, when one end of the LED is tied to +5, and
through a current limiting resistor the other
end is tied to the Stamp, and the Stamp then
outputs a '0', what is said to happen is that
the Stamp 'sinks' the (by convention positive)
(consisting of "positive charges")current
from the +5V power supply through the
LED, and it lights (turns 'on').
The Stamp is really 'sourcing' electrons in this
case, which are being 'sucked' by the +5V
power terminal -- in which case the Stamp is
'sourcing' negative current. It's the same
thing as saying the Stamp is 'sinking' positive
current -- which is the standard way of saying it.
--- In basicstamps@yahoogroups.com, Don Denhardt <dondenhardt@y...>
wrote:
> If electron flow is from negative to positive, are you not sourcing
> current when a negative is provided; sinking current when a
positive is
> provided???
>
>
> jonwms@a... wrote:
> >
> > As Al points out, we often wire LEDs to turn on when with a low
signal. This
> > habit, I believe, developed because many devices can sink more
current than
> > they can source.
> >
> > One note on the example code below: ON is a keyword in PBASIC 2.5
and will
> > cause a compiler conflict. I have modified my programs like this:
> >
> > IsOn CON 0
> > IsOff CON 1
> >
> > -- Jon Williams
> > -- Parallax
> >
> > In a message dated 5/21/2003 7:41:59 AM Central Standard Time,
> > alw@a... writes:
> >
> > > Assuming you have an LED, for example, wired up to turn on when
low --
> > > and this offends you so strongly -- you could write something
like this:
> > >
> > > ON con 0
> > > OFF con 1
> > > LED var pin9
> > >
> > > LED=OFF
> > >
> > > Of course, you might have cases where you have somethings that
turn on
> > > with a 1 and some with a 0, in which case you might like to
write:
> > >
> > > ON con 1
> > > nON con 0
> > > OFF con 0
> > > nOFF con 1
> > >
> > > nLED var pin9 ' inverted LED
> > > LED var pin8 ' positive LED
> > >
> > > nLED=nON
> > > LED=ON
> > >
> > > Etc.
> > >
> > > Al Williams
> > > AWC
> > > * Free standard shipping this week only
> > > http://www.al-williams.com/awce
> > >
> > >
> > >
> > >
> > > >
Original Message
> > > >From: dcalotta [noparse][[/noparse]mailto:dave@c...]
> > > >Sent: Wednesday, May 21, 2003 6:55 AM
> > > >To: basicstamps@yahoogroups.com
> > > >Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> > > >
> > > >
> > > >0=on and 1=off, sometimes. wtf?
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
are reversed from actuality. Historically the north "seeking" pole of a
magnet was named because it was attracted toward the Earth's North Pole,
which is in actuality polarized as the south pole.
No wonder I get lost all the time!!!
Yiipes....
Mike Sokol
Original Message
From: "Allan Lane" <allan.lane@h...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, May 22, 2003 5:06 PM
Subject: [noparse][[/noparse]basicstamps] Re: Why is BS so gay?
> Aha, electron flow...
>
> Yes, electron flow IS from negative to positive, but
> back when they were discovering electricity, they
> didn't know that. So they defined 'Charges' and
> 'Current Flow' from positive to negative. Positive
> current flows from the positive terminal of a
> voltage source to the negative terminal. That
> is the convention, and how it is defined.
>
> In TTL circuitry, they defined +5 volts as the
> standard positive voltage, and 0 volts as
> 'ground'. I suppose what really happens is
> that electrons come creeping up out of 'ground'
> under the stimulus of the voltage differential
> between ground and +5, and so you get a
> negative current flow of negative charges, which
> results in a positive current flow the other
> way. While you can think this way if you want,
> there's a lot of literature written assuming you
> (and everyone else) thinks the other way. You
> are adding an enormous confusion factor.
>
> So, when one end of the LED is tied to +5, and
> through a current limiting resistor the other
> end is tied to the Stamp, and the Stamp then
> outputs a '0', what is said to happen is that
> the Stamp 'sinks' the (by convention positive)
> (consisting of "positive charges")current
> from the +5V power supply through the
> LED, and it lights (turns 'on').
>
> The Stamp is really 'sourcing' electrons in this
> case, which are being 'sucked' by the +5V
> power terminal -- in which case the Stamp is
> 'sourcing' negative current. It's the same
> thing as saying the Stamp is 'sinking' positive
> current -- which is the standard way of saying it.
>
> --- In basicstamps@yahoogroups.com, Don Denhardt <dondenhardt@y...>
> wrote:
> > If electron flow is from negative to positive, are you not sourcing
> > current when a negative is provided; sinking current when a
> positive is
> > provided???
> >
> >
> > jonwms@a... wrote:
> > >
> > > As Al points out, we often wire LEDs to turn on when with a low
> signal. This
> > > habit, I believe, developed because many devices can sink more
> current than
> > > they can source.
> > >
> > > One note on the example code below: ON is a keyword in PBASIC 2.5
> and will
> > > cause a compiler conflict. I have modified my programs like this:
> > >
> > > IsOn CON 0
> > > IsOff CON 1
> > >
> > > -- Jon Williams
> > > -- Parallax
> > >
> > > In a message dated 5/21/2003 7:41:59 AM Central Standard Time,
> > > alw@a... writes:
> > >
> > > > Assuming you have an LED, for example, wired up to turn on when
> low --
> > > > and this offends you so strongly -- you could write something
> like this:
> > > >
> > > > ON con 0
> > > > OFF con 1
> > > > LED var pin9
> > > >
> > > > LED=OFF
> > > >
> > > > Of course, you might have cases where you have somethings that
> turn on
> > > > with a 1 and some with a 0, in which case you might like to
> write:
> > > >
> > > > ON con 1
> > > > nON con 0
> > > > OFF con 0
> > > > nOFF con 1
> > > >
> > > > nLED var pin9 ' inverted LED
> > > > LED var pin8 ' positive LED
> > > >
> > > > nLED=nON
> > > > LED=ON
> > > >
> > > > Etc.
> > > >
> > > > Al Williams
> > > > AWC
> > > > * Free standard shipping this week only
> > > > http://www.al-williams.com/awce
> > > >
> > > >
> > > >
> > > >
> > > > >
Original Message
> > > > >From: dcalotta [noparse][[/noparse]mailto:dave@c...]
> > > > >Sent: Wednesday, May 21, 2003 6:55 AM
> > > > >To: basicstamps@yahoogroups.com
> > > > >Subject: [noparse][[/noparse]basicstamps] Why is BS so gay?
> > > > >
> > > > >
> > > > >0=on and 1=off, sometimes. wtf?
> > >
> > > [noparse][[/noparse]Non-text portions of this message have been removed]
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>