Skip to content

Optimized conversion times

Compare
Choose a tag to compare
@SV-Zanshin SV-Zanshin released this 03 Dec 13:43
· 84 commits to master since this release

The MAXIM documentation specifies maximum conversion times for the various precision settings. These are actually maximum values that are to be used when doing conversions using parasitic power. When normal power is used, a device sends 0s while it is performing a conversion and 1s once complete. This only works if the last command issued was a "convert temperature".
The library has been changed to check for this state and instead of waiting for a fixed period it will read the 1-Wire microLAN bus until the last conversion has completed and will then continue. This results in significantly faster potential throughput.
In addition, the DeviceStartConvert() function has an additional optional boolean parameter which, when set to "true", file cause the function to wait for the temperature conversion to complete before returning.