Shop OBEX P1 Docs P2 Docs Learn Events
One Wire with BS2 — Parallax Forums

One Wire with BS2

bob kruggelbob kruggel Posts: 50
edited 2007-03-06 22:51 in BASIC Stamp
Has anyone interfaced a BS2 to the Dallas DS2450 (serial to 1-wire converter), or know a source of info about the same. I have the Dallas DS2450 document, but it confuses me.
Bob Kruggel

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-10-15 16:21
    Well the BasicStamps supports one wire, but I think the BS2 does not. At least the BS2 doesn't support I2C.

    I think the two are synonymous.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-15 16:28
    I2C and OW are different, OW is more finicky than I2C and both are more finicky than SPI. The higher level BS2's have OW built in, Jon has experience with OW and has talked with the Dallas/Maxim engineers about it. He says it's impossible to code OW in a BS2 that doesn't already support it, I _think_ he said its possible to use the converter, but it may have been someone else that said that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • bob kruggelbob kruggel Posts: 50
    edited 2005-10-15 16:57
    I asked about coding 1-wire with a BS2 and received the recommendation to use the DS2450. Now I'm hoping to find some who has experience with the BS2·and DS2450.

    Bob
  • bob kruggelbob kruggel Posts: 50
    edited 2005-10-15 17:12
    My mistake! The Dallas device is the DS2480, not the DS2450.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-15 17:32
    I know of a customer of ours in Australia who has used a BS2sx with the DS2880 and had success. That said, he recently changed to the BS2p-family to simplify his design. The DS2480 is not available in a DIP package, so it's not easy to experiment with (unless you're adept at making surface-mount adapters or can find one that suits the DS2480).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • bob kruggelbob kruggel Posts: 50
    edited 2005-10-15 18:26
    Jon,

    Do you know if the costumer documented his experience for public consumption.\?

    Bob
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-15 18:28
    No, he's an EOM and I don't think he's shared his code. Once you get the the DS2480 connected, my understanding is that the process is pretty straightforward -- you'll use SEROUT and SERIN.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • bob kruggelbob kruggel Posts: 50
    edited 2005-10-24 19:04
    I have managed to connect the DS2480, using an 8-pin surfboard, to a stamp BS2. I can write commands to the DS2480 and monitor the async response from the DS2480 to the stamp with a scope. The response occurs 100us after the command to the DS2480 ends. If I attempt to use SERIN to capture the response I get different results then I see on the scope. I'm pretty sure it is not possible for SERIN to capture the data from the DS2480 if the SEROUT data to the DS2480 finished 100us earlier.

    So my new question is: is there is a way to get SERIN to respond this soon (100us)·after SEROUT data has been transmitted by the stamp? If I can't check out the command responses from the DS2480, I may just ignore them and see if I can get the 1-wire communications working.

    BobK
  • superoosuperoo Posts: 5
    edited 2005-11-10 05:36
    Hello,

    Its the·bloke in Australia, I've just rejoined the forum after a few years out of it, and stumbled across this thread.

    I'm sorry·I cant give you the exact code, as we use the software in a commercial application where we have pleanty of competition, but I can tell you that the ds2480b is·very reliable with bs2sx.

    I think you will have trouble·with·the·bs2 comms with DS2480B.

    The DS application note for the DS2480B gives some good help, as does the DS1996L app notes.

    Be sure to read the information in the DS2480B documentation regarding sending of control codes as data, ie: when you want to send the command code value as part of the data, not as a command code, in that situation you need to send the data byte twice...

    Eg:

    if databyte·<> CommandCode then sendit
    serout pin, baud,[noparse][[/noparse]CommandCode]
    sendit:
    serout pin, baud,[noparse][[/noparse]databyte]

    We went to bs2p, and it is better in our application because it freed up 1 io pin, and uses heaps less code space.

    Hope this helps in some way.

    Cheers,
    Chris
  • bob kruggelbob kruggel Posts: 50
    edited 2005-11-10 18:00
    Chris,

    Thanks for the response. I've alredy convinced myself that the BS2 is too slow for the serial communications. Since I have a BS2SX, I'll give it a try. I may just ignore the responses with the BS2 and just see if I can get the 1-wire talking and listening.

    BobK
  • Mark BrooksMark Brooks Posts: 1
    edited 2007-03-06 20:30
    So did you get it working? Will the oem BS2SX work with the 2480B?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    ·Mark Brooks
    ·HighFlyer
  • bob kruggelbob kruggel Posts: 50
    edited 2007-03-06 22:51
    My curiousity did not prevail. I gave up the effort and just use the BS2P.

    Bob Kruggel
Sign In or Register to comment.