I²C Sensor Communication Overview
21 Feb 2014 Issue A
1 INTRODUCTION
1.1 OVERVIEW
The DPS 5000 sensor is a smart pressure transducer with I²C output. This
document provides a brief overview of the communication sub-system of this
sensor. It is designed to accompany pre-release samples and not to be full
documentation.
2 COMMUNICATING WITH THE SENSOR
The sensor communicates over an I²C interface at speeds of up to 100 kHz. It
appears on the bus as a slave device with a number of memory addresses
containing information about the device and its environment. The electrical
connections to the sensor are shown in the table below:
The memory map is split into three groups: The volatile information,
configuration parameters and a Flash memory block. The full layout of the
memory is described in the table in section 3.
The I²C address of the supplied sensor has been pre-set to 2. This can be
changed over the bus if required.
2.1 READING FROM THE DEVICE
In order to read from the device the host must first send the address of the
sensor to read, followed by the single byte address of the location to read
from the sensor’s memory. The host should then read the four bytes from that
location.
For example, to read the status register from sensor 2 the host should follow
the steps below.
Write 0 (location of the status word) to I2C device 2.
Read four bytes. This will return the 32 bit integer status register, LSB first. The
contents of this register are explained in section 0.
2.2 WRITING TO THE DEVICE
In order to access the device the host must first address the sensor and then
send the address of the location it wants to access followed by the data to be
written to the location.
For example, to write to the access word (location 5) of sensor 2 the host
should follow the steps below.
Write 5 to I2C device 2.
Write the four byte integer, LSB first, to the sensor.
2.3 READING THE COMPENSATED PRESSURE AND TEMPERATURE
When the sensor is first switched on it takes a pressure and temperature
reading. It will not take another reading until instructed to do so by the host. If
the sensor is used in an application where it is only turned on when a reading
is needed and turned off when this reading has been read, this may be
adequate, in other cases the host will need to trigger a reading when required.
To trigger a pressure reading, bit 0 of the status register should be set. The
sensor will now clear that bit and begin taking a reading. This will typically
take approximately 25ms. This host should poll the status register waiting for
bit 0 to be set again. This indicates that the reading is available now. The host
can now read locations 1 and 2 to obtain the compensated pressure and
temperature values.
For example, to trigger a new reading and get the values from sensor 2 the
host should follow the steps below.
Trigger a reading.
Write 0 to I2C device 2.
Write 1 as a four byte integer, LSB first, to the sensor.
Poll the sensor until a reading has been completed.
Write 0 to I2C device 2.
Read the four byte integer, LSB first and check bit 0. If 1, a reading has been
taken. Otherwise, poll again.