Level Translators For SPI and

Level Translators For SPI and,第1张

Abstract: A serial interface is often used for board-level communicaTIon between different integrated circuits, especially in space-constrained applicaTIons at low-to medium data-rates. The most popular serial interfaces are I²C and SPI™. If a system has different supply voltages for the µP and for peripheral devices, suitable level translators are required to be able to use one of these serial interfaces. There are several reasons why today? systems have two or more supply-voltages. High-speed µPs and DSPs are implemented on the most advanced processes to get maximum performance with the lowest power consumpTIon. Another reason for different supply voltages is the use of ASICs or FPGAs together with a µP. For all these applicaTIons the designer needs a uni-or bi-directional level translator for the bus signals. The MAX3372E-MAX3379E/MAX3390E-MAX3393E family of level translators was designed to solve these problems.

A serial interface is often used for board-level communication between different integrated circuits, especially in space-constrained applications at low-to medium data-rates. The most popular serial interfaces are I²C and SPI™.

This application note describes I²C and SPI and some level-translation circuits that interface to them.

The SPI-bus has 4 signals: active-low CS = active-low Chip select, SCLK = Clock, DIN = Data In, and DOUT = Data Out.

Figure 1 illustrates the timing of these signals. The SPI-specification has a clock polarity (CPOL) and a clock phase (CPHA) bit. Figure 1 relates to the most common combination of these bits, CPOL = 0 (data-transfer on the rising clock edge) and CPHA = 0 (clock transitions in the middle of bit timing).

Level Translators For SPI and,Figure 1. Signals and timing of the SPI-interface.,第2张
Figure 1. Signals and timing of the SPI-interface.

Several devices might be connected to the same bus, where all devices share the DIN and SCLK-line. Each device has a separate chip-select signal, so that the µP can address the appropriate part by the relevant active-low CS signal. If a chip does not talk back to the µP (e.g., DAC), the DOUT-line is not needed. The SPI-bus is well suited to data-rates to 20Mbps. Some devices (e.g., RTCs like the MAX6901) have a 3-wire interface, where the data-line is bi-directional. This interface is similar to SPI.

The I²C-bus has 2 signals: SCL = Clock and SDA = Data in/out.

Figure 2 illustrates the timing of the I²C-bus. Each device has a unique 7-bit or 10-bit address. As the data-line is bi-directional, only 2 wires are required, which is an advantage in space-constrained applications or in designs where different parts of the circuit have to be optically isolated. Data-rates for the I²C-bus are 100kbps, 400kbps, or even µP to 3.4Mbps for the high-speed mode. The I²C-bus requires pull-up resistors RP, where the value of RP depends on the supply-voltage and the bus-capacitance (number of devices connected to the bus and length of the bus).

Level Translators For SPI and,Figure 2. Signals and timing of the I2C-interface.,第3张
Figure 2. Signals and timing of the I²C-interface.



Figure 3 shows a basic level translator with an N-channel MOSFET. If neither Q2 or Q3 pulls the data-line low, VGS of Q1 is 0V and Data 1.8 has a level of 1.8V, Data 3.3 is at 3.3V. If Q2 pulls Data 1.8 low, VGS of Q1 is 1.8V and will turn on Q1, pulling Data 3.3 low. If Q3 pulls Data 3.3 low, the body diode of Q1 will be forward-biased, pulling the source to 0.3V. VGS will be 1.5V and Q1 will turn on, pulling Data 1.8 low. So logic-levels are translated in both directions. We assume here that Q2 has zero on-resistance. For a real application we would have to consider this on-resistance, which is 133Ω worst-case for an I²C-compatible output (0.4V at 3mA) or 22Ω for the 74LVC125 buffer (0.55V at 24mA). In this case the voltage VGS to turn on Q1 would no longer be 1.8V, but would be lower, depending on R1 and the on-resistance of Q1.

Level Translators For SPI and,Figure 3. Basic level translator.,第4张
Figure 3. Basic level translator.

