MPL3115A2 | MPL3115A2 Pressure Sensor library with calibration functions
kandi X-RAY | MPL3115A2 Summary
kandi X-RAY | MPL3115A2 Summary
MPL3115A2 Pressure Sensor library with calibration functions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MPL3115A2
MPL3115A2 Key Features
MPL3115A2 Examples and Code Snippets
Community Discussions
Trending Discussions on MPL3115A2
QUESTION
I'm trying to read the pressure value from MPL3115. At chapter 14.3 the ds says:
The pressure data is stored as a 20-bit unsigned integer with a fractional part. The OUT_P_MSB (01h), OUT_P_CSB (02h) and bits 7 to 6 of the OUT_P_LSB (03h) registers contain the integer part in Pascals. Bits 5 to 4 of OUT_P_LSB contain the fractional component. This value is representative as a Q18.2 fixed point format where there are 18 integer bits and two fractional bits.
Here my (testing) code for Microchip XMEGA (GCC):
...ANSWER
Answered 2018-Jul-08 at 09:38you must to right shift data of 6 bits and then add fractional part (2 bits * 0.25).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MPL3115A2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page