SPI bus communication with digital HME and HCE pressure sensors

Similar documents
DS1803 Addressable Dual Digital Potentiometer

Table of Contents. ELVR - Analog and Digital Low Pressure Sensors Series. all sensors. Introduction. Page 1

DS1807 Addressable Dual Audio Taper Potentiometer

SQ277 Series Miniature amplified pressure sensors

HMI Series Amplified pressure sensors

INF8574 GENERAL DESCRIPTION

Figure 1: Functional Block Diagram

V OUT0 OUT DC-DC CONVERTER FB

I2C Demonstration Board I 2 C-bus Protocol

RayStar Microelectronics Technology Inc. Ver: 1.4

Two-/Four-Channel, I 2 C, 7-Bit Sink/Source Current DAC

AMS 5915 Amplified pressure sensor with digital output (I²C)

Two-/Four-Channel, I 2 C, 7-Bit Sink/Source Current DAC

I O 7-BIT POT REGISTER ADDRESS COUNT 7-BIT POT. CODE 64 (40h) DS3503

DS1621. Digital Thermometer and Thermostat FEATURES PIN ASSIGNMENT

DS1307ZN. 64 X 8 Serial Real Time Clock PIN ASSIGNMENT FEATURES

Figure 1: Functional Block Diagram

DS1307/DS X 8 Serial Real Time Clock

ABLIC Inc., Rev.2.2_02

Applications. Operating Modes. Description. Part Number Description Package. Many to one. One to one Broadcast One to many

16-Port I/O Expander with LED Intensity Control, Interrupt, and Hot-Insertion Protection

CPS131. Data Sheet. Water Resistant Pressure Sensor. Consensic. Preliminary 0.1 January 2013 DAT 0006

DATA SHEET. TDA8415 TV and VTR stereo/dual sound processor with integrated filters and I 2 C-bus control INTEGRATED CIRCUITS

DS4000 Digitally Controlled TCXO

DS1307ZN. 64 X 8 Serial Real Time Clock

PNI MicroMag 3. 3-Axis Magnetic Sensor Module. General Description. Features. Applications. Ordering Information

MagAlpha MA120 Angular Sensor for Brushless Motor Commutation

Dual, 8-Bit, Low-Power, 2-Wire, Serial Voltage-Output DAC

Fully Calibrated Temperature Sensor IC

Pin Configuration Pin Description PI4MSD5V9540B. 2 Channel I2C bus Multiplexer. Pin No Pin Name Type Description. 1 SCL I/O serial clock line

TOP VIEW. Maxim Integrated Products 1

MCP3425. with I 2 C Interface and On-Board Reference. Features. Description. Block Diagram. Typical Applications. Package Types V IN + V SS SCL

Product Information Using the SENT Communications Output Protocol with A1341 and A1343 Devices

Roland Kammerer. 13. October 2010

Haptic Driver for DC Motors (ERMs) and Linear Resonant Actuators (LRAs)

CoolEx User Manual 2008 XDIMAX LTD. Revision 1.0

DS1267B Dual Digital Potentiometer

Low-Power, Low-Glitch, Octal 12-Bit Voltage- Output DACs with Serial Interface

NJM37717 STEPPER MOTOR DRIVER

IS31FL3235A 28 CHANNELS LED DRIVER. February 2017

ROTRONIC HygroClip Digital Input / Output

FAH4830 Haptic Driver for DC Motors (ERMs) and Linear Resonant Actuators (LRAs)

ILI2117 Capacitive Touch Controller

TSL1406R, TSL1406RS LINEAR SENSOR ARRAY WITH HOLD

IN1307N/D/IZ1307 CMOS IC of Real Time Watch with Serial Interface, 56 Х 8 RAM

MCP4021/2/3/4. Low-Cost NV Digital POT with WiperLock Technology. Package Types. Features. Block Diagram. Applications. Description.

+3V/+5V, Low-Power, 8-Bit Octal DACs with Rail-to-Rail Output Buffers

DS1267 Dual Digital Potentiometer Chip

Installation procedure Ground loop reader: LBS type R12 / RS232 type 5C

10-Bit, Low-Power, 2-Wire Interface, Serial, Voltage-Output DAC

+Denotes lead-free package. *EP = Exposed paddle. V CC GND AGND AV CC GND I 2 C INTERFACE. -35dB TO +25dB GAIN AUDIO SOURCE AUDIO AMPLIFIER DS4420

4 x 10 bit Free Run A/D 4 x Hi Comparator 4 x Low Comparator IRQ on Compare MX839. C-BUS Interface & Control Logic

