Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: bytewise read mode may return false readings #12

Open
Tech-TX opened this issue Sep 29, 2019 · 0 comments
Open

Bug: bytewise read mode may return false readings #12

Tech-TX opened this issue Sep 29, 2019 · 0 comments

Comments

@Tech-TX
Copy link

Tech-TX commented Sep 29, 2019

All of the register reads are bytewise (one byte at a time). From the Bosch datasheet, that's a mistake that could return incorrect readings in 'normal' mode if the register reads happen across sample boundaries. The register shadowing protects you from that error if you do a burst read of all of the sample registers.

  1. Data readout

To read out data after a conversion, it is strongly recommended to use a burst read and not address every register individually. This will prevent a possible mix-up of bytes belonging to different measurements and reduce interface traffic. Note that in I²C mode, even when pressure was not measured, reading the unused registers is faster than reading temperature and humidity data separately.

Data readout is done by starting a burst read from 0xF7 to 0xFC (temperature and pressure) or from 0xF7 to 0xFE (temperature, pressure and humidity). The data are read out in an unsigned 20-bit format both for pressure and for temperature and in an unsigned 16-bit format for humidity.

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

No branches or pull requests

1 participant