Use DigiTemp to check he crc and save it with temperature

43 views
Skip to first unread message

Thomas Heyndrickx

unread,
Feb 22, 2019, 9:27:26 AM2/22/19
to DigiTemp

Hello everybody, I'am sorry for my English it's not my mother tongue so be indulgent.

I'am looking to have the CRC to check if the communication of my bus is maintained. I would like to save the CRC with temperature in file to export it and analyse the result.

If CRC is good, then the communication is ok, but if there is a bad answer I would know it.

Or I would like to make an analyse of error rate and save it to a file.

But I'am not really good at programming so I don't have any idea of how to do it.

PS: the length of my bus 300m with 30 x ds18b20 (temperature sensor) and drive DS2480b

Thank-you for your attention.

Have a nice day.

T.H

Brian C. Lane

unread,
Feb 22, 2019, 2:28:04 PM2/22/19
to digi...@googlegroups.com
If the CRC calculation fails digitemp will print an error to stderr, for
example:

CRC Failed. CRC is 0x55 instead of 0x00

To associate the errors with the sensor you would have to log stdout and
stderr in sequence. Or you can enable verbose mode where it will also
output the scratchpad values for each sensor, no matter whether or not
the CRC matched.

--
http://www.brianlane.com
Reply all
Reply to author
Forward
0 new messages