IS31FL3206 IS31FL CHANNEL LED DRIVER; SELECTABLE PWM FREQUENCY. Preliminary Information May 2018

DS1867 Dual Digital Potentiometer with EEPROM

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny261A. Appendix A. Appendix A ATtiny261A Specification at 105 C

17-Output LED Driver/GPO with Intensity Control and Hot-Insertion Protection

ES /2 DMM. Features. General Description. Absolute Maximum Ratings

IS31FL3209 IS31FL CHANNELS LED DRIVER; 1/24 DC SCALING WHITE BALANCE. December 2017

IS31FL3236A 36-CHANNEL LED DRIVER; SELECTABLE PWM FREQUENCY IS31FL3236A. February 2018

ADC081C021/ADC081C027 I 2 C-Compatible, 8-Bit Analog-to-Digital Converter (ADC) with Alert Function

SG2525A SG3525A REGULATING PULSE WIDTH MODULATORS

Low Dropout Regulator with On-Demand Power for DDR Memory VDDQ. Description. Applications. On-Demand Power Control Logic.

Data Sheet PT7C4337 Real-time Clock Module (I 2 C Bus) Product Description. Product Features. Ordering Information

Quad, 12-Bit, Low-Power, 2-Wire, Serial Voltage-Output DAC

Model 310H Fast 800V Pulse Generator

PDA ANALOG INTERFACE CIRCUIT

Data Sheet SHTW2. WLCSP Humidity and Temperature Sensor IC

FMS Input, 6-Output Video Switch Matrix with Output Drivers, Input Clamp, and Bias Circuitry

Lab Experiments. Boost converter (Experiment 2) Control circuit (Experiment 1) Power diode. + V g. C Power MOSFET. Load.

FLD00042 I 2 C Digital Ambient Light Sensor

6-Bit Windowed Volatile DAC with Command Code SDA SCL. Resistance POR/BOR. Range. Value. Data. Value. I 2 C Slave

Peripheral Sensor Interface for Automotive Applications

DTCXO Temperature Compensated Real-Time-Clock Module with SPI bus

10-pin, 24-Bit, 192 khz Stereo D/A Converter for PCM Audio. Multi-level Sigma-delta DAC. Interpolation. Filter. Multi-level Sigma-delta DAC

IS31FL3208A 18-CHANNEL LED DRIVER; SELECTABLE PWM FREQUENCY. August 2018

8-Bit A/D Converter AD673 REV. A FUNCTIONAL BLOCK DIAGRAM

DS1806 Digital Sextet Potentiometer

MCP Bit, Quad Digital-to-Analog Converter with EEPROM Memory. Features. Description. Applications

Figure 1: Functional Block Diagram

DS1202, DS1202S. Serial Timekeeping Chip FEATURES PIN ASSIGNMENT. ORDERING INFORMATION DS pin DIP DS1202S 16 pin SOIC DS1202S8 8 pin SOIC

ADC081C021/ADC081C027

16 Channels LED Driver

Pin Pin. 1 A0 Input address input 0 2 A1 Input address input 1. 4 INT0 Input active LOW interrupt input 0

DS1868B Dual Digital Potentiometer

DTCXO Temperature Compensated Real-Time-Clock Module with SPI bus

PBL 3717/2 Stepper Motor Drive Circuit

Debugging a Boundary-Scan I 2 C Script Test with the BusPro - I and I2C Exerciser Software: A Case Study

SD2057 Low Power HART TM Modem

AN-1011 APPLICATION NOTE

INTEGRATED CIRCUITS. PCA channel I 2 C multiplexer and interrupt logic. Product data Supersedes data of 2001 May 07.

DS1802 Dual Audio Taper Potentiometer With Pushbutton Control

I2C Digital Input RTC with Alarm DS1375. Features

DS1801 Dual Audio Taper Potentiometer

RW1026 Dot Matrix 48x4 LCD Controller / Driver

Features. Description PT7C4563B. Real-time Clock Module (I2C Bus)

3-Channel Fun LED Driver

