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)使用实例的更多相关文章

  1. Http协议基本知识简介

    HTTP协议是指超文本传输协议,位于应用层,HTTP规定数据格式,然后用tcp进行传输. 请求响应模式:简单理解为客户端对服务器发起请求,服务器响应客户端. 主要特点 无连接:无连接的含义是限制每次连 ...

  2. 很清晰的解读i2c协议

    很清晰的解读i2c协议 转载:http://dpinglee.blog.163.com/blog/static/14409775320112239374615/ 1.I2C协议 2条双向串行线,一条数 ...

  3. I2C协议简介

    主从芯片如何传输数据 AT24C02是一个存储芯片,需要把数据从ARM板发给AT24C02,也需要从AT24C02读取数据. I2C是一个主从结构,Master发起传输,slave接收或回应 一主多从 ...

  4. 『Python基础-1 』 编程语言Python的基础背景知识

    #『Python基础-1 』 编程语言Python的基础背景知识 目录: 1.编程语言 1.1 什么是编程语言 1.2 编程语言的种类 1.3 常见的编程语言 1.4 编译型语言和解释型语言的对比 2 ...

  5. i2c协议简要分析(转载)

    声明 本文大部分内容为转载,因此标定为转载 源地址: http://www.cnblogs.com/zym0805/archive/2011/07/31/2122890.html http://blo ...

  6. Mozilla研究—深入理解mozilla所需的背景知识

    mozilla是一个以浏览器为中心的软件平台,它在我们平台中占有重要地位.我们用它来实现WEB浏览器.WAP浏览器.邮件系统.电子书和帮助阅读器等应用程序.为此,我最近花了不少时间去阅读mozilla ...

  7. Tomcat(一):背景知识和安装tomcat

    Tomcat系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1. 基础背景知识 1.1 java和jdk概念 无论是何种程序,要能在计算机 ...

  8. jenkins X实践系列(1) —— 背景知识

    本文介绍jenkins X(以下简称jx)相关的背景技术. jenkins X 简介 Jenkins X 是一个高度集成化的CI/CD平台,基于Jenkins和Kubernetes实现,旨在解决微服务 ...

  9. {Python之进程} 背景知识 什么是进程 进程调度 并发与并行 同步\异步\阻塞\非阻塞 进程的创建与结束 multiprocess模块 进程池和mutiprocess.Poll

    Python之进程 进程 本节目录 一 背景知识 二 什么是进程 三 进程调度 四 并发与并行 五 同步\异步\阻塞\非阻塞 六 进程的创建与结束 七 multiprocess模块 八 进程池和mut ...

  10. http协议与url简介(转)

    一 知识简介 HTTP:(Hypertext transfer protocol)超文本传输协议,是用于从万维网(WWW:World Wide Web)服务器传输超文本到本地浏览器的传送协议. URL ...

随机推荐

  1. php 微信小程序转义403

    function code 微信 iv 偶现 encryptedData 41003 encodeURIComponent 关于小程序微信授权登录提示41003 文章简介 原因一(iv和encrypt ...

  2. 一行代码搞定防抖节流:JavaScript新特性解析

    防抖(Debounce)和节流(Throttle)是两种前端开发中常用的性能优化技术,尤其在处理高频触发事件如滚动.调整窗口大小.输入等场景中.传统实现这些功能需要编写复杂的函数,但随着JavaScr ...

  3. 【笔记】Python3|爬虫请求 CSRF-Token 时如何获取Token、Token过期、处理 CSRF-Token 需要注意的问题及示例

      CSRF-Token 机制是 Web 应用程序中常用的安全机制,它可以防止跨站请求伪造攻击,但会给爬虫造成一定的困扰.本文将介绍在使用 Python3 爬虫时,处理 CSRF-Token 机制需要 ...

  4. 【经验】博客|Windows下,一键安装和部署 hexo-admin 插件(Hexo 静态博客)

    1. 在博客根目录下运行下列指令 npm install --save hexo-admin -y echo "hexo clean && hexo g -d"&g ...

  5. 完整版QQ(腾讯)开放平台操作指南(包含:qq登录能力获取等等)

    之前我和大家提过,我要购买第三方的APP服务,就相当于有自己的APP了,现在APP对接上线之前需要做大量的准备工作,在此把步骤分享给大家,这样可以节省大家很多时间. 完整版QQ(腾讯)开放平台操作指南 ...

  6. Python 面向对象 之 @property

    Python 面向对象 之 Property 初识 @property Property 是 Python 类的一个内置的 装饰器. @property 的作用是 将一个方法, 变为属性来调用. 装饰 ...

  7. MarchingCube算法之C#实现三维❤

    首先致谢该博文,讲解的非常详细:https://blog.csdn.net/u013339596/article/details/19167907?spm=1001.2101.3001.6650.7& ...

  8. GDI+中的Region的集合关系

    string content=""; GraphicsPath c1 = new GraphicsPath(); c1.AddEllipse(0, 20, 50, 50); Gra ...

  9. codeup之复制字符串中的元音字母

    Description 写一个函数,将一个字符串中的元音字母复制到另一个字符串中.在主函数中输入一个字符串,通过调用该函数,得到一个有该字符串中的元音字母组成的一个字符串,并输出. Input 一个字 ...

  10. PostGIS栅格数据类型解析【raster】

    PostGIS 栅格数据类型解析:结构.转换与应用 一.栅格数据类型概述 在 PostGIS 中,raster 是用于存储和处理栅格数据的核心类型,支持从多种格式(如 JPEG.GeoTIFF.PNG ...