English
Language : 

MLX90323 Datasheet, PDF (9/25 Pages) Melexis Microelectronic Systems – 4 – 20 mA Loop Sensor Interface with Signal Conditioning and EEPROM
MLX90323
4 – 20 mA Loop Sensor Interface
with Signal Conditioning and EEPROM
7.3 Digital features
UART
The serial link is a potentially full-duplex UART. It is receive-buffered, in that it can receive a second byte
before a previously received byte has been read from the receiving register. However, if the first byte is not
read by the time the reception of the second byte is completed, the first byte will be lost. The UART's baud
rate depends on the RC-oscillator's frequency and the "TURBO"-bit (see output port). Transmitted and
received data has the following structure: start bit = 0, 8 bits of data, stop bit = 1.
Sending Data
Writing a byte to port 1 automatically starts a transmission sequence. The TX Interrupt is set when the STOP-
bit of the byte is latched on the serial line.
Receiving Data
Reception is initialized by a 1 to 0 transition on the serial line (i.e., a START-bit). The baud rate period (i.e.,
the duration of one bit) is divided into 16 phases. The first six and last seven phases of a bit are not used.
The decision on the bit-value is then the result of a majority vote of phase 7, 8 and 9 (i.e., the center of the
bit).
Spike synchronization is avoided by de-bouncing on the incoming data and a verification of the START-bit
value. The RX Interrupt is set when the stop bit is latched in the UART.
Timer
The clock of the timers TMI and TPI is taken directly from the main oscillator. The timers are never reloaded,
so the next interrupt will take place 2x oscillator pulses after the first interrupt.
Watch Dog
An internal watch dog will reset the whole circuit in case of a software crash. If the watch dog counter is not
reset at least once every 26 milliseconds (@ 2.46 MHz main clock), the microcontroller and all the
peripherals will be reset.
Temperature Processing
Temperature reading controls the temperature compensation. This temperature reading is filtered as
designated by the user. The filter adjusts the temperature reading by factoring in a portion of the previous
value. This helps to minimize the effect of noise when using an external temperature sensor. The filter
equation is:
If measured_temp > Temp_f(n) then
Temp_f(n+1) = Temp_f(n) + [measured_temp - Temp_f(n)] / [2 n_factor]
If measured_temp < Temp_f(n), then
Temp_f(n+1) = Temp_f(n) - [measured_temp - Temp_f(n)] [2 n_factor]
Temp_f(n+1) = new filtered temperature value
Temp_f(n) = previous filtered temperature value
Measured_temp = Value from temperature A to D
n_factor = Filter value set by the user (four LSB’s of byte 25 of EEPROM), range 0-6.
The filtered temperature value, Temp_f, is stored in RAM bytes 58 and 59. The data is a 10 bit value, left
justified in a 16 bit field.
3901090323
Rev 003
Page 9 of 25
Data Sheet
Feb/12