LaserPING Rangefinder Module (#28041)

SCLK 4 CS 1. Maxim Integrated Products 1

Description. Features. Pin Configuration. Pin Description PI4MSD5V9546A. 4 Channel I2C bus Switch with Reset

PT7C4563 Real-time Clock Module (I 2 C Bus)

Transcription:

1 INTRODUCTION 1.1 Digitale pressure sensors The digital HME and HCE pressure sensors are calibrated and temperature compensated with an on-board AIC, which provides a corrected digital pressure value. For the HCE series an additional analog voltage output is available at the same time. The response time of the sensors depends on the adjusted internal resolution. For 12 bit it is typ. 0.5 ms. The HME and HCE pressure sensors are configured to comply with the PI bus protocol. 1.2 erial Peripheral Interface (PI) The erial Peripheral Interface (PI) is a simple bus system for synchronous serial communication between one master and one or more slaves (theoretically any amount of slaves would be possible). It operates in full-duplex mode allowing communication to happen in both directions simultaneously. The master device initiates an information transfer on the bus and generates clock and control signals. lave devices are controlled by the master through individual slave select lines and are active only when selected. For the data transmission there needs to be two signal and two data lines. These are: lave elect () ignal Clock () Master Out - lave In () Master In - lave Out () All bus lines are unidirectional. 1/11

2 BU ARCHITECTURE 2.1 (ignal Clock) The clock signal is generated by the master and is connected to all slaves. It is used to synchronise all data transfer. 2.2 (lave elect) lave devices are addressed and controlled by the master through individual slave select lines. The master selects a slave by pulling the lave elect line of that slave to LOW. The limiting factor for the amount of slaves in a system is the possible number of lave elect lines to the master device. 2.3 (Master Out - lave In) The line transfers data from the master to the slave. 2.4 (Master In - lave Out) The line transfers data from the slave to the master. Master 1 lave 1 2 3 lave 2 lave 3 Fig. 1: ample PI configuration with one master and multiple slaves 2/11

3 PI BU PROTOCOL 3.1 Data transmission To start communication, the master first selects a slave by pulling the lave elect line of this slave down to LOW. The master then writes the data to be transferred into its data transmission register and, after a short delay, transmits the clock signal (see 4.5 Timing). Data transfer is organised in full duplex mode by using shift registers in both, master and slave devices. With each clock cycle data is pushed from master to slave on the line while the slave itself pushes data to the master on the line at the same time (see Fig. 2). A data transmission will be finished when the lave elect line is pulled up to HIGH again. NOTE: For the digital HME and HCE pressure sensors with PI bus a line is not necessary because there is no need for data transmission to the sensor (slave). Therefore, for some applications it makes sense not to connect the sensors line with the mastermicrocontroller but to pull up this line to HIGH level with a resistor on the sensor side (see 5 Application Circuit). Master lave 7 0 7 0 Fig. 2: Data transfer using master and slave shift registers 3/11

3.2 Communication modes The PI protocol specifies the clock signal by two parameters, the clock polarity (CPOL) and the clock phase (CPHA). This results into four possible communication modes (see Table 1). These settings define which clock edge the data will be transmitted and which time the data is allowed to change. It is important to set these parameters to the same values in both, master and slave devices to ensure proper communication. CPOL and CPHA can be adjusted via two control bits in the PI control registers. 3.2.1 CPOL (clock polarity) The clock polarity specifies whether the clock signal is LOW (CPOL=0) or HIGH (CPOL=1) in its idle state. 3.2.2 CPHA (clock phase) The clock phase defines at which clock edge the first data is accepted as valid. CPHA=0 means that the data is valid with the first (leading) clock edge. CPHA=1 means that the data is valid with the second (trailing) clock edge. PI mode CPOL CPHA 0 0 0 1 0 1 2 1 0 3 1 1 Table 1: PI communication modes NOTE: The digital HME and HCE pressure sensors are programmed to CPHA=0 and CPOL=0 by default. Generally they support all four different modes. Please contact us for further information. 4/11

3.3 Transfer format 3.3.1 CPHA=0 If the clock phase is set to 0 data is valid with the first clock edge. The state of the clock polarity defines whether this first clock edge is a rising or falling edge. NOTE: Fig. 3 and 4 show the PI bus data transfer in principle. For the specific communication characteristics of the HME and HCE pressure sensors please refer to 4.5 Timing. For CPOL=0 the clock value is LOW in its idle state and rises to HIGH with the first clock edge. For CPOL=1 the clock value is HIGH in its idle state and falls to LOW with the first clock edge. However, the clock polarity does not influence the moment when the first data bit is valid and therefore does not influence the transfer format which is shown in Fig. 3. cycle 1 2 3 4 5 6 7 8 (CPOL=0) (CPOL=1) MB LB MB LB ampling End of idle state Begin of idle state Fig. 3: Example of a 1 byte PI data transfer for CPHA=0 5/11

3.3.2 CPHA=1 If the clock phase is set to 1 data is valid with the second clock edge. The state of the clock polarity defines whether this second clock edge is a rising or falling edge. For CPOL=0 the clock value is in its HIGH state after the first clock edge and is falling to LOW with the second edge. For CPOL=1 the clock value is in its LOW state after the first clock edge and is rising to HIGH with the second edge. The clock polarity does not influence the moment when the first data bit is valid and therefore does not influence the transfer format which is shown in Fig. 4. cycle 1 2 3 4 5 6 7 8 (CPOL=0) (CPOL=1) MB LB MB LB ampling End of idle state Begin of idle state Fig. 4: Example of a 1 byte PI data transfer for CPHA=1 6/11

4 PI BU DATA TRANFER WITH HME AND HCE PREURE ENOR 4.1 Pressure reading To start communication the master pulls down the lave elect line to LOW level. The pressure information will be transferred as a 15 bit word within a 3 byte data stream (see Fig. 5). The HMA and HCE pressure sensors are not designed for data reception. Therefore, it is recommended to send only a HIGH level to the sensor so as not to cause any problems or undefined actions. As the master might still send some order to the slave at the beginning of the transfer there is a first byte without any data transmitted by the sensor (the sensor will typically send 0xFFh). The following 2 nd and 3 rd data bytes contain the current pressure information starting with the most significant bit (MB) and ending with the least significant bit (LB). The data transmission will be terminated when the master pulls up the lave elect to HIGH again. The sensor is also able to send pressure values online. That is, if the master does not pull up the lave elect line after the third exchanged byte the slave will go on sending the last available pressure value when it is clocked. These online values are then only 2 bytes long. 4.2 Optional temperature reading As an option the sensor can be factory configured to deliver an additional 15 bit temperature reading. This will then be NOTE1: The HME and HCE sensors are configured for a 2 or 3 byte data transfer. Therefore, the lave elect line must not be pulled up in between the individual bytes of a data stream since this would terminate the communication! NOTE2: With a clock frequency of 500 khz the exchange of the first 3 data bytes takes about 50 µs. The following 2 byte online pressure values take another 32 µs each. However, e.g. for the HCE sensor, the internal conversion cycle to obtain a new pressure value is 500 µs for 14 bit resolution. Therefore, if the sensor is not deactivated it will send the same digital pressure value at least 14 times before a new reading can be obtained. Please contact us for further information. transmitted as a 4 th and 5 th byte after the pressure value. If the master does not pull up the lave elect Line after the 5 th byte the sensor will continue sending alternating 4 byte long pressure and temperature values until it is deactivated. Data Byte 1 Data Byte 2 Data Byte 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X X X X X X X X X P14 P13 P12 P11 P10 P9 P8 P7 P6 P5 P4 P3 P2 P1 P0 Relevant data Fig. 5: 3 byte data stream containing the pressure value as a 15 bit information 7/11

4.3 Calculation of the actual pressure value from the digital pressure word The following formulas show how to calculate the actual pressure value from the digital sensor output: Definitions: = ensitivity [counts/mbar] Out max = Output @ max. pressure [counts] Out min = Output @ min. pressure [counts] P max = Max. value of pressure range [mbar] P min = Min. value of pressure range [mbar] P = Pressure reading [mbar] = Digital pressure reading [counts] P counts Outmax Outmin = P P (1) max min P Out P + counts min = Pmin (2) The following example shows the calculation for a HCEM100DB... device (pressure range 0 ±100 mbar bidirectional). Please refer to the HCE data sheet for the specified calibration values. Out min (-100 mbar) = 0666 hex = 1638 dec Out max (+100 mbar) = 6CCC hex = 27852 dec With equation (1) the sensitivity of the sensor gives For an actual digital pressure reading of e.g. P counts = 20608 counts decimal the actual pressure in mbar can be calculated from equation (2) to be 20608 counts 1638 counts P = + ( 100mbar) 131.07 counts / mbar P = 44.73mbar This pressure reading is calculated with the typical calibration values, not taking into account that the individual sensor calibrations might differ within the tolerances specified in the HCE data sheet. 4.4 Resolution of data Each temperature and pressure value will be transmitted as a 15 bit word. However, the actual resolution can be less than this depending on how the internal A/D-converter is configured. Also, internal calculations and signal windowing will reduce the effective resolution. For the HCE pressure sensors the standard resolution for pressure measurement is typ. 14 bits, for the HME series it is typ. 12 bits. For temperature measurement the limiting factor is the sensitivity of the sensing element. Please contact us for further information. 27852 counts 1638 counts = 100 mbar ( 100 mbar) = 131.07 counts/mbar 8/11

Parameter ymbol M in. T yp. Max. Input high level 90 100 Input low level 0 10 Output low level 10 Unit % of Vs Pull-up resistor 500 Ω Load capacitance @ C IO Input capacitance @ each pin C PI_IN ignal clock frequency f CK hold time after sample slope t PI_HD_MI O setup time before sample slope tpi_u_mo I / setup time before sample slope t PI_U_ / hold time after sample slope tpi_hd_ * recommended (see note on page 10) M 400 10 100* 40 00 0 pf 6 khz 2 ns 2/ fclk 1 ns 1/ fclk Table 2: PI bus timing and communication parameters for HME and HCE pressure sensors 4.5 Timing To ensure correct communication the sensor must be able to detect the start condition (pull down of lave elect line) before the master sends the first clock signal. Therefore, a minimum delay time t PI_U_ is required prior to the first clock edge (see Table 2 and Fig. 6). Further, after the last clock edge of the data transfer a minimum delay time t PI_HD_ is required before the master pulls up the lave elect line to terminate the communication. The correct timing has to be controlled by the master and is influenced by the following conditions: the PI communication mode the communication speed the application circuit (e.g. the values of the pull-up-resistors) the load capacitances and impedances of the PI bus lines and others (CPOL=0) Fig. 6: t PI_U_ t PI_U_ t PI_HD_ PI bus timing characteristics t PI_HD_ The HME and HCE pressure sensors change their data after t PI_HD_ very shortly after the valid clock edge (see Fig. 6). This does not correspond to the theoretical transfer format as shown in Fig. 3, page 5. Therefore, especially for low communication speeds there can be the wrong impression as if the data transfer would take place with the falling clock edge (CPHA=1, CPOL=0, compare Fig. 4 page 6). 9/11

4.6 Communication parameters The maximum allowed communication speed depends on the configured internal clock frequency of the sensor which varies with temperature and production conditions. For the worst case scenario the maximum allowed clock frequency in standard configuration is 640 khz. As a special configuration this can be increased to 730 khz. 4.7 ignal noise due to communication As the pulses transmitted on the bus lines have very sharp edges, this can cause some electromagnetic interference. Especially for very low pressures and small PCB designs, these spikes can influence the analog millivolt measurement of the sensor bridge and downgrade signal quality. If both digital and analog interfaces are used in parallel it is recommended to separate these lines as far as possible from each other. Further, decoupling capacitors of 220 nf between supply and ground and 15 nf between the analog output and ground are beneficial. It is important to place the capacitors as close to the pins as possible. 5 APPLICATION CIRCUIT All bus lines have to be connected to the supply voltage via pull-up resistors (see Fig. 7). Resistors of about 4.7 kω are recommended. Additionally, 330 Ω serial resistors should be used in each communication line. NOTE: To prevent signal noise we recommend a min. clock frequency of 100 khz (max. 640 khz) and transmission breaks of min. 500 µs between two pressure readings. This is especially valid for low pressure devices up to 25 mbar. Please contact us for further information. +V s 4k7 4k7 4k7 4k7 330 ensor 330 330 330 Fig. 7: PI bus application circuit for HME and HCE pressure sensors 10/11

6 AMPLE PROGRAM CODE byte dont_care; byte byte_msb, byte_lsb; int16 pressure; // 8bit values // 8bit values // 16bit value // If your controller does not control the / pin, you'll need to configure it yourself // et output value to 1/high state (PI in idle state) pin_ss = 1; // et pin to output set_inout_mode(pin_ss, PIN_OUT); // et PI unit to PI master mode, clock speed 100 khz and PI mode 0 (CPHA = 0 & CPOL = 0) configurepi (PI_MATER CLK_PEED_100KHZ PI_MODE_0); // et / Pin low (tart communication) pin_ss = 0; // Transfer one byte over PI bus (send 0xFF, write received data to dont_care (discard first byte)) PI_transfer (0xFF, &dont_care); // Transfer one byte over PI bus (send 0xFF, write received data to byte_msb) PI_transfer (0xFF, &byte_msb); // Transfer one byte over PI bus (send 0xFF, write received data to byte_lsb) PI_transfer (0xFF, &byte_lsb); // et / pin high (End communication) pin_ss = 1; // Put both values together pressure = ((int16)byte_msb << 8) byte_lsb; 7 TROUBLEHOOTING 7.1 ensor does not respond Check the signal levels at the and lave elect pins of the sensor: - Are the edges sharp enough? - Are the HIGH and LOW levels within the specified range (compare Table 2)? Check the analog output signal of the sensor (only possible for the HCE sensor). If it responds to pressure changes the sensor works. 7.2 ensor supplies unstable data Check the used PI communication mode. By default the HME and HCE pressure sensors are programmed to CPHA=0 and CPOL=0. Have the advices regarding signal noise under point 4.7 been followed? Please contact us for further information: www.sensortechnics.com/contact FM@first-sensor.com 11/11