Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Remove sleep_us(1) in read_bit and write_bit #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

affoltep
Copy link

@affoltep affoltep commented Feb 4, 2018

The 1 us sleep command does not work on pycom devices. It generates a wait time up to 30us. Without waiting time you get an impulse from at least 10us. Removing the waiting time improves significantly the stability of the communication of the new pycom devices as LoPy4, FiPy etc.
See whole case at https://forum.pycom.io/topic/2570/onewire-ds18x20-reading-not-stable-with-lopy4-no-problem-with-lopy/
Remark: There would be an additional improvement by adding gc.collect() to read_byte and write_byte, but to keep the lib as basic as possible I propose not to integrate it into the lib

The 1 us sleep command does not work on pycom devices. It generates a wait time up to 30us. Without waiting time you get an impulse from at least 10us. Removing the waiting time improves significantly the stability of the communication of the new pycom devices as LoPy4, FiPy etc.
See whole case at https://forum.pycom.io/topic/2570/onewire-ds18x20-reading-not-stable-with-lopy4-no-problem-with-lopy/
Remark: There would be an additional improvement by adding gc.collect() to read_byte and write_byte, but to keep the lib as basic as possible I propose not to integrate it into the lib
@livius2
Copy link
Contributor

livius2 commented Feb 7, 2018

As discussed in thread provided in the link to topic on the forum
second sleep_us in read_bit must have condition
like

if addWait:
            sleep_us(1)

to work properly on Wipy2

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants