Anchor Chips EZ-USB User manual

The EZ-USBTM
Integrated Circuit
Getting Started Guide
AN3041Q
Version 1.5

The information in this document is subject to change without notice and should not be
construed as a commitment by Anchor Chips Incorporated. While reasonable precautions
have been taken, Anchor Chips Incorporated assumes no responsibility for any errors that may
appear in this document.
No part of this document may be copied or reproduced in any form or by any means without
the prior written consent of Anchor Chips Incorporated.
Anchor Chips products are not designed, intended, or authorized for use as components in
systems intended for surgical implant into the body, or other applications intended to support
or sustain life, or for any other application in which the failure of the Anchor Chips product
could create a situation where personal injury or death may occur. Should Buyer purchase or
use Anchor Chips products for any such unintended or unauthorized application, Buyer shall
indemnify and hold Anchor Chips and its officers, employees, subsidiaries, affiliates and
distributors harmless against all claims, costs, damages, expenses, and reasonable attorney
fees arising out of, directly or indirectly, any claim of personal injury or death associated with
such unintended or unauthorized use, even if such claim alleges that Anchor Chips was
negligent regarding the design or manufacture of the part.
The acceptance of this document will be construed as an acceptance of the foregoing
conditions.
The EZ-USBTM Integrated Circuit Getting Started Guide
Copyright 1998, Anchor Chips Incorporated
All rights reserved.
Document: AN2131-GS
Printed in USA

i
EZ-USB Development Kit Overview 1-1
Introduction ....................................................................................... 1-2
Tools Needed ................................................................................. 1-3
Required Tools Not Included ................................................... 1-3
Other Suggested Tools ............................................................. 1-4
EZ-USB Block Diagram ................................................................ 1-4
Final EZ-USB System Block Diagram ..........................................1-5
Initial Download Process ............................................................... 1-6
EZ-USB Development System Block Diagram ............................. 1-7
Setting up the Development Environment ..................................... 1-9
EZ-USB Development Kit Contents 2-1
EZ-USB Xcelerator Development Kit Contents ............................ 2-2
Hardware .................................................................................. 2-2
Software on CD-ROM ............................................................. 2-2
EZ-USB Tutorials .................................................................... 2-3
Printed Documentation ............................................................ 2-3
Getting Started Guide
Contents

Contents
ii
EZ-USB Development Kit Software 3-1
Beginning the Install Procedure ..................................................... 3-2
Installing the Control Panel, Drivers and Documentation ............. 3-3
Installing the Hardware 4-1
Confirming Installation Using the Control Panel .......................... 4-2
EZ-USB Development Board 5-1
Board Overview ............................................................................. 5-2
8051Resources Used ...................................................................... 5-3
Circuit Details ................................................................................ 5-4
Jumpers .......................................................................................... 5-6
DIP Switch Settings ....................................................................... 5-7
Connectors ..................................................................................... 5-8
Memory Maps .............................................................................. 5-11
Configuration 00 .................................................................... 5-11
Configuration 01 .................................................................... 5-12
Configuration 11 .................................................................... 5-12
Configuration 10 .................................................................... 5-12
PLD Signals ................................................................................. 5-13
PLD Source File ........................................................................... 5-15
Prototype Board Expansion Connectors P1-P5 ........................... 5-17
Philips PCF8574 IO Expander ..................................................... 5-21
Connector, Switch Jumper and Indicator Locations .................... 5-23

Preliminary - Information Subject to Change - 9/24/98
C H A P T E R1
EZ-USB
Development Kit
Overview
Introduction............................................................................ 1-2
Tools Needed ......................................................................... 1-3
EZ-USB Block Diagram........................................................ 1-4
Final EZ-USB System Block Diagram..................................1-5
Initial Download Process....................................................... 1-6
EZ-USB Development System Block Diagram..................... 1-7
Setting up the Development Environment............................. 1-9

Preliminary - Information Subject to Change - 9/24/98
1 - 2 EZ-USB Development Kit Overview
Introduction The Anchor Chips EZ-USB is a compact integrated circuit that
provides a highly integrated solution for implementing a USB
peripheral device. Three key EZ-USB features are:
• The EZ-USB family provides a “soft” (RAM-based)
solution that allows unlimited configuration and upgrades.
• The EZ-USB family delivers full USB throughput. Designs
that use EZ-USB are not limited by number of endpoints,
buffer sizes or transfer speeds.
• The EZ-USB family does much of the USB housekeeping in
the EZ-USB core, simplifying code and accelerating the
USB learning curve.
To help reduce the development time and learning curve for making
a USB peripheral using the Anchor Chips EZ-USB device, Anchor
Chips provides the EZ-USB Developer’s Kit which this manual
describes.
The Anchor Chips EZ-USBTM family (AN21XX/AN23XX)
provides significant improvements over other USB architectures by
including an enhanced 8051 core, 4, 8 or 16 Kbytes of RAM, and
an intelligent USB core. The family includes 16 different products
to accommodate the needs of different systems. The enhanced 8051
core provides five times the performance of the standard 8051,
while maintaining 8051 software compatibility. With on-chip
RAM, firmware code can be downloaded from the host PC. This
allows the peripheral manufacturer to easily modify and transfer
new code to current and new users. This on-chip memory
eliminates the need for external memory in many systems.
The EZ-USB family supports high-bandwidth transfers by
providing an efficient mechanism to move data between external
memory and the USB FIFOs. Using this “turbo” mode, the 8051
core can transfer 1024 bytes of data in or out of an isochronous
FIFO in 338 microseconds. This leaves a high percentage of the
bandwidth for the processor to service the application. The EZ-
USB family also supports an equivalent data transfer rate for bulk
packets of over 2 Mbytes per second, which exceeds the USB
bandwidth. The EZ-USB family conforms to the high-speed (12
Mbps) requirements of USB Specification version 1.0, including

Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Kit Overview 1 - 3
support for remote wake-up. The internal SRAM replaces Flash
memory, EEPROM, EPROM, or masked ROM that is
conventionally used in other USB solutions.
The EZ-USB family offers two packages, a 44 PQFP and an 80
PQFP. All EZ-USB devices are pin- and software-compatible. And,
all RAM versions have ROM equivalents to allow easy migration
for high-volume applications.
Tools Needed The following list shows the components supplied in the EZ-USB
Development Kit. They represent most of the development tools
required to build a USB system.
• EZ-USB Development Board
• EZ-USB Peripheral Board
• EZ-USB Firmware Library and Firmware Frameworks
• EZ-USB General-Purpose Device Driver
• EZ-USB Driver and Firmware Sample Code
• Anchor Loader Driver sample code and driver
• EZ-USB Control Panel
• EZ-USB Documentation
• Reference Schematics
• 8051 Limited C Compiler from Keil Software
• 8051 Assembler from Keil Software
• 8051 Custom Debugger from Keil Software
Required Tools Not Included
• Full retail Keil Development System (if your application
requires it)
• Microsoft Visual C++ (all PC sample code is developed
under this platform)
• Microsoft WDM DDK (available through Microsoft
Developer’s Network MSDN)

Preliminary - Information Subject to Change - 9/24/98
1 - 4 EZ-USB Development Kit Overview
• Windows 98 PC
Other Suggested Tools
• Numega Softice for PC software debugging
• CATC USB Protocol Analyzer
EZ-USB Block
Diagram The Anchor Chips EZ-USB chip packs the intelligence required by
a USB peripheral interface into a compact integrated circuit. As
Figure 1-1 illustrates, an integrated USB transceiver connects to the
USB bus pins D+ and D-. A Serial Interface Engine (SIE) decodes
and encodes the serial data and performs error correction, bit
stuffing, and other signaling-level details required by USB, and
ultimately transfers data bytes to and from the USB interface.
The internal microprocessor is an enhanced 8051 with fast
execution time and enhanced features. It uses internal RAM for
program and data storage, making the EZ-USB family a “soft”
solution. The USB host downloads 8051 program code and device
personality into RAM over the USB bus, and then the EZ-USB chip
re-connects as the custom device defined by the loaded code.
The EZ-USB family uses an enhanced SIE/USB interface (called
the Anchor “core”) which has the intelligence to function as a full
Figure 1-1: AN2313S (80 pin) Simplified Block Diagram
Serial
Interface
En
g
ine
(SIE)
USB
Transceiver
+5V
GND
D+
D-
USB
Connector
bytes
bytes IO Ports
Address Bus
Data Bus
External
Memory,
FIFOS,
etc.
General
Purpose
Microprocessor
USB
Interface
Pro
g
ram &
Data
RAM
EZ-USB

Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Kit Overview 1 - 5
USB device even before the 8051 is running. This allows the USB
host to download code into EZ-USB RAM, and then start the 8051.
The enhanced core simplifies 8051 code by implementing much of
the USB protocol.
EZ-USB chips operate at 3.3 volts. This simplifies the design of
bus-powered USB devices, since the 5V power available in the
USB connector (which the USB specification allows to be as low as
4.4V) can drive a 3.3 volt regulator to deliver clean isolated power
to the EZ-USB chip.
The AN2131Q, an 80-pin version of the EZ-USB family has in
addition to the 24 IO pins, a 16-bit address bus and 8-bit data bus
for external memory expansion.
A special “fast transfer” mode moves data directly between external
logic and internal USB FIFOs. The fast transfer mode, along with
abundant endpoint resources, allows the EZ-USB family to support
transfer bandwidths beyond the maximum required by the USB
specification.
Final EZ-USB
System Block
Diagram
Your final USB application most likely will consist of a few major
pieces: a custom Windows USB device driver, the standard
Windows USB drivers, EZ-USB Application firmware, and an
optional custom Windows USB Application program.
Figure 1-2 shows a typical EZ-USB Peripheral application block
diagram.

Preliminary - Information Subject to Change - 9/24/98
1 - 6 EZ-USB Development Kit Overview
Initial
Download
Process
The EZ-USB family provides a “soft” (RAM-based) solution that
allows unlimited configuration and upgrades. In order to
accomplish this, your system must go through an initial download
process before your final application is running.
The following list details the state of your system from the moment
the EZ-USB based device is plugged into the USB bus.
• The Host detects that your device is plugged in and asks the
device for it’s ID’s
• The device responds with ID’s that represent your non-
downloaded device: (Vendor=XYZ Corp,
Product=GIZMOLOADER).
• The Host PC sees these ID’s and knows to load your Loader
Driver (based on the EZLOADER example in the Driver
directory on the CD).
Figure 1-2: Final EZ-USB System Block Diagram
USB DeviceUSB-Capable computer
Windows Host
USBD.SYS
Your Custom USB Device
Driver
Application
Pro
g
ram
EZ-USB
8051 Application
Firmware
USB
Bus

Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Kit Overview 1 - 7
• Your Loader Driver performs an Anchor download of the
embedded 8051 firmware into the EZ-USB chip.
• The Loader Driver then releases the Reset of the EZ-USB
8051 processor and your firmware application code starts
running.
• Your 8051 firmware electrically disconnects the EZ-USB
from the USB bus.
• The host, seeing the original device disappear, discards the
Loader Driver from host memory.
• Your 8051 firmware Reconnects the EZ-USB to the USB
bus.
• The Host detects that your device is plugged in and asks the
device for it’s ID’s.
• The 8051 firmware responds with ID’s that represent a your
fully downloaded and configured device: (Vendor=XYZ
Corp, Product=GIZMO).
• The Host PC sees these ID’s and knows to load your
Custom Device Driver (based on the Generic Driver
example).
• The Host Driver and EZ-USB firmware are now loaded and
running and perform the data transfers and control functions
necessary for your application. You may also have a
Windows application that calls your device driver that sends
and receives data.
EZ-USB
Development
System Block
Diagram
During system development, the EZ-USB system looks slightly
different than your final system. The development environment
provides debugging tools for the system under development. In
order to accomplish this, a monitor program is first downloaded
over a serial port and run in the EZ-USB 8051 processor. Then,
using the Keil Debugger, you can load programs and debug your
firmware application by single stepping and setting breakpoints.
Once your firmware is loaded, the Anchor Control panel (which
uses the Windows USB driver) allows you to generate USB traffic
to test your USB control firmware.

