Component: Barometer (MS5637) (Sensors)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Sensors |
Contents
Barometer (MS5637) component
A small PCB surface mount barometric pressure sensor with a I2C bus interface. Pressure range 0 to 30 Bar. Temperature range -20 to +85 °C.
Examples
No additional examples
Downloadable macro reference
ReadPressureFloat
Reads the pressure as a floating point value in Bars.
Resultion sets the return bit value and conversion time.
Calls the ReadPressureRaw function and then converts to a meaningful value.
Parameters
- BYTE Resolution
- Range 0-5
Return value
Reset
Resets the device
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ReadTemperatureFloat
Reads the temperature as a floating point value in °C.
Resultion sets the return bit value and conversion time.
Calls the ReadTemperatureRaw function and then converts to a meaningful value.
Parameters
- BYTE Resolution
- Range 0-5
Return value
ReadPressureRaw
Reads the pressure as a digital 32-bit value.
Resultion sets the return bit value and conversion time.
0=0.11mBar / 1=0.062mBar / 2=0.039mBar
3=0.028mBar / 4=0.021mBar / 5=0.016mBar
Parameters
- BYTE Resolution
- Range 0-5
Return value
ReadTemperatureRaw
Reads the temperature as a digital 32-bit value.
Resultion sets the return bit value and conversion time.
0=0.012°C / 1=0.009°C / 2=0.006°C
3=0.004°C / 4=0.003°C / 5=0.002°C
Parameters
- BYTE Resolution
- Range 0-5
Return value
ReadPROM
Reads a single 16-bit value from the PROM calibration data.
Parameters
- BYTE Address
- Range 0-6
Return value
Initialise
Stes up the I2C bus and initialises the termperature sensor ready for use.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::CHANNEL.
Channel selection
SDA
This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SDA.
Pin used for SDA (data signal)
SCL
This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SCL.
Pin used for SCL (clock signal)
Baud Select
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_i2c1::BAUD.
Baud rate to be used
Stop Delay
This property is of type True or false and can be referenced with the variable name cal_i2c1::StopDel.
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not
a 10ms delay between an I2C stop event and the next I2C start event.
Most modern microcontrollers will not have a problem so this property can be disabled to speed up the
I2C communications.