There are several problems associated with this circuit:

  1. With VL being 1.8V or even lower, the choice of suitable MOSFETs with a low enough VGS threshold voltage is rather limited. One candidate might be the TN2501 from Supertex.
  2. The slew-rate and, therefore, the maximum transmission rate depends on the value of R1/R2 and on the number of devices on the bus, which determines the capacitance. It is possible to increase the maximum transmission rate by choosing lower value resistors R1/R2. This will lead to higher current consumption, which is undesirable in portable/low-power applications.
  3. With this simple circuit it is not possible to tristate the bus and disconnect R1/R2. Therefore one cannot switch off segments of the bus.

The MAX3372E-MAX3393E family of level translators solves these problems. Figure 4 shows the simplified schematic of the MAX3373E, where two MOSFETs Q4 and Q5 have been added. Q4 and Q5 close for a short time during the rising edge and speed-up the low-to-high transition. Minimum guaranteed data-rate for the MAX3373E is 8Mbps, µP to 16Mbps is possible if |VCC - VL| < 0.8V. This family of level-translators has a three-state mode, where the pull-up resistors are disconnected. This makes them ideal in multidrop-networks or for controlling I²C-devices with the same address, where these devices are on different sections of the network, which are decoupled by a level translator.

The data-lines on the VCC-side are ±15kV ESD-protected, which is a valuable feature in applications where the bus is accessible on a connector and where ESD-strikes are likely to occur. A thermal-shutdown circuit puts these level-translators in the three-state mode if temperature exceeds 150°C.

Level Translators For SPI and,Figure 4. Improved level translator MAX3373E with speed-up circuit.,第5张
Figure 4. Improved level translator MAX3373E with speed-up circuit.

Typical ApplicationsFigure 5 shows a typical application for the MAX3390E level translator in a battery-powered measurement circuit. A MAX4194 low-power instrumentation amplifier amplifies the signal from the bridge. The signal is AD-converted by the MAX1270, a 12-bit 8 channel ADC. The supply voltage for the analog front-end is 5V, the low-power µP has a supply of 2.5V. The MAX3390E level shifts the SPI signals from 2.5V to 5V and from 5V to 2.5V for the DOUT signal.

Level Translators For SPI and,Figure 5. The MAX3390E level translator in an SPI-bus application.,第6张
Figure 5. The MAX3390E level translator in an SPI-bus application.

Figure 6 shows a similar application with an I²C-bus. The MAX3373E dual level translator is used to interface the µP I/O levels to the I²C-compatible interface of the MAX1236 (4 channel 12 Bit ADC).

Level Translators For SPI and,Figure 6. MAX3373E dual level translator used in an IIC-bus application with optional pull-up resistors RPP.,第7张
Figure 6. MAX3373E dual level translator used in an IIC-bus application with optional pull-up resistors RPP.

Depending on the number of devices on the bus, optional pull-up resistors RPP might be required. The MAX3372E-MAX3393E family of level translators has internal 10kΩ pull-up resistors. In Figure 7 we can see that this is sufficient for a bus-capacitance of about 90pF, assuming we do not connect the optional resistor RS(RS = 0).

Level Translators For SPI and,Figure 7. Maximum value of RP as a function of bus capacitance for a standard-mode I²C-bus, from I2C-specification.,第8张
Figure 7. Maximum value of RP as a function of bus capacitance for a standard-mode I²C-bus, from I²C-specification.

If there are several devices on the same bus or if the bus is relatively long (>30cm), it is necessary to use external pull-up resistors RPP. Figure 8 shows the minimum value of RP, which is 1.7kΩ for RS = 0 and VDD = 5V. From this we find the minimum value for RPP to be 2.2kΩ, so that RPP in parallel with the internal pull-up of 10kΩ is 1.83kΩ.

Level Translators For SPI and,Figure 8. Minimum value of RP as a function of supply voltage with the value of RSas a parameter, from I2C-specification.,第9张
Figure 8. Minimum value of RP as a function of supply voltage with the value of RSas a parameter, from I²C-specification.

In summary, the MAX3372E-MAX3393E are ideal solutions to solve the I²C or SPI bus-level translation problems found in low-voltage systems. Guaranteed data rates, low power requirements, low-supply-voltage operability, and small packages help solve the many problems facing designers in bus architectures today.

SPI is a trademark of Motorola, Inc.

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/dianzi/2529590.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-05
下一篇 2022-08-05

发表评论

登录后才能评论

评论列表(0条)

保存