Preliminary - Information Subject to Change - 9/24/98
1 - 8 EZ-USB Development Kit Overview
Figure 1-3 shows the EZ-USB Developer’s Kit System block
diagram.
Figure 1-3: EZ-USB Developer’s Kit System Block Diagram
USB Bus
Plugging in the Development board (with
development board Vendor, Product, and
Device ID's) signals host to load the EZ-
MON driver
USB DeviceUSB Capable computer
Windows Host
EZ-USB
Your Application
Firmware (loaded by the
monitor via a serial port
on the board)
Keil Monitor/Debugger
(downloaded by the
EZ-MON Driver)
Anchor's EZ-USB Control
Panel Application
Anchor's EZ-MON Device
Driver (knows how to
download the monitor to the
board via USB)
USBD.SYS

Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Kit Overview 1 - 9
Setting up the
Development
Environment
The following list outlines the steps needed for setting up and using
the development environment.
• The Host detects that a USB device has been plugged in and
asks the device for it’s ID’s
• The device responds with ID’s that indicate an Anchor non-
downloaded Developer’s Kit device: (Vendor=Anchor
Chips, Product=EZ-USB Developer’s Kit).
• The Host PC sees these ID’s and knows to load the EZMON
Driver (this driver knows how to download the Keil Monitor
program to the EZ-USB Developer’s Board).
• The EZMON Driver performs an Anchor download of the
Keil Monitor firmware to the embedded 8051 RAM outside
of the EZ-USB chip.
• The EZMON Driver then releases the Reset of the EZ-USB
8051 processor and starts the Keil Monitor code running.
The green light on the development board turns on when the
Keil monitor firmware is running.
• Once the Keil Monitor is running, you run the Keil
Debugger on the Host computer and download your
application code using the serial port on the Developer’s Kit
board to the 8051 RAM, either internal or external (but not
on top of the Monitor).
• The Keil Debugger then starts running your Application
firmware, allowing you to set breakpoints and single step.
• From here, your 8051 Application firmware is running.
• Your 8051 firmware Disconnects the EZ-USB from the
USB bus.
• The host, seeing the EZ-USB Developer’s Kit device
disappear, discards the EZMON Driver from host memory.
• Your 8051 firmware Reconnects the EZ-USB to the USB
bus.
• The Host detects that your device is plugged in and asks the
device for it’s ID’s.

Preliminary - Information Subject to Change - 9/24/98
1 - 10 EZ-USB Development Kit Overview
• The 8051 firmware responds with ID’s that represent a your
fully downloaded and configured device: (Vendor=XYZ
Corp, Product=GIZMO).
• The Host PC sees these ID’s and knows to load your
Custom Device Driver (based on the Generic Driver
example).
• The Host Driver and EZ-USB firmware are now loaded and
running and perform the data transfers and control functions
necessary for your application. You may also have a
Windows application that calls your device driver that sends
and receives data.

Preliminary - Information Subject to Change - 9/24/98
C H A P T E R2
EZ-USB
Development Kit
Contents
EZ-USB Xcelerator Development Kit Contents.............. 2-2
Hardware.................................................................... 2-2
Software on CD-ROM ............................................... 2-2
Printed Documentation .............................................. 2-3

Preliminary - Information Subject to Change - 9/24/98
2 - 2 EZ-USB Development Kit Contents
The EZ-USB XceleratorTM development kit provides a complete
hardware and software solution for accelerating the firmware and
device driver development for all the members of the EZ-USB fam-
ily. Other USB development kits use emulation of the eventual USB
device. The EZ-USB Xcelerator developer kit uses the actual
device, the AN2131QC, during the entire development.
EZ-USB
Xcelerator
Development
Kit Contents
Hardware
• EZ-USB Developer Board (AN2131DK)
• Shielded Series A-B USB Cable
• Breadboard
• RS-232 Cable
Software on CD-ROM
Custom Software Utilities & Documentation
• EZ-USB Control Panel Application Software
• USB Generic Driver
• Source file for USB Generic Driver
• EZ-USB Loader Driver
• Example Source file for EZ-USB Loader Driver
• EZ-USB Firmware Library
• EZ-USB Applications Framework
• Source file for Firmware Frameworks and Firmware Library
• 8051 Example Code
• EZ-USB Control Panel User’s Guide
• USB Generic Driver Documentation
• EZ-USB Loader Driver Documentation
• 8051 Firmware Library Documentation
• EZ-USB Technical Reference Manuals

Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Kit Contents 2 - 3
Keil Development Tools (2K Limited Edition)
(8051 Build Environment)
• Compiler
• Assembler
•Linker
• Debugger
• Monitor
• Documentation and User Guide
Keil Development Tools (4K Limited Edition)
(8051 Build Environment)
• Compiler
• Assembler
•Linker
• Debugger
• Monitor
• Documentation and User Guide
EZ-USB Tutorials
Printed Documentation
• Getting Started Manual
• EZ-USB Technical Reference Manual

Preliminary - Information Subject to Change - 9/24/98
2 - 4 EZ-USB Development Kit Contents

Preliminary - Information Subject to Change - 9/24/98
3 - 2 EZ-USB Development Kit Software
Beginning the
Install
Procedure
Start by collecting the following materials:
• Installation CD.
• The EZ-USB Development Board.
• USB Cable.
• A Development Platform (PC) with USB support.
Verify that USB support is present on the development PC before
proceeding. There should be at least one USB connector socket
available on the PC chassis (a flat connector socket). The
motherboard BIOS must also contain USB support.
Generally speaking, you must have one of the following operating
systems which provide USB support.
• Win 95 OSR2.1 (version 4.03.1214 or later)
• Windows 98 (highly recommended)
The OS version can be found in the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion -> VersionNumber
If you are using Win95 and are not up to version 1214, then you
need to get the most current version of usbsupp.exe and install it.
usbsupp.exe is available through Microsoft Developer’s Network
(MSDN).
To quickly determine that USB support is present on your PC, do
the following:
• Select “Start\Settings\Control Panel”.
• Double-click on the “System” icon.
• Select the “Device Manager” tab.
• You should see a “Universal Serial Bus Controller” icon.
This icon will probably have a Host Controller and a USB Root
Hub listed beneath it.
Table of contents
Popular Microcontroller manuals by other brands

Division 6
Division 6 CEM3340 VCO Build instructions

Maxim Integrated
Maxim Integrated MAX32650 user guide

Lantronix
Lantronix Open-Q 660 mSOM user guide

DOEPFER
DOEPFER WHEEL ELECTRONIC manual

GigaDevice Semiconductor
GigaDevice Semiconductor GD32F403 Series user manual

Freescale Semiconductor
Freescale Semiconductor MCF51CN128 Reference manual

Texas Instruments
Texas Instruments TMS320C67 DSP Series Programmer's reference guide

ST
ST FP-SNS-SMARTAG1 quick start guide

NXP Semiconductors
NXP Semiconductors FRDM665SPIEVB user manual

Spectrum Digital
Spectrum Digital TMS320C6416T DSK Technical reference

Microchip Technology
Microchip Technology Digital Power Starter Kit user guide

Texas Instruments
Texas Instruments TMS320DM357 user guide