Circuit translates I2C voltages

This Design Idea explores level-shifting an I2C bus from 5V/ground (positive domain) to ground/–5V (negative domain). In multisupply systems, you sometimes face a situation in which digital information stored in logic circuits running from 5V to ground needs conversion to analog signals referenced to a negative supply. Converting from digital to analog in the positive domain and then level-shifting to reference the negative rail introduces errors and results in a large component count. A better approach is to level-shift the digital data lines and convert with negative-referenced A/D converters. I2C is a bidirectional system employing a two-wire bus: one clock line and one data line. Pullup resistors and open-collector outputs establish dominant-low signaling. Figure 1 shows a typical setup, in which the microcontroller is the master, and all the peripherals are slaves. Each device has a unique I2C address. The master always generates the clock, but, depending on the desired direction of data flow, either the master or the slave could be the transmitter on the data line.

To understand the level-shifting procedure, consider the simple circuit in Figure 2. The circuit level-shifts the clock line unidirectionally. Q1 comes with a pnp, an npn, and four bias resistors, all in one small SOT-363 package. R1 provides the necessary pullup function in the positive domain, and R2 does the same in the negative domain. The operation of the circuit is straightforward. When VIN is set to VDD, Q1 remains off, so VOUT=0V (logic high). When VIN is set to 0V, Q1 is on, so VOUT=VEE (logic low). This unidirectional circuit does not allow the master to detect when the slave holds the clock low. Therefore, if you desire I2C clock-extension (wait-stating), you would need a bidirectional level-shifting circuit.

The data line needs a bidirectional circuit. Even when the master is transmitting, the master needs to detect when the negative-domain slave pulls the data line low on every ninth bit to acknowledge the transmitted byte. Also, when instructed, the slave may need to transmit data back to the master. In the slave-transmitter mode, the slave would have to detect when the master pulls the data line low on every ninth bit to acknowledge the transmitted byte. Despite this added complexity, you can still accomplish the task with just five SOT-363-size packages and five discrete resistors (Figure 3). To see that the circuit in Figure 3 is topologically the same as the one inFigure 2, assume transmission gates IC1 and IC2 are on and ignore the lower half of the circuit for the moment. With SDA_POS set to VDD, Q2 is off, R3 and R4 pull up to 0V, resulting in SDA_NEG=0V (logic high). With SDA_POS set to 0V, Q2 is on, so SDA_NEG~VEE (logic low).

Now, trace the return path from slave to master. With SDA_NEG set to 0V (logic high), Q3 is off, and R1 pulls SDA_POS up to VDD. With SDA_NEG set to VEE (logic low), Q3 is on, and R1||R2 forms a voltage divider with R5 to yield SDA_POS~0V. You select R1, R2, and R5 to yield VDD=5V and VEE=–5.2V. If desired, you could use additional transistors to construct the return path so that it doesn‘t depend on resistors to set logic levels. Transmission gates IC1 and IC2 and Schottky diodes D1A and D1B break the positive feedback path that would otherwise result when either master or slave pulls SDA to a logic low. Note that, without these components, Q2 and Q3 would form a latch. The circuit in Figure 3 easily meets I2C timing requirements at a 50-kHz clock rate. For 100-kHz operation, it is best to use an MUN5311, which has 10-kΩ internal resistors instead of 22 kΩ. You can use the same bidirectional circuit in Figure 3 for the clock signal, to cover all the I2C modes of operation.

时间: 2024-10-09 03:39:54

Circuit translates I2C voltages的相关文章

SPI、I2C、UART、I2S、GPIO、SDIO、CAN

