Skip to content

Commit

Permalink
extmod/modonewire: Adopt Maxim recommended read timings.
Browse files Browse the repository at this point in the history
The timing of the onewire module was way too fast when reading.  This
commit adopts read timings as recommended in Maxim application note 126:
6 us (pulse) / 9 us (sample) / 55 us (bit slot).  See also:
https://www.analog.com/en/technical-articles/1wire-communication-through-software.html

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
xorbit authored and dpgeorge committed Dec 15, 2023
1 parent de3e83a commit 06df3b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extmod/modonewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
#define TIMING_RESET1 (480)
#define TIMING_RESET2 (70)
#define TIMING_RESET3 (410)
#define TIMING_READ1 (5)
#define TIMING_READ2 (5)
#define TIMING_READ3 (40)
#define TIMING_READ1 (6)
#define TIMING_READ2 (9)
#define TIMING_READ3 (55)
#define TIMING_WRITE1 (10)
#define TIMING_WRITE2 (50)
#define TIMING_WRITE3 (10)
Expand Down

0 comments on commit 06df3b2

Please sign in to comment.