diff options
author | King Kévin <kingkevin@cuvoodoo.info> | 2017-03-26 19:31:56 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-04-07 14:45:32 +0200 |
commit | 548b39e78ed1b8638e84c1ee9bfa30d987f97c55 (patch) | |
tree | c1b76dec163d117edcf5a45c0893825e5950707e /decoders/onewire_link/__init__.py | |
parent | 483f2aff787a750efc3c470cbb25bd2de754b824 (diff) | |
download | libsigrokdecode-548b39e78ed1b8638e84c1ee9bfa30d987f97c55.tar.gz libsigrokdecode-548b39e78ed1b8638e84c1ee9bfa30d987f97c55.zip |
Implement new 1-Wire link decoder using time ranges
Rewrite of the 1-Wire link decoder.
Existing outputs are kept and new warnings are added.
Instead of sampling at fixed user defined time, time ranges as
specified by the "Book of iButton Standards" are used.
The user does not have to tweak the timing values anymore.
Overdrive speed is detected automatically.
This fixes bugs #666 and #926.
Diffstat (limited to 'decoders/onewire_link/__init__.py')
-rw-r--r-- | decoders/onewire_link/__init__.py | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/decoders/onewire_link/__init__.py b/decoders/onewire_link/__init__.py index 28b0194..69b570f 100644 --- a/decoders/onewire_link/__init__.py +++ b/decoders/onewire_link/__init__.py @@ -2,6 +2,7 @@ ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> +## Copyright (C) 2017 Kevin Redon <kingkevin@cuvoodoo.info> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -39,29 +40,17 @@ overdrive communication speed. The following minimal values should be used: Channels: 1-Wire requires a single signal, but some master implementations might have a separate signal used to deliver power to the bus during temperature conversion -as an example. This power signal is currently not used. +as an example. - owr (1-Wire signal line) - - pwr (optional, dedicated power supply pin) Options: -1-Wire is an asynchronous protocol, so the decoder must know the samplerate. -The timing for sampling bits, presence, and reset is calculated by the decoder, -but in case the user wishes to use different values, it is possible to -configure the following timing values (number of samplerate periods): +1-Wire is an asynchronous protocol with fixed timing values, so the decoder must +know the samplerate. +Two speeds are available: normal and overdrive. The decoder detects when +switching from one to another but the user can set which to start decoding with: - - overdrive (if active the decoder will be prepared for overdrive) - - cnt_normal_bit (time for normal mode sample bit) - - cnt_normal_slot (time for normal mode data slot) - - cnt_normal_presence (time for normal mode sample presence) - - cnt_normal_reset (time for normal mode reset) - - cnt_overdrive_bit (time for overdrive mode sample bit) - - cnt_overdrive_slot (time for overdrive mode data slot) - - cnt_overdrive_presence (time for overdrive mode sample presence) - - cnt_overdrive_reset (time for overdrive mode reset) - -These options should be configured only on very rare cases and the user should -read the decoder source code to understand them correctly. + - overdrive (to decode starting with overdrive speed) ''' from .pd import Decoder |