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_114 FTDI USB to SPI 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 SPI 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.

1 Introduction

The FT2232H and FT4232H are the FTDI's first USB 2.0 Hi-Speed(480Mbits/s) USB to UART/FIFO ICs.

They have the capability of being configured in a variety of serial interfaces using the internal MPSSE (Multi-Protocol Synchronous Serial Engine). The FT2232H device has two independent ports, both of which can be configured using MPSSE while only Channel A and B of FT4232H can be configured using MPSSE.

1.1 Overview & Scope

This application note gives details of how to interface and configure the FT2232H to read and write data from a host PC to a serial EEPROM over the serial SPI interface bus. This note includes:

  • Overview of SPI communications interface.
  • Hardware example of a USB to a serial EEPROM SPI interface using the FT2232H.
  • Code example in C++ showing how to configure the FT2232H in SPI mode.
  • Oscilloscope plots showing example SPI read and write cycles.

1.2 Overview of SPI Interface

The SPI (Serial to Peripheral Interface) is a master/slave synchronous serial bus that consists of 4 signals.

Both command signals and data are sent across the interface.

The SPI master initiates all data transactions.

There is no fixed bit length in SPI.

Full duplex data transfers can be made up to 30Mbits/sec with the FT2232H.

A generic SPI system consists of the following signals and is illustrated in Figure 1.:

  • SCLK(Serial Clock) from master to slave.
  • CS(Chip Select) from master.
  • MOSI(Serial Data Out, also called Master Out Slave In) from master.
  • MISO(Serial Data In, also called Master In Slave Out) from slave.

The FT2232H always acts as the SPI master. Multiple slave devices can be enabled by multiplexing the chip select line. As SPI data is shifted out of the master and in to a slave device, SPI data will also be shifted out from the slave and clocked in to the master.

Depending on which type of slave device is being

implemented, data can be shifted MSB first or LSB first.

Slave devices can have active low or active high chip select inputs.

This SPI device uses SPI Mode 0, with active low Chip Select.

In addition, the SPI interface has 4 unique modes of clock phase(CPHA) and clock polarity (CPOL), known as Mode 0, Mode 1, Mode 2 and Mode 3. Table 1 summarizes these modes:

Mode CPOL CPHA
0 0 0
1 0 1
2 1 0
3 1 1

Table 1 Clock Phase/Polarity Modes

For CPOL = 0, the base (inactive) level of SCLK is 0. In this mode:

  • When CPHA = 0, data will be read in on the rising edge of SCLK, and data will be clocked out on the falling edge of SCLK.
  • When CPHA = 1, data will be read in on the falling edge of SCLK, and data will be clocked out on the rising edge of SCLK.

For CPOL = 1, the base (inactive) level of SCLK is 1. In this mode:

  • When CPHA = 0, data will be read in on the falling edge of SCLK, and data will be clocked out on the rising edge of SCLK.
  • When CPHA = 1, data will be read in on the rising edge of SCLK, and data will be clocked out on the falling edge of SCLK.

It is worth noting that the SPI slave interface can be implemented in various ways. The FT2232H can be configured to handle these different implementations.

It is recommended that designers review the SPI Slave data sheet to determine the SPI mode implementation.

FTDI device can only support mode 0 and mode 2 due to the limitation of MPSSE engine.

3.2 FT2232H to 93LC56 Read/Write Timing on Scope

The following screenshots show examples of the Read and write waveforms on the SPI interface. These are provided to illustrate the operational details of the SPI write and read commands sent from the FT2232H to the 93LC56 EEPROM:



SPI协议背景知识简介与FTDI的FT4232H配成USB to SPI(MPSSE)使用实例的更多相关文章

  1. Http协议基本知识简介

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

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

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

  3. [SPI]SPI协议详解

    转自:https://my.oschina.net/freeblues/blog/67400 1.SPI协议简介 1.1.SPI协议概括 SPI,是英语Serial Peripheral interf ...

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

    IIC vs SPI 现今,在低端数字通信应用领域,我们随处可见IIC (Inter-Integrated Circuit) 和 SPI (Serial Peripheral Interface)的身 ...

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

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

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

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

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

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

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

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

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

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

  10. 『Linux基础 - 2 』操作系统,Linux背景知识和Ubuntu操作系统安装

    这篇笔记记录了以下几个知识点: 1.目前常见的操作系统及分类,虚拟机 2.Linux操作系统背景知识,Windows和Linux两个操作系统的对比 3.在虚拟机中安装Ubuntu系统的详细步骤 OS( ...

随机推荐

  1. RabbitMq在win10上的安装、用户管理及控制台Demo

    思路: 安装elang--设置elang的环境变量--安装erlang版本对应的rabbitmq--设置rabbitmq的环境变量--安装rabbitmq的可视化管理插件 相关链接: RabbitMQ ...

  2. windows 滑动关机

    可以参考:https://zhuanlan.zhihu.com/p/90087401

  3. 如何使用 websocket 完成 socks5 网络穿透

    有盆友好奇所谓的网络穿透是怎么做的 然后talk is cheap,please show code 所以只好写个简单且常见的websocket例子, 这里的例子大致是这个原理 浏览器插件(或者其他) ...

  4. 【Elasticsearch】一文读懂ES向量搜索:原理剖析与技术全景

    大家好,我是大任,今天给大家分享一下Elasticsearch的向量搜索技术 注:本文若未说明ES版本则为7.10,其他版本会特别标记,由于ES版本不同,部分差异较大,具体请以官方文档为准 一.向量搜 ...

  5. 计算机图形学——Games101深度解析_第一章

    写在前面 关于Games101深度解析参考了很多佬的文章,并且加上了自己的理解.主要感觉games101课程里面还有很多由于时间原因都没讲的很详细,略过了很多,所以我对于课程中困难的知识点进行了更多的 ...

  6. centos 7 安装 netcoresdk 和Nginx 并发布netcore

    微软官网的yum安装: 打开linux终端程序 netcore sdk 地址https://dotnet.microsoft.com/download/linux-package-manager/ce ...

  7. dify打造数据可视化图表

    一.概述 在日常工作和学习中,我们经常需要和数据打交道.无论是分析报告.项目展示,还是简单的数据洞察,一个清晰直观的图表,往往能胜过千言万语. 一款能让数据可视化变得超级简单的 MCP Server, ...

  8. 【中文】【吴恩达课后编程作业】Course 1 - 神经网络和深度学习 - 第四周作业(1&2)

    [吴恩达课后编程作业]01 - 神经网络和深度学习 - 第四周 - PA1&2 - 一步步搭建多层神经网络以及应用 上一篇:[课程1 - 第四周测验]※※※※※ [回到目录]※※※※※下一篇: ...

  9. 使用HTML完成一个最low的页面

    1 <body> 2 <div style="background: burlywood"> 3 <h1 style="text-align ...

  10. HyperWorks基于 Shrink Warp Mesh 的零部件网格剖分

    Step01:读入模型 Exercise_4b.hm. Step02:在名为 loose_gap 的 component 中建立 Loose Shrink Warp Mesh. (1) 点击 Shad ...