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.
Circuit translates I2C voltages的更多相关文章
- SPI、I2C、UART、I2S、GPIO、SDIO、CAN
总线,总线,总要陷进里面.这世界上的信号都一样,但是总线却成千上万,让人头疼. 总的来说,总线有三种:内部总线.系统总线和外部总线.内部总线是微机内部各外围芯片与处理器之间的总线,用于芯片一级的互连: ...
- PatentTips - Well bias control circuit
BACKGROUND OF THE INVENTION The present invention relates to a semiconductor integrated circuit devi ...
- N76E003之IIC
I2C 总线提供了一种串行通信方式,用在 MCU 与 EEPROM,LCD模块,温度传感器等等之间控制.I2C 用两条线 (数据线SDA 和时钟线 SCL) 在设备间传输数据.I2C 总线用作主机与从 ...
- Linear regulator=low-cost dc/dc converter
The circuit in Figure 1 is a good choice if you need a power supply with high efficiency and you don ...
- 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 ...
- 基于ARM的射频识别读卡器电路设计
http://tech.yktworld.com/201010/201010032128115666.html 来源:一卡通世界 作者:江小平,李中捷,余晓峰 2010-10-3 ...
- Two-transistor circuit replaces IC
Linear Technology's recently introduced LTC4300 chip buffers I2C clock and data lines to and from a ...
- I2C 基础原理详解
今天来学习下I2C通信~ I2C(Inter-Intergrated Circuit)指的是 IC(Intergrated Circuit)之间的(Inter) 通信方式.如上图所以有很多的周边设备都 ...
- 单片机TM4C123学习(七):I2C模块(温度传感器)
I2C(Inter Intergrated Circuit)总线是Philips公司推出的一种用于IC器件之间连接的二线制串行扩展总线,它通过两根信号线(SDA-串行数据线:SCL-串行时钟线)在连接 ...
随机推荐
- sicily 1003. Hit or Miss
Description One very simple type of solitaire game known as "Hit or Miss" (also known as & ...
- 004_Gradle 笔记——Java构建入门
Gradle是一个通用的构建工具,通过它的构建脚本你可以构建任何你想要实现的东西,不过前提是你需要先写好构建脚本的代码.而大部分的项目,它 们的构建流程基本是一样的,我们不必为每一个工程都编写它的构建 ...
- CSS初步了解
CSS 概述 个人理解为对html的扩展,对html关键字进行功能添加. CSS 指层叠样式表 (Cascading Style Sheets) 样式定义如何显示 HTML 元素 样式通常存储在样式表 ...
- Adding Completion to (interactive)
Adding Completion to (interactive) Author: Tubo Question: Is there any way to add my own completio ...
- codeforce 1A Theatre Square
A. Theatre Square Theatre Square in the capital city of Berland has a rectangular shape with the siz ...
- Gitlab基本管理(二)
一. Gitlab分支 1. 切换到项目位置. 2. 创建一个项目的一新分支. mike@win10-001 MINGW64 ~/cookbook/cookbook (master) $ git br ...
- Java 中(静态)变量、(静态)代码块的执行顺序
Java 中(静态)变量.(静态)代码块的执行顺序 非原创 本文讨论 Java 中(静态)变量.(静态)代码块的执行顺序 首先创建 3 个类 1.Foo 类 public class Foo { pu ...
- img标签src图片地址找不到显示默认图片
可以采用onerror的属性: onerror="javascript:this.src='${base}/after/img/aifu.png'" <img id=&quo ...
- jquery放大镜非常漂亮噢
这个放大镜的代码挺简单滴效果也不错. <script> //QQ:496928838 微凉 $(function(){ $("#demo").enlarge( { // ...
- SCU 4441 Necklace
最长上升子序列,枚举. 因为$10000$最多只有$10$个,所以可以枚举采用哪一个$10000$,因为是一个环,所以每次枚举到一个$10000$,可以把这个移到最后,然后算从前往后的$LIS$和从后 ...