Shop OBEX P1 Docs P2 Docs Learn Events
iButton question — Parallax Forums

iButton question

ArchiverArchiver Posts: 46,084
edited 2003-06-06 14:55 in General Discussion
All-
I am seriously thinking of incorporating i-button memory into a project that I
am
working upon, because the ability to have add-only EPROM memory (that is,
uneraseable memory), is quite desirable, as is the ability to swap a full-up
button
with a new one. I am looking at the DS1986.
I have two questions about the i-button memory:
(1) the EPROM write requires a 12 volt pulse appr 1/2 millisecond long to
permantly
change the memory. Does anybody out there have experience in shifting the TTL
level
signal of the Stamp to the 12 Volt level needed to write to the iButton?
(2) Is there any BS2 sample code for the iButton memory that out there anyone
has
seen.
Thanks,
-Mark

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 17:00
    I'm a huge fan of the iButtons -- especially the thermochrons, which
    can log temperature. The 12V question is easy just use a RTL or TTL
    pullup circuit with a seccond 12V power supply. The code question is
    a little trickier. I haven't seen any online but it wouldn't be to
    hard to communicate with the ibutton using SEROUT and SERIN.

    -Brian

    --- In basicstamps@yahoogroups.com, "mmarpet" <marpetm@s...> wrote:
    > All-
    > I am seriously thinking of incorporating i-button memory into a
    project that I am
    > working upon, because the ability to have add-only EPROM memory
    (that is,
    > uneraseable memory), is quite desirable, as is the ability to swap
    a full-up button
    > with a new one. I am looking at the DS1986.
    > I have two questions about the i-button memory:
    > (1) the EPROM write requires a 12 volt pulse appr 1/2 millisecond
    long to permantly
    > change the memory. Does anybody out there have experience in
    shifting the TTL level
    > signal of the Stamp to the 12 Volt level needed to write to the
    iButton?
    > (2) Is there any BS2 sample code for the iButton memory that out
    there anyone has
    > seen.
    > Thanks,
    > -Mark
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 18:07
    The iButton has its own protocol and you cannot use SEROUT and SERIN to
    communicate with iButton devices without a serial-to-1-wire convertor. The BS2p

    family has 1-Wire protocol built in.

    -- Jon Williams
    -- Parallax

    In a message dated 6/5/2003 11:01:29 AM Central Standard Time,
    selket_10027@y... writes:

    > I haven't seen any online but it wouldn't be to
    > hard to communicate with the ibutton using SEROUT and SERIN.
    >



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 18:12
    Brian (and Stampland)-
    Being a mechanical engineer, I have only a vague idea what you are
    talking about. I think of a pull-up circuit as a pull-up resistor.
    (DUH!) Don't I need to protect the stamp from the 12V? Can you point me
    to some schematics? Thanks.
    -Mark


    > I'm a huge fan of the iButtons -- especially the thermochrons, which
    > can log temperature. The 12V question is easy just use a RTL or TTL
    > pullup circuit with a seccond 12V power supply. The code question is
    > a little trickier. I haven't seen any online but it wouldn't be to
    > hard to communicate with the ibutton using SEROUT and SERIN.
    >
    > -Brian
    >
    > --- In basicstamps@yahoogroups.com, "mmarpet" <marpetm@s...> wrote:
    >> All-
    >> I am seriously thinking of incorporating i-button memory into a
    > project that I am
    >> working upon, because the ability to have add-only EPROM memory
    > (that is,
    >> uneraseable memory), is quite desirable, as is the ability to swap
    > a full-up button
    >> with a new one. I am looking at the DS1986.
    >> I have two questions about the i-button memory:
    >> (1) the EPROM write requires a 12 volt pulse appr 1/2 millisecond
    > long to permantly
    >> change the memory. Does anybody out there have experience in
    > shifting the TTL level
    >> signal of the Stamp to the 12 Volt level needed to write to the
    > iButton?
    >> (2) Is there any BS2 sample code for the iButton memory that out
    > there anyone has
    >> seen.
    >> Thanks,
    >> -Mark
    >
    >
    > 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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 18:30
    By "serial-to-1-wire convertor," are you referring to a hardware device
    or the one-wire commands in the BS2P? I am using a 2P40 and have
    already communicated with single 1-button devices (reading their serial
    number) without additional hardware (just a resistor).

    On Thursday, June 5, 2003, at 01:07 PM, jonwms@a... wrote:

    > The iButton has its own protocol and you cannot use SEROUT and SERIN to
    > communicate with iButton devices without a serial-to-1-wire convertor.
    > The BS2p
    > family has 1-Wire protocol built in.
    >
    > -- Jon Williams
    > -- Parallax
    >
    > In a message dated 6/5/2003 11:01:29 AM Central Standard Time,
    > selket_10027@y... writes:
    >
    >> I haven't seen any online but it wouldn't be to
    >> hard to communicate with the ibutton using SEROUT and SERIN.
    >>
    >
    >
    >
    > [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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 20:46
    I think of a pull-up circuit similarly, however, I would solve the problem
    like so:

    The BS puts out 1-5 volts on a pin, and if you had two supplies sharing a
    common ground, you could have an output pin tied to the base of an NPN
    transistor, with the emmiter tied to ground, and the collector tied to the
    +12V supply via a resistor (say, 1K ohm). With the pin high, the collector
    of the transistor would be somewhere near .7 volts, but if you set the
    output pin to low, the transistor will cut off, putting the collector at
    +12V, making the transistor a switch. When the transistor is cut-off, the 1K
    resistor will source (sink? I was taught current will flow from - to +, but
    many others are taught current flow by holes...) 12V/1Kohms or 12 mA. Should
    your iButton chip need more or expect less current on its input, you should
    change the resistor accordingly.

    Steve

    Original Message
    From: "Mark Marpet" <marpetm@s...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, June 05, 2003 7:12 PM
    Subject: Re: [noparse][[/noparse]basicstamps] Re: iButton question


    > Brian (and Stampland)-
    > Being a mechanical engineer, I have only a vague idea what you are
    > talking about. I think of a pull-up circuit as a pull-up resistor.
    > (DUH!) Don't I need to protect the stamp from the 12V? Can you point me
    > to some schematics? Thanks.
    > -Mark
    >
    >
    > > I'm a huge fan of the iButtons -- especially the thermochrons, which
    > > can log temperature. The 12V question is easy just use a RTL or TTL
    > > pullup circuit with a seccond 12V power supply. The code question is
    > > a little trickier. I haven't seen any online but it wouldn't be to
    > > hard to communicate with the ibutton using SEROUT and SERIN.
    > >
    > > -Brian
    > >
    > > --- In basicstamps@yahoogroups.com, "mmarpet" <marpetm@s...> wrote:
    > >> All-
    > >> I am seriously thinking of incorporating i-button memory into a
    > > project that I am
    > >> working upon, because the ability to have add-only EPROM memory
    > > (that is,
    > >> uneraseable memory), is quite desirable, as is the ability to swap
    > > a full-up button
    > >> with a new one. I am looking at the DS1986.
    > >> I have two questions about the i-button memory:
    > >> (1) the EPROM write requires a 12 volt pulse appr 1/2 millisecond
    > > long to permantly
    > >> change the memory. Does anybody out there have experience in
    > > shifting the TTL level
    > >> signal of the Stamp to the 12 Volt level needed to write to the
    > > iButton?
    > >> (2) Is there any BS2 sample code for the iButton memory that out
    > > there anyone has
    > >> seen.
    > >> Thanks,
    > >> -Mark
    > >
    > >
    > > 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/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 21:29
    You're fine with the BS2p-40. The post I responded to suggested on could
    connect with an iButton via SEROUT and SERIN. This is not possible without a
    serial-to-1-wire convertor (which you don't need). Anyone using a non-P BASIC
    Stamp can use the convertor and SEROUT and SERIN.

    -- Jon Williams
    -- Parallax

    In a message dated 6/5/2003 2:07:00 PM Central Standard Time,
    marpetm@s... writes:

    > By "serial-to-1-wire convertor," are you referring to a hardware device
    > or the one-wire commands in the BS2P? I am using a 2P40 and have
    > already communicated with single 1-button devices (reading their serial
    > number) without additional hardware (just a resistor).
    >
    > On Thursday, June 5, 2003, at 01:07 PM, jonwms@a... wrote:
    >
    > >The iButton has its own protocol and you cannot use SEROUT and SERIN to
    > >communicate with iButton devices without a serial-to-1-wire convertor.
    > > The BS2p
    > >family has 1-Wire protocol built in.
    > >
    > >-- Jon Williams
    > >-- Parallax
    > >
    > >In a message dated 6/5/2003 11:01:29 AM Central Standard Time,
    > >selket_10027@y... writes:
    > >
    > >>I haven't seen any online but it wouldn't be to
    > >>hard to communicate with the ibutton using SEROUT and SERIN.



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 22:36
    In a message dated 6/5/2003 1:38:57 PM Pacific Daylight Time,
    zman97211@y... writes:

    > I think of a pull-up circuit similarly, however, I would solve the problem
    > like so:
    >
    > The BS puts out 1-5 volts on a pin, and if you had two supplies sharing a
    > common ground, you could have an output pin tied to the base of an NPN
    > transistor, with the emmiter tied to ground, and the collector tied to the
    > +12V supply via a resistor (say, 1K ohm). With the pin high, the collector
    > of the transistor would be somewhere near .7 volts, but if you set the
    > output pin to low, the transistor will cut off, putting the collector at
    > +12V, making the transistor a switch. When the transistor is cut-off, the 1K
    > resistor will source (sink? I was taught current will flow from - to +, but
    > many others are taught current flow by holes...) 12V/1Kohms or 12 mA. Should
    > your iButton chip need more or expect less current on its input, you should
    > change the resistor accordingly.
    >
    > Steve

    "you could have an output pin tied to the base of an NPN
    transistor, with the emmiter tied to ground, and the collector tied to the
    +12V supply via a resistor (say, 1K ohm)."

    And a resistor between the stamp output pin and the base of the
    transistor.....10k will do just fine. Otherwise, Mr. Stamp output pin will get
    real mad
    real fast.....


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 23:44
    Roger. I think that that is enough information to allow mw to start
    fooling around.
    Thanks.

    On Thursday, June 5, 2003, at 03:46 PM, Steve Ziuchkovski wrote:

    > I think of a pull-up circuit similarly, however, I would solve the
    > problem
    > like so:
    >
    > The BS puts out 1-5 volts on a pin, and if you had two supplies
    > sharing a
    > common ground, you could have an output pin tied to the base of an NPN
    > transistor, with the emmiter tied to ground, and the collector tied to
    > the
    > +12V supply via a resistor (say, 1K ohm). With the pin high, the
    > collector
    > of the transistor would be somewhere near .7 volts, but if you set the
    > output pin to low, the transistor will cut off, putting the collector
    > at
    > +12V, making the transistor a switch. When the transistor is cut-off,
    > the 1K
    > resistor will source (sink? I was taught current will flow from - to
    > +, but
    > many others are taught current flow by holes...) 12V/1Kohms or 12 mA.
    > Should
    > your iButton chip need more or expect less current on its input, you
    > should
    > change the resistor accordingly.
    >
    > Steve
    >
    >
    Original Message
    > From: "Mark Marpet" <marpetm@s...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, June 05, 2003 7:12 PM
    > Subject: Re: [noparse][[/noparse]basicstamps] Re: iButton question
    >
    >
    >> Brian (and Stampland)-
    >> Being a mechanical engineer, I have only a vague idea what you are
    >> talking about. I think of a pull-up circuit as a pull-up resistor.
    >> (DUH!) Don't I need to protect the stamp from the 12V? Can you point
    >> me
    >> to some schematics? Thanks.
    >> -Mark
    >>
    >>
    >>> I'm a huge fan of the iButtons -- especially the thermochrons, which
    >>> can log temperature. The 12V question is easy just use a RTL or TTL
    >>> pullup circuit with a seccond 12V power supply. The code question is
    >>> a little trickier. I haven't seen any online but it wouldn't be to
    >>> hard to communicate with the ibutton using SEROUT and SERIN.
    >>>
    >>> -Brian
    >>>
    >>> --- In basicstamps@yahoogroups.com, "mmarpet" <marpetm@s...> wrote:
    >>>> All-
    >>>> I am seriously thinking of incorporating i-button memory into a
    >>> project that I am
    >>>> working upon, because the ability to have add-only EPROM memory
    >>> (that is,
    >>>> uneraseable memory), is quite desirable, as is the ability to swap
    >>> a full-up button
    >>>> with a new one. I am looking at the DS1986.
    >>>> I have two questions about the i-button memory:
    >>>> (1) the EPROM write requires a 12 volt pulse appr 1/2 millisecond
    >>> long to permantly
    >>>> change the memory. Does anybody out there have experience in
    >>> shifting the TTL level
    >>>> signal of the Stamp to the 12 Volt level needed to write to the
    >>> iButton?
    >>>> (2) Is there any BS2 sample code for the iButton memory that out
    >>> there anyone has
    >>>> seen.
    >>>> Thanks,
    >>>> -Mark
    >>>
    >>>
    >>> 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/
    >>
    >
    >
    > 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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-06 02:11
    Thanks.

    On Thursday, June 5, 2003, at 04:29 PM, jonwms@a... wrote:

    > You're fine with the BS2p-40. The post I responded to suggested on
    > could
    > connect with an iButton via SEROUT and SERIN. This is not possible
    > without a
    > serial-to-1-wire convertor (which you don't need). Anyone using a
    > non-P BASIC
    > Stamp can use the convertor and SEROUT and SERIN.
    >
    > -- Jon Williams
    > -- Parallax
    >
    > In a message dated 6/5/2003 2:07:00 PM Central Standard Time,
    > marpetm@s... writes:
    >
    >> By "serial-to-1-wire convertor," are you referring to a hardware
    >> device
    >> or the one-wire commands in the BS2P? I am using a 2P40 and have
    >> already communicated with single 1-button devices (reading their
    >> serial
    >> number) without additional hardware (just a resistor).
    >>
    >> On Thursday, June 5, 2003, at 01:07 PM, jonwms@a... wrote:
    >>
    >>> The iButton has its own protocol and you cannot use SEROUT and SERIN
    >>> to
    >>> communicate with iButton devices without a serial-to-1-wire
    >>> convertor.
    >>> The BS2p
    >>> family has 1-Wire protocol built in.
    >>>
    >>> -- Jon Williams
    >>> -- Parallax
    >>>
    >>> In a message dated 6/5/2003 11:01:29 AM Central Standard Time,
    >>> selket_10027@y... writes:
    >>>
    >>>> I haven't seen any online but it wouldn't be to
    >>>> hard to communicate with the ibutton using SEROUT and SERIN.
    >
    >
    >
    > [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/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-06 09:40
    > "you could have an output pin tied to the base of an NPN
    > transistor, with the emmiter tied to ground, and the collector tied to the
    > +12V supply via a resistor (say, 1K ohm)."
    >
    > And a resistor between the stamp output pin and the base of the
    > transistor.....10k will do just fine. Otherwise, Mr. Stamp output pin will
    get real mad
    > real fast.....

    I understand this could be a problem, causing the pin to try to source too
    much current. I currently have a BS2 hooked up directly to the base
    directly, with the collector tied to Vcc and a resistor and an LED (2.2V,
    30mA) from the emitter to ground, and have not noticed a problem. Could this
    be because this allows the base to rise to a full 5 volts, instead of only
    .7?

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-06 14:55
    Fortunately, you have that current limiting
    resistor in the emitter side circuit, or
    you would have burned out the pin.

    The earlier post assumed you tied the
    emitter directly to ground -- in which
    case you MUST have the current limiting
    resistor in the base side circuit.

    The 10K value of that post was to limit
    the current through the transistor, as
    well as through the stamp pin.

    --- In basicstamps@yahoogroups.com, "Steve Ziuchkovski"
    <zman97211@y...> wrote:
    > > "you could have an output pin tied to the base of an NPN
    > > transistor, with the emmiter tied to ground, and the collector
    tied to the
    > > +12V supply via a resistor (say, 1K ohm)."
    > >
    > > And a resistor between the stamp output pin and the base of the
    > > transistor.....10k will do just fine. Otherwise, Mr. Stamp output
    pin will
    > get real mad
    > > real fast.....
    >
    > I understand this could be a problem, causing the pin to try to
    source too
    > much current. I currently have a BS2 hooked up directly to the base
    > directly, with the collector tied to Vcc and a resistor and an LED
    (2.2V,
    > 30mA) from the emitter to ground, and have not noticed a problem.
    Could this
    > be because this allows the base to rise to a full 5 volts, instead
    of only
    > .7?
    >
    > Steve
Sign In or Register to comment.