Calibrated Pressure Sensor Series
V2.6/2022.12
XGZP6897D_DataSheet_EN_V2.7
www.CFSensor.com
1 / 17
XGZP6897D PRESSURE SENSOR
FEATURES
■Wide Ranges: -100kPa…-0.5～0～0.5…200kPa(show in Pressure Range Example)
■Optional 2.5V～5.5V Power Supply
■Differential Pressure(Positive&Vacuum) Type
■For Non-corrosive Gas or Air
■Calibrated Digital Signal(I2C Interface)(Refer to XGZP6897A for Analog signal)
■Temp. Compensated: 0℃～+60℃(32℉～+140℉)
■Current Consumption: 5uA(single measurement)
■Standby Current: <100nA (25°C)
APPLICATIONS
■Medical&Healthy: e.g. ventilators, CPAP, NPWT, DVT, blood analysis, blood pressure monitoring, drug
dosing, hospital beds, oxygen concentrators, patient monitoring, sleep apnea equipment, urine analyzers and
wound therapy, breast pumps, massage device etc.
■Consumer&Household: e.g. Robot, UAV, wearable device, coffee makers, washing machines, vacuum
cleaners, hand dryers, air pump, air beds etc.
■Industrial&Automation: e.g. HVAC, flow and liquid level measurement, process control and monitoring,
life sciences, pressure switch and meter, IoT and automotive application etc.
INTRODUCTION
XGZP6897D is a prefect silicon pressure sensor offering a ratiometric digital data(I2C interface) for reading
differential pressure over the specified full scale pressure span.
The XGZP6897D incorporates a silicon piezoresistive pressure sensor chip and an interior signal-
conditional Application Specific Integrated Circuit(ASIC) in a SOP8 package with two air vents, which can be
mounted directly on a standard PCB.
The XGZP6897D is fully calibrated and temperature compensated for specified span, so XGZP6897D
pressure sensor satisfy the perfect accuracry, which is designed for a wide range of application in medical
care&health, home appliances, consumer electronic, industry, automotive, loT and other pneumatic devices etc
by utilizing a microcontroller or microprocessor with D/A inputs.
XGZP6897D pressure sensor is for high volume application at an affordable cost and perfect performance.
Customized calibration parameter (e.g.pressure range etc.) are available.

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
2 / 17
PERFORMANCE PARAMETER
Unless otherwise specified, measurements were taken with a a temperature of 25±1℃and humidity from 25%～85%RH.
1 Pressure Range(Operating pressure): The available pressure range including various span, not a specific pressure range.
2 Power supply: The default test voltage value: 3.3V, available working power supply voltage range:2.5～5.5V.
3 ADC Resolution: The ADC resolution is defined as the smallest incremental voltage that can be recognized and thus
causes a change in the digital output.
4 Total Accuracy: The max. deviation in output from ideal transfer function at any pressure or temperature over the specified
ranges, units are in percent of full scale span (%FSS), which mainly consists of: Offset and Span Shift;Linearity(Non-linearity);
Repeatability; Pressure Hsteresis ; TcOffset and TcSpan.
4.1. The accuracy in table is the typical output accuracy. The accuracy is not identical accroding to different specified
pressure range. Contact factory for more information or for higher accuracy requirement(e.g ±1%Span) if need.
4.2 Non-linearity(Linearity): the deviation of measured output from "Best Straight Line" through three points (Offset
pressure, FS pressure and ½ FS pressure)at constant temperature.
4.3 Repeatability: the deviation of measured output when the same pressure is applied continuously, with pressure
approaching from the same direction within the specified operating pressure range,under the same operating conditions.
4.4 Pressure Hysteresis: the deviation of measured output at any pressure within the specified range, when this pressure is
applied continuously, with pressure approaching from opposite directions within the specified operating pressure range,
under the same operating conditions.
4.5 TcOffset (TCO:Temp. Coefficient of Offset): the deviation of measured output with minimum rated pressure applied,
over the temperature range of 0° to 60°C, relative to 25°C.
4.6 TcSpan (TCS:Temp. Coefficient of Span): the deviation of measured output over the temperature range of 0° to 60°C,
relative to 25°C.
Item
Data
Unit
Remark
Available Pressure Range
1
-100…-0.5～0～0.5…200
kPa
Customization acceptable
Power Supply
2
2.5~5.5
Vdc
Max. Excitation Current
3
mA
ADC Resolution
3
24
Bit
SDA/SCL pull up resistor
4.7
Kohm
ESD HBM
4000
V
Total
Accuracy
4
10kPa＜Pressure ≤200kPa
±2
%Span
Customization acceptable
Pressure ≤10kPa or＞200kPa
±2.5
Offset Shift with Reflow
±2.0
%Span
Long Term Stability
5
±1
%Span
Over
Pressure
6
Pressure ≤5kPa
5X
Rated Pressure
Base on P1＞P2 and differ on
specific pressure range
5kPa＜Pressure ≤200kPa
2.5X
Rated Pressure
Burst
Pressure
7
Pressure ≤5kPa
10X
Rated Pressure
5kPa＜Pressure ≤200kPa
3X
Rated Pressure
Max. Pressure on P2 Port
250
kPa
Compensation Temp.
8
0 ～60/32 ～140
℃/℉
Customization acceptable
Operating Temp.
9
-20 ～100/-4 ～212
℃/℉
Storage Temp.
-30 ～125/-22 ～257
℃/℉
Response Time
10
2.5
mS

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
3 / 17
5. Long Term Stability: the sensor’s output deviation when subjected to 30days pressure test or store for one year.
6. Over Pressure (Proof pressure): the maximum pressure which may be applied without causing durable shifts of the
electrical parameters of the sensing element and remain the specification once pressure is returned to the operating
pressure range.
7. Burst Pressure: the maximum pressure which may be applied without causing damage to the sensing die or leaks; The
sensor should not be expected to recover function after exposure to any pressure beyond the burst pressure.
8. Compensated Temperature: the temperature range over which the sensor have an output proportional to pressure within
the specified performance limits.
9. Operating Temperature (or Ambient Temperature): the temperature range over which the sensor have an output
proportional to pressure but may not remain within the specified performance limits.
10. Response Time: it is defined as the time for the incremental change in the output from 10% to 90% of of its final value
when subjected to a specified step change in pressure.
ELECTRICAL CHARACTERISTICS(Interior ASIC)
Parameter
Min.
Typ.
Max.
Unit
Notes
Power Supply
5.5
V
Working Current
100
nA
Filter Capacitor
100
nF
PSRR
60
dB
Output Current Load
5
mA
Input Common Mode Rejection Ratio
80
110
dB
Short-circuit Current Limit
15
20
25
mA
Upper limit Clamping Voltage
3/4
1
VDD
Lower limit Clamping Voltage
0
1/4
VDD
BLOCK DIAGRAM

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
4 / 17
DIMENSION (Unit:mm)
Notes:
1.,Port 1 as High pressure cavity, and Port 2 as Low pressure cavitys.
2. Implement ESD protection during overall soldering and assembly process.
3.Overload voltage(max.6.5Vdc) or current(max.5mA) may burn the ASIC and cause the sensor fail throughly.
4.More detalis about soldering and storage etc., refer to Overall notes.
CIRCUIT DIAGRAM
ELECTRIC CONNECTION
1
2
3
4
5
6
7
8
N/C
Vdd
N/C
N/C
N/C
SDA
SCL
GND
NAME
FUNCTION
N/C
Do not connect to external circuitry or ground
VDD
Voltage supply
GND
Ground
SCL
The clock signal
SDA
Data signal(Send& Receive)
CROSS SECTION
FOOTPRINT(REFERENCE)
Note: Diagram state schematic connection only;
Check Pin allocation in Dimension drawing.
Unit: mm

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
5 / 17
ORDER GUIDE (100kPa=0.1MPa=1bar≈14.5PSI)
XGZP6897
D
001
KP
DPN
Pressure Type(DG:Postive; DN: Negative; DPN:P+N)
Pressure Unit(KP：kPa
HP:hPa)
Pressure Range(000-999）
Output Signal(A: Analog
D:I2C)
Series
PRESSURE RANGE EXAMPLE
Notes: 1. Unit conversion: 1000hPa=1000mbar≈750mmHg≈100kPa≈14.5PSI≈10mH2O≈1bar=0.1MPa;
2. Available for more custom pressure range e.g. -7～7kPa, , 0-250Pa etc,.
Pressure Range（kPa）
Pressure Range（by other units）
Part Number
-0.25 ～0.25
250～250Pa
XGZP6897D2.5HPDPN
-0.5 ～0.5
-5～5mbar / 500～500Pa
XGZP6897D005HPDPN
-1 ～1
-10～10mbar / -100～100mmH2O
XGZP6897D001KPDPN
-2.5 ～2.5
-25～25mbar / -250～250mmH2O
XGZP6897D025HPDPN
-5 ～5
-50～50mbar / -500～500mmH2O
XGZP6897D005KPDPN
-10 ～10
-100～100mbar / -75～75mmHg
XGZP6897D010KPDPN
-50 ～50
-500～500mbar / -375～375mmHg
XGZP6897D050KPDPN
-100 ～0
-1～0bar / -14.5～0PSI
XGZP6897D100KPDN
0 ～1
0～10mbar / 0～100mmH2O
XGZP6897D010HPDG
0 ～2.5
0～25mbar / 0～250mmH2O
XGZP6897D025HPDG
0 ～5
0～50mbar / 0～500mmH2O
XGZP6897D005KPDG
0 ～10
0～100mbar / 0～75mmHg
XGZP6897D010KPDG
0 ～20
0～200mbar / 0～150mmHg
XGZP6897D020KPDG
0 ～40
0～400mbar / 0～300mmHg
XGZP6897D040KPDG
0 ～50
0～500mbar / 0～375mmHg
XGZP6897D050KPDG
0 ～100
0～1bar /0～14.5PSI
XGZP6897D100KPDG
Please consult CFSensor whether required pressure range is under normal production before place order.
Note: Custom requirement or parameter, please consult CFSensor and comment custom code herewith Part number.

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
6 / 17
I2C INTERFACE
I2C bus uses SCL and SDA as signal lines. Both lines are connected to VDD externally via pull-up resistors(Typ value:4.7kΩ)
so that they are pulled high when the bus is free. I2C device factory setting slave address: 0X6D.
The master device can communicate with the product using commands in the following format:
ELECTRICAL SPEC. OF I2C INTERFACE PIN
Symbol
Parameter
Condition
Min
Max
Unit
fscl
Clock frequency
400
KHz
tLOW
SCL low pulse
1.3
us
tHIGH
SCL high pulse
0.6
us
tSUDAT
SDA setup time
0.1
us
tHDDAT
SDA hold time
0.0
us
tSUSTA
Setup Time for a repeated start
0.6
us
tHDSTA
Hold time for a start condition
0.6
us
tSUSTO
Setup Time for a stop condition
0.6
us
tBUF
Time before a new transmission
1.3
us
I2C TIME DIAGRAM

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
7 / 17
The I2C interface protocol has special bus signal conditions. Start (S), stop (P) and binary data conditions are shown below.
At start condition, SCL is high and SDA has a falling edge. Then the slave address is sent. After the 7 address bits, the
direction control bit R/W selects the read or write operation. When a slave device recognizes that it is being addressed, it
should acknowledge by pulling SDA low in the ninth SCL (ACK) cycle.
At stop condition, SCL is also high, but SDA has a rising edge. Data must be held stable at SDA when SCL is high. Data can
change value at SDA only when SCL is low.
I2C PROTOCAL
REGISTER DESC.
Add.
Desc.
R/W
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Default
0x06
DATA_MSB
R
Pressure Data out<23:16>
0x00
0x07
DATA_CSB
R
Pressure Data out<15:8>
0x00
0x08
DATA_LSB
R
Pressure Data out<7:0>
0x00
0x09
TEMP_MSB
R
Temp Data out<15:8>
0x00
0x0A
TEMP_LSB
R
Temp Data out<7:0>
0x00
0x30
CMD
RW
Sleep_time<7:4>
Sco
Measurement_ctrl<2:0>
0x00
0xA5
Sys_config
RW
Aout_config<7:4>
LDO_config Unipolar
Data_out_control
Diag_on
OTP
0xA6
P_config
RW
Input Swap
Gain_P<5:3>
OSR_P<2:0>
OTP
Reg0x06-Reg0x0A :
Pressure ADC data Register(Reg0x06-Reg0x08); Temperature ADC data Register(Reg0x09-Reg0x0A)
Reg0x30 :
Measurement Command Register
Sleep_time<7:4>: 0000:0ms; 0001:62.5ms; 0010:125ms ;... 1111: 1s, only active during sleep mode conversion.
Sco: 1, Start of conversion, automatically come back to 0 after conversion ends (except sleep mode conversion).
Measurement_control<2:0>:
010: indicate the combined conversion (namely a temperature conversion followed by a pressure-signal conversion).
011: indicate a sleep mode conversion (periodically perform a combined conversion with an interval time of ‘sleep_time’),

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
8 / 17
Reg0xA5(configured at factory)
Aout_config<7:4>: Analog output setting(recommending reserve default value)
LDO_config: 0: set with 1.8V; 1: setwith 3.6V.
Unipolar: 0: ADC output in bipolar format(signed binary), 1: ADC output in unipolar format. (Unsigned binary, Only take
effect when ‘raw_data_on’ = 1)
Raw_data_on:
0: output calibrated data(as default value), 1: output ADC raw data.
Diag_on:
1, Enable diagnosis function(default).
Reg0xA6(configured at factory)
Input Swap:
Swap VINP and VINN inside the ASIC
Gain_<5:3>: set the gain of the sensor signal conversion channel. 000: gain=1, 001: gain=2, 010: gain=4, 011: gain=8, 100:
gain=16, 101: gain=32, 110: gain=64, 111: gain=128.
OSR_P<2:0>: set the over sampling ratio of the sensor signal conversion channel. 000:1024X, 001:2048X, 010:4096X,
011:8192X, 100:256X, 101:512X, 110:16384X, 111:32768X.
READ OPERATION
As the following instruction sequences for reading data:
(Only for combined conversion (namely a temperature conversion immediately followed by a pressure-signal conversion))
1. Send instructions 0x0A to 0x30 register for one temperature acquisition, one pressure data acquisition.
2. Read the 0x30 register address. If Sco bit is 0, signify the acquisition end, the data can be read.
(Or, Hold 20mS and then skip this step to read data directly）
3. Read 0x06, 0x07, 0x08 register address data to form a 24-bit AD value (pressure data AD value); Read 0x09, 0x0A register
address data to form a 16-bit AD value (temperature data AD value)
Read Pressure
The total pressure output value which include 0x06, 0x07 and 0x08 registers are 24 bits. The highest position is the symbol
bit, and the value is "1", it represents "negative pressure"; The symbol digit value is "0", it represents "positive pressure".
Pressure_ADC value: = (Pressure 3rd Byte [23:16] x 65536+Pressure 2nd Byte [15:8] x 256 + Pressure1st Byte [7:0])
Note：1 Pressure 3rd Byte [23:16] is the hexadecimal value read out by REG0x06 and need converte into decimal value;
2 Pressure 2nd Byte [15:8] is the hexadecimal value read out by REG0x07 and need converte into decimal value;
3 Pressure 1st Byte [7:0] is the hexadecimal value read out by REG0x08 and need converte into decimal value.
For Pressure conversion formula are as follows:
The highest bit is "0", which means positive pressure
Pressure = Pressure_ ADC /k;
The highest bit is "1", which means negative pressure
Pressure=(pressure_ADC-2^24)/k;
Note:
1. the unit is Pa (default). If need to display other units, fill the
corresponding coefficient in the conversion formula for conversion;
2. the K value is selected according to the postive pressure value only, like -100～100kPa,the K value is 64.
Pressure range(kpa)
K(value)
131<P≤260
32
65<P≤131
64
32<P≤65
128
16<P≤32
256
8<P≤16
512
4<P≤8
1024
2≤P≤4
2048
1≤P<2
4096
P<1
8192

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
9 / 17
Read Temperature
The bits of temperature output values in the 0x09 and 0x0A registers are 16 bits, the highest is the symbol bit.
The symbol digit value is "1" when it represents "negative", and the symbol digit value is "0" when it represents "positive".
Supposing if the decimal values of REG0x09 and REG0x0A readout are X, Y,
For Temperature ADC value and conversion formula are as:
Temperature AD value: N=X*256+Y
If n<2^15, Temperature is positive value, actual temperature T =N/256; (℃).
If n>2^15, Temperature is negative value, actual temperature value = (N-2^16) /256; (℃)
PACKING INFORMATION
Plastic Tube(unit:mm)
Standard Quantity/Tube: 45 pcs
（520mm x 14mm x 13mm，45PCS）
（CARTON：530mm x 145mm x 53mm，1800PCS）
Note: The packing sizel may be not quite same with above for other different quantity.
White Plug
Mark Direction
Blue Plug
Side view

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
10 / 17
OVERALL NOTES
Unless otherwise specified, following notes are general attention or presentation for all products from CFSensor.
Mounting
The following steps is for transmitting the air pressure to sensor after sensor soldering on PCB.
▼For some sensors that come with inlet tube, select the flexiable pipe to suit the pressure inlet that is firm enough to
prevent the pressure leaks.
▼Atmosphere hole (for Gauge type sensors) and Inlet pipe/hole can’t be blocked with gel or glue etc,..
▼Avoiding excessive external force operation
Soldering
Due to its small size, the thermal capacity of the pressure sensor is low. Therefore, take steps to minimize the effects of
external heat. Damage and changes to characteristics may occur due to heat deformation. Use a non-corrosive resin type of
flux. Since the pressure sensor is exposed to the atmosphere, do not allow flux to enter inside.
▼Manual soldering
☉Raise the temperature of the soldering tip to 190°C max. and solder within 5 seconds.
☉The sensor output may vary if the load is applied on the terminal during soldering.
☉Keep the soldering tip clean.
▼Reflow soldering (SMD Terminal)
☉The recommended reflow temperature profile conditions are given below.
☉Self alignment may not always work as expected, therefore, please carefully the position of the terminals and pattern.
☉The temperature of the profile is assumed to be a value measured with the printed wiring board of the terminal
neighborhood.
☉Please evaluate solderbility under the actual mounting conditions since welding and deformation of the pressure inlet port
may occur due to heat stress depending on equipments or conditions.
▼Rework soldering
☉Complete rework at a time.
☉Use a flattened soldering tip when performing rework on the solder bridge. Do not add the flux.
☉Keep the soldering tip below the temperature described in the specifications.
▼Avoid drop and rough handling as excessive force may deform the terminal and damage soldering characteristics.
▼Keep the circuit board warpage within 0.05 mm of the full width of the sensor.
▼After soldering, do not apply stress on the soldered part when cutting or bending the circuit board.
▼Prevent human hands or metal pieces from contacting with the sensor terminal. Such contact may cause anomalous
outlets as the terminal is exposed to the atmosphere.
▼
After soldering, prevent chemical agents from adhering to the sensor when applying coating to avoid insulation
deterioration of the circuit board.

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
11 / 17
Connecting
▼
Correctly wire as in the connection diagram. Reverse connection may damage the product and degrade the
performance.
▼Do not use idle terminals(N/C) to prevent damages to the sensor.
Cleaning
▼Since the pressure sensor is exposed to the atmosphere, do not allow cleaning fluid to enter inside from atmosphere
hole (for Gauge type sensors) and inlet pipe.
▼Avoid ultrasonic cleaning since this may cause breaks or disconnections in the wiring.
Environment
▼Please avoid using or storing the pressure sensor in a place exposed to corrosive gases (such as the gases given off by
organic solvents, sulfurous acid gas, hydrogen sulfides, etc.) which will adversely affect the performance of the pressure
sensor chip.
▼Since this pressure sensor itself does not have a water-proof construction(even available media can be liquid), please do
not use the sensor in a location where it may be sprayed with water, etc.
▼Avoid using the pressure sensors in an environment where condensation may form. Furthermore, its output may fluctuate
if any moisture adhering to it freezes.
▼The pressure sensor is constructed in such a way that its output will fluctuate when it is exposed to light. Especially when
pressure is to be applied by means of a transparent tube, take steps to prevent the pressure sensor chip from being exposed
to light.
▼Avoid using pressure sensor where it will be susceptible to ultrasonic or other high-frequency vibration.
▼Keeping the sensors sealed in static shielding bags with an oxygen-free condition and use the sensor as soon as possible
once unfold the package, because the sensors' PINs may be oxidated a bit under atmosphere environment(slight oxidation
wouldn't affect soldering and performance)
More Precautions
▼That using the wrong pressure range or mounting method may result in accidents.
▼The only direct pressure medium you can use is non-corrosive gas or air as illuminated above(Note: some sensors are
compatible with liquid media). The use of other media, in particular, corrosive gases and liquid (organic solvent based,
sulfurous acid based, and hydrogen sulfide based, etc.) or contains foreign substances will cause malfunction and damage.
Please do not use them and check with CFSensor.
▼The pressure sensor is positioned inside the pressure inlet. Never poke wires or other foreign matter through the pressure
inlet since they may damage the sensor or block the inlet. Avoid use when the atmospheric pressure inlet(only for Gauge
type pressure sensor) is blocked.
▼Use an operating pressure which is within the rated pressure range. Using a pressure beyond this range may cause
damage.
▼Since static charge can damage the pressure sensor, bear in mind the following handling precautions.
☉When storing the pressure sensor, use a conductive material to short the pins or wrap the entire sensor in aluminum foil.
Common plastic containers should not be used to store or transport the sensor since they readily become charged.
☉When using the pressure sensor, all the charged articles on the bench surface and the work personnel should be
grounded so that any ambient static will be safely discharged.
▼Based on the pressure involved, give due consideration to the securing of the pressure sensor.

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
12 / 17
【SAFETY NOTES 】
Using these sensors products may malfunction due to external interference and surges, therefore, please confirm the
performance and quality in actual use. Just in case, please make a safety design on the device (fuse, circuit breaker, such as
the installation of protection circuits, multiple devices, etc.), so it would not harm life, body, property, etc even a malfunction
occurs. To prevent injuries and accidents, please be sure to observe the following items:
●The driving current and voltage should be used below the rated value.
●Please follow the terminal connection diagram for wiring. Especially for the reverse connection of the power supply, it will
cause an accident due to circuit damage such as heat, smoke, fire, etc.
●In order to ensure safety, especially for important uses, please be sure to consider double safety circuit configuration.
●Do not apply pressure above the maximum applied pressure. In addition, please be careful not to mix foreign matter into
the pressure medium. Otherwise, the sensor will be discarded, or the media will blew out and cause an accident.
●Be careful when fixing the product and connecting the pressure inlet. Otherwise, accidents may occur due to sensor
scattering and the blowing out of the media.
●If the sensor come with sharp PIN, please be careful not to hurt your body when using it.
【WARRANTY 】
The information in this sheet has been carefully reviewed and is believed to be accurate; however, no responsibility is
assumed for inaccuracies. Furthermore, this information does not convey to the purchaser of such devices any license under
the patent rights to the manufacturer. CFSensor reserves the right to make changes without further notice to any product
herein. CFSensor makes no warranty, representation or guarantee regarding the suitability of its product for any particular
purpose, nor does CFSensor assume any liability arising out of the application or use of any product or circuit and specifically
disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters can and
do vary in different applications. All operating parameters must be validated for each customer application by customer’s
technical experts. CFSensor does not convey any license under its patent rights nor the rights of others.
【CONTACT 】
CFSensor
22F/14Bldg High-Tech Park High-Tech Area Wuhu P.R.C.241000
Tel/Fax:+86 18226771331
Email:INFO@CFSensor.com
North America ⅡEurope ⅡSoutheast Asia ⅡMiddle East ⅡLatin America

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
13 / 17
READ CODE(C51 Example)
#include <reg52.h>
#include <math.h>
#define DELAY_TIME 600
#define TRUE 1
#define FALSE 0
#define uchar unsigned char
#define uint unsigned int
//----define IIC SCL, SDA port----
sbit SCL = P1 ^ 7;
sbit SDA = P1 ^ 6;
//----delay time_us----
void DELAY(uint t)
{
while (t != 0)
t--;
}
//----IIC START CONDITION----
void I2C_Start(void)
{
SDA = 1;
//SDA output high
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME); //SCL output high
SDA = 0;
DELAY(DELAY_TIME);
SCL = 0;
DELAY(DELAY_TIME);
}
//----IIC STOP CONDITION----
void I2C_Stop(void)
{
SDA = 0;
//SDA OUTPUT LOW
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME);
SDA = 1;

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
14 / 17
DELAY(DELAY_TIME);
SCL = 0;
//SCL OUTPUT LOW
DELAY(DELAY_TIME);
}
//----IIC SEND DATA "0"----
void SEND_0(void)
{
SDA = 0;
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME);
SCL = 0;
DELAY(DELAY_TIME);
}
//----IIC SEND DATA "1"----
void SEND_1(void)
{
SDA = 1;
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME);
SCL = 0;
DELAY(DELAY_TIME);
}
//----Check SLAVE's Acknowledge----
bit Check_Acknowledge(void)
{
SDA = 1;
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME / 2);
F0 = SDA;
DELAY(DELAY_TIME / 2);
SCL = 0;
DELAY(DELAY_TIME);
if (F0 == 1)
return FALSE;
return TRUE;
}

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
15 / 17
//----Write One Byte of Data----
void WriteI2CByte(uchar b) reentrant
{
char i;
for (i = 0; i < 8; i++)
if ((b << i) & 0x80)
SEND_1();
else
SEND_0();
}
//----Read One Byte of Data----
uchar ReadI2CByte(void) reentrant
{
char b = 0, i;
for (i = 0; i < 8; i++)
{
SDA = 1;
DELAY(DELAY_TIME);
SCL = 1;
DELAY(DELAY_TIME);
F0 = SDA;
DELAY(DELAY_TIME);
SCL = 0;
if (F0 == 1)
{
b = b << 1;
b = b | 0x01;
}
else
b = b << 1;
}
return b;
}
//----write One Byte of Data,Data from MASTER to the SLAVER----
void Write_One_Byte(uchar addr, uchar thedata)
//Write "thedata" to the SLAVER's address of "addr"
{
bit acktemp = 1;
I2C_Start(); //IIC START
WriteI2CByte(0x6D << 1 + 0);
//IIC WRITE operation, SLAVER address bit: 0x6D
acktemp = Check_Acknowledge();
//check the SLAVER

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
16 / 17
WriteI2CByte(addr);
//address
acktemp = Check_Acknowledge();
WriteI2CByte(thedata);
//thedata
acktemp = Check_Acknowledge();
I2C_Stop(); //IIC STOP
}
//----Read One Byte of Data,Data from SLAVER to the MASTER----
uchar Read_One_Byte(uchar addr)
{
bit acktemp = 1;
uchar mydata;
I2C_Start();
WriteI2CByte(0x6D << 1 + 0);
//IIC WRITE operation, SLAVER address bit: 0x6D
acktemp = Check_Acknowledge();
WriteI2CByte(addr);
acktemp = Check_Acknowledge();
I2C_Start();
WriteI2CByte(0x6D << 1 + 1);
//IIC READ operation, SLAVER address bit: 0x6D
acktemp = Check_Acknowledge();
mydata = ReadI2CByte();
I2C_Stop();
return mydata;
}
//----Delay_ms----
void Delay_xms(uint x)
{
uint i, j;
for (i = 0; i < x; i++)
for (j = 0; j < 112; j++)
;
}
//----The main function----
void main(void)
{
uchar pressure_H, pressure_M, pressure_L, temperature_H, temperature_L;
//temporary variables of pressure and temperature
long int pressure_adc, temperature_adc;
//The value of pressure and temperature converted by the sensor’s ADC

Calibrated Pressure Sensor Series
V2.7/202302
XGZP6897D_DataSheet_EN_V2.6
www.CFSensor.com
17 / 17
long float pressure, temperature;
//The calibrated value of pressure and temperature
Delay_xms(1000);
//delay 1000ms
while (1)
{
Write_One_Byte(0x30, 0x0A);
//indicate a combined conversion (once temperature conversion immediately followed by once sensor signal
conversion)
//more measurement method, check Register 0x30
while ((Read_One_Byte(0x30) & 0x08) > 0); //Judge whether Data collection is over, if above action has no
response, delete that command and execute this command as: Delay_xms(20);
pressure_H = Read_One_Byte(0x06);
pressure_M = Read_One_Byte(0x07);
pressure_L = Read_One_Byte(0x08);
// Read ADC output Data of Pressure
pressure_adc = pressure_H * 65536 + pressure_M * 256 + pressure_L;
//Compute the value of pressure converted by ADC
if (pressure_adc > 8388608)
pressure = (pressure_adc - 16777216) / K; //unit is Pa, select appropriate K value according to pressure range.
else
pressure = pressure_adc / K; //unit is Pa, select appropriate K value according to pressure range.
//The conversion formula of calibrated pressure, its unit is Pa
temperature_H = Read_One_Byte(0x09);
temperature_L = Read_One_Byte(0x0A);
//Read ADC output data of temperature
temperature_adc = temperature_H * 256 + temperature_L;
//Compute the value of temperature converted by ADC
temperature = (temperature_adc – 65536) / 256;
//unit is ℃
else
temperature = temperature_adc / 256;
//unit is ℃
//The conversion formula of calibrated temperature, its unit is Centigrade
Delay_xms(100);
//delay 100ms
}
}
