This repository was 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
affoltep wants to merge 1 commit intopycom:masterfrom
Open
Remove sleep_us(1) in read_bit and write_bit#51affoltep wants to merge 1 commit intopycom:masterfrom
affoltep wants to merge 1 commit intopycom:masterfrom
Conversation
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
Contributor
|
As discussed in thread provided in the link to topic on the forum to work properly on Wipy2 |
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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