Scale_Pressure(); Description; Actions; Prototype - Infineon SP37 Function Manual

High integrated single-chip tpms sensor with a low power embedded microcontroller and wireless fsk/ask uhf transmitter
Table of Contents

Advertisement

2.3

Scale_Pressure()

2.3.1

Description

A 450 kPa range TPMS sensor will typically transmit the pressure value as a single byte within an RF telegram:
the pressure range 100...450 kPa is represented with an unsigned byte ranging from 0...255. A scale factor of
1.373 kPa/LSB is required to meet this typical requirement. The SP37 Meas_Pressure function, however, returns
a signed integer value that represents pressure as 1/16 kPa/LSB. Conversion from 1/16 kPa/LSB to
1.373 kPa/LSB is therefore a commonly required task, but one that is not straightforward as care must be taken
to avoid excessive rounding or loss of precision. The full scale error (FSE) of this function is less than 0.4%.
As a convenience, this Scale_Pressure( ) function performs this conversion. In addition, pressure bounds
checking is performed so that 0 and 255 are returned for input pressure values below 100 kPa and above 450 kPa,
respectively. Finally, to reduce the amount of data handling required by the application program, note that the input
value to Scale_Pressure is passed as a pointer. This allows the same pointer to the
structure *(PressResult+0) to be re-used as the input pointer to Scale_Pressure().
Note: Scale function is intended to provide backward compatibility with SP30 100...450kPa numeric
representation. The 100kPa and 450kPa bounds checking feature prevents this function from being useful
outside of this range.
2.3.2

Actions

Check 16 bit input value against 100 kPa and 450 kPa bounds, if value is outside of these bounds return 0 or
255, respectively
Convert input value to unsigned 8 bit return value between 0 and 255
2.3.3

Prototype

unsigned char Scale_Pressure(signed int idata * PressureValue)
2.3.4

Inputs

Table 19
Scale_Pressure: Input Parameters
Register / Address
R7
2.3.5

Outputs

Table 20
Scale_Pressure: Output values
Register/ Address
R7
ROM Library Function Guide
Type
Name
signed int
PressureValue
idata*
Type
Name
unsigned char Result
Tire Pressure Monitoring Sensor
Description
Pointer to 16 bit input pressure value; Reuse of
Meas_Pressure output structure
*(PressResult+0)
Description
8 bit output pressure value
42
SP37
ROM Library Functions
Meas_Pressure()
output
Revision 1.0, 2011-12-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents