summaryrefslogtreecommitdiff
path: root/onewire
diff options
context:
space:
mode:
authorKing Kévin <kingkevin@cuvoodoo.info>2017-03-26 19:25:40 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2017-04-06 21:36:58 +0200
commitf68fd2bd1e18821bfb754c4235085752452f97aa (patch)
tree0a3943c7411a2dfda8739d8d81b2393364fa9b08 /onewire
parent6ce65dbbe0ba94af090a355724877b95ac39c012 (diff)
downloadsigrok-dumps-f68fd2bd1e18821bfb754c4235085752452f97aa.tar.gz
sigrok-dumps-f68fd2bd1e18821bfb754c4235085752452f97aa.zip
add 1-Wire example using Dallas DS18B20 devices
Diffstat (limited to 'onewire')
-rw-r--r--onewire/ds18b20/2xds18b20.srbin0 -> 5192 bytes
-rw-r--r--onewire/ds18b20/README63
2 files changed, 63 insertions, 0 deletions
diff --git a/onewire/ds18b20/2xds18b20.sr b/onewire/ds18b20/2xds18b20.sr
new file mode 100644
index 0000000..1b71e93
--- /dev/null
+++ b/onewire/ds18b20/2xds18b20.sr
Binary files differ
diff --git a/onewire/ds18b20/README b/onewire/ds18b20/README
new file mode 100644
index 0000000..9246b32
--- /dev/null
+++ b/onewire/ds18b20/README
@@ -0,0 +1,63 @@
+-------------------------------------------------------------------------------
+Dallas DS18B20 1-Wire digital temperature sensor
+-------------------------------------------------------------------------------
+
+This is a set of example captures of the 1-Wire traffic from Maxim DS18B20
+temperature sensors.
+
+Details:
+https://en.wikipedia.org/wiki/1-Wire
+https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
+
+
+Logic analyzer setup
+--------------------
+
+The logic analyzer used was a MCU123 Saleae Logic clone (at 8 MHz):
+
+ Probe DS18D20 pin
+ -----------------------
+ 1 (brown) 2 (DQ)
+
+The sigrok command line used was:
+
+ sigrok-cli -d fx2lafw:samplerate=1mhz --samples 2m --channels 0 -o <file>
+
+
+2xds18b20.sr
+------------
+
+Two DS18D20 sensors are connected to the 1-Wire bus with following ROM codes:
+
+ - 0x8d011627f794ee28
+ (family code: 0x28, serial number: 0x011627f794ee, CRC: 0x8d)
+ - 0x330216255487ee28
+ (family code: 0x28, serial number: 0x0216255487ee, CRC: 0x33)
+
+The sensors have the same following marking:
+
+ Dallas
+ 18B20
+ 1619C4
+ +827AH
+
+The communication is initiated by a custom 1-Wire master software
+implementation for a STM32F103C8 using timers.
+
+The master performs the following actions:
+
+ - Use Search ROM command to enumerate all 1-Wire devices on the bus so to
+ count the number of DS10B20 sensors on the bus (two).
+ - Restart enumeration of each device using the Search ROM command so to store
+ their ROM code. After enumeration of each device:
+ - Use Match ROM command to select device.
+ - Use Read Scratchpad function command to read the 9 scratchpad bytes.
+ - Use Write Scratchpad function command to write 3 bytes, setting the
+ temperature conversion precision to 9 bits.
+ - Use the Copy Scratchpad function command to copy the scratchpad into
+ the device's internal EEPROM.
+ - Use Skip ROM command to address all devices.
+ - Use Convert T function command to start temperature conversion.
+ - After one second use Match ROM and Read Scratchpad commands on each device
+ to read the temperature stored in the scratchpad.
+ - After 1 second use Skip ROM and Convert T commands to start next conversion.