1 Introducing EZ-USB ......................................................................1-11.1 Introduction ............................................................................................. 1-11.2 EZ-USB Block Diagrams ....................................................................... 1-21.3 The USB Specification ........................................................................... 1-31.4 Tokens and PIDs ..................................................................................... 1-41.5 Host is Master ......................................................................................... 1-51.5.1 Receiving Data from the Host .................................................. 1-61.5.2 Sending Data to the Host ......................................................... 1-61.6 USB Direction ......................................................................................... 1-61.7 Frame ...................................................................................................... 1-61.7.1 Bulk Transfers .......................................................................... 1-71.7.2 Interrupt Transfers ................................................................... 1-71.8 EZ-USB Transfer Types ......................................................................... 1-71.8.1 Isochronous Transfers ............................................................. 1-81.8.2 Control Transfers ..................................................................... 1-81.9 Enumeration ............................................................................................ 1-91.10 The USB Core ....................................................................................... 1-101.11 EZ-USB Microprocessor ...................................................................... 1-111.12 ReNumerationÔ ................................................................................... 1-121.13 EZ-USB Endpoints ............................................................................... 1-121.13.1 EZ-USB Bulk Endpoints ......................................................... 1-131.13.2 EZ-USB Control Endpoint Zero ............................................ 1-131.13.3 EZ-USB Interrupt Endpoints ................................................. 1-141.13.4 EZ-USB Isochronous Endpoints ............................................ 1-141.14 Fast Transfer Modes ............................................................................. 1-141.15 Interrupts ............................................................................................... 1-151.16 Reset and Power Management .............................................................. 1-151.17 EZ-USB Product Family ....................................................................... 1-161.18 Summary of AN2122, AN2126 Features ............................................. 1-161.19 Revision ID ........................................................................................... 1-171.20 Pin Des criptions .................................................................................... 1-182 EZ-USB CPU .................................................................................. 2-12.1 Introduction ............................................................................................. 2-12.2 8051 Enhancements ................................................................................ 2-12.3 EZ-USB Enhancements .......................................................................... 2-22.4 EZ-USB Register Interface ..................................................................... 2-22.5 EZ-USB Internal RAM ........................................................................... 2-32.6 I/O Ports .................................................................................................. 2-32.7 Interrupts ................................................................................................. 2-42.8 Power Control ......................................................................................... 2-52.9 SFRs ........................................................................................................ 2-62.10 Internal Bus ............................................................................................. 2-72.11 Reset ........................................................................................................ 2-73 EZ-USB Memory ............................................................................ 3-13.1 Introduction ............................................................................................. 3-13.2 8051 Memory .......................................................................................... 3-23.3 Expanding EZ-USB Memory ................................................................. 3-43.4 CS# and OE# Signals .............................................................................. 3-53.5 EZ-USB ROM Versions ......................................................................... 3-74 EZ-USB Input/Output ................................................................... 4-14.1 Introduction ............................................................................................. 4-14.2 IO Ports ................................................................................................... 4-24.3 IO Port Registers ..................................................................................... 4-54.4 I2C Controller .......................................................................................... 4-64.5 8051 I2C Controller ................................................................................. 4-64.5.1 START ...................................................................................... 4-84.5.2 STOP ........................................................................................ 4-84.6 Control Bits ............................................................................................. 4-84.6.1 LASTRD ................................................................................... 4-94.6.2 DONE ....................................................................................... 4-94.6.3 ACK .......................................................................................... 4-94.7 Status Bits ............................................................................................... 4-94.7.1 BERR ...................................................................................... 4-104.7.2 ID1, ID0 ................................................................................. 4-104.8 Sending I2C Data .................................................................................. 4-104.9 Receiving I2C Data ............................................................................... 4-114.10 I2C Boot Loader .................................................................................... 4-125 EZ-USB Enumeration and ReNumerationÔ ...............................5-15.1 Introduction ............................................................................................. 5-15.2 The Default USB Device ........................................................................ 5-25.3 EZ-USB Core Response to EP0 Device Requests .................................. 5-45.4 Firmware Load ........................................................................................ 5-55.5 Enumeration Modes ................................................................................ 5-75.6 No Serial EEPROM ................................................................................ 5-85.7 Serial EEPROM Present, First Byte is 0xB0 .......................................... 5-95.8 Serial EEPROM Present, First Byte is 0xB2 ........................................ 5-105.9 ReNumerationÔ ................................................................................... 5-115.10 Multiple ReNumerationsÔ ................................................................... 5-135.11 Default Des criptor ................................................................................. 5-136 EZ-USB Bulk Transfers ................................................................. 6-16.1 Introduction ............................................................................................. 6-16.2 Bulk IN Transfers ................................................................................... 6-46.3 Interrupt Transfers .................................................................................. 6-56.4 EZ-USB Bulk IN Example ..................................................................... 6-56.5 Bulk OUT Transfers ............................................................................... 6-66.6 Endpoint Pairing ..................................................................................... 6-86.7 Paired IN Endpoint Status ....................................................................... 6-96.8 Paired OUT Endpoint Status ................................................................. 6-106.9 Using Bulk Buffer Memory .................................................................. 6-106.10 Data Toggle Control ............................................................................. 6-116.11 Polled Bulk Transfer Example .............................................................. 6-146.12 Enumeration Note ................................................................................. 6-156.13 Bulk Endpoint Interrupts ...................................................................... 6-166.14 Interrupt Bulk Transfer Example .......................................................... 6-176.15 Enumeration Note ................................................................................. 6-226.16 The Autopointer .................................................................................... 6-237 EZ-USB Endpoint Zero ..................................................................7-17.1 Introduction ............................................................................................. 7-17.2 Control Endpoint EP0 ............................................................................. 7-27.3 USB Requests ......................................................................................... 7-57.3.1 Get Status ................................................................................. 7-77.3.2 Set Feature ............................................................................. 7-107.3.3 Clear Feature ......................................................................... 7-127.3.4 Get Des criptor ....................................................................... 7-127.3.4.1 Get Des criptor-Device ...............................................................7-147.3.4.2 Get Des criptor-Configuration ....................................................7-157.3.4.3 Get Des criptor-String ................................................................7-167.3.5 Set Des criptor ........................................................................ 7-167.3.6 Set Configuration ................................................................... 7-197.3.7 Get Configuration .................................................................. 7-197.3.8 Set Interface ........................................................................... 7-207.3.9 Get Interface .......................................................................... 7-217.3.10 Set Address ............................................................................. 7-217.3.11 Sync Frame ............................................................................ 7-227.3.12 Firmware Load ...................................................................... 7-238 EZ-USB Isochronous Transfers .................................................... 8-18.1 Introduction ............................................................................................. 8-18.1.1 Initialization ............................................................................. 8-28.2 Isochronous IN Transfers ........................................................................ 8-28.2.1 IN Data Transfers .................................................................... 8-38.3 Isochronous OUT Transfers .................................................................... 8-38.3.1 Initialization ............................................................................. 8-48.3.2 OUT Data Transfer .................................................................. 8-48.4 Setting Isochronous FIFO Sizes ............................................................. 8-58.5 Isochronous Transfer Speed .................................................................... 8-88.6 Fast Transfers .......................................................................................... 8-98.6.1 Fast Writes ............................................................................. 8-108.6.2 Fast Reads .............................................................................. 8-118.7 Fast Transfer Timing ............................................................................ 8-118.7.1 Fast Write Waveforms ........................................................... 8-128.7.2 Fast Read Waveforms ............................................................ 8-138.8 Fast Transfer Speed .............................................................................. 8-148.8.1 Disable ISO ............................................................................ 8-158.9 Other Isochronous Registers ................................................................. 8-158.9.1 Zero Byte Count Bits .............................................................. 8-168.10 ISO IN Response with No Data ............................................................ 8-178.11 Using the Isochronous FIFOs ............................................................... 8-179 EZ-USB Interrupts ......................................................................... 9-19.1 Introduction ............................................................................................. 9-19.2 USB Core Interrupts ............................................................................... 9-19.3 Wakeup Interrupt .................................................................................... 9-29.4 USB Signaling Interrupts ........................................................................ 9-49.5 SUTOK, SUDAV Interrupts ................................................................... 9-89.6 SOF Interrupt .......................................................................................... 9-99.7 Suspend Interrupt .................................................................................... 9-99.8 USB RESET Interrupt ............................................................................ 9-99.9 Bulk Endpoint Interrupts ........................................................................ 9-99.10 USB Autovectors .................................................................................. 9-109.11 Autovector Coding ................................................................................ 9-119.12 I2C Interrupt .......................................................................................... 9-139.13 In Bulk NAK Interrupt - (AN2122/AN2126 only) ............................... 9-139.14 I2C STOP Complete Interrupt - (AN2122/AN2126 only) .................... 9-1510 EZ-USB Resets .............................................................................. 10-110.1 Introduction ........................................................................................... 10-110.2 EZ-USB Power-On Reset (POR) .......................................................... 10-110.3 Releasing the 8051 Reset ...................................................................... 10-310.3.1 RAM Download ...................................................................... 10-410.3.2 EEPROM Load ...................................................................... 10-410.3.3 External ROM ........................................................................ 10-410.4 8051 Reset Effects ................................................................................ 10-410.5 USB Bus Reset ...................................................................................... 10-510.6 EZ-USB Disconnect ............................................................................. 10-710.7 Reset Summary ..................................................................................... 10-811 EZ-USB Power Management ......................................................11-111.1 Introduction ........................................................................................... 11-111.2 Suspend ................................................................................................. 11-211.3 Resume .................................................................................................. 11-311.4 Remote Wakeup .................................................................................... 11-412 EZ-USB Registers ......................................................................... 12-112.1 Introduction ........................................................................................... 12-112.2 Bulk Data Buffers ................................................................................. 12-312.3 Isochronous Data FIFOs ....................................................................... 12-412.4 Isochronous Byte Counts ...................................................................... 12-612.5 CPU Registers ....................................................................................... 12-812.6 Port Configuration ................................................................................ 12-912.7 Input-Output Port Registers ................................................................ 12-1112.8 230-Kbaud UART Operation - AN2122, AN2126 ............................. 12-1412.9 Isochronous Control/Status Registers ................................................. 12-1412.10 I2C Registers ....................................................................................... 12-1612.11 Interrupts ............................................................................................. 12-1912.12 Endpoint 0 Control and Status Registers ............................................ 12-2912.13 Endpoint 1-7 Control and Status Registers ......................................... 12-3112.14 Global USB Registers ......................................................................... 12-3712.15 Fast Transfers ...................................................................................... 12-4612.16 SETUP Data ........................................................................................ 12-4912.17 Isochronous FIFO Sizes ...................................................................... 12-5013 EZ-USB AC/DC Parameters ....................................................... 13-113.0.1 Absolute Maximum Ratings ................................................... 13-113.0.2 Operating Conditions ............................................................ 13-113.0.3 DC Characteristics ................................................................ 13-113.1 Electrical Characteristics ...................................................................... 13-113.1.1 AC Electrical Characteristics ................................................ 13-213.1.2 General Memory Timing ........................................................ 13-213.1.3 Program Memory Read ......................................................... 13-213.1.4 Data Memory Read ................................................................ 13-213.1.5 Data Memory Write ............................................................... 13-313.1.6 Fast Data Write ..................................................................... 13-313.1.7 Fast Data Read ...................................................................... 13-314 EZ-USB Packaging ....................................................................... 14-114.1 44-Pin PQFP Package ........................................................................... 14-114.2 80-Pin PQFP Package ........................................................................... 14-314.3 48-Pin PQFP Package ........................................................................... 14-5Appendix A: 8051 Introduction ........................................................... A-1A.1 Introduction ............................................................................................ A-1A.2 8051 Features ......................................................................................... A-1A.3 Performance Overview .......................................................................... A-2A.4 Software Compatibility .......................................................................... A-3A.5 803x/805x Feature Comparison ............................................................. A-4A.5.1 Serial Ports ..............................................................................A-55.1.1 Timer 2 .....................................................................................A-55.1.2 Timed Access Protection ..........................................................A-55.1.3 Watchdog Timer .......................................................................A-5A.6 8051 Core/DS80C320 Differences ........................................................ A-5Appendix B: 8051 Architectural Overview .......................................... B-1B.1 Introduction .............................................................................................B-1B.1.1 Memory Organization ..............................................................B-2B.1.1.1 Program Memory ...................................................B-2B.1.1.2 External RAM ........................................................B-2B.1.1.3 Internal RAM .........................................................B-2B.1.2 Instruction Set ..........................................................................B-3B.1.3 Instruction Timing ..................................................................B-10B.1.4 CPU Timing ...........................................................................B-11B.1.5 Stretch Memory Cycles (Wait States) ....................................B-11B.1.6 Dual Data Pointers ................................................................B-12B.1.7 Special Function Registers ....................................................B-13Appendix C: 8051 Hardware Des cription ............................................C-1C.1 Introduction .............................................................................................C-1C.2 Timers/Counters ......................................................................................C-1C.2.1 803x/805x Compatibility ..........................................................C-1C.2.2 Timers 0 and 1 .........................................................................C-2C.2.2.1 Mode 0 ...................................................................C-2C.2.2.2 Mode 1 ...................................................................C-3C.2.2.3 Mode 2 ...................................................................C-6C.2.2.4 Mode 3 ...................................................................C-7C.2.3 Timer Rate Control ..................................................................C-8C.2.4 Timer 2 .....................................................................................C-9C.2.4.1 Timer 2 Mode Control .........................................C-10C.2.5 16-Bit Timer/Counter Mode ...................................................C-10C.2.5.1 6-Bit Timer/Counter Mode with Capture ............C-12C.2.6 16-Bit Timer/Counter Mode with Auto-Reload .....................C-12C.2.7 Baud Rate Generator Mode ...................................................C-13C.3 Serial Interface ......................................................................................C-14C.3.1 803x/805x Compatibility ........................................................C-15C.3.2 Mode 0 ...................................................................................C-15C.3.3 Mode 1 ...................................................................................C-21C.3.3.1 Mode 1 Baud Rate ...............................................C-21C.3.3.2 Mode 1 Transmit ..................................................C-24C.3.4 Mode 1 Receive ......................................................................C-24C.3.5 Mode 2 ...................................................................................C-26C.3.5.1 Mode 2 Transmit ..................................................C-27C.3.5.2 Mode 2 Receive ...................................................C-27C.3.6 Mode 3 ...................................................................................C-29C.3.7 Multiprocessor Communications ...........................................C-30C.3.8 Interrupt SFRs ........................................................................C-30C.4 Interrupt Processing ..............................................................................C-36C.4.1 Interrupt Masking ..................................................................C-37C.4.2 Interrupt Priorities .................................................................C-38C.4.3 Interrupt Sampling .................................................................C-39C.4.4 Interrupt Latency ...................................................................C-40C.4.5 Single-Step Operation ............................................................C-40C.5 Reset ......................................................................................................C-40C.5.1 Idle Mode ...............................................................................C-41C.6 Power Saving Modes ............................................................................C-41Figure 1-1. AN2131S (44 pin) Simplified Block Diagram ........................................... 1-2Figure 1-2. AN2131Q (80 pin) Simplified Block Diagram ........................................... 1-3Figure 1-3. USB Packets ................................................................................................ 1-4Figure 1-4. Two Bulk Transfers, IN and OUT .............................................................. 1-7Figure 1-5. An Interrupt Transfer .................................................................................. 1-7Figure 1-6. An Isochronous Transfer ............................................................................. 1-8Figure 1-7. A Control Transfer ...................................................................................... 1-8Figure 1-8. What the SIE Does .................................................................................... 1-10Figure 1-9. 80-pin PQFP Package (AN2131Q) ........................................................... 1-18Figure 1-10. 44-pin PQFP Package with Port B (AN2121S, AN2122S,and AN2131S) ........................................................................................................ 1-19Figure 1-11. 44-pin Package with Data Bus (AN2125S, AN2126S, AN2135S,and AN2136 ............................................................................................................ 1-20Figure 1-12. 48-pin TQFP Package (AN2122T) ......................................................... 1-21Figure 1-13. 48-pin PQFP Package (AN2126T) ......................................................... 1-22Figure 2-1. 8051 Registers ............................................................................................. 2-3Figure 3-1. EZ-USB 8-KB Memory Map - Addresses are in Hexadecimal .................. 3-1Figure 3-2. EZ-USB 4-KB Memory Map - Addresses are in Hexadecimal .................. 3-1Figure 3-3. Unused Bulk Endpoint Buffers (Shaded) Used as Data Memory ............... 3-3Figure 3-4. EZ-USB Memory Map with EA=0 ............................................................. 3-4Figure 3-5. EZ-USB Memory Map with EA=1 ............................................................. 3-6Figure 3-6. 8-KB ROM, 2-KB RAM Version ............................................................... 3-7Figure 3-7. 32-KB ROM, 4-KB RAM Version ............................................................. 3-8Figure 4-1. EZ-USB Input/Output Pin ........................................................................... 4-2Figure 4-2. Alternate Function is an OUTPUT ............................................................. 4-4Figure 4-3. Alternate Function is an INPUT ................................................................. 4-4Figure 4-4. Registers Associated with PORTS A, B, and C .......................................... 4-5Figure 4-5. General I2C Transfer ................................................................................... 4-6Figure 4-6. General FC Transfer .................................................................................... 4-7Figure 4-7. FC Registers ................................................................................................ 4-8Figure 5-1. USB Control and Status Register .............................................................. 5-11Figure 5-2. Disconnect Pin Logic ................................................................................ 5-12Figure 5-3. Typical Disconnect Circuit (DISCOE=1) ................................................. 5-12Figure 6-1. Two BULK Transfers, IN and OUT ........................................................... 6-1Figure 6-2. Registers Associated with Bulk Endpoints ................................................. 6-3Figure 6-3. Anatomy of a Bulk IN Transfer .................................................................. 6-4Figure 6-4. Anatomy of a Bulk OUT Transfer .............................................................. 6-7Figure 6-5. Bulk Endpoint Toggle Control .................................................................. 6-1Figure 6-6. Example Code for a Simple (Polled) BULK Transfer .............................. 6-14Figure 6-7. Interrupt Jump Table ................................................................................. 6-18Figure 6-8. INT2 Interrupt Vector ............................................................................... 6-19Figure 6-9. Interrupt Service Routine (ISR) for Endpoint 6-OUT .............................. 6-19Figure 6-10. Background Program Transfers Endpoint 6-OUT Data toEndpoint 6-IN ......................................................................................................... 6-20Figure 6-11. Initialization Routine ............................................................................... 6-21Figure 6-12. Autopointer Registers ............................................................................. 6-23Figure 6-13. Use of the Autopointer ............................................................................ 6-24Figure 6-14. 8051 Code to Transfer External Data to a Bulk IN Buffer ..................... 6-25Figure 7-1. A USB Control Transfer (This One Has a Data Stage) .............................. 7-2Figure 7-2. The Two Interrupts Associated with EP0 CONTROL Transfers ............... 7-3Figure 7-3. Registers Associated with EP0 Control Transfers ...................................... 7-4Figure 7-4. Data Flow for a Get_Status Request ........................................................... 7-7Figure 7-5. Using the Setup Data Pointer (SUDPTR) for Get_Des criptor Requests .. 7-13Figure 8-1. EZ-USB Isochronous Endpoints 8-15 ......................................................... 8-1Figure 8-2. Isochronous IN Endpoint Registers ............................................................ 8-2Figure 8-3. Isochronous OUT Registers ........................................................................ 8-4Figure 8-4. FIFO Start Address Format ......................................................................... 8-5Figure 8-5. Assembler Translates FIFO Sizes to Addresses .......................................... 8-7Figure 8-6. 8051 Code to Transfer Data to an Isochronous FIFO (IN8DATA) ............ 8-8Figure 8-7. 8051 MOVX Instructions ............................................................................ 8-9Figure 8-8. Fast Transfer, EZ-USB to Outside Memory ............................................. 8-10Figure 8-9. Fast Transfer, Outside Memory to EZ-USB ............................................. 8-11Figure 8-10. The FASTXFR Register Controls FRD# and FWR# Strobes ................. 8-11Figure 8-11. Fast Write Timing ................................................................................... 8-12Figure 8-12. Fast Read Timing .................................................................................... 8-13Figure 8-13. 8051 Code to Transfer 640 Bytes of External Data to an IsochronousIN FIFO ................................................................................................................... 8-14Figure 8-14. ISOCTL Register .................................................................................... 8-15Figure 8-15. ZBCOUT Register .................................................................................. 8-16Figure 9-1. EZ-USB Wakeup Interrupt ......................................................................... 9-2Figure 9-2. USB Interrupts ............................................................................................ 9-4Figure 9-3. The Order of Clearing Interrupt Requests is Important .............................. 9-6Figure 9-4. EZ-USB Interrupt Registers ........................................................................ 9-7Figure 9-5. SUTOK and SUDAV Interrupts ................................................................. 9-8Figure 9-6. A Start Of Frame (SOF) Packet .................................................................. 9-9Figure 9-7. The Autovector Mechanism in Action ...................................................... 9-12Figure 9-8. I2C Interrupt Enable Bits and Registers .................................................... 9-13Figure 9-9. IN Bulk NAK Interrupt Requests Register ............................................... 9-14Figure 9-10. IN Bulk NAK Interrupt Enables Register ............................................... 9-14Figure 9-11. I2C Mode Register ................................................................................... 9-15Figure 9-12. I2C Control and Status Register .............................................................. 9-15Figure 9-13. I2C Data ................................................................................................... 9-15Figure 10-1. EZ-USB Resets ....................................................................................... 10-1Figure 11-1. Suspend-Resume Control ........................................................................ 11-1Figure 11-2. EZ-USB Suspend Sequence .................................................................... 11-2Figure 11-3. EZ-USB Resume Sequence .................................................................... 11-3Figure 11-4. USB Control and Status Register ............................................................ 11-4Figure 12-1. Register Des cription Format ................................................................... 12-2Figure 12-2. Bulk Data Buffers ................................................................................... 12-3Figure 12-3. Isochronous Data FIFOs ......................................................................... 12-4Figure 12-4. Isochronous Byte Counts ........................................................................ 12-6Figure 12-5. CPU Control and Status Register ............................................................ 12-8Figure 12-6. IO Port Configuration Registers ............................................................. 12-9Figure 12-7. Output Port Configuration Registers ..................................................... 12-11Figure 12-8. PINSn Registers .................................................................................... 12-12Figure 12-9. Output Enable Registers ........................................................................ 12-13Figure 12-10. 230-Kbaud UART Operation Register ............................................... 12-14Figure 12-11. Isochronous OUT Endpoint Error Register ........................................ 12-14Figure 12-12. Isochronous Control Register .............................................................. 12-15Figure 12-13. Zero Byte Count Register ................................................................... 12-15Figure 12-14. I2C Transfer Registers ......................................................................... 12-16Figure 12-15. I2C Mode Register ............................................................................... 12-18Figure 12-16. Interrupt Vector Register .................................................................... 12-19Figure 12-17. IN/OUT Interrupt Request (IRQ) Registers ........................................ 12-20Figure 12-18. USB Interrupt Request (IRQ) Registers .............................................. 12-21Figure 12-19. IN/OUT Interrupt Enable Registers .................................................... 12-23Figure 12-20. USB Interrupt Enable Registers .......................................................... 12-24Figure 12-21. Breakpoint and Autovector Register ................................................... 12-26Figure 12-22. IN Bulk NAK Interrupt Request Register ........................................... 12-27Figure 12-23. IN Bulk NAK Interrupt Enable Register ............................................. 12-27Figure 12-24. IN/OUT Interrupt Enable Registers .................................................... 12-28Figure 12-25. Port Configuration Registers ............................................................... 12-29Figure 12-26. IN Control and Status Registers .......................................................... 12-32Figure 12-27. IN Byte Count Registers ..................................................................... 12-34Figure 12-28. OUT Control and Status Registers ...................................................... 12-35Figure 12-29. OUT Byte Count Registers ................................................................. 12-36Figure 12-30. Setup Data Pointer High/Low Registers ............................................. 12-37Figure 12-31. USB Control and Status Registers ...................................................... 12-38Figure 12-32. Data Toggle Control Register ............................................................. 12-40Figure 12-33. USB Frame Count High/Low Registers .............................................. 12-41Figure 12-34. Function Address Register .................................................................. 12-42Figure 12-35. USB Endpoint Pairing Register .......................................................... 12-43Figure 12-36. IN/OUT Valid Bits Register ............................................................... 12-44Figure 12-37. Isochronous IN/OUT Endpoint Valid Bits Register ........................... 12-45Figure 12-38. Fast Transfer Control Register ............................................................ 12-46Figure 12-39. Auto Pointer Registers ........................................................................ 12-48Figure 12-40. SETUP Data Buffer ............................................................................ 12-49Figure 12-41. SETUP Data Buffer ............................................................................ 12-50Figure 13-1. External Memory Timing ........................................................................ 13-4Figure 13-2. Program Memory Read Timing .............................................................. 13-4Figure 13-3. Data Memory Read Timing .................................................................... 13-5Figure 13-4. Data Memory Write Timing ................................................................... 13-5Figure 13-5. Fast Transfer Mode Block Diagram ........................................................ 13-6Figure 13-6. Fast Transfer Read Timing [Mode 00] .................................................... 13-7Figure 13-7. Fast Transfer Write Timing [Mode 00] ................................................... 13-7Figure 13-8. Fast Transfer Read Timing [Mode 01] .................................................... 13-8Figure 13-9. Fast Transfer Write Timing [MODE 01] ................................................ 13-8Figure 13-10. Fast Transfer Read Timing [Mode 10] .................................................. 13-9Figure 13-11. Fast Transfer Write Timing [Mode 10] ................................................. 13-9Figure 13-12. Fast Transfer Read Timing [Mode 11] ................................................ 13-10Figure 13-13. Fast Transfer Write Timing [Mode 11] ............................................... 13-10Figure 14-1. 44-Pin PQFP Package (Top View) ......................................................... 14-1Figure 14-2. 44-Pin PQFP Package (Side View) ......................................................... 14-1Figure 14-3. 44-Pin PQFP Package (Detail View) ...................................................... 14-2Figure 14-4. 80-Pin PQFP Package (Top View) ......................................................... 14-3Figure 14-5. 80-Pin PQFP Package (Side View) ......................................................... 14-3Figure 14-6. 80-Pin PQFP Package (Detail View) ...................................................... 14-4Figure 14-7. 48-Pin PQFP Package (Side View) ......................................................... 14-5Figure 14-8. 48-Pin PQFP Package (Top View) ......................................................... 14-5Figure 14-9. 48-Pin PQFP Package (Detail View) ...................................................... 14-6Figure A-1. Comparative Timing of 8051 and Industry Standard 8051 ....................... A-3Figure B-1. 8051 Block Diagram ..................................................................................B-1Figure B-2. Internal RAM Organization .......................................................................B-3Figure B-3. CPU Timing for Single-Cycle Instruction ................................................B-11Figure C-1. Timer 0/1 - Modes 0 and 1 .........................................................................C-3Figure C-2. Timer 0/1 - Mode 2 ....................................................................................C-6Figure C-3. Timer 0 - Mode 3 ........................................................................................C-7Figure C-4. Timer 2 - Timer/Counter with Capture ....................................................C-12Figure C-5. Timer 2 - Timer/Counter with Auto Reload .............................................C-13Figure C-6. Timer 2 - Baud Rate Generator Mode ......................................................C-14Figure C-7. Serial Port Mode 0 Receive Timing - Low Speed Operation ...................C-19Figure C-8. Serial Port Mode 0 Receive Timing - High Speed Operation ..................C-20Figure C-9. Serial Port Mode 0 Transmit Timing - Low Speed Operation .................C-20Figure C-10. Serial Port Mode 0 Transmit Timing - High Speed Operation ..............C-21Figure C-11. Serial Port 0 Mode 1 Transmit Timing ..................................................C-25Figure C-12. Serial Port 0 Mode 1 Receive Timing ....................................................C-26Figure C-13. Serial Port 0 Mode 2 Transmit Timing ..................................................C-28Figure C-14. Serial Port 0 Mode 2 Receive Timing ....................................................C-28Figure C-15. Serial Port 0 Mode 3 Transmit Timing ..................................................C-29Figure C-16. Serial Port 0 Mode 3 Receive Timing ....................................................C-29Table 1-1. USB PIDs ..................................................................................................... 1-4Table 1-2. EZ-USB Series 2100 Family ...................................................................... 1-16Table 1-3. EZ-USB Series 2100 Pinouts by Pin Function ........................................... 1-23Table 2-1. EZ-USB Interrupts ....................................................................................... 2-4Table 2-2. Added Registers and Bits ............................................................................. 2-6Table 4-1. IO Pin Functions for PORTxCFG=0 and PORTxCFG=1 ............................ 4-3Table 4-2. Strap Boot EEPROM Address Lines to These values ............................... 4-13Table 4-3. Results of Power-On I2C Test .................................................................... 4-14Table 5-1. EZ-USB Default Endpoints .......................................................................... 5-2Table 5-2. How the EZ-USB Core Handles EP0 Requests When ReNum=0 ............... 5-4Table 5-3. Firmware Download ..................................................................................... 5-5Table 5-4. Firmware Upload .......................................................................................... 5-6Table 5-5. EZ-USB Core Action at Power-Up .............................................................. 5-7Table 5-6. EZ-USB Device Characteristics, No Serial EEPROM ................................. 5-8Table 5-7. EEPROM Data Format for “B0” Load ......................................................... 5-9Table 5-8. EEPROM Data Format for “B2” Load ....................................................... 5-10Table 5-9. USB Default Device Des criptor ................................................................. 5-13Table 5-10. USB Default Configuration Des criptor .................................................... 5-14Table 5-11. USB Default Interface 0, Alternate Setting 0 Des criptor ......................... 5-14Table 5-12. USB Default Interface 0, Alternate Setting 1 Des criptor ......................... 5-15Table 5-13. USB Default Interface 0, Alternate Setting 1, InterruptEndpoint Des criptor ................................................................................................ 5-15Table 5-14. USB Default Interface 0, Alternate Setting 1, BulkEndpoint Des criptors .............................................................................................. 5-16Table 5-15. USB Default Interface 0, Alternate Setting 1, BulkEndpoint Des criptors .............................................................................................. 5-17Table 5-16. USB Default Interface 0, Alternate Setting 1, IsochronousEndpoint Des criptors .............................................................................................. 5-18Table 5-17. USB Default Interface 0, Alternate Setting 2 Des criptor ......................... 5-19Table 5-18. USB Default Interface 0, Alternate Setting 1, InterruptEndpoint Des criptor ................................................................................................ 5-19Table 5-19. USB Default Interface 0, Alternate Setting 2, BulkEndpoint Des criptors .............................................................................................. 5-20Table 5-20. USB Default Interface 0, Alternate Setting 2, IsochronousEndpoint Des criptors .............................................................................................. 5-21Table 6-1. EZ-USB Bulk, Control, and Interrupt Endpoints ......................................... 6-1Table 6-2. Endpoint Pairing Bits (in the USB PAIR Register) ..................................... 6-8Table 6-3. EZ-USB Endpoint 0-7 Buffer Addresses ................................................... 6-10Table 6-4. 8051 INT2 Interrupt Vector ....................................................................... 6-16Table 6-5. Byte Inserted by EZ-USB Core at Location 0x45 if AVEN=1 .................. 6-16Table 7-1. The Eight Bytes in a USB SETUP Packet ................................................... 7-5Table 7-2. How the 8051 Handles USB Device Requests (ReNum=1) ........................ 7-6Table 7-3. Get Status-Device (Remote Wakeup and Self-Powered Bits) ..................... 7-8Table 7-4. Get Status-Endpoint (Stall Bits) ................................................................... 7-8Table 7-5. Get Status-Interface .................................................................................... 7-10Table 7-6. Set Feature-Device (Set Remote Wakeup Bit) ........................................... 7-10Table 7-7. Set Feature-Endpoint (Stall) ....................................................................... 7-11Table 7-8. Clear Feature-Device (Clear Remote Wakeup Bit) .................................... 7-12Table 7-9. Clear Feature-Endpoint (Clear Stall) .......................................................... 7-12Table 7-10. Get Des criptor-Device .............................................................................. 7-14Table 7-11. Get Des criptor-Configuration ................................................................... 7-15Table 7-12. Get Des criptor-String ............................................................................... 7-16Table 7-13. Set Des criptor-Device .............................................................................. 7-16Table 7-14. Set Des criptor-Configuration ................................................................... 7-17Table 7-15. Set Des criptor-String ................................................................................ 7-17Table 7-16. Set Configuration ..................................................................................... 7-19Table 7-17. Get Configuration ..................................................................................... 7-19Table 7-18. Set Interface (Actually, Set Alternate Setting AS for Interface IF) ......... 7-20Table 7-19. Get Interface (Actually, Get Alternate Setting AS for interface IF) ........ 7-21Table 7-20. Sync Frame ............................................................................................... 7-22Table 7-21. Firmware Download ................................................................................. 7-23Table 7-22. Firmware Upload ...................................................................................... 7-23Table 8-1. Isochronous Endpoint FIFO Starting Address Registers ............................. 8-6Table 8-2. Addresses for RD# and WR# vs. ISODISAB bit ....................................... 8-15Table 9-1. EZ-USB Interrupts ....................................................................................... 9-1Table 9-2. 8051 JUMP Instruction .............................................................................. 9-10Table 9-3. A Typical USB Jump Table ....................................................................... 9-11Table 10-1. EZ-USB States After Power-On Reset (POR) ......................................... 10-2Table 10-2. EZ-USB States After a USB Bus Reset ................................................... 10-6Table 10-3. Effects of an EZ-USB Disconnect and Re-connect .................................. 10-7Table 10-4. Effects of Various EZ-USB Resets (“U” Means “Unaffected”) .............. 10-8Table 12-1. Bulk Endpoint Buffer Memory Addresses ............................................... 12-3Table 12-2. Isochronous Endpoint FIFO Register Addresses ..................................... 12-4Table 12-3. Isochronous Endpoint Byte Count Register Addresses ............................ 12-6Table 12-4. IO Pin Alternate Functions ..................................................................... 12-10Table 12-5. Control and Status Register Addresses for Endpoints 0-7 ..................... 12-31Table 12-6. Isochronous FIFO Start Address Registers ............................................ 12-51Table 13-1. DC Characteristics .................................................................................... 13-1Table 13-2. General Memory Timing .......................................................................... 13-2Table 13-3. Program Memory Read ............................................................................ 13-2Table 13-4. Data Memory Read ................................................................................... 13-2Table 13-5. Data Memory Write .................................................................................. 13-3Table 13-6. Fast Data Write ......................................................................................... 13-3Table 13-7. Fast Data Read .......................................................................................... 13-3Table A-1. Feature Summary of 8051 Core and Common 803x/805x Configurations A-4Table B-1. Legend for Instruction Set Table .................................................................B-4Table B-2. 8051 Instruction Set .....................................................................................B-5Table B-3. Data Memory Stretch values .....................................................................B-12Table B-4. Special Function Registers ........................................................................B-14Table B-5. Special Function Register Reset values ....................................................B-16Table B-6. PSW Register - SFR D0h ..........................................................................B-18Table C-1. Timer/Counter Implementation Comparison ...............................................C-2Table C-2. TMOD Register - SFR 89h ..........................................................................C-4Table C-3. TCON Register - SRF 88h ...........................................................................C-5Table C-4. CKCON Register - SRF 8Eh .......................................................................C-8Table C-5. Timer 2 Mode Control Summary ..............................................................C-10Table C-6. T2CON Register - SFR C8h ......................................................................C-10Table C-7. Serial Port Modes ......................................................................................C-15Table C-8. SCON0 Register - SFR 98h .......................................................................C-16Table C-9. SCON1 Register - SFR C0h ......................................................................C-18Table C-10. Timer 1 Reload values for Common Serial Port Mode 1 Baud Rates ....C-23Table C-11. Timer 2 Reload values for Common Serial Port Mode 1 Baud Rates ....C-24Table C-12. IE Register - SFR A8h .............................................................................C-31Table C-13. IP Register - SFR B8h .............................................................................C-32Table C-14. EXIF Register - SFR 91h .........................................................................C-33Table C-15. EICON Register - SFR D8h ....................................................................C-34Table C-16. EIE Register - SFR E8h ...........................................................................C-35Table C-17. EIP Register - SFR F8h ...........................................................................C-36Table C-18. Interrupt Natural Vectors and Priorities ..................................................C-37Table C-19. Interrupt Flags, Enables, and Priority Control .........................................C-38Table C-20. PCON Register - SFR 87h .......................................................................C-41
猜您喜欢
评论