SERIAL INTERFACE
The MS5540B communicates with microprocessors and other digital systems via a 3-wire synchronous serial
interface as shown in Fig. 1. The SCLK (Serial clock) signal initiates the communication and synchronises the
data transfer with each Bit being sampled by the MS5540B on the rising edge of SCLK and each Bit being sent
by the MS5540B on the rising edge of SCLK. The data should thus be sampled by the microcontroller on the
falling edge of SCLK and sent to the MS5540B with the falling edge of SCLK. The SCLK-signal is generated by
the microprocessor’s system. The digital data provided by the MS5540B on the DOUT pin is either the
conversion result or the software calibration data. In addition the signal DOUT (Data out) is also used to indicate
the conversion status (conversion-ready signal, see below). The selection of the output data is done by sending
the corresponding instruction on the pin DIN (Data input).
Following is a list of possible output data instructions:
•
•
•
•
•
•
•
Conversion start for pressure measurement and ADC-data-out
Conversion start for temperature measurement and ADC-data-out
Calibration data read-out sequence for Word1
Calibration data read-out sequence for Word2
Calibration data read-out sequence for Word3
Calibration data read-out sequence for Word4
RESET sequence
“D1”
“D2”
(Figure 6a)
(Figure 6b)
(Figure 6c)
(Figure 6d)
(Figure 6c)
(Figure 6d)
(Figure 6e)
Every communication starts with an instruction sequence at pin DIN. Fig. 6 shows the timing diagrams for the
MS5540B. The device does not need a ‘Chip select’ signal. Instead there is a START sequence (3-Bit high)
before each SETUP sequence and STOP sequence (3-Bit low) after each SETUP sequence. The SETUP
sequence consists in 4-Bit that select a reading of pressure, temperature or calibration data. In case of pressure-
(D1) or temperature- (D2) reading the module acknowledges the start of a conversion by a low to high transition
at pin DOUT during the last bit of the STOP sequence.
Two additional clocks at SCLK are required after the acknowledge signal. Then SCLK is to be held low by the
microcontroller until a high to low transition on DOUT indicates the end of the conversion.
This signal can be used to create an interrupt in the microcontroller. The microcontroller may now read out the
16-Bit word by giving another 17 clocks on the SLCK pin. It is possible to interrupt the data READOUT sequence
with a hold of the SCLK signal. It is important to always read out the last conversion result before starting a
new conversion.
The RESET sequence is special as its unique pattern is recognised by the module in any state. By consequence
it can be used to restart if synchronisation between the microcontroller and the MS5540B has been lost. This
sequence is 21-Bit long. The DOUT signal might change during that sequence (see Fig. 6e). It is recommended
to send the RESET sequence before each CONVERSION sequence to avoid hanging up the protocol
permanently in case of electrical interference.
Conversion start for pressure measurement and ADC-data-out "D1":
end of conversion
conversion
(33ms)
start of conversion
ADC-data out MSB
ADC-data out LSB
DB6
DB5 DB4 DB3 DB2 DB1 DB0
DB7 DB6 DB5 DB4 DB3 DB2 DB1
DB0 DB7
sequence: START+P-measurement
Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 Bit8 Bit9
Start-bit
Setup-bits
Stop-bit
Fig. 6a: D1 ACQUISITION sequence.
DA5540B_007
September 25th, 2006
12
00005540767 ECN 865