]>
Commit | Line | Data |
---|---|---|
51990c45 | 1 | ## |
50bd5d25 | 2 | ## This file is part of the libsigrokdecode project. |
51990c45 IJ |
3 | ## |
4 | ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> | |
548b39e7 | 5 | ## Copyright (C) 2017 Kevin Redon <kingkevin@cuvoodoo.info> |
51990c45 IJ |
6 | ## |
7 | ## This program is free software; you can redistribute it and/or modify | |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation; either version 2 of the License, or | |
10 | ## (at your option) any later version. | |
11 | ## | |
12 | ## This program is distributed in the hope that it will be useful, | |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
16 | ## | |
17 | ## You should have received a copy of the GNU General Public License | |
4539e9ca | 18 | ## along with this program; if not, see <http://www.gnu.org/licenses/>. |
51990c45 IJ |
19 | ## |
20 | ||
21 | ''' | |
4c3b1846 | 22 | This protocol decoder handles the 1-Wire link layer. |
51990c45 | 23 | |
e7720d6c UH |
24 | The 1-Wire protocol enables bidirectional communication over a single wire |
25 | (and ground) between a single master and one or multiple slaves. The protocol | |
26 | is layered: | |
4633e258 | 27 | |
e7720d6c UH |
28 | - Link layer (reset, presence detection, reading/writing bits) |
29 | - Network layer (skip/search/match device ROM addresses) | |
30 | - Transport layer (transport data between 1-Wire master and device) | |
31 | ||
f4d0363d | 32 | Sample rate: |
e7720d6c UH |
33 | A sufficiently high samplerate is required to properly detect all the elements |
34 | of the protocol. A lower samplerate can be used if the master does not use | |
35 | overdrive communication speed. The following minimal values should be used: | |
36 | ||
37 | - overdrive available: 2MHz minimum, 5MHz suggested | |
38 | - overdrive not available: 400kHz minimum, 1MHz suggested | |
f4d0363d | 39 | |
6a15597a | 40 | Channels: |
a2b13347 | 41 | 1-Wire requires a single signal, but some master implementations might have a |
e7720d6c | 42 | separate signal used to deliver power to the bus during temperature conversion |
548b39e7 | 43 | as an example. |
e7720d6c UH |
44 | |
45 | - owr (1-Wire signal line) | |
a2b13347 IJ |
46 | |
47 | Options: | |
2787cf2a UH |
48 | 1-Wire is an asynchronous protocol with fixed timing values, so the decoder |
49 | must know the samplerate. | |
548b39e7 | 50 | Two speeds are available: normal and overdrive. The decoder detects when |
2787cf2a | 51 | switching speed, but the user can set which to start decoding with: |
e7720d6c | 52 | |
548b39e7 | 53 | - overdrive (to decode starting with overdrive speed) |
51990c45 IJ |
54 | ''' |
55 | ||
95d11271 | 56 | from .pd import Decoder |