USB to SPI Bus Interface - Sample Project

Page 1
USB to SPI Bus Interface - Sample Project
Overview
This example project for the FT2232C demonstrates how to use the devices Multi-Protocol synchronous Serial Engine (MPSSE) to make a USB to SPI bus interface. The executable application and full project code
(in Delphi) are provided.
Requirements
This project is designed to run on Windows 2000 or Windows XP and requires FTDI’s FT2232C drivers to
be installed
Test Circuit
This project was developed and tested using the following circuit. 4 of the signal lines on channel A of the
FT2232C were used.
USB "B"
Connector
Ferrite Bead
470R
VCC
1
27R
2
3
3
V
C
C
27R
4
5
6
10nF
33nF
8
7
V
C
C
V
C
C
I
O
A
3v3OUT
V
C
C
I
O
A
USB DM
USB DP
1.5K
5
14 31
42
0.1uF
46
A
V
C
C
SK (ADBUS0)
Vcc
24
1
DO (ADBUS1) 23
2
DI (ADBUS2) 22
3
CS (ADBUS3) 21
4
CS
VCC
SK
NC
DIN
NC
93LC56B
DOUT
FT2232C
8
7
6
GND 5
Vcc
RSTOUT#
10K
43 XTIN
6MHz
44 XTOUT
VCC
27pF
27pF
10K
VCC
+
0.1uF
0.1uF
10uF
Decoupling Capacitors
FT2232C-Proj01 USB to SPI Bus - Sample Project
4
RESET#
48
EECS
1
EESK
2
EEDATA
47
TEST
A
G
N
D
45
G
N
D
G
N
D
9
G
N
D
18 25
G
N
D
34
© Future Technology Devices International Ltd. 2004
Page 2
Running the Sample Application
Run SPITest.exe. The following dialogue window will be shown. Use the Device name drop down menu to
select the MPSSE device that you want to talk to.
Read - this will read the current contents of the 93LC56B. If the EEPROM is blank FF’s will be shown.
Erase - this will erase the EEPROM contents.
Prog To Addr - This will program the address value (in hex) to each address in the EEPROM. i.e. 0000 will
be programmed to address 0000, 0001 to address 0001,...., and 007F to address 007F.
Prog Frm File - This allows the EEPROM to be programmed with data from a file stored on the PC. The
file used to program can be selected using Open from the File menu. The file path will be displayed under
the File Name field.
Clk Divisor - Allows the clock divisor for programming the EEPROM to be set.
The full Delphi project files are available for this application program.
Further Information
FT2232C Device Datasheet
AN2232C-01 - Command Processor For MPSSE and MCU Host Bus Emulation
AN2232C-02 - Bit Mode Functions for the FT2232C
FT2232C-Proj01 USB to SPI Bus - Sample Project
© Future Technology Devices International Ltd. 2004
Page 3
Document Revision History
FT2232C-Proj01 Version 1.0 – Initial document created April 2004.
Version 1.1 – Document update July 2004.
• Change references to 93LC46 to 93LC56.
• Test circuit diagram corrected - CS(ADBUS3) changed to Pin 21.
Disclaimer
© Future Technology Devices International Limited , 2002 - 2004
Neither the whole nor any part of the information contained in, or the product described in this manual, may be
adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder.
This product and its documentation are supplied on an as-is basis and no warranty as to their suitability for any
particular purpose is either made or implied.
Future Technology Devices International Ltd. will not accept any claim for damages howsoever arising as a result of
use or failure of this product. Your statutory rights are not affected.
This product or any variant of it is not intended for use in any medical appliance, device or system in which the failure
of the product might reasonably be expected to result in personal injury.
This document provides preliminary information that may be subject to change without notice.
Contact Information
Future Technology Devices International Limited
373 Scotland Street,
Glasgow G5 8QB,
United Kingdom.
Tel : +44 ( 0 )141 429 2777
Fax : +44 ( 0 )141 429 2758
E-Mail ( Sales ) : [email protected]
E-Mail ( Support ) : [email protected]
E-Mail ( General Enquiries ) : [email protected]
Web Site URL : http://www.ftdichip.com
Agents and Sales Representatives
Please visit the Sales Network page of the FTDI Web site for the contact details our distributor(s) in your country.
FT2232C-Proj01 USB to SPI Bus - Sample Project
© Future Technology Devices International Ltd. 2004