Shop OBEX P1 Docs P2 Docs Learn Events
BS2p <==> 1-wire device bug? — Parallax Forums

BS2p <==> 1-wire device bug?

bobhillierbobhillier Posts: 27
edited 2004-08-11 17:35 in BASIC Stamp
I wrote on·Aug 8 about my BS2p24 not communicating with a DS2450. There were 31 readers but no responses to that post. (Very few actual post in this forum have 0 responses.)
·
Has anyone been successful getting a BS2p24 rev C to talk with a DS2450 A2D converter? I have used the Nuts and Volts sample code (nv82) provided by Jon Williams and the code simply does not work.
·
Does anyone know if the DS2450 has unusual signal timing? (I don't know how to confirm that.) The power requirements appear to be low. I think the device is not being power starved. Other devices on the 1-wire bus seem to work fine.
·
The code is fairly straightforward.
FOR idx = 1 TO 4 ' setup four channels
· OWOUT OWpin, OW_NoRst, [noparse][[/noparse]$08] ' 8-bit values
· OWIN OWpin, OW_NoRst, [noparse][[/noparse]crc16.LowByte, crc16.HighByte, verify]
· OWOUT OWpin, OW_NoRst, [noparse][[/noparse]$01] ' 5.12 volt scale
· OWIN OWpin, OW_NoRst, [noparse][[/noparse]crc16.LowByte, crc16.HighByte, verify]
NEXT
·
The verify value in the 1st OWIN statement is supposed to be $08. The first time through the loop it is. The next two times through the loop it is $11. The last time through the loop it is $08. This is weird.

Similarly, the verify value in the·2nd OWIN statement is supposed to be $01. The first time through the loop it is. The next two times through the loop it is $03. The last time through the loop it is $01.

Something unusual happens during the second and third pass through the loop.
·
Does anyone have any suggestions or insights?
·
Any response is appreciated.
·
Thanks...
Bob
·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Bob, Ottawa
W75 54 17·· N45 18 30
·········· G16 #27

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-11 15:39
    In fairness, my code DID work with the weather station I had. I ultimately found that weather station to be unreliable and stopped working with it.· Perhaps the station you have is different than the one I had.· The trouble with the DS2450 (and many 1-Wire parts), is that there are no DIP versions, so they're not easy to experiment with.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 8/11/2004 3:55:46 PM GMT
  • bobhillierbobhillier Posts: 27
    edited 2004-08-11 16:18
    Thanks Jon. I wasn't suggesting your code didn't work in general. All I know is things do not work for me. There are a multitude of differences between my configuration and yours. I'm just trying to figure out where my problem might be.
    ·
    Your comment about the reliability of the Dallas 1-wire weather station is interesting. I'm running an AAG V3. I expect that was what you had since your code was for a DS2450 and not the earlier versions using DS2407.
    ·
    I have a selection of sample i-button devices from Maxim. I have experimented with most of them and they worked as documented. This DS2450 is the only device in its family code. This could suggest a different hardware front-end interface on the device. Maybe the BS2p has problems with this family code device due to different timing requirements.
    ·
    Has anyone got a BS2p to work with a DS2450?
    ·
    Jean Marchaudon posted in the files section the discrete coding for a BS2SX to interface with a DS1820. There is a supplementary circuit to accommodate special pulse widths. Is this approach worth investigating with the BS2p?
    ·
    Jon, when you said you stopped working with the un-reliable weather station did you mean you stopped working with 1-wire devices or just the weather station configuration? In other words, in your experience, do 1-wire devices generally or almost always·work well with the BS2p special interface? (I've read all the NV articles and don't remember if you've done any 1-wire columns since nv82.)
    ·
    Is it plausible 1-wire technology and BS2p isn't a good fit? (I sure hope the answer is NO.)

    Thanks for your feedabck Jon. It's very much appreciated.
    ·
    Bob

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······ Bob, Ottawa
    W75 54 17·· N45 18 30
    ·········· G16 #27
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-11 17:03
    I'm pretty fed up with most 1-Wire devices in general. This is a personal thing, of course. I just found that there are far too few devices, and far to many complications to make them worth dealing with (Like the 1-Wire search ... what a nightmare....). By adding a second pin (which my projects can usually afford), I can use I2C and get many more parts that are far easier to deal with.

    Back to 1-Wire, if the the DS2450 violates the specs of 1-Wire timing then the BS2p cannot be blamed. We designed the inteface around [noparse][[/noparse]then] Dallas specifications for the protocol and tested it as thoroughly as we could. That's not to say that we're perfect, but to my knowledge we've made no updates to the low-level 1-Wire code (we did in fact make a minor update to I2CIN and I2COUT to allow devices that don't have addresses [noparse][[/noparse]PCF8574, etc.]).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • bobhillierbobhillier Posts: 27
    edited 2004-08-11 17:35
    Thanks Jon

    Your opinion is valued. History provides good lessons.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······ Bob, Ottawa
    W75 54 17·· N45 18 30
    ·········· G16 #27
Sign In or Register to comment.