Hi,
Am 12.10.2014 um 20:36 schrieb Uwe Hermann:
On Sun, Oct 12, 2014 at 07:27:37PM +0200, Johannes Römer wrote:
According to the data sheet of the AM2301, it uses the exact same protocol
(with 40 bits). There are 24 additional bits at the end, all zeros. Never
seen something like this before. As they are cheap, I ordered an AM2301. I
can then try to reproduce your observation.
Ok, cool.
I can now confirm that the AM2301 adds three empty bytes at the end of
each transmission. The current implementation ignores this data. We
might as well add some special handling for this case to the decoder,
but I guess it is not worth the trouble.
I could also get my hand on some devices from the AM232x product line.
They support single wire communication as well as I2C, although I did
not check the latter. The two patches attached to this mail add example
dumps for AM2320, AM2321 and AM2322 as well as matching test cases to
sigrok-dumps and sigrok-test, respectively.
I will add pictures of these sensors to the wiki page within the next days.
The current name does not reflect the growing number of supported
devices. Something generic, like "am23xx" or "aosong_onewire" might be
more appropriate. Any ideas on this?
Best regards,
Johannes
>From e7b8551785f3cc376d1f34e1fa56365165bbd746 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20R=C3=B6mer?= <[email protected]>
Date: Wed, 18 Feb 2015 20:55:53 +0100
Subject: [PATCH] Add some Aosong AM232x humidity/temperature sensor dumps.
---
am230x/am2320/README | 19 +++++++++++++++++++
am230x/am2320/am2320_1mhz.sr | Bin 0 -> 616 bytes
am230x/am2321/README | 19 +++++++++++++++++++
am230x/am2321/am2321_1mhz.sr | Bin 0 -> 610 bytes
am230x/am2322/README | 19 +++++++++++++++++++
am230x/am2322/am2322_1mhz.sr | Bin 0 -> 611 bytes
6 files changed, 57 insertions(+)
create mode 100644 am230x/am2320/README
create mode 100644 am230x/am2320/am2320_1mhz.sr
create mode 100644 am230x/am2321/README
create mode 100644 am230x/am2321/am2321_1mhz.sr
create mode 100644 am230x/am2322/README
create mode 100644 am230x/am2322/am2322_1mhz.sr
diff --git a/am230x/am2320/README b/am230x/am2320/README
new file mode 100644
index 0000000..27c92ee
--- /dev/null
+++ b/am230x/am2320/README
@@ -0,0 +1,19 @@
+-------------------------------------------------------------------------------
+Aosong AM2320
+-------------------------------------------------------------------------------
+
+This is an example capture of the Aosong AM2320 temperature and humidity sensor
+single-wire protocol.
+
+The sensor was connected to an Atmel ATmega8 running a custom software to read
+out this type of devices.
+
+
+Logic analyzer setup
+--------------------
+
+The logic analyzer used was an MCU123 USBee AX Pro clone (at 1 MHz):
+
+ Probe AM2320
+ ------------------
+ 0 SDA
diff --git a/am230x/am2320/am2320_1mhz.sr b/am230x/am2320/am2320_1mhz.sr
new file mode 100644
index 0000000000000000000000000000000000000000..231fb063be3a5f2b28a0d1dc121e4c0415c644f7
GIT binary patch
literal 616
zcmWIWW@Zs#U|`^2FjyGm#=GyT6f=;=2*m6_T$Wl?oSC0z%)}6YqHbD`b!a<Kelrkr
z0C8?=Nn%Q3Nuuf*Tdu<fJPr?Imw#ZDdh|zMic5A^$twvXi*;Epb1iQ8wawYL^p;)4
z2e;>kbN;Y&#`4IQ2KdN?>2&YXU_2%+o8$SCbIr|9axc%$yTE?@+aksGoISUaW@tWS
zIH@yxd4|!#u>Rki{}+9%+|8wZrAbQLv3cu)qiz=xwO?!$=DBfrUy)zUzhfU*Q60PQ
z+=kFCKu0cUV`Sh2(mDC*naR3_x`uCWGzuP2;9%MCce>d007nnDAM?`XbCrQghy!lX
z4&3>(<5EOq&v92y{}lFiPtepKA71j8+f`bAGs?9rx3<cDa5DSLE2$5y`h7du+oaCw
zT-<Vg>c8oS)(HLd<|57(BvlTT(gEI#Od`y<V+^KxTO)`CjX!iv=+TGJqyc2YA`@K~
edN?9<T?I1Xp&H=L$_A2R2Es)^dIKmiF#rHlKBOW5
literal 0
HcmV?d00001
diff --git a/am230x/am2321/README b/am230x/am2321/README
new file mode 100644
index 0000000..9d2740d
--- /dev/null
+++ b/am230x/am2321/README
@@ -0,0 +1,19 @@
+-------------------------------------------------------------------------------
+Aosong AM2321
+-------------------------------------------------------------------------------
+
+This is an example capture of the Aosong AM2321 temperature and humidity sensor
+single-wire protocol.
+
+The sensor was connected to an Atmel ATmega8 running a custom software to read
+out this type of devices.
+
+
+Logic analyzer setup
+--------------------
+
+The logic analyzer used was an MCU123 USBee AX Pro clone (at 1 MHz):
+
+ Probe AM2321
+ ------------------
+ 0 SDA
diff --git a/am230x/am2321/am2321_1mhz.sr b/am230x/am2321/am2321_1mhz.sr
new file mode 100644
index 0000000000000000000000000000000000000000..0d90cf840375ede5517bb3e2ece7cea754b870d4
GIT binary patch
literal 610
zcmWIWW@Zs#U|`^2P*3o8<K1^viW$gb1Y&j|E=w&c&dkp<W?~3HQ8%r}I<y@qzZr-*
zfH*g`BrzqiBvJK@E!SZK9*2jq%RjJ6J^G_B#U;C|<duYx#kwq)xfVD4+UD$Addsfj
zgWL1NIe%C>V|nCD1AJt{bh>wGFdh?^&GCH6x#s34xtC|>U0^@{ZINPo&YoLIGc+GE
zoYa}UJi};VSpRR%|BF6W?&i|I(j=wr*t~VYQMU_;+AlT=^V~SRugI_F-?0y@sE!rW
zisxSkbmW3IMg~qGos*xQnXGH5YxwqhCoh8n2g`=P)5W%bV7Sd_B4oE3sDKoZu#nm3
z+qONsw=CHCJhb~Wi-Cm^ySn?19rpX{!plt7sN{aU&ro)&@6zd+F;V{>9G`p3rTp)|
zbtYPKKK9#_V2{HApr;s_M3`~M70k44jUW~@=Fl~vM;t<v29ODhMs!{1A&Ag*7085#
VXMi^=8%T;72p0kARiI?V003u=ozVaQ
literal 0
HcmV?d00001
diff --git a/am230x/am2322/README b/am230x/am2322/README
new file mode 100644
index 0000000..66bf87f
--- /dev/null
+++ b/am230x/am2322/README
@@ -0,0 +1,19 @@
+-------------------------------------------------------------------------------
+Aosong AM2322
+-------------------------------------------------------------------------------
+
+This is an example capture of the Aosong AM2322 temperature and humidity sensor
+single-wire protocol.
+
+The sensor was connected to an Atmel ATmega8 running a custom software to read
+out this type of devices.
+
+
+Logic analyzer setup
+--------------------
+
+The logic analyzer used was an MCU123 USBee AX Pro clone (at 1 MHz):
+
+ Probe AM2322
+ ------------------
+ 0 SDA
diff --git a/am230x/am2322/am2322_1mhz.sr b/am230x/am2322/am2322_1mhz.sr
new file mode 100644
index 0000000000000000000000000000000000000000..a573419c4e8ef205fbe06a33cd6775f890ba8701
GIT binary patch
literal 611
zcmWIWW@Zs#U|`^2keL_c#=GyT6f=;=2*m6_T$Wl?oSC0z%)}6YqHbD`b!a<Kelrkr
z0C8?=Nn%Q3Nuuf*Tdu<fJPr?Imw#ZDdh|zMic5A^$twvXi*;Epb1iQ8wawYL^p;)4
z2e;>kbN;Y&#`4IQ2KdN?>2&YXU_2%+o8$SCbIr|9axc%$yTE?@+aksGoISUaW@tWS
zIH@yxd4|!#u>Rki{}+9%+|8wZrAbQLv3cu)qiz=xwO?!$=DBfrUy)zUzhfU*Q5_qi
zvh?kGpd%NwF*0xh>74xZ%w%0dUBkCGP6{$8aIkFnH(RXx!wlESOce?oQLI2E1i%}U
zhI4w~%g?BONj#vK5HK^fG`Q~U{Yc*?V=czLLJJPEzOhr~zrJCef%|<KW%lDvA8uB;
z-RL?bEbt)_6tZN2HM0V|8JR?waYq)+*lmp<7BuS6HKE5GLX!rN35!Q`UFboG&~+8a
Wga>GVH!B-RiWvwO0qNCX-vR)${GKrY
literal 0
HcmV?d00001
--
2.1.0
>From 7f219726126ebd40f2e3eb7567a0723dc84863ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20R=C3=B6mer?= <[email protected]>
Date: Wed, 18 Feb 2015 20:54:40 +0100
Subject: [PATCH] am230x: Add some AM232x tests.
---
decoder/test/am230x/am2320_1mhz.output | 51 ++++++++++++++++++++++++++++++++++
decoder/test/am230x/am2321_1mhz.output | 51 ++++++++++++++++++++++++++++++++++
decoder/test/am230x/am2322_1mhz.output | 51 ++++++++++++++++++++++++++++++++++
decoder/test/am230x/test.conf | 15 ++++++++++
4 files changed, 168 insertions(+)
create mode 100644 decoder/test/am230x/am2320_1mhz.output
create mode 100644 decoder/test/am230x/am2321_1mhz.output
create mode 100644 decoder/test/am230x/am2322_1mhz.output
diff --git a/decoder/test/am230x/am2320_1mhz.output b/decoder/test/am230x/am2320_1mhz.output
new file mode 100644
index 0000000..9ae0899
--- /dev/null
+++ b/decoder/test/am230x/am2320_1mhz.output
@@ -0,0 +1,51 @@
+42567-43569 am230x: start: "Start" "S"
+43569-43730 am230x: response: "Response" "R"
+43730-43810 am230x: bit: "Bit: 0" "0"
+43810-43890 am230x: bit: "Bit: 0" "0"
+43890-43970 am230x: bit: "Bit: 0" "0"
+43970-44050 am230x: bit: "Bit: 0" "0"
+44050-44130 am230x: bit: "Bit: 0" "0"
+44130-44209 am230x: bit: "Bit: 0" "0"
+44209-44289 am230x: bit: "Bit: 0" "0"
+44289-44368 am230x: bit: "Bit: 0" "0"
+43730-44368 am230x: byte: "Byte: 0x00" "0x00"
+44368-44509 am230x: bit: "Bit: 1" "1"
+44509-44635 am230x: bit: "Bit: 1" "1"
+44635-44715 am230x: bit: "Bit: 0" "0"
+44715-44842 am230x: bit: "Bit: 1" "1"
+44842-44969 am230x: bit: "Bit: 1" "1"
+44969-45095 am230x: bit: "Bit: 1" "1"
+45095-45175 am230x: bit: "Bit: 0" "0"
+45175-45301 am230x: bit: "Bit: 1" "1"
+44368-45301 am230x: byte: "Byte: 0xdd" "0xdd"
+43730-45301 am230x: humidity: "Humidity: 22.1 %" "RH = 22.1 %"
+45301-45395 am230x: bit: "Bit: 0" "0"
+45395-45474 am230x: bit: "Bit: 0" "0"
+45474-45554 am230x: bit: "Bit: 0" "0"
+45554-45634 am230x: bit: "Bit: 0" "0"
+45634-45714 am230x: bit: "Bit: 0" "0"
+45714-45794 am230x: bit: "Bit: 0" "0"
+45794-45874 am230x: bit: "Bit: 0" "0"
+45874-46000 am230x: bit: "Bit: 1" "1"
+45301-46000 am230x: byte: "Byte: 0x01" "0x01"
+46000-46140 am230x: bit: "Bit: 1" "1"
+46140-46220 am230x: bit: "Bit: 0" "0"
+46220-46347 am230x: bit: "Bit: 1" "1"
+46347-46427 am230x: bit: "Bit: 0" "0"
+46427-46554 am230x: bit: "Bit: 1" "1"
+46554-46633 am230x: bit: "Bit: 0" "0"
+46633-46713 am230x: bit: "Bit: 0" "0"
+46713-46839 am230x: bit: "Bit: 1" "1"
+46000-46839 am230x: byte: "Byte: 0xa9" "0xa9"
+45301-46839 am230x: temperature: "Temperature: 42.5 °C" "T = 42.5 °C"
+46839-46977 am230x: bit: "Bit: 1" "1"
+46977-47057 am230x: bit: "Bit: 0" "0"
+47057-47137 am230x: bit: "Bit: 0" "0"
+47137-47217 am230x: bit: "Bit: 0" "0"
+47217-47297 am230x: bit: "Bit: 0" "0"
+47297-47423 am230x: bit: "Bit: 1" "1"
+47423-47550 am230x: bit: "Bit: 1" "1"
+47550-47676 am230x: bit: "Bit: 1" "1"
+46839-47676 am230x: byte: "Byte: 0x87" "0x87"
+46839-47676 am230x: checksum: "Checksum: OK" "OK"
+47676-47723 am230x: end: "End" "E"
diff --git a/decoder/test/am230x/am2321_1mhz.output b/decoder/test/am230x/am2321_1mhz.output
new file mode 100644
index 0000000..6f29a53
--- /dev/null
+++ b/decoder/test/am230x/am2321_1mhz.output
@@ -0,0 +1,51 @@
+49233-50224 am230x: start: "Start" "S"
+50224-50388 am230x: response: "Response" "R"
+50388-50468 am230x: bit: "Bit: 0" "0"
+50468-50548 am230x: bit: "Bit: 0" "0"
+50548-50629 am230x: bit: "Bit: 0" "0"
+50629-50709 am230x: bit: "Bit: 0" "0"
+50709-50789 am230x: bit: "Bit: 0" "0"
+50789-50869 am230x: bit: "Bit: 0" "0"
+50869-50950 am230x: bit: "Bit: 0" "0"
+50950-51076 am230x: bit: "Bit: 1" "1"
+50388-51076 am230x: byte: "Byte: 0x01" "0x01"
+51076-51170 am230x: bit: "Bit: 0" "0"
+51170-51250 am230x: bit: "Bit: 0" "0"
+51250-51377 am230x: bit: "Bit: 1" "1"
+51377-51504 am230x: bit: "Bit: 1" "1"
+51504-51631 am230x: bit: "Bit: 1" "1"
+51631-51712 am230x: bit: "Bit: 0" "0"
+51712-51792 am230x: bit: "Bit: 0" "0"
+51792-51918 am230x: bit: "Bit: 1" "1"
+51076-51918 am230x: byte: "Byte: 0x39" "0x39"
+50388-51918 am230x: humidity: "Humidity: 31.3 %" "RH = 31.3 %"
+51918-52012 am230x: bit: "Bit: 0" "0"
+52012-52092 am230x: bit: "Bit: 0" "0"
+52092-52172 am230x: bit: "Bit: 0" "0"
+52172-52253 am230x: bit: "Bit: 0" "0"
+52253-52333 am230x: bit: "Bit: 0" "0"
+52333-52413 am230x: bit: "Bit: 0" "0"
+52413-52493 am230x: bit: "Bit: 0" "0"
+52493-52573 am230x: bit: "Bit: 0" "0"
+51918-52573 am230x: byte: "Byte: 0x00" "0x00"
+52573-52713 am230x: bit: "Bit: 1" "1"
+52713-52841 am230x: bit: "Bit: 1" "1"
+52841-52921 am230x: bit: "Bit: 0" "0"
+52921-53001 am230x: bit: "Bit: 0" "0"
+53001-53081 am230x: bit: "Bit: 0" "0"
+53081-53162 am230x: bit: "Bit: 0" "0"
+53162-53242 am230x: bit: "Bit: 0" "0"
+53242-53368 am230x: bit: "Bit: 1" "1"
+52573-53368 am230x: byte: "Byte: 0xc1" "0xc1"
+51918-53368 am230x: temperature: "Temperature: 19.3 °C" "T = 19.3 °C"
+53368-53506 am230x: bit: "Bit: 1" "1"
+53506-53633 am230x: bit: "Bit: 1" "1"
+53633-53760 am230x: bit: "Bit: 1" "1"
+53760-53887 am230x: bit: "Bit: 1" "1"
+53887-54015 am230x: bit: "Bit: 1" "1"
+54015-54095 am230x: bit: "Bit: 0" "0"
+54095-54222 am230x: bit: "Bit: 1" "1"
+54222-54348 am230x: bit: "Bit: 1" "1"
+53368-54348 am230x: byte: "Byte: 0xfb" "0xfb"
+53368-54348 am230x: checksum: "Checksum: OK" "OK"
+54348-54395 am230x: end: "End" "E"
diff --git a/decoder/test/am230x/am2322_1mhz.output b/decoder/test/am230x/am2322_1mhz.output
new file mode 100644
index 0000000..1df8271
--- /dev/null
+++ b/decoder/test/am230x/am2322_1mhz.output
@@ -0,0 +1,51 @@
+35940-36932 am230x: start: "Start" "S"
+36932-37097 am230x: response: "Response" "R"
+37097-37178 am230x: bit: "Bit: 0" "0"
+37178-37259 am230x: bit: "Bit: 0" "0"
+37259-37340 am230x: bit: "Bit: 0" "0"
+37340-37421 am230x: bit: "Bit: 0" "0"
+37421-37502 am230x: bit: "Bit: 0" "0"
+37502-37583 am230x: bit: "Bit: 0" "0"
+37583-37712 am230x: bit: "Bit: 1" "1"
+37712-37792 am230x: bit: "Bit: 0" "0"
+37097-37792 am230x: byte: "Byte: 0x02" "0x02"
+37792-37934 am230x: bit: "Bit: 1" "1"
+37934-38015 am230x: bit: "Bit: 0" "0"
+38015-38143 am230x: bit: "Bit: 1" "1"
+38143-38272 am230x: bit: "Bit: 1" "1"
+38272-38400 am230x: bit: "Bit: 1" "1"
+38400-38529 am230x: bit: "Bit: 1" "1"
+38529-38657 am230x: bit: "Bit: 1" "1"
+38657-38785 am230x: bit: "Bit: 1" "1"
+37792-38785 am230x: byte: "Byte: 0xbf" "0xbf"
+37097-38785 am230x: humidity: "Humidity: 70.3 %" "RH = 70.3 %"
+38785-38927 am230x: bit: "Bit: 1" "1"
+38927-39008 am230x: bit: "Bit: 0" "0"
+39008-39089 am230x: bit: "Bit: 0" "0"
+39089-39170 am230x: bit: "Bit: 0" "0"
+39170-39251 am230x: bit: "Bit: 0" "0"
+39251-39332 am230x: bit: "Bit: 0" "0"
+39332-39413 am230x: bit: "Bit: 0" "0"
+39413-39493 am230x: bit: "Bit: 0" "0"
+38785-39493 am230x: byte: "Byte: 0x80" "0x80"
+39493-39588 am230x: bit: "Bit: 0" "0"
+39588-39717 am230x: bit: "Bit: 1" "1"
+39717-39798 am230x: bit: "Bit: 0" "0"
+39798-39879 am230x: bit: "Bit: 0" "0"
+39879-40007 am230x: bit: "Bit: 1" "1"
+40007-40136 am230x: bit: "Bit: 1" "1"
+40136-40264 am230x: bit: "Bit: 1" "1"
+40264-40344 am230x: bit: "Bit: 0" "0"
+39493-40344 am230x: byte: "Byte: 0x4e" "0x4e"
+38785-40344 am230x: temperature: "Temperature: -7.8 °C" "T = -7.8 °C"
+40344-40483 am230x: bit: "Bit: 1" "1"
+40483-40564 am230x: bit: "Bit: 0" "0"
+40564-40645 am230x: bit: "Bit: 0" "0"
+40645-40726 am230x: bit: "Bit: 0" "0"
+40726-40855 am230x: bit: "Bit: 1" "1"
+40855-40983 am230x: bit: "Bit: 1" "1"
+40983-41112 am230x: bit: "Bit: 1" "1"
+41112-41239 am230x: bit: "Bit: 1" "1"
+40344-41239 am230x: byte: "Byte: 0x8f" "0x8f"
+40344-41239 am230x: checksum: "Checksum: OK" "OK"
+41239-41287 am230x: end: "End" "E"
diff --git a/decoder/test/am230x/test.conf b/decoder/test/am230x/test.conf
index 8c3d7ff..8ecf027 100644
--- a/decoder/test/am230x/test.conf
+++ b/decoder/test/am230x/test.conf
@@ -18,6 +18,21 @@ test am2303
input am230x/am2303/am2303_1mhz.sr
output am230x annotation match am2303_1mhz.output
+test am2320
+ protocol-decoder am230x channel sda=0
+ input am230x/am2320/am2320_1mhz.sr
+ output am230x annotation match am2320_1mhz.output
+
+test am2321
+ protocol-decoder am230x channel sda=0
+ input am230x/am2321/am2321_1mhz.sr
+ output am230x annotation match am2321_1mhz.output
+
+test am2322
+ protocol-decoder am230x channel sda=0
+ input am230x/am2322/am2322_1mhz.sr
+ output am230x annotation match am2322_1mhz.output
+
test dht11
protocol-decoder am230x channel sda=5 option device=dht11
input am230x/dht11/dht11_1mhz.sr
--
2.1.0
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel