I2C协议背景知识简介与FTDI的FT4232H配成USB to I2C(MPSSE)使用实例
MPSSE Application Example:
http://ftdichip.cn/Support/SoftwareExamples/MPSSE.htm
MPSSE: AN_129 FTDI USB To JTAG TAP Example
MPSS: AN_114 FTDI USB to SPI Example
MPSSE: AN_113 FTDI USB to I2C Example
MPSS: AN_113 FTDI USB to I2C Example
Acronyms and Abbreviations
| Terms | Description |
|---|---|
| MPSSE | Multi Purpose Synchronous Serial Engine |
| I2C | Inter-Integrated Circuit |
| JTAG | Joint Test Action Group |
| SPI | Serial Peripheral Interface |
| SPI Master | A SPI device that initiates and manages serial communication to all devices connected to its SPI bus. |
| SPI Slave | A SPI device that responds to commands sent to it by the SPI master. |
| MISO | Master In, Slave Out |
| MOSI | Master Out, Slave In |
| Serial EEPROM | A programmable memory chip that uses a bitwise serial interface such as I2C or SPI. |
| USB | Universal Serial bus |
FTDI MPSSE(Multi-Protocol Synchronous Serial Engine)
Using the MPSSE can simplify the synchronous serial protocol (USB to SPI, I2C, JTAG, etc.) design. This application note illustrates how to use the MPSSE of the FT2232H to interface with the I2C bus. The FT232H and FT4232H can also be used with the example in this document, though pin-out and port selection will need to match the respective part.
Users can use the example schematic (refer to Figure 3) and software code (section 3) to begin their design.
Note that software code listing is provided as an illustration only and not supported by FTDI.
provided as an illustration only and not supported by FTDI.
1.1 I2C Bus Introduction
I2C is a low- to medium-data-rate master/slave communication bus.:
- Two wires: SCL(serial clock) and SDA(serial data), carry information between the devices connected to the bus.
- Each device is recognized by a unique address and can operate as either a transmitter or receiver, depending on the function of the device.
- In addition to transmitters and receivers, devices can also be considered as masters or slaves when performing data transfers. A master is the device whic h initiates a data transfer on the bus. At that time, any device addressed is considered a slave.
The physical layer of I2C bus is a simple handshaking protocol that relies upon open collector outputs on the bus devices and the device driving or releasing the bus lines, so a pull-up resistor is needed on each wire of the bus.
I2C bus is a true multi-master bus including collision detection and arbitration to prevent data corruption, if two or more masters simultaneously initiate data transfer Serial, 8-bit oriented, bi-directional data transfers can be made at:
- Standard-mode: up to 100 kbit/s,
- Fast-mode: up to 400 kbit/s,
- High-speed mode: up to 3.4 Mbit/s.
Figure 1 shows typical data transfers on the I2C bus.

The master supplies the clock; it initiates and terminates transactions and the intended slave (based upon the address provided by the master) acknowledges the master by driving or releasing the bus. The slave cannot terminate the transaction but can indicate a desire to by a "NAK" or not-acknowledge.
I2C specification defines unique situations as S(START) and P(STOP) conditions(Figure 2):

- START and STOP conditions are always generated by the master.
- START condition: A HIGH to LOW transition on the SDA line while SCL is HIGH.
- STOP condition: A LOW to HIGH transition on the SDA line while SCL is HIGH.
- Every byte put on the SDA line must be 8-bits long. The number of bytes can be transmitted per transfer is unrestricted.
- Each byte is followed by an acknowledge bit. In most cases, data transfer with acknowledge is obligatory. The acknowledge-related clock pulse is generated by the master.
- Data is transferred with the MSB(most significant bit) first.
- The transmitter releases the SDA line (HIGH) during the acknowledge clock pulse. The receiver must pull down the SDA line during the acknowledge clock pulse so that it remains stable LOW during the HIGH period of this clock pulse (see Figure 3). Also, set-up and hold times must also be taken into account.

Data transfers of I2C specification should follow the format. After the START condition (S), a slave address should be sent first. This address is 7 bits long followed by an eighth bit which is a data direction bit (R/ ) – a "zero" indicates a transmission (WRITE), a "one" indicates a request for data (READ). After the slave address byte is sent, master can continue its data transfer by writing or reading data byte as defined format. The data transfer is always terminated by a STOP condition generated by the master.

I2C协议背景知识简介与FTDI的FT4232H配成USB to I2C(MPSSE)使用实例的更多相关文章
- Http协议基本知识简介
HTTP协议是指超文本传输协议,位于应用层,HTTP规定数据格式,然后用tcp进行传输. 请求响应模式:简单理解为客户端对服务器发起请求,服务器响应客户端. 主要特点 无连接:无连接的含义是限制每次连 ...
- 很清晰的解读i2c协议
很清晰的解读i2c协议 转载:http://dpinglee.blog.163.com/blog/static/14409775320112239374615/ 1.I2C协议 2条双向串行线,一条数 ...
- I2C协议简介
主从芯片如何传输数据 AT24C02是一个存储芯片,需要把数据从ARM板发给AT24C02,也需要从AT24C02读取数据. I2C是一个主从结构,Master发起传输,slave接收或回应 一主多从 ...
- 『Python基础-1 』 编程语言Python的基础背景知识
#『Python基础-1 』 编程语言Python的基础背景知识 目录: 1.编程语言 1.1 什么是编程语言 1.2 编程语言的种类 1.3 常见的编程语言 1.4 编译型语言和解释型语言的对比 2 ...
- i2c协议简要分析(转载)
声明 本文大部分内容为转载,因此标定为转载 源地址: http://www.cnblogs.com/zym0805/archive/2011/07/31/2122890.html http://blo ...
- Mozilla研究—深入理解mozilla所需的背景知识
mozilla是一个以浏览器为中心的软件平台,它在我们平台中占有重要地位.我们用它来实现WEB浏览器.WAP浏览器.邮件系统.电子书和帮助阅读器等应用程序.为此,我最近花了不少时间去阅读mozilla ...
- Tomcat(一):背景知识和安装tomcat
Tomcat系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1. 基础背景知识 1.1 java和jdk概念 无论是何种程序,要能在计算机 ...
- jenkins X实践系列(1) —— 背景知识
本文介绍jenkins X(以下简称jx)相关的背景技术. jenkins X 简介 Jenkins X 是一个高度集成化的CI/CD平台,基于Jenkins和Kubernetes实现,旨在解决微服务 ...
- {Python之进程} 背景知识 什么是进程 进程调度 并发与并行 同步\异步\阻塞\非阻塞 进程的创建与结束 multiprocess模块 进程池和mutiprocess.Poll
Python之进程 进程 本节目录 一 背景知识 二 什么是进程 三 进程调度 四 并发与并行 五 同步\异步\阻塞\非阻塞 六 进程的创建与结束 七 multiprocess模块 八 进程池和mut ...
- http协议与url简介(转)
一 知识简介 HTTP:(Hypertext transfer protocol)超文本传输协议,是用于从万维网(WWW:World Wide Web)服务器传输超文本到本地浏览器的传送协议. URL ...
随机推荐
- Netty 心跳机制实现(客户端与服务端)
Netty 心跳机制实现(客户端与服务端) Netty 的心跳机制是保持长连接有效性的重要手段,可以检测连接是否存活并及时释放无效连接.下面介绍客户端和服务端的完整实现方案. 一.服务端实现 1. 基 ...
- 2个小时1.5w字| React & Golang 全栈微服务实战
目录 前言 Golang 入门教程 1. 下载与环境配置 安装 Go Windows 安装 macOS 安装 Linux 安装 理解 GOROOT 和 GOPATH GOROOT GOPATH Go ...
- 【Uber 面试真题】SQL :每个星期连续5星评价最多的司机
大家好,我是"蒋点数分",多年以来一直从事数据分析工作.从今天开始,与大家持续分享关于数据分析的学习内容. 本文是第一篇,也是[SQL 周周练]系列的第一篇.该系列是挑选或自编具有 ...
- 队列-Python 实现
用 Python 来实现 队列和双端队列, 直接上代码理解即可. 队列蛮好理解的, 就是模拟咱生活中的排队. 先进, 先出嘛. """ 队列 - ADT 队列 Queue ...
- JAVA 24 环境安装与配置
JAVA 24 环境安装与配置 一.Java Downloads Java 下载(Windows x64) https://www.oracle.com/java/technologies/downl ...
- 【网站推荐】推荐几个MCP(Model Context Protocol,模型上下文协议)的网站
MCP网站一:MCP 快速入门 介绍 MCP 快速入门.开发工具.核心架构等内容. https://mcp-docs.cn/introduction MCP网站二:GitHub 官方仓库 由MCP协议 ...
- Golang相关环境变量
GOROOT: GO语言的安装路径,linux系统下一般是/usr/local/go GOPATH: 程序员自己的go源码路径,比如开发一个Helloworld的项目,那么它的代码文件夹就应该放在GO ...
- Django Web应用开发实战第一章
一.常见域名后缀 .com:商业性的机构或公司. .net:从事Internet相关的网络服务的机构或公司. .org:非营利的组织.团体. .gov:政府部门. .cn:中国国内域名. .com.c ...
- 如何下载DingTalk的直播视频?
如何下载DingTalk的直播视频? 说明:本文未经授权禁止转载 绪言 如果有天早上 你突发奇想 突然就想把老师上课的视频下载下来 但是 正在寻找下载按钮时 突然发现-- 灰色的?!?! 看来是老师禁 ...
- 自定义localStorage监听事件
一.问题 在项目开发过程中,发现有很多时候进行localStorage.setItem()操作设置本地存储后,页面必须刷新才能够获取到存储数据,而有些时候本地缓存更新后,页面无法通过再次刷新以获取本地 ...