总线,总线,总要陷进里面.这世界上的信号都一样,但是总线却成千上万,让人头疼. 总的来说,总线有三种:内部总线.系统总线和外部总线.内部总线是微机内部各外围芯片与处理器之间的总线,用于芯片一级的互连:而系统总线是微机中各插件板与系统板之间的总线,用于插件板一级的互连:外部总线则是微机和外部设备之间的总线,微机作为一种设备,通过该总线和其他设备进行信息与数据交换,它用于设备一级的互连. 除了总线外,还有一些接口,它们是多种总线的集合体,或者说来者不拒. SPI (Serial Peripheral

PatentTips - Well bias control circuit

BACKGROUND OF THE INVENTION The present invention relates to a semiconductor integrated circuit device having a PN Vt balance compensation circuit for compensating a threshold voltage difference between a PMOS transistor and an NMOS transistor and ca

单片机相关名词解释总结

最近开始研究单片机相关的知识,好多名词都容易混淆,所以做了个总结,可以直接用来查找索引,持续更新ing CPU Central Processing Unit,中央处理器,是一台计算机的运算核心和控制核心.它的功能主要是解释计算机指令以及处理计算机软件中的数据.中央处理器主要包括运算器(ALU,ArithmeticLogic Unit)和高速缓冲存储器(Cache)及实现它们之间联系的数据(Data).控制及状态的总线(Bus).它与内部存储器(Memory)和输入/输出(I/O)设备合称为电子

Bipolar transistor boosts switcher's current by 12 times

The circuit in Figure 1 uses a minimal number of external parts to raise the maximum output current of a 0.5A buck switching-regulator IC to more than 6A. The circuit accommodates input voltages of 15 to 60V and delivers output voltages of 3.3, 5, or

Two-transistor circuit replaces IC

Linear Technology's recently introduced LTC4300 chip buffers I2C clock and data lines to and from a hot-swappable card. This task is difficult because the IC must work bidirectionally, meaning that you can simultaneously and actively drive both sides

【转】SPI & I2C

来自以下地址:http://www.byteparadigm.com/applications/introduction-to-i2c-and-spi-protocols/ I2C vs SPI Today, at the low end of the communication protocols, we find I2C (for 'Inter-Integrated Circuit', protocol) and SPI (for 'Serial Peripheral Interface')

[SPI&I2C]I2C和SPI协议介绍

IIC vs SPI 现今,在低端数字通信应用领域,我们随处可见IIC (Inter-Integrated Circuit) 和 SPI (Serial Peripheral Interface)的身影.原因是这两种通信协议非常适合近距离低速芯片间通信.Philips(for IIC)和Motorola(for SPI) 出于不同背景和市场需求制定了这两种标准通信协议. IIC 开发于1982年,当时是为了给电视机内的CPU和外围芯片提供更简易的互联方式.电视机是最早的嵌入式系统之一,而最初的嵌

嵌入式Linux裸机开发(十三)——I2C通信

嵌入式Linux裸机开发(十三)--I2C通信 一.IIC协议 1.IIC总线简介 I2C(Inter-Integrated Circuit)总线是一种由PHILIPS公司开发的两线式串行总线,用于连接微控制器及其外围设备.I2C总线是一种串行数据总线,只有二根信号线,一根是双向的数据线SDA,另一根是时钟线SCL.在 I2C总线上传送的一个数据字节由八位组成.总线对每次传送的字节数没有限制,但每个字节后必须跟一位应答位. IIC总线是一种串行总线,用于连接微控制器及其外围设备,具有以下特点:

I2C总线介绍

1. 简介 I2C, Inter-Integrated Circuit, 是一种串行通信总线,用于连接微控制器及其外围设备它是一种两线式串行总线(串行数据:SDA; 串行时钟频率:SCL), 利用电阻将电位上拉, 典型的电压准位为+3.3V或+5V使用多主从架构, 主机是初始化总线的数据传输并产生允许传输的时钟信号的器件, 任何被寻址的器件都被认为是从机每个器件都有一个唯一的地址识别(共7个bit, 包括主机和从机), 而且都可以作为一个发送器或接收器(由器件的功能决定) 常见的应用如下:- 存