Skip to content
This repository

Problems with 1-wire protocol analyser #128

Closed
wanjie opened this Issue November 12, 2012 · 4 comments

2 participants

wanjie Jan Willem Janssen
wanjie

Hi,

I'm trying to sample and analyse data on a 1-wire bus communicating with an DS18B20 (1-Wire Digital Thermometer) [1].

The sampled data is ok but the 1-wire protocol analyse algorithm misinterpret the DS18B20 presence (110us) pulse as the first data bit. The presence pulse is sent after the master have sent the reset pulse (685us) [2].

If the master sends the same data (0x33) without first running the initialization procedure (reset and presence pulses) the data is correctly analysed [3].

//Peter

[1] - http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
[2] - http://s11.postimage.org/jos8t952b/1wire_1.jpg
[3] - http://s13.postimage.org/pb3lxme1z/1wire_2.jpg

Jan Willem Janssen
Owner

You're right. After checking the code again with the (various) specifications, it is eminent that the slave detection routine does not work correctly.

Are you able to supply me with a datafile which shows the bug? I'd like to add it to the test suite of the decoder...

wanjie

Cool,

I have sampled 3 scenarios that hopefully can help you implement the 1-wire analyse algorithm correctly.

Please let me know if you have additional questions, want data from some other scenarios or want me to test something.

Thanks for looking into this!

[1] - http://www.uploadmb.com/dw.php?id=1353009728
BUS RESET OK
WRITE: 0x33

[2] - http://www.uploadmb.com/dw.php?id=1353009775
BUS RESET OK
WRITE: 0x33
READ: 0x28 0xCA 0x54 0xA9 0x03 0x00 0x00 0x81

[3] - http://www.uploadmb.com/dw.php?id=1353009797 (Two DS18B20 connected to the bus)
SEARCH ROM (0xF0)
Macro 1WIRE address
1.0x28 0xCA 0x56 0xA9 0x03 0x00 0x00 0x99
*DS18B20 Prog Res Dig Therm
2.0x28 0xEE 0x5D 0xA9 0x03 0x00 0x00 0x83
*DS18B20 Prog Res Dig Therm

Jan Willem Janssen
Owner

Thanks for the details! I'll use them for debugging the 1-wire decoder...

Jan Willem Janssen
Owner

Issue solved. The provided data files now correctly decode and yield the expected data.

Jan Willem Janssen jawi closed this January 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.