LITERATURE 1983 will be a year of transition for Intel's catalog program. In order to better serve you, our customers, we are reorganizing many of our catalogs to more completely reflect product groups. In addition to the new product line handbooks listed below, an INTEL PRODUCT GUIDE (Order No. 210846) will be available free of charge in March. This GUIDE will contain a listing of Intel's complete product line along with information on quality/reliability, packaging and ordering,customer training classes and product services. Consult the Intel Literature Guide (no charge, Order No. 210620) for a complete listing Of Intel . literature. Literature is presently available in other forms for those handbooks that will not be published until later in the year. Write or call the Intel Literature Department, 3065 Bowers Avenue, Santa Clara, CA 95051, (800) 538-1876, or (800) 672-1833 (California only). HANDBOOKS Memory Components Handbook (Order No. 210830) Contains all application notes, article reprints, data sheets and other design information on RAMs, DRAMs, EPROMs, E2 PROMs, Bubble Memories. Microcontroller Handbook (Available in May) Contains all application notes, article reprints, data sheets, and other user information on the MCS-48, MCS-51 (8-bit) and the new MCS-96 (16-bit) product families. Military Handbook (Order No. 210461) Contains complete data sheets on all military products. Microprocessor and Peripherals Handbook (Order No. 210844) Contains data sheets on all microprocessors and peripherals. (Individual User Manuals are also available on the 8085, 8086, 8088, 186, 286, etc.) Development Systems Handbook (Available in April) Contains data sheets on development systems and supporting software. OEM Systems Handbook (Available in May) Contains all application notes, article reprints and data sheets for OEM boards and systems. Software Handbook (Available in May) Contains software product overview as well as data sheets for all Intel software. Quality/Reliability Standards Handbook (Available in April) MICROPROCESSOR AND PERIPHERALS HANDBOOK \ 1983 Intel Corporation makes no warranty for the use of its products and assumes no responsibility for any errors which may appear in this document nor does it make a commitment to update the information contained herein. The following are trademarks of Intel Corporation and may only be used to identify Intel Products: BXP, CREDIT, i, ICE, 12 1CE, ICS, iDBP, iDIS, iLBX, i m , iMMX, Insite, INTEL, intel, Intelevision, Intellec, inteligent Identifier™ intelBOS, inteligent Programming™, Intellink, iOSP, iPDS, iRMS, iSBC, iSBX, iSDM, iSXM, Library Manager, MCS, Megachassis, Micromainframe, MULTI BUS, Multichannel™ Plug-A-Bubble, MULTI MODULE, PROMPT, Ripplemode, RMX/80, RUPI, System 2000, and UPI, and the combination of ICE, iCS, iRMX, iSBC, MCS, or UPI and a numerical suffix. MDS is an ordering code only and is not used as a product name or trademark. MDS® is a registered trademark of Mohawk Data Sciences Corporation . • MULTI BUS is a patented Intel bus. Additional copies of this manual or other Intel literature may be obtained from: Intel Corporati on Literature Department 3065 Bowers Avenue Santa Clara, CA 95051 ©INTEL CORPORATION. 1982 Table of Contents CHAPTER 1 GENERAL INFORMATION Quality Assurance Operations ................................................................. 1-1 Express Program Overview ................................................................... 1-6 Intel Workshops .............................................................................. 1-8 CHAPTER 2 MCSIiI)·8OI85 MICROPROCESSORS ,8080Al8080A-1/SOSOA-2, 8-Bit N-Channel Microprocessor ........................................ 2-1 8085AHl8085AH-2/S085AH-1 8-Bit HMOS Microprocessors .......................•.............. 2-10 8085A18085A-2 Single Chip 8-Bit N-Channel Microprocessors ................................... 2-26 8155H/8156H18155H-218156H-2, 2048-Bit Static HMOS RAM with I/O Ports and Timer .............. 2-30 8155/8156/8155-2/8156-2, 2048-Bit Static MOS RAM with I/O Ports and Timer ..................... 2-42 818518185-2, 1024 x 8-Bit Static RAM fQr MCS-85 ............................................... 2-45 8205 High Speed 1 Out of 8 Binary Decoder ................................................... 2-50 8212 8-Bit Input/Output Port ............................•.................................... 2-55 8216/8226, 4-Bit Parallel Bidirectional Bus Driver ............................................... 2-63 8218/8219 Bipolar Microcomputer Bus Controllers for MCS-80 and MCS-85 Family ................ 2-68 8224 Clock Generator and Driver for S080A CPU ...........•................................... 2-79 8228/8238 System Controller and Bus Driver for S080A CPU ..................................... 2-84 8237 Al8237 A-4/8237 A-5 High Performance Programmable DMA Controller .................•..... 2-88 8257/8257-5 Programmable DMA Controller .................................................. 2-103 8259A18259A-2/8259A-8 Programmable Interrupt Controller .................................... 2-120 8355/8355-2, 16,384-Bit ROM with I/O ........................................................ 2-138 8755A18755A-2, 16,384-Bit EPROM with I/O ................................................... 2-146 CHAPTER 3 IAPX 86, 88, 186, 188.MICROPROCESSORS iAPX 86/10 16-Bit HMOS Microprocessor ....................................................... 3-1 iAPX 186 High Integration 16-Blt Microprocessor ............................................... 3-25 iAPX 88110 8-Bit HMOS Microprocessor ....................................................... 3-74 iAPX 188 High Integration 8-Bit Microprocessor .................... : .......................... 3-106 8089 8116-Bit HMOS I/O Processor ....................................................... : ... 3-161 iAPX 86/20, 88/20 8-Bit HMOS Numeric Data Processor ........................................ 3-175 iAPX 86/30, 88/30 Operating System Processors .............................................. 3-195 iAPX 86/50, 88150, 186/50 CP/M ·-86 Operating System Processors .............................. 3-217 8282/8283 Octal Latch ...................................................................... 3-229 8284A18284A-1/Clock Generator and Driver for iAPX 86,88 Processors ~ ........................ 3-234 8286/8287 Octal Bus Transceiver ............................................................ 3-242 8288 Bus Controller for iAPX 86, 88 ............................................... , .......... 3-247 8289 Bus Arbiter ............................. : ..........•.................................. 3-254 CHAPTER 4 IAPX 286 MICROPROCESSORS iAPX 286/10 High PerfQrmance Microprocessor with Memory Management and Protection ......... 4-1 82284 Clock Generator and Ready Interface for iAPX 286 Processors ............................ 4-51 82288 Bus Controller for iAPX 286 Processors ................................................. 4-58 CHAPTERS IAPX 432 MICROMAINFRAME™ iAPX 43201/43202/43203 VLSI Micromainframe System .......................................... 5-1 Intel Asynchronous' Communications Link ....................................................... 5-3 ·CP/M-86 is a trademark of Digital Research, Inc. iii CHAPTER 6 MICROPROCESSOR PERIPHERALS 8041 N8641 N8741 A Universal Peripheral Interface 8-Bit Microcomputer ..................... : .... 6-1 8042/8742 Universal Peripheral Interface 8-Bit Microcomputer .................................. 6-13 8202A Dynamic RAM Controller .............................................................. 6-26 8203 64K Dynamic RAM Controller ........',' ................................................. 6-40 8206 Error Detection and Correction Unit ...................................................... 6-55 8207 Advanced Dynamic RAM Controller ...................................................... 6-74 8231 A Arithmetic Processing Unit ........................................................... 6-100 8232 Floating Point Processing Unit ......................................................... 6-110 8251 A Programmable Communications Interface ............................................. 6-122 8253/8253-5 Programmable Interval Timer ........................................... ' ........ 6-139 8254 Programmable Interval Timer ................... : ...................................... 6-150 8255N8255A-5 Programmable Peripheral Interface ........................................... 6-166 8256 Multifunction Universal Asynchronous Receiver-Transmitter (MUART) ..................... 6-187 8271/8271-6 Programmable Floppy Disk Controller ............................................ 6-196 8272A Single/Double Density Floppy Disk Controller .......................................... 6-224 8273, 8273-4, 8273-8 Programmable HDLC/SDLC Protocol Controller ........................... 6-243 8274 Multi-Protocol Serial Controller (MPSC) ................................................. 6-271 8275H Programmable CRT Controller .. , ..................................................... 6-306 8276H Small System CRT Controller ......................................................... 6-330 8279/8279-5 Programmable Keyboard/Display Interface ........................................ 6-347 8291 A GPIB Talker/Listener ................................................................. 6-359 8292 GIPB Controller ....................................................................... 6-388 8293 GIPB Transceiver ...................................................................... 6-403 8294A Data Encryption Unit , ................................................................ 6-415, 8295 Dot Matrix Printer Controller ........................................................... 6-426 82062 Winchester Disk Controller ............................................................ 6-435 82501 Ethernet" Serial Interface ............................................................. 6-444 82586 Local Communications Controller ..................................................... 6-456 82720 Graphics Display Controller ........................................................... 6-468 "Ethernet is a trademark of Xerox Corp. iv General Information 1 QUALITY ASSURANCE OPERATIONS QUALITY ASSURANCE OPERATION'S, RELIABILITY, DESIGNED-IN AND CORPORATE POLICY BUILT ON EXPERIENCE "It is the policy of Intel Corporation to design, Intel's extensive reliability program forms the basis of manufacture, and deliver products that not only meet the quality program. Whether process, package or our specified standards, but also satisfy our customer product, the appropriate reliability department is part standards, and perform reliably in their applications. To of the development cycle from concept. In this way, the this end, Quality Assurance at Intel has the authority to finished product is based on the reliability history of exercise control of quality over every phase of the millions of devices-built on experience. To illustrate design and manufacturing process." , this philosophy, since 1970, the first application of a new technology has, always been on a memory chip. Intel Quality Program Policy, This type of chip provides a large-volume basis to es- Intel (Corporate) Policies and Procedures. tablish a reliability data base for the technology. As part of the data base, the memory device is extensively QUALITY ASSURANCE, analyzed for failure mechanisms and the process tech- THE SCOPE OF THE OPERATION nology altered to eliminate them. From this data base, By definition, quality is conformance to specification under the guidance of process reliability, design rules, . . . process or procedure, mechanical or electrical, test patterns, and process limits evolve. Only after customer or Intel. The operation chartered to maintain completing qualification will the technology be utilized that conformance is "Quality Assurance. " Within this in another type of device; such as a microprocessor. operation, departmental activities include the day-to- And so the data base grows, with more complex devices day surveillance of manufacturing and testing of prod- advancing the technology, each succeeding device uct, and the longer-range considerations of process, being potentially more reliable than the last, because package, and product reliability. Just as quality is the devices are built on experience, and the reliability is "conformance to specification," reliability is designed-in. "continual conformance to specification." The reliability departments, process, package and product, The key to establishing a new product, process or pack- play key roles in maintaining Intel's high quality stan- age, or to changing an existing one, is the rigid qualifica- dards, by being involved from concept to on-going pro- ,tion requirements which must be met. Qualification duction monitors throughout, the product life. must be run and approved by the appropriate reliability department before any revenue shipment may be made. The reliability goals have been set during the concept ORGANIZATION, A UNIQUE MATRIX stage in keeping with corporate objectiv~s and must be All product-related Q.A. organizations come under a demonstrated by the qualification. Consider one exam- uniform policy, while still maintaining the flexibility to ple, the qualification of a new wafer fab technology for service the specific needs of a product area. To perform E-PROMs. Below is a list of tests the first 5 wafer lots in this manner, a unique matrix organization was see during qualification: developed. All quality and reliability functions report directly through Q.A. operations or site managers to the Director of Quality Assurance. The flexibility is 125°C burn-in 168 hours obtained by the Q .A. managers associated with product 125°C lifetest 2000 hours areas (such as E-PROMs, memories, microcontrollers, 150°C HTRB 1000 hours microprocessors and peripheral circuits) also reporting Low-temperature lifetest 1000 hours indirectly to (i.e., matrixing to) the operation or division ,250°C storage ' 1000 hours general manager. Temperature cycle -65°C to + 150°C Thermal shock -65°C to + 150°C Additionally, each product area has both a quality and Test pattern study reliability group under a single Q.A. manager. This in- Program/erase cycling volvement on a product-specific level provides both the System verification customer and Intel with the timely response necessary to maintain a problem-free product flow. And when there are problems, they are handled quickly on a local It is from this type of sequence that infant mortality, level. This results in a "team" approach, quality, random failure rates, and associated failure mecha- reliability, development, manufacturing-making nisms are determined. Also from this data, reliability state-of-the-art technology available in a usable form reports are written and made available to our for our customers. customers. QUALITY ASSURANCE OPERATIONS While successful completion of qualification is the key Process Reliability. In all areas, controls mvst be app- to product introduction, it would be meaningless if the roved by Quality and 'Reliability. ' device was not sampled throughout its product life. As Assembly Quality Assurance operates at all assembly has been shown, the use of generic technology families sites instituting controls that guarantee product in- evaluates the process each time a new product is quali- tegrity irrespective of piant location. Consolidated fied. More than that, on a rotating product basis, 125°C trend data is published weekly, heading off potential dynamic burn-in and lifetests are performed to contin- problems by allowing effective concentration of en- llously monitor all technologies. Fifty thousand devices gineering resources in a timely'manner. ' each month are allocated for the Reliability Monitor Program by the Components Division. In this manner, Final Quality Assurance (FQA) operates in each Test all generic technology families are continuously and Finish area to verify that Intel and customer re- scrutinized to assure that reliability goals are met. quirements are met. Independent electrical sampling, external visual examination, and checking data require- In the same manner, Intel Package Reliability performs ments are some of the functions of this group. an extensive package monitor program to assure the mechanical integrity of every package type produced Overlaying all areas is a network of calibration labora- by every assembly facility. tories. Operating to Mil-Std-45662, the laboratory supports all operations by maintaining test and process equipment within their required tolerances. The group QUALITY, THE DEVICE MEETS provides the baseline for all Intel measure!Dents by SPECIFICATION ' both systems and bench-top equipment', assuring the validity of product shipments at the customer's The reliability program has been shown to support com- ponents quality through design-in, qualification, and location. on-going monitors. This forms the basis of the quality philosophy of looking at product from its concept, and requiring succeeding and more complex technolo- MAJOR PROGRAMS, gies/products to perform at levels better than those CUSTOMER-ORIENTED TO PROVE AND previous. The quality operations supporting this philos- IMPROVE QUALITY Every area of quality and reliability at Intel has major ophy start, as reliability does, by working with the programs which are customer-oriented. Several are desi!\n team in the product concept stage. detailed here to illustrate the manner in which Intel Quality must approve the Target Specification for any services the customer in the quality and reliability areas new device. Later, before qualification, test programs after the sale. are validated as meeting the required limits and condi- The Reliability Monitor ,Program, referred to in the tions to guarantee operation of the product to "Reliability" section, is a burn-in and Iifetest program specification. which verifies that all of Intel's technologies are being The checks and balances implemented during the pro- controlled within specified reliability target goals. By cess flow start with incoming inspection of piece parts, utilizing a dynamic 125°C, 48-hour burn-iii, "infant wafers, chemicals and masks. All must meet the stan- mortality" failure rates may be determined. A portion dards determined to be commensurate with Intel's of these devices are continued to 1000 hours to deter- product quality and reliability goals. The Materials mine random failure rates. This process technology- Technology Laboratory plays a large support role in oriented data is now available to customers biannually deteI;mining these standards, in some installces devel-. to use instead of requiring produ~t burn-in on a lot-by- oping test methods where none exist tO'meet the com- lot basis. plex control needs. There has been a need, that has grown with device Throughout the entire process, an independent complexity, for an Intel-customer correlation effort. manufacturing group, Manufacturing Process Control, This effort has resulted in the FACR (Failure Analysis continuously monitors processes in wafer faqrication, Correlation Request) system within each division or assembly, die sod, burn-in and test areas. The group operation. Operating through the Field Sales En- provides trend data and process auditing control on a gineers, the object of the progran:t is t<;l eliminate electri- day-to-day basis, involving quality and reliability cal test discrepancies between Intel ,and its customers groups when control problems ar!:: evident. In the case in a timely manner. The system provides direct contact ofwafef fabrication, the test methods and patterns used with a product-oriented Quality Engineer to eliminate for process control ·by MPC have been designed by test program or equipment discrepancies betwe,en the 1-2 QUALITY ASSURANCE OPERATIONS customer and Intel without returning all product ship- Federal Government (see "Military Grade Products" ped. The success of the program may be measured by for details). This department also performs process the numbers of lots that have been shipped to custom- audits on a regular basis of applicable Intel manufactur- ers and been questioned and accepted after utilizing the ing facilities to assure compliance to rigid military FACR system. The obvious by-product of this system is traceability and process requireme!"::~. to build customer confidence to the point where Intel's final test and FQA data becomes the customer's incom- QUALITY ASSURANCE OPERATIONS ing inspection data. FLOWCHART The Military Quality Assurance program, operated out The Quality Assurance Operations are involved in of the Phoenix site, attends to customers within the every phase of the Components Divisions. Activities aerospace or military industry, or in some cases, to vary from generating and validating design rules for a customers that have special documentation require- process technology to assuring the device count agrees ments. To perform in this product area, the Military with the Intel invoice in Plant Clearance. The following Q.A. acts as an overlay on all sites and operations, flowchart documents some of the major interactions of defining the Q.A. program requirements in that particu- Quality and Reliability through the product Iifecycle. lar area. The success of this program may be gauged by Step-by-step inspection is not shown, but rather an the acceptance of selected high-technology products by overview of the entire cycle to illustrate the extent of the Federal Government under MiI-M-38510, and the Intel's commitment to provide the quality and product processing areas certified by an agency of the reliability our customers have utilized since 1969. 1-3 QUALITY ASSURANCE OPERATIONS PROCESS TECHNOLOGY PACKAGE TECHNOLOGY Reliability: Process Qualification Materials Test Methods Materials Characterization WAFER FABRIC Reliability: Generate Design Rules Generate Test Pattern Process Qualification Stress Testing Failure Mode Analysis Quality: Incoming Inspeci High Magnificatic Reliability: Process Qualific~ PRODUCT DESIGN Process Control, Analytical Test La Quality: Parameter Limits. Testability Test Program Control Target Specification PRODUCT VALIDATION/QUALIFICATION Design Engineering: Design Verification Design Engineering: Performance Verification Applications Engineering: System Verification Quality/Reliability: Qualification 1-4 ASSEMB~Y Quality: Incoming Inspection Gates High/Low Magnification Visual Gates Assembly Q.A. Acceptance External Visual Open/Short Test Fine/Gross Leak® Bond Pull Centrifuge Die Shear Acoustic (PIND) X-Ray MarK Permanency Internal Visual Reliability: Process Qualification Assem Monitor Program te dation , ' ASSEMBLY MONITOR PROGRAM TEST AND FINISH Quality: Final Q.A. Acceptance Electrical Test Sample Physical Dimensions Solderability External Visual Mark Permanency Conformance to Sales Order External Visual Internal Visual Fine/Gross Leak® Temperature Cycle Lid Torque Thermal Shock Temp/Humidity® Steam Moisture Resistance® PLANT CLEARANCE 48 Hr, 125°C Dynamic Burn-In Quality: External Visual 1000 Hr, 12SOC Dynamic Lifetest Sales Order Requirements NOTES: lID Hermetic packages, only. ® Plastic packages, only. 1-5' EXPRESS PROGRAM OVERVIEW EXPRESS is a new service program that allows users EXPRESS Prefix Definitions ofIntel IC components to tailor the products' electrical test flow to your specific application requirements. The IA HIGH-QUALITY STANDARD PRODUCT test flows are designed to suit a broad range of system and production reqiIirements. IB STANDARD PRODUCT WITH BURN-IN AND 100% UNIT POST BURN-IN ELECTRICAL SCREENING TO The EXPRESS program offers users ofIntel microcom- COMMERCIAL TEMPERATURE RANGE puters, RAMs, EPROMs and peripheral component families, products that are screened to operate within lIA STANDARD PRODUCT WITH EXTENDED two industry-standard temperature ranges, each with TEMPERATURE SCREENING the option of 168±8 hours of dynamic burn (equivalent to MTR-STD-883B, Method 1015). All Intel processing lIB STANDARD PRODUCT WITH BURN-IN technologies are included. New products will enter the AND 100% UNIT POST BURN-IN program as they become available. ELECTRICAL SCREENING TO EXTENDED TEMPERATURE RANGE The key to using EXPRESS is the generic matrix. You can, by specifying a two-letter prefix, select the test The EXPRESS test flow first subjects 100% of all prod- ucts to a stringent class electrical examination. Com- flow your product requires including its operating tem- plete DC, AC and functional parameters are tested at perature range and package type. The two operating temperature ranges are: Commercial (Ooe.to 70°C) and operating guard band temperature(s) for compliance to published specifications. Then, at· your option, the Extended (-40°C to 85°C). Products are available in both hermetic ceramic and molded plastic packages, product undergoes 168±8 hours of dynamic burn-in at 125°C. (By exercising the components' sequential cir- that meet these temperature specifications. Adding the cuitry while under burn-in stress, a more realistic option of burn-in creates the versatile EXPRESS emulation of the electrical operating environment is matrix. achieved.) Post burn-in screening features a 100% unit electrical retest of DC, AC and functional parameters to guarantee the product's performance over its desig- nated operating temJ'lerature range. Burn-In Hours Both these product flows, independent of package type, Temperature Range A (None) B (168+8) then receive sample screening for electrical and visual parameters by Final Quality Assurance to O.I%AQL. I Commercial D,P QD,QP O°C to 70°C This overall component sampling plan of 0.1 % across the board, represents the tightest standard in the indus- II Extended TD,TP LD try. These standards are periodically reviewed, and -40°C to 85°C tightened according to Intel's Corporate quality goals. 1-6 EXPRESS PRODUCT MANUFACTURING F..-s OUTGOING ACCEPTANCE OPTICAL INSPECTION: SORT DEFECTS . LEGEND o MANUFACTURING o TEST OPERATION o QUALITY ASSURANCE DIE ATTACH QAMONITOR o LOT ACCEPTANCE LOT ACCEPTANCE 1-7 Intel Workshops puter systems since the EXTENSIVE MATERIAL early '70s, and there are Teaching aids include slide now many thousands of en- and video tape equipment, gineers creating the most student notebooks and a advanced microcomputer wide range of printed ma- systems as a direct result of terials which are designed successful training with us. to provide post-training as- similation and act as practi- VARIETY OF COURSES cal reference manuals in Intel offers a wide spectrum your own laboratory. of workshops covering all "HANDS-ON" EXPERIENCE Intel microprocessor We believe that students families from components learn better by doing than to the board and system by listening, so a sizeable levels. Microcontroller and proportion of course time is microprocessor workshops devoted to dynamic training Training in cover assembly language via the INTELLEC develop- Microcomputers programming; high level ment System, appropriate languages are covered in single-board computers, In- Whether your present separate intense courses. Circuit Emlilators (ICE), I/O involvement with micro- Your particular training re- units for programming exer- computers is a result of quirement may involve just cises, and computer kits for long-term planning or one or several courses, so design and debugging ses- simply an exploratory proj- we have taken care to en- sions. Each student there- ect undertaken by your sure tliat each workshop is fore receives valuable company in response to a high-quality training mod- "hands-on" experience of external circumstances, ule that can either stand the principles and tech- there exists an obvious independently or integrate niques featured in the and urgent need for you to with other modules to com- lecture sessions. familiarize yourself with this pletely cover the subject. . exciting new technology. If The workshops are fre- the microcomputer is, or is Accreditation for quently updated to include Workshops destined to become, a part the latest developments in of your working scene, then devices, boards, software, Intel Customer Training the importance of carefully and development tools, and offers Continuing Educa- planned training cannot be reviewed on a regular basis tion Units (CEUs) for com- over-emphasized. A modest for clarity and content. pletJon of our workshops. outlay-in time and money Attendees of our 5-day now can save many weeks PRODUCT KNOWLEDGE workshops receive 3.5 of self-study and could well As the designers and CEUs, while attendees of prevent some very expen- manufacturers of the most our 4-day and 3-day work- sive mistakes during the widely accepted microcom- shops receive 3.0 CEU and initial development of puter products in the world, 2.0 CEUs respectively. your systems. our knowledge is both com- Education Units provide prehensive and topical. Re- recognition of pro- Why Intel Training? member the saying about fessional growth and EXPERIENCE "the horse's mouth'" achievement. Intel has been training engi- neers in the application of microprocessors and the development of microcom- AFN-01608C 1-8 Where Is Intel Training? Intel Customer Training is a worldwide organization with workshops scheduled nearly every week of the . year in our training centers: BOSTON AREA (617) 256-1374 TWX 710-343-6333 CHICAGO AR.EA (312) 981-7250 TWX 910-651-5881 DALLAS AREA (214) 241-8087 TWX 910-860-5617 SAN FRANCISCO BAY AREA (408) 734-8395 Telex 352-005 TWX 910-338-7811 WASHINGTON, D.C. AREA (617) 256-1374 TWX 710-343-6333 LONDON AREA SWINDON (0793) 488-388 Telex 444447 MUNICH AREA (089) 5389-1 Telex 523177 PARIS AREA RUNGIS (01) 687-22-21 Telex 270475 STOCKHOLM AREA BROMMA (08) 98.53.85 Workshops are presented in the local language. Telex 12261 TOKYO AREA 03-437-6611 BENELUX AREA Rotterdam (10) 149-122 Telex 844-22283 COPENHAGEN AREA (1) 182-000 Telex 19567 ISRAEL (972) 452-4261 Telex 46511 AFN-01608C 1-9 IVICS®-80!85,Mict'Oprocessors, Course Outline DAY 1 Introduction to Microprocessors Assembly Language Instructions Programmed Input and O~tput Microcomputer Development System Monitor Lab: Using System Monitor DAY2 ' Microcomputer Development . System Disk Operating System CREDIT Text Editor and Macro Assembler The Processors Lab: Using Text Editor and Assembler 'DAY3 Stacks and Subroutines Interrupts In-Circuit Emulator Lab: In-Circuit Emulator Course Description . Attendees Introduction • 8085 architecture • Design engineer or pro- DAY 4 explained in detail grammer who is familiar Input and Output Techniques • Assembly language· with binary numbers and Programming Techniques programming for logic functions Lab: Using 8085 In-Circuit 8080/8085 • Prior !ittepdance at Intro- Emulator • Design and development duction to Microcom- of systems using Intel puters Workshop or 8080,8085 chips equivalent knowledge is DAY 5 • Interfacing and recommended 8555,8355,8185, 8251A programming techniques Length: 5 Days Peripherals • "Hands-on" lab sessions Tools for Modular Program using the Intellec Micro- Tuition: $995 Development computer Development $850 (Group rate) Lab: Multimodule System Programming • ICE-85 in-Circuit Emulator used to debug programs AFN-ol608C - 8080,8085 iAPX 86,88,186 Microprocessors Part I Course Description • Programming with ASM 86. • Lectures cover CPU, in- terrupts, timing, and I/O • Designing iAPX 86,88,186-based systems • "Hands-on" laboratory uses INTELLEC devel- opment system and DEBUG-86 Attendees • Design engineer or programmer who will use or evaluate iAPX 86,88,186 products • Digital circuit experience and familiarity with bi- nary numbers is required • Prior attendance to Introduction to Microcomputers Work- Course Outline shop or equivalent experience is highly DAY 1 DAY 4 recommended Introduction to Multi-Segment Programming Microcomputers Enhancements to the iAPX 186 Length: 5 Days iAPX 86,88,186 Programming CPU Model iAPX 186 Interrupt System Tuition: $995 Assembly Language iAPX 186 Chip Select/Wait $850 (Group rate) Instructions State Logic Lab: Using ALTER and Lab: Programming with Assembler Multiple Segments DAY 2 DAY 5 iAPX 86,88,186 CPU sets iAPX 186 Timer System Design and Timing iAPX 186 DMA Controller Accessing Data Modular Programming DEBUG-86 Lab: Programming with Lab: Testing and Debugging Multiple Modules programs with DEBUG-86 DAY 3 Procedures iAPX 86,88 Interrupt System Memory and 1/0 Interfacing Lab: Programming with Procedures AFN-01608C 8086,8088 1-11 iAPX 86~88,186 Microprocessors Pa.rt II Length: 5 Days Tuition: $995 $850 (Group rate) Course Outline DAY 1 iAPX 86,88,186 Architecture and Instruction Set Review Segmentation Overview of the software development process Lab: Writing multiple segment program DAY 2 Accessing data memory String operators Modular program development LlNK86,LOC86,LIB86 Lab: Using string operators Programming with multiple modules Course Description Attendees DAY 3 • Programming of large • Design engineer or Data Structures systems based on the programmer who Based Addressing iAPX 86,88,186 family of needs an advanced Linkage with PLIM Lab: Using Data Structures products understanding of the iAPX Linking with PLIM • Efficient programming 86,88,186 product line. using segmentation • Knowleoge of the DAY 4 • Detailed explanation of INTELLEC Development Linkage with Pascal and addressing modes System required. FORTRAN • Detailed usage of the • Prior attendance at Introduction to the 8087 iAPX 86 programming the iAPX 86, 88,186 numeric processor utilities (L1NK8S, LOC86, Microprocessor extension L1B86) Workshop, Part I 8087 register stack is recommended. 8087 instruction set • Linking assembly lan- . Lab: Using the 8087 NPX guage with high levellan- However, experienced guages (PL/M, Pascal, design engineers or DAY 5 FORTRAN) programmers who are Multibus system design • Detailed discussion of the already familiar with Introduction to the 8089 8087 Numeric Processor the iAPX 86,88,186 I/O processor Extension architecture and Lab: More on the 8087. • Introduction to the 8089 instruction set may 1/0 Processor attend this more • "Hands-on" laboratory advanced workshop. uses INTELLEC Micro- computer Development System and DEBUG-86 AFN-01608C 8086,8088 1-12 iAPX 286 Architecture Course Description • Describes operating modes of the iAPX 286 microprocessor • Explains the protection model of the iAPX 286 and its hardware implementation • Discusses the instructio'n set of the iAPX 286 in- cluding the memory man~ agement and protection . support instructions • Covers the iAPX 86,88 and iAPX 286 interpro- cessor compatibility issues • "Hands-on" lab sessions using the iAPX 286 Evalu- ation Package and Series III Development System Attendees • Engineer or systems pro- grammers 'interested in using or evaluating the iAPX 286 microprocessor ., Knowledge of iAPX 86,88 Course Outline architecture assumed • Knowledge of Develop- DAV1 DAV2 ment System operation iAPX 286 Operating Modes Memory Management required IAPX 86/iAPX 286 Comparison Protection • Familiarity with operating Privilege Levels Fault Recovery system internals is Task State Switching Virtual Memory iAPX 286 Evaluation Package Evaluation Builder Software recommended and Simulator Software Lab: Using Evaluation Builder Length: 3 Days Lab: Using the Simulator DAV3 Tuition: $650 Hardware Design $550 (Group rate) Multibus Interfacing N,umeric Data Processor Sys~em Initialization AFN·01608C 286 1-13 Peripheral Chips (Emphasizing Data Communications) Course Description • Explains and demonstrates use of asynchronous, byte synchronous, bit synchro'nous and local network serial commun- ications, including Ethernet' • Explains how to utilize Intel chips effectively and avoid problems • Discusses data transmis- sion via telephone lines Attendees • Intended for the design engineer, service engi- neer or programmer who wants to learn serial com- munciation techniques and implement them using state-of-the-art microcomputer products • Prior attendance to iAPX Course Outline 86 Workshop is required DAY 1 DAY 2 Length: 4 Days The History of Data Byte Synchronous Communications Communication Tuition: $795 Asynchronous Communication Modems (Modulators/ $675 (Group rate) Description and Use of: Demodulators) 8251AUSART RS-232, RS-422 8253/8254 Programmable iSBC 88/45 Communications Timer Board 8274 Multi-Protocol Serial Use of 8237 DMA Controller Controller and Use of 8259A Interrupt Lab: Asynchronous Controller Communications iSBX 351 Communications Board Lab: Bi-synchronous Communication DAY 3 Bit Synchronous Communication SDLC/HDLC Communication Description and Use of 8273 SDLC Protocol Controller Lab: SDLC Loop Using the 8273 DAY 4 'Ethernet is a trademark of Xerox Corporation, Layered Communications Ethernet Local Area Network AFN-01608C Data Comm/Ethernet 1-14 MCS®-80/85 Microprocessors 2 8080A/8080A·1/8080A·2 8·BIT N·CHANNEL MICROPROCESSOR " • TTL Drive Capability • 16·Bit Stack Pointer and Stack • 2 /AS ( - 1:1.3 /AS, - 2:1.5 /As) Instruction Manipulation Instructions for Rapid Cycle Switching of the Program Environment • Decimal, Binary, and Double Precision • Powerful Problem Solving Instruction Arithmetic Set • Ability to Provide Priority Vectored • 6 General Purpose Registers and an Interrupts Accumulator • 512 Directly Addressed 1/0 Ports ill 16·Bit program Counter for Directly Addressing up to 64K Bytes of • Available ,in EXPRESS Memory - Standard Temperature Range The Intel'" 8080A is a complete 8-bit parallel central processing unit (CPU). It is fabricated on a single LSI chip using Intel's n-channel silicon gate MOS process. This offers the user a high performance solution to control and processing applications. The 8080A contains 6 8-bit general purpose working registers and an accumulator. The 6 general purpose registers may be addressed individually or in pairs providing both single and double precision operators. Arithmetic and logical instructions set or reset 4 testable flags. A fifth flag provides decimal arithmetic operation. The 8080A has an external stack feature wherein any portion of memory may be used as a last in/first out stack to store/retrieve the contents of the accumulator, flags, program counter, and all of the 6 general purpose registers. The l6-bit stack pointer controls tt].e addressing of this external stack. This stack gives the 8080A the ability to easily handle multiple level priority interrupts by rapidly storing and restoring processor status. It also provides almost unlimited subroutine nesting. This microprocessor has been designed to simplify systems design. Separate l6-line address and 8-line bidirectional data busses are used to facilitate easy interface to memory and I/O. Signals to control the interface to memory and I/O are provided directly by the 8080A. Ultimate control of the address and data busses resides with the HOLD signal. It provides the ability to suspend processor operation and force the address and data busses into a high impedance state. T'his permits OR-tying these busses with other controlling devices for (DMA) direct memory access or multi-processor operation. NOTE: The 8080A is functionally and electrically compatible with the Intel" 8080. , 01 Do B1D1ReCTlONAL DATA BUS 40 39 38 37 3. 35 34 33 32 8080A 31 30 29 28 +12V 27 A, 2. A, 25 Ao 24 WAIT 23 19 22 ;, 21 HLDA Figure 1. Block Diagram Figure 2. Pin Configuration 2-1 8080Al8080A·1/8080A·2 Table 1. Pin Description Symbol ~pe Name and Function A'5- AO 0 Address 8us: The address bus provides the address to inemory (up to 64K 8-bit words) or denotes the I/O device number for up to 256 input and 256 output devices. Ao IS the least significant address bit. DrDo I/O Data Bua: The data "bus provides bl-dlrectlonal communication betweeen the CPU, memory, and I/O deVices for Instructions and data"transfers. Also, dUring the first clock cycle of each machine cycle, the 8080A outputs a status word on the data bus that describes the current machine cycle. Do is the least significant bit SYNC 0 Synchronizing Signal: The SYNC pin provides a Signal to indicate the beginning of each machine cycle. DBIN 0 Data Bus In: The DBIN sign'al indicates to external Circuits that the data bus is In the input mode. This signal should be used to enable the gating of data onto the 8080A data bus from memory or 110. READY I Ready: The READY signal Indicates to the 8080A that vahd'memory or input data IS available on the 8080A data bus This Signal is used to synchr0!1ize the CPU with slower memory or I/O devices, If after sending an address out the 8080Adoes not receive a READY Input, the8080AwIli enter a WAITstate for as long as the READY hne IS low READY can also be used to single step the CPU WAIT 0 Wait: The WAIT signal acknowledges that the CPU IS In a WAITstate WR 0 Write: The WR signal IS used for memory WRITE or 110 output control. The data on the data bus IS stable while the WR signal IS active low (WR = 0), HOLD I Hold: The HOLD Signal requests the CPU to enter the HOLD state The HOLD state allows an external deVice to gain control of the 8080A address'and data bus as soon as the 8080A has completed its use of these bu~ses for the current machine cycle, It IS recognized under the following conditions: • the CPU is In the HALT state • ,the CPU IS In the T2 or TW state and ihe READY signal IS active, As a result of entering the 1i0LD state the CPU ADDRESS BUS (A'5-AO) and DATA BUS (07-00) will be In their high impedance staie The CPU acknowledges ItS state with the HOLD ACKNOWLEDGE (HLDA) pin. HLqA 0 Hold Acknowledge: The HLDA Signal appears in response to the HOLD signal and indicates that the data l and address bus will go to the high Impedance state, The HLDA Signal Qegins at: • T3 for READ memory or Input. • The Clock Period following T3 for WRITE memory or OUTPUT operation, In either case, the HLDA Signal appears after the rising edge of <1>2. INTE 0 Interrupt Enable: Indicates the content of the internal Interrupt enable fhp!flop This flip!flop may be set or reset by the Enable and Disable Interrupt instructions and inhibits Interrupts from being accepted by the CPU when It IS reset It is automatically reset (disabling further Interrupts) at time T1 of the instruction fetch cycle (M1) when an Interrupt IS accepted and IS also reset by the RESET signal INT I Interrupt Request: The CPU recognizes an Interrupt request on this line at the end of the current instruction or while halted, If the CPU IS In the HOLD state or If the Interrupt Enable flip!flop IS reset It will not honor the request. RESET' I Reset: While the RESET signal IS activated, the content of the program counter IS cleared. After RESET, the program will start at 10callOn 0 In memory, The INTE and HLDA fllp!flops are also reset Note that the flags, accumulator, stack pOinter, and registers are not cleared Vss Ground: Reference Voo Po,.,er: +12 ±5% Volts Vee Power: +5 ±5% Volts VBB Power: -5 ±5% Volts <1>" <1>2 Clock Phases: 2 externally supphed clock phases (non TTL compatible) 2-2 AFN·OO735C inter 8080Al8080A·118080A·2 ABSOLUTE MAXIMUM RATINGS· ·NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Temperature Under Bias . . . . . . • . . . . . OoC to +70° C device. This is a stress rating only and functional opera- Storage Temperature . . . . . . . . . . . . . -65°C to +150oC tion of the device at these or any other conditions above All Input or Output Voltages those indicated in the operational sections of this With Respect to VBB . . . . . . . . . . . -0.3V to +20V specification is not implied. Exposure to absolute maxi- Vcc. VDD and Vss With Respect to VBB -0.3V to +2OV mum rating conditions for extanded periods may affect Power Dissipation . . . . . . . . . . . . . . . ....... 1.5W device reliability. D.C. CHARACTERISTICS (TA = OOC to 700C. VDO = +12V ±5%, Vee = +5V ±5%, Vee = -5V ±5%. vss =OV; unless otherwise noted) Symbol Parameter Min. Typ. Max. Unit Test Condition VILC Clock Inpl,lt Low Voltage Vss-1 Vss+Q8 V VIHC Clock Input High Voltage 9.0 VDD+1 V Vil Input Low Voltage Vss-1 Vss+0.8 V VIH Input High Voltage 3.3 Vcc+ 1 V VOL Output Low Voltage 0.45 V } IOl = 1.9mA on all outputs. VOH Output High Voltage 3.7 V IoH =-150~. IDD(AV) Avg. Power Supply Current (VDD) 40 70 mA Avg. Power Supply Current (VCe! 60 80 mA } 00-"';00 IcC (AV) T Cy = .48 /Lsec IsS (AV) Avg. Power Supply Current (Vss) .01 1 mA III I nput Leakage ±10 /LA Vss .;;;; VIN .;;;; Vcc ICl Clock Leakage ±10 /LA Vss .;;;; VClOCK .;;;; VDD I Dl [2) Data Bus Leakage in I nput Mode -100 /LA VSS';;;;VIN ';;;;Vss+0.8V -2.0 mA Vss +0.8V';;;;VIN ';;;;Vcc Address and Data Bus Leakage +10 VADDR/DATA = Vcc IFl /LA During HOLD -100 VADDR/DATA = Vss + 0.45V 1. CAPACITANCE (TA = 25°C. Vee = VOD =Vss = ov, Vee = -5V) Symbol Parameter Typ. Max. Unit Test Condition or-- ---- r--- 1 C'" Clock Capacitance 17 25 pf fc = 1 MHz CIN I nput Capacitance 6 10 pf Unmeasured Pins COUT Output Capacitance 10 20 pf Returned to Vss D. +25 +75 0 +50 NOTES: AMBIENT TEMPERATURE (Oel 1. The RESET sognal must be active for a minimum of 3 clock cycles. 2. Al su ppy I /AT A = -O.45%fC. Typical Supply Current v•. Temperature, Normallzed[31 2-3. AFN·OO735C 8080Al8080A·1/8080A·2 A.C. CHARACTERISTICS (8080A) (TA = O"C to 70·C, Voo = +12V ±5%, vee = +5V ±5%, Vee =-5V ±5%, Vss =OV; unless otherwise noted) ·1 ' ., ." ·2 Symbol Parameter Min. Max. Min. Max. Min. Max. Unit Te.t Condition tCy[3] Clock Period 0.48 2.0 0.32 2.0 0.38 2.0 /J'sec Ir, If Clock Rise and Fall Time 0 50 0 25 0 50 nsec 101 01 Pulse Widlh 60 50 60 nsec 102 02 Pulse Wldlh 220 145 175 nsec 101 Delay 01 10 02 0 0 0 nsec 102 Delay 02 to 01 70 60 70 nsec tD3 Delay 01 to 02 Leading Edges 60 60 70 nsec tDA Address Oulput Delay From 02 200 150 175 nsec } CL=I00 pF too Data Output Delay From 02 220 180 200 nsec tDC Signal Output Delay From 02 or 02 (SYNC, WR, WAIT, HLDA) 120 110 120 nsec } CL=50pF tDF DBIN Delay From 02 25 140 25 130 25 140 nsec tDl[I] Delay for Input Bus to Ent,er Inpul Mode tDF IDF IDF nsec IDSI Dala Set~p Time During 01 and DBIN 30 10 20 nsec tDS2 Data Setup Time to 02 During DBIN 150 120 130 nsec IDH[I] Dala Holt time From 02 During DBIN [I] [I] [I] nsec liE INTE Oulpul Delay From 02 200 200 200 nsec CL=50 pF IRS READY Selup Time During 02 120 90 90 nsec IHS HOLD Selup Time 10 02 140 120 120 nsec liS INT Selup Time During 02 120 100 100 nsec IH Hold Time From 02 (READY, INT, HOLD) 0 0 0 nsec IFD Delay 10 Floal During Hold (Address and Dala Bus) 120 120 120 nsee lAW Address Siable, Prior to WR [5] [5] [5] nsec - tow Output Data Stable Prior to WR [6] [6] [6] nsec two Outpul Data Stable From WR '[7] [7] [7] nsec CL = 100 pF~dress, Data tWA Address Stable From WR [7] [7] [7] nsee CL = 50 pF: WR,HLDA,DBIN 'tHF HLDA to Float Delay [8] [8] [8] nsec tWF WR to Floal Delay [9] [9] [9] nsec tAH Address Hold Time After DBIN During HLDA -20 -20 -20 nsec 1- A.C. TESTING LOAD CIRCUIT DEVICE ~CL~100PF UNDER TEST CL 100 pF C L INCLUDES JIG CAPACITANCE 2-4 AF~·OO735C 8080A/8080A·1/8080A·2 WAVEFORMS ¢, -----JI '2 - - - - - - j - - " i l A'5 AO --------.....,'--~ SYNC -----------'1-'1 DB IN ------------~~I =uk i 1 READY ~o+-t=-+i_--I+-/ -_'"'-.: . '~,H_ '_-I.:....1---+, ~-=r~I-i I II _~'H-_'~-' WAIT- _ - _ - - _ - _ - _ - - _ - _ - - _ -_ _ _ _ _ _ _ 1- j '00- HOLD HLDA ----------------------------------- --" _(gi' --. tHS - - ii -------------------------~I' INT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ~I t H _ ] ..... INTE NOTE: Timing measurements are made at the following reference voltages: CLOCK "1" = 8.0V, "0" = 1.0V; INPUTS "1" = 3.3V, "0" = 0.8V; OUTPUTS "1" = 2.0V, "0" = 0.81l 2·5 AFN·00735C 8080AJ8080A·1/8080A·2 WAVEFORMS (Continued) NOTES: (ParenthesiS gives -1, -2 specifications, respectively) 1. Data input should be enabled with DB IN status. No bus con- flict can then occur-and data hold time is assured. tOH = 50 ns or tOF, whichever is lass. 2. tCY = t03 + tr4>2 +'4>2 + tf4>2 + t02 + tr4>l ;;. 480 ns ( - 1:320 ns, - 2:3BO ns). TYPICAL A OUTPUT DELAY VS. A CAPACITANCE +20 > c +10 / ~ 0 ... V I-t-t-r--1 --r--I 'WD --I -- --- .- ~~ 1:" " ·10 0 / ""- SPEC SYNC , ! , --I .. tA,H CSPEC, subtract .3nslpF ' (from modified delay) if CL < CSPEC' 4. tAW = 2 tCY- t03 - tr2 - 140 ns ( - 1:110 ns, - 2:130 ns). 5. tow = tCY - too - tr2 - 170 ns (- 1:150 ns, - 2:170 ns). INT 6. if not HLDA, two = tWA = t03 + tr4>2 + 10 ns. If HLDA, two = tWA = tWF· '-:If'-~------- 7. tHF = t03 + tr4>2 -50 ns). INTE B. tWF = t03 + tr4>2 - 10ns. 9. Data in must be stable for this period during DBIN T3. Both tOS1 and tOS2 must be satisfied. 10. Ready signal must be stable for this period during T2 or Tw. (Must be externally synchronized.) 11. Hold signal must be stable for this period during T2 or T W when entering hold mode, and during T3, T.j, Ts and TWH when in hold mode. (External synchronization is not re- quired.) 12. Interrupt signal must be stable during this period of the last clock cycle of any instruction in order to be recognized on the following instruction. (External synchronization is not re- quired.) 13. This timing diagram shows timing relationships only; it does not represent any spll!lifiC machine cycle. 2-6 AFN·oo735C 8080Al8080A·1/8080A·2 INSTRUCTIO'N SET The accumulator group instructions include arithmetic and increment and decrement memory, the six general registers logical operators with direct, indirect, and immediate ad- and the accumulator is provided as well as extended incre- d[essing modes. ment and decremllnt instructions to operate on the register Move, load, and store instruction groups provide the ability pairs and stack pointer. Further capability is provided by to move either 8 or '6 bits of data between memory, the the ability to rotate the accumulator l!lft or right through six working registers and the accumulator using direct, in- or around the carry bit. direct, and immediate addressing modes. Input and output may be accomplished using memory ad- The ability to branch to different portions of the program dresses as I/O ports or the directly addressed 1/0 provided is provided with jump, jump conditional, and computed for in the 8080A instruction set. jumps. Also the ability to call to and return from sub- The following special instruction group completes the 8080A routines is provided both conditionally and unconditionally. instruction, set: the NOP instruction, HALT to stop pro- The RESTART (or single byte call instruction) is useful for cessor execution and the DAA instructions provide decimal interrupt vector operation. arithmetic capability. STC allows the carry flag to be di- Double precision operators such as stack manipulation and rectly set, and the CMC instruction allows it to be comple- double add instructions extend both the arithmetic and mented. CMA complements the contents of the accumulator interrupt handling capability of the 8080A. The ability to and XCHG exchanges the contents of two 16-bit register pairs directly. Data and Instruction Formats Data in the 8080A is stored in the form of 8-bit binary integers. All data transfers to the system data bus will be in the same format. ID7 D6 D5 D4 D3 D2 D1 Dol DATA WORD The program instructions may be one, two, or three bytes in length. Multiple bYte instructions must be stored in successive words in program memory. The instruction formats then depend on the particular operation executed. One Byte Instructions TYPICAL INSTRUCTIONS I D7 D6 D5 D4 D3 D2 D1 Do OP CODE 1 Register to register, memory refer- ence, arithmetic or logical, rotate, return, push, pop, enable or disable Interrupt instructions Two Byte Instructions ID7 D6 D5 D4 D3 D2 D1 Do I OP CODE ID7 D6 D5 D4 D3 D2 D1 Do I OPERAND Immediate mode or 1/0 instructions Three Byte Instructions ID7 D6 D5 D4 D3 D2 D1 DO I OP CODE Jump, call or direct load and store I D7 D6 D5 D4 D3 D2 D1 Do I LOW ADDRESSOR OPERAND' instructions ID7 D6 D5 D4 D3 D2 D1 Do I HIGH ADDRESS OR OPERAND 2 For the 8080A a logic "'" is defined as a high level and a logic "0" is defined as a I'ow level. 2-7 AFN·OO735C 8080Al~80A.1/8080A·2 Table 2. Instruction' Set Summary Clock Clock Instruction Code (1) Operations Cycle. Ins-.on Code (1) Operation. Crctea M _ t c 0-, Os D5 D4 D:l II:! D1 Do DHcrIptIon (2) MnemoniC 0-, Os Ds D4 D:l II:! Dl Do Description (2) MOVE, LOAD, AND STORE JPO 1 1 1 0 0 0 1 0 Jump on parity odd 10 MOVr1,r2 0 1 0 o 0 S S S Move register to register 5 PCHL 1 1 1 0 1 0 0 1 H & L to prcgrem 5 MOVM,r 0 1 1 1 0 S S S Move register to counter memory 7 CALL MOVr,M 0 1 0 D 0 1 1 0 Move memory to regis- CALL 1 1 0 0 1 1 0 1 Call unconditional 17 ter 7 CC 1 1 0 1 1 1 0 0 Ca" on carry 11/17 MVlr 0 0 D 0 0 1 1 0 Move immediate regis- CNC 1 1 0 1 0 1 0 0 Call on no carry 11/17 ter 7 CZ 1 1 0 0 1 1 0 0 Call onzerc 11/17 MVIM 0 0 1 1 0 1 1 0 Move Immediate CNZ 1 1 0 0 0 1 0 0 Ca" on no zero 11/17 memory 10 CP 1 1 1 1 0 1 0 0 Ca" on positive 11/17 LXIB 0 0 0 0 0 0 0 1 Load Immediate regIster 10 CM 1 1 1 1 1 1 0 0 Call on minus 11/17 PalrB&C CPE 1 1 1 0 1 1 0 O. Call on parity even 11/17 LXID 0 1 0 0 1 Load Immediate regIster 10 CPO 1 1 1 0 0 1 0 0 Ca" on parity odd 11/17 , 0 0 0 PairD&E RETURN LXIH 0 0 1 0 0 0 0 1 Load immediate register 1~ RET 1 1 0 0 1 0 0 1 Return 10 PairH&L RC 1 1 0 1 1 0 0 0 Return on carry 5111 STAXB 0 0 0 0 0 0 1 0 Store A Indirect 7 RNC 1 1 0 1 0 0 0 0 Return on no carry 5111 STAXD 0 0 0 1 0 0 1 0 Store A indirect 7· RZ 1 1 0 0 1 0 0 0 Return on zerc 5111 LDAXB 0 0 0 0 1 0 1 0 Load A Indirect 7 RNZ 1 1 0 0 0 0 0 0 Return on no zerc 5111 LoAXD 0 0 0 1 1 0 1 0 Load A indIrect 7 RP 1 1 1 1 0 0 0 0 Return on positlve 5111 STA 0 0 1 1 0 0 1 0 Store A direct 13 RM 1 1 1 1 1 0 0 0 Return on minus 5111 LDA 0 0 1 1 1 0 1 0 Load A direct 13 RPE 1 1 1 0 1 0 0 0 Return on parity even 5111 SHLo 0 0 1 0 0 0 1 0 Store H & L direct 16 RPO 1 1 1 0 0 0 0 0 Return on panty odd 5111 LHLo 0 0 1 0 1 0 1 0 Load H & L direct 16 RESTART XCHG 1 1 1 0 1 0 1 1 Exchange D & E, H & L 4 RST 1 1 A A A 1 1 1 Restart 11 Registers INCREMENT AND DECREMENT STACKOPS INRr 0 0 0 D D 1 0 0 Increment register 5 PUSHB 1 1 0 0 0 1 0 1 Push register Pair B & 11 DCRr 0 0 0 D D 1 0 1 Decrement register 5 Constack INRM 0 0 1 1 0 1 0 0 Increment memory 10 PUSHD 1 1 0 1 0 1 0 1 Push register Pair D & 11 DCRM 0 0 1 1 0 1 0 1 Decrement memory 10 E on stack INXB 0 0 0 0 0 0 1 1 Increment B & C 5 PUSHH 1 1 1 0 0 1 0 1 Push register Pair H & 11 registers Lonstack INXo 0 0 0 1 0 0 1 1 Increment D & E 5 PUSH 1 1 1 1 0 1 0 1 Push A and Flags 11 registers PSW on stack INXH 0 0 1 0 0 0 1 1 Increment H & L 5 POPB 1 1 0 0 0 0 0 1 Pop register Pair B & 10 registers C off stack DCXB 0 0 0 0 1 0 1 1 Decrement B & C 5 POPD 1 1 0 1 0 0 0 1 Pop register Pair 0 & 10 DCXo 0 0 0 1 1 0 1 1 Decrement 0 & E 5 Eoffstack DCXH 0 0 1 0 1 0 1 1 Decrement H & L 5 POPH 1 1 1 0 0 0 0 1 Pop regIster Pair H & 10 ADD Loffstack ADor 1 0 0 0 0 S S S Add register to A 4 Pop A and Flags 10 ADer 1 0 0 0 1 S S S Add register to A 4 POPPSW 1 1 1 1 0 0 ~ 1 off slack with carry XTHL 1 1 1 0 0 0 1 1 Exchange top of 18 ADoM 1 0 0 0 0 1 1 0 Add memory to A 7 steck, H & L ADeM 1 0 0 0 1 1 1 0 Add memory to A 7 SPHL 1 1 1 1 j 0 0 1 H & L to stack pointer 5 with carry LXISP 0 0 1 1 0 0 0 1 Load immediate stack 10 ADI 1 1 0 0 0 1 1 0 Add immediate to A 7 pointer ACI 1 1 0 0 1 1 1 0 Add immedlala to A 7 INXSP 0 0 1 1 0 0 1 1 Increment stack pointer 5 with carry DCXSP 0 0 1 1 1 0 1 1 Decrement slack 5 DADS 0 0 0 0 1 0 0 1 AddB&CtoH&L 10 pOlnlar DADO 0 0 0 1 1 0 0 1 Addo&EtoH&L 10 JUMP oADH 0 0 1 0 1 0 0 1 AddH&LtoH&L 10 JMP 1 1 0 0 0 0 1 1 Jump unconditional 10 oADSP 0 0 1 1 1 0 0 1 Add stack pointer to 10 JC 1 1 0 1 1 0 1 0 Jump on carry 10 H&L JNC 1 1 0 1 0 0 1 0 Jump on no carry 10 JZ 1 1 0 0 1 0 1 0 Jump on zerc 10 JNZ 1 1 0 0 0 0 1 0 Jump on no zerp 10 JP 1 1 1 1 0 0 1 0 Jump on positive 10 JM 1 1 1 1 1 0 1 0 Jump on minus 10 JPE 1 1 1 0 1 0 1 0 Jump on parity even 10 2-8 AFN·00735C inter 8080Al8080A·1/8080A·2 Summary of ProceslOr Instructions (ContI Clock Clock Instruction Code [1] Operations Cycle. Instruction Code 111 Operations Cycles Mnemonic D-, De Ds D4 D:! ~ D, Do Description [2] Mnemonic D-, De DS D4 D:! D2 D, D( DelCrlptlon 121 SUBTRACT ROTATE SUBr 1 0 0 1 0 S S S Subtract register 4 RLe 0 0 0 0 0 1 1 1 Rotate A left 4 from A RRC 0 0 0 0 1 1 1 1 Rotate A right 4 SBBr 1 0 0 1 1 S S S Subtract regIster from 4 RAL 0 0 0 1 0 1 1 1 Rotate A left through 4 AWlth borrow carry SUBM 1 0 0 1 0 1 1 0 Subtract memory 7 RAR 0 0 0 1 1 1 1 1 Rotate A right through 4 from A carry SBBM 1 0 0 1 1 1 1 0 Subtract memory from 7 SPECIALS A with borrow CMA 0 0 1 _0 1 1 1 1 Complement A 4 SUI 1 1 0 1 0 1 1 0 Subtract immediate 7 STC 0 0 1 1 0 1 1 1 Set carry 4 from A CMC 0 0 1 1 1 1 1 1 Complement carry 4 SBI 1 1 0 1 1 1 1 0 Subtract ImmedIate 7 OM 0 0 1 0 0 1 1 1 Decimal ad ust A 4 from A with borrow INPUT/OUTPUT LDGICAL IN 1 1 0 1 1 0 1 1 Input 10 ANAr 1 0 1 0 0 S S S And regIster with A 4 OUT 1 1 0 1 0 0 1 1 Output 10 XRAr 1 0 1 0 1 S S S Exclusive Or register 4 CONTROL with A EI 1 1 1 1 1 0 1 1 Enable Interrupts 4 ORAr 1 0 1 1 0 S S S Or register with A 4 01 1 1 1 1 0 0 1 1 DIsable Interrupt 4 CMPr 1 0 1 1 1 S S S Compare register wIth A 4 NOP 0 0 0 0 0 0 0 0 No-operatIon 4 ANAM 1 0 1 0 0 1 1 0 And memory with A 7 HLT 0 1 1 1 0 1 1 0 Halt 7 XRAM 1 0 1 0 1 1 1 0 Exclusive Or memory 7 wIth A ORAM 1 0 1 1 0 1 1 0 Or memory with A 7 CMPM 1 0 1 1 1 1 1 0 Compare memory with A 7 ANI 1 1 1 0 0 1 1 0 And immedIate wIth A 7 XRI 1 1 1 0 1 1 1 0 ExclUSIve Or Immediate 7 with A ORI 1 1 1 1 0 1· 1 0 Or Immediate with A 7 CPI 1 1 1 1 1 1 1 0 Compare Immediate 7 with A NOTES: 1. DOD or SSS B=ooo, C=OOl, 0=010, E=011, H=100, L=101, Memory=110, A=111. 2. liNo possible cycle tImes (61121 Indicate InstructIon cycles dependent on conditIon flags. 'All mnemonics copyright Clntel Corporation 1977 2-9 AFN·0073SC inter 8085AHl8085AH-218085AH-1 8-BIT HMOS MICROPROCESSORS • Single +5V Power Supply with 10% • On-Chip System Controller; Advanced Voltage Margins Cycle Status Information Available for • 3 MHz, 5 MHz and 6 MHz Selections Large System Control Available • Four Vectored Interrupt Inputs (One is Non-Maskable) Plus an • 200"" Lower Power Consumption than 8080A-Compatlble Interrupt 8085A for 3 MHz and 5 MHz • Serial In/Serial Out Port • 1.3 p,s Instruction Cycle (8085AH); 0.'8 • Decimal, Binary and Double Precision p,s (8085AH-2); 0.67 p,s (8085AH-1) Arithmetic • 1000/0 Compatible with 8085A • Direct Addressing Capabjlity to 64K Bytes of Memory • 1000/0 Software Compatible witI'! 8080A • Available in EXPRESS • On-Chip Clock Generator (with - Standard Temperature Range External Crystal, LC or RC Network) - Extended Temperature Range The Intel® 8085AH is a complete 8 bit parallel Central Processing Unit (CPU) implemented in N-channel, depletion load, silicon gate technology (HMOS). Its instruction set is 100% software compatible with the 8080A microprocessor, and it is designed to improve the present 8080A's performance by higher system speed. Its high level of system integration allows a minimum system of three IC's [8085AH (CPU), 8156H (RAM/IO) and 8355/8755A (ROM/PROM/IO)] while maintaining total system expandability. The 8085AH-2 and 8085AH-1 are faster versions of the 8085AH. The 8085AH incorporates all of the features that the 8224 (clock generator) and 8228 (system controller) provided for the 8080A, thereby offering a high level of system integration. The 8085AH uses a multiplexed data bus. The address is split between the 8 bit address bus and the 8 bit data bus, The on-chip address latches of 8155H/8156H/8355/8755A memory products allow a direct interface with the 8085AH. iNTA RST65 TRAP X, Vee x, HOLD RESET OUT HlDA elK {OUT) AESETiN READY RST 7 5 101M *:: *:: RST 65 S, iffi INTR WR REG REG JREGISTEFI ARRAY INTA ADO ALE So STACf(POINTER (111 AD, A15 PROGRAM COUNTER INCFlEMENTERfDECREMENTER ". A02 AD3 A14 A13 ADDRESS LATCH 1111 AD4 A12 ADS An ADa AlO AD7 Ag Vss -...;;.'O_....;;..r A8 x, x, READY A'6-Ae A07-ADo AODRESSBUS AODRESSIDATA BUS Figure 2. 8085AH Pin Figure 1. 8085AH CPU Functional Block Diagram Configuration Intel Corporation Assumes No Responslbllty for the Uae of Any Circuitry Other Than Circuitry Embodied In an Intel Product No Other CirCUit Patent Licenses are Implied "INTEL CORPORATION. 1981 2-1,0 inter 8085AH/8085AH-218085AH-1 1~=:;-_T.:""_r-_-::-_ _-:-:::-_-:-_T.::..a:::.:b:::.:l:.::.e_1:..:....,Pln Description Symbol Type Name and Function Symbol lYpe Name and Function o Address Bus: The most significant READY I Ready: If READY IS high during a 8 bits of the memory address or the read or write cycle, It Indicates that 8 bits of the 1/0 address, 3-stated the memory or peripheral is ready to dUring Hold and Halt modes and send or receive data If READY is during RESET low, the cpu will walt an Integral 110 Multiplexed AddresslData Bus: number of clock cycles for READY ADO_7 Lower 8 bits of the memory address to go high before completing the (or 110 address) appear on the bus read or write cycle READY must during the first clock cycle (Tstate) conform to specified setup and hold of a machine cycle. It then becomes times the data bus during the second and HOLD I Hold: Indicates that another master third clock cycles. IS requesting the use of the address ALE o Addres. Latch Enable: It occurs and data buses. The cpu, upon during the first clock state of a ma- receiving the hold request, will chine cycle and enables the address relinquish the use of the bus as to get latched Into the on-chip latch soon as the completion of the cur- of peripherals. The falhng edge oj rent bus transfer Internal process- ALE is set to guarantee setup and Ing can continue The processor hold times for the address informa- can regain the bus only after the tion. The failing edge of ALE can HOLD IS removed When the HOLD also be used to strobe the status IS, acknowledged, the Address, information. ALE IS never 3-stated Data RD, WR, and 101M lines are 3-stated So, S1, and 10/iiil 0 Machine Cycle Status: HLDA 0 Hold AcknOwledge: Indicates that 101M S1 So Status the cpu has received the HOLD re- o 0 1 Memory write quest and that It Will rtliinquish the o 1 0 Memory read bus In the next clock cycle HLDA 1 0 1 I/O write goes low after the Hold request IS 1 1 0 1/0 read removed. The cpu takes the bus one o 1 1 Opcode fetch half clock cycle after HLDA goes 1 1 1 Opcode fetch low 1 1 1 Interrupt Acknowledge INTR I Interrupt Request: Is used as a • 0 0 Halt general purpose Interrupt. It IS • X X Hold sampled only dUring the next to the • X X Reset last clock cycle of an instruction • ~ 3-state (high impedance) and dUring Hold and Halt states. If It X ~ unspecified IS active, the Program Counter (PC) Will be inhibited from incrementing S1 can be used as an advanced R1W and an INTA Will be Issued.' DUring status 101M, SO and S1 become thiS cycle a RESTART or CALL in- valid at the beginning of a machine struction can be inserted to Jump to cycle and remain stable throughout the interrupt service routine The the cycle. The failing edge of ALE INTR is enabled and disabled by may be used to latch the state of software. It IS disabled by Reset and these hnes. Immediately after an Interrupt IS ac- cepted RD o Read Control: A low level on RD indicates the selected memory or INTA 0, Interrupt Acknowledge: Is used In- stea~of (and has the same timing 1/0 deVice IS to be read and that the Data Bus IS available for the data as) RD dUring the Instruction cycle transfer, 3-stated during Hold and after an INTR IS accepted. It can be Halt modes and dUring RESET. used to activate an 8259A Interrupt chip or some other Interrupt port. WR o Write Control: A low level on WR RST 55 I Restart Interrupts: These three In- indicates the data on the Data Bus IS to be written Into the selected' RST 65 puts have the same timing as INTR memory or 1/0 location Data IS set RST 7.5 except they cause an Internal up at the trailing edge of WR. 3- RESTART to be automatically stated dUring Hold and Halt modes inserted. and during RESET The Priority of these Interrupts IS ordered as shown In Table 2. These Interrupts have a higher priority than INTR. In addition, they may be individually masked out uSing the SIM Instruction 2-11 AFN·01835C 8085AH/8085AH-2/8085AH-1 Table 1. Pin Description (Continued) r-----~----,---------~------~ Symbol Type Name and Function SYl1lbol Type Name and Function TRAP I Trap: Trap Interrupt is a non- RESET OUT 0 Reset Out: Reset Out indicates cpu maskable RESTART interrupt. It is IS being reset. Can be used recognized at the same time as as a system reset. The signal is INTR or RST 5.5-7.5. It is unaffected synchronized to the processor by any mask or Interrupt Enable. It clock and lasts an Integral number has the highest priority of any inter- of clock periods rupt. (See Table 2 ) X1, X2 I X1 and X 2: Are connected to a RES~T IN ReBet In: Sets the Program crystal, le, or RC network to drive Counterto zero and resets the Inter- the internal clock generator. X1 can rupt Enable and HlDA flip-flops. also be an external clock input from The data and address buses and the a logic gate. The input frequency IS control lines are 3-stated during divided by 2 to give the processor's RESET and because of the asyn- Internal operating frequency. chronous nature of RESET, the pro- ClK Clock: Clock output for use as a sys- 0 cessor's internal registers and flags tem clock. The period of 'ClK is may be altered by RESET with un- twice the X1, X2 input period. predictable results. RESET IN is a Schmitt-triggered input, allowing SID I Serial Input Data line: The data on connection to an R-C network for thiS line is loaded into accumulator power-on RESET delay (see Figure bit 7 whenever a RIM Instruction IS 3). Upon power-up, RESET IN must executed remain low for at least 10 ms after SOD 0 Serial Output Data line: The out- minimum Vee has been reached. put SOD IS set or reset as specified For proper reset operation after the by tne SIM Instruction power-up duration, RESET IN should be kept Iowa minimum of Vee Power: +5 volt supply. th ree clock periods. The CPU is held Vss Ground: Reference. in the reset condition as long as RESET IN is applied. Table 2. Interrupt Priority, Restart Address, and Sensitivity Address Branched To (1) Name Priority When Interrupt Occurs Type Trigger TRAP 1 24H Rising edge AND high level until sampled. RST 7.5 2 3CH Rising edge (latched). RST 6 5 3 34H High level until sampled. RST 5.5 4 2CH High level until sampled. INTR 5 See Note (2). High level until sampled. NOTES: ·1. The processor pushes the PC on the stack before branching to the indicated address. 2. The address branched to depends on the instruction provided to the cpu when the Interrupt is acknowledged. L~ f c, TYPICAL POWER'()N , RESET RC VAWES' I~ Vee 0 'VAWES MAY HAVE TO VARY DUE TO APpLIED POWER SUPPLY RAMP UPTIME Figure 3. Power-On Reset Circuit 2-12 AFN-01835C intJ 8085AH/8085AH-218085AH-1 FUNCTIONAL DESCRIPTION The three maskable interrupts cause the internal execution of RESTART (saving the program counter The 8085AH is a complete 8-bit parallel central pro~ in the stack and branching to the RESTART address) cessor. It is designed with N-channel, depletion if the interrupts are enabled and if the interrupt mask load, silicon gate technology' (HMOS), and requires is not set. The nonmaskable TRAP causes the inter- a single +5 volt supply. Its basic clock speed is nal execution of a RESTART vector independent 3 MHz (8085AH), 5 MHz (8085AH-2), or 6 MHz of the state of the interrupt enable or masks. (See (8085AH-1), thus il'!'1proving on the present 8080A's Table 2.) performance With higher system speed. Also it is designed to fit into a minimum system of three IC's: There are two different types of inputs in the restart The CPU (8085AH), a RAM/IO (8156H), and a ROM or interrupts. RST 5.5 and RST 6.5 are high leve/- EPROM/IO chip (8355 or 8755A). sensitive like INTR (and INT on the 8080) and are recognized with the same timing as INTR. RST 7.5 is The 8085AH has twelve addressable 8-bit registers. rising edge-sensitive. Four of them can function only as two 16-bit register pairs. Six others can be used interchangeably as For RST 7.5, only a pulse is required to set an inter- 8-bit registers or as 16-bit register pairs. The 8085AH nal flip-flop which generates th~ internal interrupt register set is as follows: request (a normally high level Signal with a low Mnemonic Register Contents going pulse is recommended for highest system ACCorA Accumulator 8 bits noise immunity). The AST 7.5 request flip-flop remains set until the request is serviced. Then PC Program Counter 16-bit address it is reset automatically. This flip-flop may also be BC,DE,HL General-Purpose 8 bits x 6 or reset by using the SIM instruction or by issuing a Registers; data 16bitsx3 pOinter (HL) RESET IN to the 8085AH. The RST 7.5 internal flip- flop will be set by a pulse on the RST 7.5 pin even SP Stack Pointer 16-bit address when the RST 7.5 interrupt is masked out. Flags or F Flag Register 5 flags (8-bit space) The 8085AH uses a multiplexed Data Bus. The The status of the three RST interrupt masks can only address is split between the higher 8-bit Address be affected by,the SIM instruction and RESET IN. Bus and the lower 8-bit Address/Data Bus. During (See SIM, Chapter 5 of the MCS-80/85 User's the first t state (clock cycle) of a machine cycle the Manual.) . low order address is sent out on the Address/Data bus. These lower 8 bits may be latched externally by The interrupts are arranged in a fixed priority that the Address Latch Enable Signal (ALE). During the determines which interrupt is to be recognized if rest of the machine cycle the data bus is used for more than one is pending as follows: TRAP- memory or I/O data. highest priority, RST 7.5, RST 6.5, RST 5.5, INTR- lowest priority. This priority scheme does not take The 8085AH provides RIT, WR, So, S1, and 101M into account the priority of a routine that was started signals for bus control. An Interrupt Acknowledge by a higher priority interrupt. RST 5.5 can interrupt signal (INTA) is also provided. HOLD and all Inter- an RST 7.5 routine if the interrupts are re-enabled rupts are synchronized with the processor's internal before the end of the RST 7.5 routine. clock. The 8085AH also provides Serial Input Data (SID) and Serial Output Data (SOD) lines for simple The TRAP interrupt is useful for catastrophic events serial interface. such as power failure or bus error. The TRAP input is recognized just as any other interrupt bl,Jt has the In addition to these features, the 8085AH has three highest priority. It is not affected by any flag or mask. maskable, vector interrupt pins, one nonmaskable The TRAP input is both edge and level sensitive. The TRAP interrupt, and a bus vectored interrupt, INTR. TRAP input must go high and remain high until it is INTERRUPT AND SERIAL I/O acknowledged. It will not be recognized again until it goes low, then high again. This avoids any false The ,8085AH has 5 interrupt inputs: INTR, RST 5.5, triggering due to noise or logic glitches. Figure 4 RST 6.5, RST 7.5, and TRAP. INTR is identical in illustrates the TRAP interrupt request circuitry function to the 8080A INT. Each of the three RE- within the 8085AH. Note that the servicing of any START inputs, 5.5, 6.5, and 7.5, has a programmable interrupt (TRAP, RST 7.5, RST 6.5, RST 5.5, INTR) mask. TRAP is also a RESTART interrupt but it is disables all future interrupts (exceptTRAPs) until an nonmaskable. EI instruction is executed._ 2-13 AFN·01B35C 8085AH/8085AH,.218085AH-1 - Parallel resonance at twice the clock frequency INSIDE THE desired EXTERNAL TRAP CL (load capacitance) '" 30 pF INTERRUPT REQUEST T RAP I Cs (shunt capacitanc~) '" 7 pF Rs (equivaleflt shunt resistance) '" 75 Ohms Drive level: 10 mW SCHMITT Frequency tolerance: ± .005% (suggested) TRIGGER Note the use of the 20 pF capacitor between X2 and +5V ground. This capacitor is required with crystal fre- quencies below 4 MHz to assure oscillator startup at o FIF the correct frequency. A parallel-resonant LC circuit may be used as the frequency-determining network for the SOS5AH, providing that its frequency INTERNAL TRAP F F tolerance of approximately ± 10% is acceptable. The TRAP ACKNOWLEDGE components are chosen from the formula: Figure 4. TRAP and RESET IN Circuit f = ----'----- The TRAP interrupt is special ir.l.that it disables inter- rupts, but preserves the previous interrupt enable To minimize variations in frequency, it is recom- status. Performing the first RIM instruction follow- mended that you choose a value for Cext that is at ing a TRAP interrupt allows yo'u to determine least twice that of Cint, or 30 pF. The use of an LC whether interrupts were enabled or disabled prior to circuit is not recommended for frequencies higher the TRAP. All subsequent RIM instructions provide than approximately 5 MHz. current interrupt enable status. Performing a RIM instruction following INTR, or RST 5.5-7.5 will An RC circuit may be used as the frequency- provide current Interrupt Enable status, revealing determining network forthe SOS5AH if maintaining a that Interrupts are disabled. See the d~scription of precise clock frequency is of no importance. Var- the RIM instruction in the MCS-SO/S5 Family User's iations in the on-chip timing generation can cause a Manual. wide variation in frequency when using the RC mode. Its advantage is its low component cost. The The serial I/O system is also controlled by the RIM driving frequency generated by the circuit shown is and SIM instructions. SID is read by RIM, and SIM approximately 3 MHz. It is not recommended that sets the SOD data. frequencies greatly higher or lower than this be attempted. ' Figure 5 shows the recommended clock driver cir- DRIVING THE X 1 AND X2 INPUTS cuits. Note in 0 and E that pullup resistors are re- quired to assure that the high level voltage of the You may drive the clock inputs of th~ aOS5AH, input is at least 4V and maximum low level voltage S085AH-2, or SOS5AH-1 with a crystal, an LC tuned of O.SV. circuit, an RC network, or an external clock source. The crystal frequency must be at least 1·MHz, and ,For driving frequencies up to and including 6 MHz must be twice the desired internal clock freque.ncy; you may supply the driving signal to X1 and leave X2 hence, the SOS5AH is operated with a 6 MHz crystal open-circuited (Figure 50). If the driving frequency (for 3 MHz clock), the S085AH-2 operated with a 10 is from 6 MHz to 12 MHz, stability of the clock MHz crystal (for 5 MHz clock), and the SOS5AH-1 can generator will bf;l improved by driving both X1 and X2 be operated with a 12 MHz crystal (for 6 MHz clock). with a push-pull source (Figure 5E). To prevent If a crystal is used, iL must have the following self-osdllation of the SOS5AH, be sure that X2 is not characteristics: coupled back to X1 through the driving circuit. 2-14 AFN·01835C BOB5AH/BOB5AH-21BOB5AH-1 X, ---, I 8085AH +5V LOW TIME> 60 ns I 4700 I C'NT TO .,... ...L ~ 15pF 1KO I / X, 2 X : '---'---+----1 2 _ _ _ _.1. '20 pF CAPACITORS REQUIRED FDR CRYSTAL FREQUENCY ~ 4 MHz ONLY a. Quartz Crystal Clock Driver X2 8085AH X, 'X2 lEFT FLOATING ---j I d. 1-6 MHz Input Frequency External Clock I C'NT Driver Circuit -L ~15pF T I X2_ _ _ ....J .5Y LOW TIME> 40 ns b. LC Tuned Circuit Clock Driver 1<>-+-47_°_°...:.1_--1 X, 8065AH X, 47O{l 1 20 6K pF L-__ _ -l X2 e. 1-12 MHz Input Frequency External Clock c. RC Circuit Clock Driver Driver Circuit Figure 5. Clock Driver Circuits GENERATING AN BOB5AH WAIT STATE cI~- -~065AH ~-~-- --=;l ALE' - _ elK CLKOUTPUT* - - elK I TO 8085AH If your system requirements are such that slow "D" I READY memories or peripheral devices are being used, the F/F 0 0: INPUT +5V -----. 0 1---.---- circuit shown in Figure 6 may be used to insert one WAIT state in each 8085AH machine cycle. 'AlE AND ClK (OUT) SHOULD BE BUFFERED IF ClK INPUT OF LATCH EXCEEDS 8065AH IOl OR IOH The D flip-flops should be chosen so that • ClK is rising edge-triggered Figure 6. Generation of a Wait State for 8085AH • CLEAR is low-level active. CPU 2-15 AFN-01835C inter BOB5AH/BOB5AH-2/BOB5AH-1 AS-15 ~ ADO 7 ~ ~ ALE 8II85AH 1m WR 101M f-- f- f-- - Vee Vee elK RESET QU, f- READY f- I f-- Vee I I. I· lTiMER _101 I RESET i I~ WRAD ALE eE< 7~D 07 101M 7:~~ 7~D 07 CE M ALE AlI~ elK~S~RDY T6~~R_ 815811 _[ROM+VO] [RAM + VO + COUNTERITIMER] 87_ OR [PROM + ,VOl *NOTE OPTIONAL CONNECTION B'B B 8 8, Figure 8. MC8-85 Minimum System (Memory Mapped I/O) j j j - X, X, --- --- RESET INHOLD TRAP RST7 HlDA AST6 SOD 8II85AH -- RST5 510_ INTR S,_ RESET iNTl< ADDR/ OUT S._ ADDA DATA ALE Fro ijijj!f 101M ROY elK 181 181 IO/iQ (CSl WR 811 2 C- AlI I K DATA STANDARD ~ MEMORY ) AOOR ICS} r (16) ~ elK ....... - i- RESET 101M (es) 110 POR TS, lS ~ WR AD DATA STANDARD I/O ADOR ~UI II Vee Vee Vee Figu,re 9. MCS-85 System (Using Standard Memories) 2-16 AFN·01835C inter SOS5AH/SOS5AH-2/S0S5AH-1 , As in the 8080, the READY line is used to ex&nd the read and write pulse lengths so that the 8085AH can be used with slow memory. HOLD causes the CPU to rlD~ vi'vrl relinquish the bus when it is through with it by float- ing the Address and Data Buses. -- TRAP X, X, RESET IN HOLD I- -- RST7,5 RST6,S 8085AH HLDA SOD t- t- SYSTEM INTERFACE -- RST5,S INTR 1JiITl AODR ADDR/ DATA ALE im W1iIO/M REseT OUT ROY elK SIOl- s,r- s'r- Th,e 8085AH family includes memory components, v" v" lSI tSI which are directly compatible to the 8085AH CPU. For example, a system consisting of the three chips, In- c. POR~~ 8085AH, 8156H, and 8355 will have the following WR _ PORT ~ (81 RD 81S6H B features: ALE DATAl PORT~ C (6) ADDR • 2K Bytes ROM • 256 Bytes RAM • 1 Timer/Counter >-+-- r- 'REseT --- 101M QUTt---" IN TIMER - • 4 8-bit I/O Ports -lOW • 1 6-bit I/O Port - Ro • 4 Interrupt Levels ~ ALE PORT • Serial In/Serial Out Ports H- e; A This minimum system, using the standard I/O tech- t= A8-IO 8355/ 8755A nique is as shown in Figure 7. OATAI ADOR ~ 101M PORT In addition to standard I/O, the memory mapped I/O r-+- - . RESET B offers an efficient I/O addressing technique. With ROY V" this technique, an area of memory address space is ..... CLK iOR-l assigned for I/O address, thereby, using the memory address for I/O manipulation. Figure 8 shows the llDROG v" system configuration of Memory Mapped I/O using v" 8085AH. 'v *NOTE OPTIONAL CONNECTION The 8085AH CPU can also interface with the stan- dard memory that does not have the multiplexed address/data bus. It will require a simple 8212 (8-blt Figure 7. 8085AH Minimum System (Standard I/O latch) as shown in Figure 9. Technique) 2-17 AFN-01635C in1:ef 8085AH/8085AH-218085AH-1 BASIC SYSTEM TIMING Table 3. 8085AH Machine Cycle Chart STAtuS CONTROL The 8085AH has a multiplexed Data Bus. ALE is used MACHINE CYCLE 101M 51 'so RD WR INTA as a strobe to sample the lower 8-bits of address on OPCODE FI'TCH (OF) 0 1 1 0 1 1 MEMORY RE=AD (MR) 0 1 0 0 1 1 the Data Bus. Figure 10 shows an instruction fetch, MEMORY WRITE (MW) 0 0 1 1 1 0 memory read and I/O write cycle (as would occur 1/0 READ (lOR) 1 1 0 0 1 1 during processing of the OUT instruction). Note that 1/0 WRITE (lOW) 1 0 1 1 0 1 ACKNOWLEDGE during the I/O write and read cycle that the I/O port OFJNTR (INA) 1 1 1 1 1 0 address is copied on both the upper and lower half BUS IDLE (BII DAD 0 1 0 1 1 1 ACK OF of the address. RST,TRAP 1 1 1 1 1 1 HALT TS 0 0 TS rs 1 There are seven possible types of machine cycles. Which of these seven takes place is defined by the Table 4. 8085AH Machine State Chart status of the three status lines (101M, S1, So) and the three control signals (RD, WR, and INTA). (See Table Statu5 & Buses Control ----- ---- -- --- -'- --,-- Machrne 3.) The status lines can be used as advanced con- State 51,SO '101M As-A15 ADo-AD, RO,m INTA ALE trols (for device selection, for example), since they T1 X X X X 1 1 l' become active at the T1 state, at the outset of each T2 X X X X X X 0 machine cycle. Control lines AD and WR become TWAtT X X X X X X 0 active later, at the time when the transfer of data is to T3 X X X X X X 0 take place, so are used as command lines. T4 1 Ot X TS 1 1 0 Ts 1 01 X TS 1 1 0 A machine cycle normally consists of three T states, 1 Ot X I TS 1 1 0 TS with the exception of OPCODE FETCH; which nor- TRESET X TS TS TS TS 1 0 mally has either four or six T states (unless WAIT or THALT 0 TS i TS TS TS 1 0 I HOLD states are forced by the receipt of READY or THOLO X TS TS TS TS 1 0 HOLD inputs). Any T state must be one of ten possible states, shown in Table 4. 0= LogiC "0" , TS = High Impedance 1 = LogiC "'" X = Unspecified ~ ALE not generated dUring 2nd and 3rd machine cycles of DAD instruction t 101M = 1 during T 4 - Ta of INA mach me cycle PCH (HIGH ORD~R ADDRESS) ALE RD WR 101M STATUS SlSo (FETCH) 10 (READ) 01 WRITE 11 Figure 10. 8085AH Basic System Timing 2-18 AFN·Ol835C inter SOS5AH/SOS5AH-2/S0S5AH-1 ABSOLUTE MAXIMUM RATINGS· *NOTlCE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ......... O°C to 70°C device. This is a stress rating only and functional opera- Storage Temperature ............... -65°C to + 150°C tion of the device at these or any other conditions above Voltage on Any Pin those indicated in the operational sections of this specifi- With Respect to Ground .............. -0.5V to +7V cation is not implied. Exposure to absolute maximum Power Dissipation ........................... 1.5 Watt rating conditions for extended periods may affect device reliability. D.C. CHARACTERISTICS . 8085AH,8085AH-2: (TA = O°C to 70°C, Vcc = 5V ±10%, VSS =OV; unless otherwise specified)* 8085AH-1: (TA = O°C to 70°C, VCC = 5V ±5%, Vss = OV; unless otherwise specified) Symbol Parameter Min. Max. Units Test Conditions Vil Input low Voltage. -0.5 +0.8 V VIH Input High Voltage 2.0 VCC +0.5 V VOL Output low Voltage 0.45 V IOl = 2mA VOH Output High Voltage 2.4 V IOH = -400/LA 135 mA 8085AH, 8085AH-2 IcC Power Supply Current 200 mA 8085AH-1 (Preliminary) III Input leakage ±10 /LA 0,,; VIN"; VCC ILO Output leakage ±10 /LA 0.45V ,,; VOUT ,,; VCC VllR Input low level, RESET -0.5 +0.8 V VIHR Input High level, RESET 2.4 VCC +0.5 V , VHY Hysteresis, RESET 0.25 V A.C. CHARACTERISTICS 8085AH,8085AH-2: (TA = O°C to 70°C, Vcc = 5V ±10%, Vss = OV)* 8085AH-1: (TA = O°C to 70°C, Vcc = 5V ±5%, Vss = OV) 8085AH[21 8085AH-2[21 8085AH-1 (Final) (Final) (Preliminary) Symbol Parameter Units Min. Max. Min. Max. Min. Max. tCYC ClK Cycle Period 320 2000 200 2000 167 2000 ns tl ClK low Time (Standard ClK loading) 80 40 20 ns t2 ClK High Time (Standard ClK loading) 120 70 50 ns t r • tf ClK Rise and Fall Time 30 30 30 ns tXKR Xl Rising to ClK Rising 25 120 25 100 20 100 ns tXKF Xl Rising to ClK Falling 30 150 30 110 25 110 ns tAC Aa-15 Valid t6 leading Edge of Control[11 270 115 70 ns tACl AO-7 Valid to leading Edge of Control 240 115 60 ns tAD Ao-15 Valid to Valid Data In 575 350 225 ns Address Float After leading Edge of tAFR 0 0 0 ns READ (INTA) tAL Aa-15 Valid Before Trailing Edge of ALE [11 115 50 25 ns *Note: For Extended Temperature EXPRESS use M8085AH Electricals Parameters. 2-19 AFN-01835C 8085AH/8085AH-2/8085AH-1 A.C. CHARACTERISTICS, (Continued) 8085AH[21 8085AH-2[21 8085AH·1 (Final) (Final) (Preliminary) Symbol Parameter Units Min. Max. Min. Max. Min. Max. tALL AO.7 Valid Before Trailing Edge of ALE 90 50 25 ns tARY READY Valid from Address Valid 220 100 40 ns tCA Address (Aa-1S) Valid After Control 120 60 30 ns Width of Control low (RD, WR, INTA) tcc 400 230 150 ns Edge of ALE Trailing Edge of Control to leading Edge tCL 50 25 0 ns of ALE tow Data Valid to Trailing Edge of WRITE 420 230 140 ns tHABE HlDA to Bus Enable 210 150 150 ns tHABF Bus Float After HlDA 210 150 150 ns tHACK HlDA Valid to Trailing Edge of ClK 110 40 0 ns tHOH HOLD Hold Time 0 0 0 ns tHOS HOLD Setup Time toTrailing Edge of ClK 170 120 120 ns tlNH INTR Hold Time 0 0 0 ns INTR, RST, and TRAP Setup Time to tiNS 160 150 150 ns Falling Edge of ClK tLA Address Hold Time After ALE 100 50 20 ns Trailing Edge of ALE to leading Edge tLC 130 60 25 ns of Control tLCK ALE low During ClK High 100 50 15 ns tLOR ALE to Valid Data Du~ing Read 460 270 175 ns tLOW ALE to Valid Data During Write 200 120 110 ns tLL ALE Width 140 80 50 ns tLRY ALE to READY Stable 110 30 10 ns Trailing Edge of READ to Re-Enabling tRAE 150 90 50 ns of Address tRO READ (or ilifi'A) to Valid Data 300 150 75 ns Control Trailing Edge to leading Edge tRY 400 220 160 ns of Next Control tROH Data Hold Time After READ fNTA 0 0 0 ns tRYH READY Hold Time 0 0 5 ns READY Setup Time to Leading Edge tRYS 110 100 100 ns ofClK two Data Valid After Trailing Edge of WRITE 100 60 30 ns tWOL LEADING Edge of WRITE to Data Valid 40 20 30 ns 2-20 AFN·01835C BOB5AH/BOB5AH-2/BOB5AH-1 NOTES: 3. For all output timing where CL of 150 pF use the following 1. Aa-A'5 address Specs apply IO/r;;l. So. and 5, except Aa-A'5 correction factors: are undefined during T4-Ts of OF cycle whereas 101M. So. and 25 pF '" CL < 150 pF: -0.10 nsipF 5, are stable. 150 pF < CL '" 300 pF: +0.30 ns/pF 2. Test Conditions: teye = 320 ns (808SAH)1200 ns (808SAH-2);/ 4. Output timings are measured with purely capacitive load. 167 ns (808SAH-1); CL = 150 pF. 5. To calculate timing specifications at other values of teye use Table 5. A.C. TESTING INPUT. OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT .. ~2'O 08 > TEST POINTS <~ 20 0.8 DEVICE UNDER TEST ~CL=150PF 045 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A lOGIC 1 AND 0 45V FOR -= A LOGIC a TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 0 8V FOR A LOGIC 0 C L =150pF C L INCLUDES JIG CAPACITANCE Table 5. Bus Timing Specification as a TCYC Dependent Symbol 8085AH 8085AH-2 8085AH-1 " tAL (1/2) T - 45 (1/2) T - 50 (1/2) T - 58 Minimum tlA (1/2) T - 60 (1/2) T - 50 (1/2) T - 63 Minimum tll (1/2) T - 20 (1/2) T - 20 (1i2) T - 33 Minimum tlCK (1/2) T - 60 (1/2) T - 50 (1/2) T - 68 Minimum tlC (1/2)T - 30 (1/2) T - 40 (1/2) T -58 Minimum tAD (5/2 + N) T - 225 (5/2 + N)T -150 (5/2 + N)T - 192 Maximum tRO (3/2 + N)T - 180 (3/2 + N) T - 150 (3/2 + N)T -175 Maximum tRAE (1/2) T - 10 (1/2) T - 10 (1/2)T - 33 Minimum tCA (1/2) T - 40 (1/2)T - 40 (1/2) T - 53 , Minimum tow (3/2 + N) T - 60 (3/2 + N) T - 70 (3/2 + N)T -110 Minimum two (1/2) T - 60 (1/2) T - 40 (1/2) T - 53 Minimum tcc (3/2 + N) T - 80 (3/2 + N) T - 70 (3/2 + N) T - 100 Minimum tCl (1/2)T - 110 (1/2) T - 75 (1/2) T - 83 Minimum tARY (3/2) T - 260 (3/2) T - 200 (3/2) T - 210 Maximum tHACK (1/2) T - 50 (1/2) T - 60 (1/2) T - 83 Minimum tHABF (1/2) T + 50 (1/2) T + 50 (1/2) T + 67 Maximum tHABE (1/2) T + 50 (1/2) T + 50 (1/2) T + 67 Maximum tAC (2/2)T - 50 (2/2)T - 85 (2/2) T - 97 Minimum t, (1/2) T - 80 (1/2) T - 60 (1/2) T - 63 Minimum t2 (1/2) T - 40 (1/2) T - 30 (1/2) T - 33 Minimum tRY (3/2) T - 80 (3/2)T- 80 (3/2) T - 90 Minimum tWR (4/2) T - 180 (4/2) T - 130 (4/2) T - 159 Maximum NOTE: N is equal to the total WAIT states. T = teye. 2-21 AFN·01835C inter 8085AH/8085AH-2/8085AH-1 WAVEFORMS (Continued) READ OPERATION WITH WAIT CYCLE (TYPICAL) - SAME READY TIMING APPLIES TO WRITE T, T, T, TWAIT NOTE t INTERRUPT AND HOLD 1 - - - - - - - BUS FLOATING* - - - - - - 1 ALE RD----------~--t_----~----------------~ HOLD HLDA 1f---- *IOfM IS ALSO FLOATING DURING THIS TIME 2-22 AFN-01835C SOSSAH/SOSSAH-2/S0SSAH-1 Table 6. Instruction Set Summary I· Instruction Code Operations Instruction Code Operations Mnemonic D7 D6 D5 D4 D:J D2 D, Do Description Mnemonic 0, D6 D5 04 D3 D2 D1 Do Description MOVE, lOAD, AND STORE CZ 1 1 0 0 1 1 0 0 Call on zero Move register to register CNZ 1 1 0 0 0 1 0 0 Call on no zero MOVr1 r2 0 1 0 0 0 S S S MOVMr 1 1 Move register to memory CP 1 1 1 1 0 1 0 0 Calion positive 0 1 0 S S S MOVrM Move memory to register CM 1 1 1 1 1 1 0 0 Call on minus 0 1 0 0 0 1 1 0 MVI r 0 0 0 0 1 1 0 Move Immediate register CPE 1 1 1 0 1 1 0 0 Call on panty even 0 MVI M 0 0 1 1 0 1 1 0 Move Immediate memory CPO 1 1 1 0 0 1 0 0 Call on Dantv odd LXIB 0 0 0 0 0 0 0 1 Load Immediate register RETURN I>;", B& C RET 1 1 0 0 1 0 0 1 Return RC 1 1 0 1 1 0 0 0 Return on carry lXID 0 0 0 1 0 0 0 1 Load Immediate register Pair 0 & E RNC 1 1 0 1 0 0 0 0 Return on no carry lXIH 1 RZ 1 1 0 0 1 0 0 0 Return on zero 0 0 0 0 0 0 1 Load Immediate register PalrH&L RNZ 1 1 0 0 0 0 0 0 Return on no zero STAX B 0 0 0 0 0 0 1 0 Store A Indirect RP 1 1 1 1 0 0 0 0 Return on positive STAXD 1 RM 1 1 1 1 1 0 0 0 Return on minus 0 0 0 1 0 0 0 Store A Indirect LDAX B 0 0 0 0 1 0 1 0 Load A Indirect RPE 1 1 1 0 1 0 0 0 Return on parity even lDAX 0 RPO 1 1 1 0 0 0 0 0 Return on panty odd 0 0 0 1 1 0 1 0 Load A indirect STA 0 0 1 1 0 0 1 0 Store A direct RESTART RST 1 1 A A A 1 1 1 Restart LOA 0 0 1 1 1 0 1 0 Load A direct SHLD 0 0 1 0 0 0 1 0 Store H & L direct INPUT/OUTPUT 1 0 1 1 0 lHLD XCHG 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 Load H & l direct Exchange 0 & E, H & L IN OUT I~ 1 0 1 0 0 1 1 1 1 Input Output Registers INCREMENT AND DECREMENT STACK OPS INR r 0 0 0 0 0 1 0 0 Increment register PUSH B 1 1 0 0 0 1 0 1 Push register Pair B & OCR r 0 0 0 0 0 1 0 1 Oecrerr:'ent register C on stack INRM 0 0 1 1 0 1 0 0 Increment memory PUSH 0 1 1 0 1 0 1 0 1 Push register Pair D & DCRM 0 0 1 1 0 1 0 1 Decrement memory E on stack INX B 0 0 0 0 0 0 1 1 Increment B & C 1 registers PUSH H 1 1 1 0 0 0 1 Push register Pair H & L on stack INX 0 0 0 0 1 0 0 1 1 Increment 0 & E PUSH PSW 1 1 1 1 1 1 Push A and Flags registers 0 0 on stack INX H 0 0 1 0 0 0 1 1 Increment H & L POP B 1 1 0 0 0 0 1 Pop register Pair B & registers 0 C off stack DCX B 0 0 0 0 1 0 1 1 Decrement B & C 1 Pop register Pair D & DCXD 0 0 0 1 1 0 1 1 Decrement 0 & E POP 0 1 1 0 1 0 0 0 E off stack DCX H 0 0 1 0 1 0 1 1 Oecrement H & L POP H 1 1 1 0 0 0 0 1 Pop register Pair H & ADD l off stack ADD r 1 a 0 0 0 S S S Add register to A POP PSW 1 1 1 1 0 0 0 1 Pop A and Flags ADC r 1 0 0 0 1 S S S Add register to A off stack With carry 1 ADDM 1 0 C 0 0 1 1 0 Add memory to A XTHL 1 1 1 0 0 0 1 Exchange top of stack, H & l ADCM 1 0 0 0 1 1 1 0 Add memory to A With carry SPHl 1 1 1 1 1 0 0 1 H & L to stack pOinter LXI SP 0 0 1 1 0 0 0 1 Load Immediate.... stack ADI 1 1 0 0 0 1 1 0 Add Immediate to A pOinter ACI 1 1 0 0 1 1 1 0 Add Immediate to A 1 0 1 1 Increment stack pOinter With carry INX SP 0 0 1 0 DCX SP 0 0 1 1 1 0 1 1 Decrement stack DADB 0 0 a 0 1 0 0 1 AddB&CtoH&L pOinter DADO 0 0 0 1 1 0 0 1 AddD&EtoH&L DADH 0 0 1 0 1 0 0 1 AddH&LtoH&L JUMP JMP 1 1 0 0 0 0 1 1 Jump unconditional DADSP a 0 1 1 1 0 0 1 Add stack pOinter to JC 1 1 0 1 1 0 1 0 Jump on carry H&l SUBTRACT JNC JZ 1 1 , 1 0 0 1 0 0 0 1 0 1 1 0 0 Jump on no carry Jump on zero SUB r 1 0 0 1 0 S S Subtract register S from A JNZ 1 1 0 0 0 a 1 0 Jump on no zero JP 1 1 1 1 0 0 1 0 Jump on positive SBB r 1 0 0 1 1 S S S Subtract register from JM 1 1 1 1 1 0 1 0 Jump, on minus A With borrow JPE 1 1 1 0 1 0 1 0 Jump on panty even SUBM 1 a 0 1 0 1 1 0 Subtract memory 1 1 1 0 0 1 0 Jump on panty odd from A JPO 0 PCHL 1 1 1 0 1 0 0 1 H & L to program SBB M 1 0 0 1 1 1 1 0 Subtract memory from counter A With borrow CALL SUI 1 1 0 1 0 1 1 0 Subtract immediate CALL 1 1 0 0 1 1 0 1 Call uncondltlOnal from A CC 1 1 0 1 1 1 0 0 Call on carry SBI 1 1 0 1 1 1 1 0 Subtract Immediate CNC 1 1 0 1 0 1 0 0 Call on no carry from A With borrow 2-23 AFN·01835C 8085AK/8085AH-2J8085AH-1 Table 6. Instruction Set Summary (Continued) Instruction Code Operations Instruction Code Operations Mnemonic 0, 06 0 5 04 03 02 0, DO Description Mnemonic 07 06 0 5 04 03 O2 0, DO Description LOGICAL SPECIALS ANA r 1 0 1 0 0 S S S I! And register with A ,CMA 0 0 1 0 1 1 1 1 Complement XRA r 1 0 1 0 1 S S S Exclusive OR register A with A STC 0 0 1 1 0 1 1 1 Set carry ORA r 1 0 1 1 0 ·S S S OR register with A CMC 0 0 1 1 1 1 1 1 Complement CMPr 1 0 1 1 1 S S S Compare register with A carry ANAM 1 0 1 0 0 1 1 0 And memory with A DAA 0 0 1 0 Q 1 1 1 Decimal adjust A XRAM 1 0 1 0 1 1 1 0 Exclusive OR memory CONTROL with A EI 1 1 1 1 1 0 1 1 Enable Interrupts ORAM 1 0 1 1 0 1 1 0 OR memory with A 01 1 1 1 1 0 0 1 1 Disable Interrupt CMPM 1 0 1 1 1 1 1 0 Compare NOP 0 0 0 0 0 0 0 0 No-operation memory with A HLT 0 1 1 1 0 1 1 0 Halt ANI 1 1 1 0 0 1 1 0 And Immediate with A NEW BOB5A 'rTRUCTIONS XRI 1 1 1 0 1 1 1 0 ExcluSive OR Immediate RIM 0 0 1 0 0 0 0 0 Read Interrupt Mask with A SIM 0 0 1 1 0 0 0 0 Set Interrupt Mask ORI 1 1 i 1 0 1 1 0 OR Immediate with A CPI 1 1 1 1 1 1 1 0 Compare Immediate with A ROTATE RLC 0 0 0 0 0 1 1 1 Rotate A left RRC 0 0 0 0 1 1 1 1 Rotate A right RAL 0 0 0 1 0 1 1 1 Rotate A left through RAR 0 0 0 1 1 1 1 , carry Rotate A right through carry NOTES: 1 DDS or SSS. BODO, C 001. D 010, E01', H 100, L 101, Memory 110, A 111 2. Two possible cycle times (6/12) indicate instructIOn cycles dependent on condition flags "All mnemonics cOPYrighted ©Intel Corporation 1976 2-24 AFN·01835C 8085AH/8085AH-218085AH-1 WAVEFORMS CLOCK Xl INPUT ..J \ t,_ . t, , _t, 1- --=~- elK OUTPUT ~ \- II~t,_~ - tXKF -. tCYC READ I T, I T, I TJ 1 T, elK\ / 1 r----\ / \ I ___ tLCK_1 --- teA _____ AS -A 1!) )! --- ADDRESS ---~--- - - - - tAD -I tRDH __ ~1~tRAE . Ir:;-- ADo-AD7 )! ADDRESS c7&. /I&')j DATA IN 1"-- ALE t - tlL --- tLA - tAFR - .. tLDR~--~ r-tCl-Y _tAl··_ ___ ICC ~_t"D-~, ,I 'I RD/INTA f---tAc--i -- - t LC -·1 1 I WRITE I T, 1 T, 1 TJ 1 T, elK \ \ J r-ILCK-I A a-A'5 )! ADDRESS X r--- tlOW - - - l'cA-1 ADo-AD7 ) ADDRESS ) DATA OUT X 1- r- t Ll - - -1 ....- lOW _lwo_1 -- tLA--..J --tWDL ALE !---tAl _ ICC , ~IL=f WR _ t CL - r------------ t AC----- HOLD T, TJ T HOLD T HOLD T, elK \ / \ \ / \ HOLD 1 "\ ~~ t HDS '" ~tHOH rtHACK"- HlDA t t HABF - \ 1- tHABE-H BUS (ADDRESS, CONTROLS} I>--l II 2-25 AFN-01835C 8085A/8085A-2 SINGLE CHIP 8-BIT N-CHANNEL MICROPROCESSORS • Single +5V Power Supply • Non-Maskable) Four Vectored Interrupt Inputs (One Is Plus an SOSOA- • 1.3 {J.s Instruction Cycle (SOS5A); 100% Software Compatible with SOSOA Compatible Interrupt • O.S {J.s (SOS5A-2) • Serial In/Serial Out Port • On-Chip Clock Generator (with External Crystal, LC or RC Network) • Arithmetic Decimal, Binary and Double Precision • On-Chip System Controller; Advanced Cycle Status Information Available for Large System Control • Direct Addressing Capability to 64k Bytes of Memory The Intel@> SOS5A is a complete S bit parallel Central Processing Unit (CPU). Its instruction set is 100% software compatible with the SOSOA microprocessor, and it is designed to improve the present SOSOA's performance by higher system speed. Its high level of system integration allows II minimum system of three IC's [SOS5A (CPU), S156 (RAM/IO) andS355/S755A (ROM/PROM/IO)j while maintaining total system expandabihty. The SOS5A-2 is a faster version of the S08SA. The SOS5A incorporates all of the features that the 8224 (clock generator) and 8228 (system controller) provided forthe 8080A, thereby offering a high level of system integration. . The 80S5A uses a multiplexed data bus. The address is split between the 8 bit address bus and the S bit data bus. The on-chip address latches of 8155/S156V8355/8755A memory products allow a direct interface with the 808SA. INTA RST65 X, Vee X2 HOLD RESET OUT HLDA SOD elK (OUTI SID RESET IN TRAP READY RST75 101M RST65 8, REG REG o E !81 RST55 iffi REG • ,,, REG C "'} INTR WR H L (81 REGISTER INTA ALE REG REG ARRAY ADO So STACK PO'NTER '''' AD1 A1S PROGRAM COUNTER nil AD2 A14 AD3 A13 INCREMENTE R/OECREMENTE R ADDRESS LATCH 1111 AD4 A12 AD5 A11 AD6 A10 AD7 Ag Vss -,,;;;.-.......;;,;,r As Als00Aa AD7-A Do ADDRESS8US AODRESS/DATA BUS Figure 2. BOBSA Pin Figure 1. 808SA CPU Functional Block Diagram Configuration 2-26 AFN-01242C intJ SOS5A/SOS5A-2 ABSOLUTE MAXIMUM RATINGS· -NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O°C to 70°C tion of the device at these or any other conditions above Storage Temperature .............. -65°C to +150°C those indicated in the operational sections of this Voltage on Any Pin specification is not implied. Exposure to absolute With Respect to Ground ............ -0.5V to + 7V maximum rating conditions for extended periods may Power Dissipation. . . . . . . . . . . . . . . . . . 1.5 Watt affect device reliability. D.C. CHARACTERISTICS (TA = O°C to 700C, Vee = OV ±5%, VSS = OV; unless otherwise specified) Symbol Parameter Min. Max. Units Test Conditions V IL Input Low Voltage -0.5 +0.8 V VIH Input High Voltage 2.0 Vcc·+0.5 V VOL Output Low Voltage 0.45 V IOL; 2mA VOH Output High Voltage 2.4 V IOH "; -400/.LA Icc Power Supply Current 170 mA IlL Input Leakage ±10 /.LA 0", YIN "'Yec ILO Output Leakage ±10 /.LA 0.45V';;; V out ,;;; Vcc V ILR Input Low Level, RESET -0.5 +0.8 V VIHR Input High Level, RESET 2.4 VCC +0.5 V V HY Hysteresis, RESET 0.25 V 2-27 AFN~01242C 808SA/808SA-2 A.C. CHARACTERISTICS (TA = O"C to 70"C, vee = ov ±5%, vss = OV) Symbol Parameter 8085AI2I 8085A·2 121 Units Min. Max. Min. Max. tCYC ClK Cycle Period 320 2000 200 2000 ns tl elK low Time (standard elK loading) 80 40 ns t2 ClK High Time (Standard ClK loading) 120 70 ns t r •t f ClK Rise and Fall Time 30 30 ns tXKR Xl RISing to GLK RIsing 30 120 30 100 ns t""" X Rlslne to ClK Falline 30 150 30 110 ns tAC A a- 15 Valid to leading Edge of Control l1 ] 270 115 ns t ACL AO-7 Valid to leading Edge of Control 240 115 ns tAD AO- 15 valla to valla Data In 575 350 ns tAFR Aa~ess. F..!..oat Arter leaalng Eage Of READ (iNTA) 0 0 ns tAL Aa_15 Valid Before Trailing Edge of AlEl 1] 115 50 ns tALL AO-7 Valid BeTore Trailing Edge Of ALE 90 50 ns t ARy READY valla from Aaaress Vaua 220 100 ns t", Aaaress (AS_15) Valla After ontro 120 60 ns tcc Width of Control low (RD. WR. INTA) Edije of ALE 400 230 ns tCL Trailing Edge of Control to leading Edge of ALE 50 25 ns tow Data Valid to Trailing Edge of WRITE 420 230 ns tHABE HlDA to Bus Enable 210 150 ns tHABF Bus Float After HlDA 210 150 ns t HACK HlDA Valid to Trailing Edge of ClK 110 40 ns t HOH HOLD Hold Time 0 0 ns tHOS HOLD Setup Time to Trailing Edge of ClK 170 120 ns t'NH _II'!T~Hola Time 0 0 ns tiNS INTR. RST. and TRAP Setup Time to Falling Edee of ClK 160 150 ns tLA Address Hold Time After ALE 100 50 ns t Lc Trailing Edge of ALE to leading Edge of Control 130 60 ns t LCK ALE low During ClK High 100 50 ns tLOR AI,EtoVaiia Data During Read 460 270 ns tLOW' ALE to Valia Data Dunng Write 200 120 ns tLL ALE W,dtn 140 80 ns t LRy ALE to READY Stable 110 30 ns 2-28 AFN-Q1242C 8085A18085A·2 A.C. CHARACTERISTICS (Continued) Symbol Paramatar 8085A12] 8085A·2[2] Units Min. Max. Min. Max. ,tRAE Trailing Edge of READ to Re-Enabling 150 90 ns of Address tRD READ (or INTA) to Valid Data 300 150 ns tRV Control Trailing Edge to leading Edge 400 220 ns of Next Control tRDH Data Hold Time After READ INTA[7] 0 0 ns tRYH READY Hold Time 0 0 ns tRYS READY Setup Time to leading Edge 110 100 ns of ClK tWD Data Valid After Trailing Edge of WRITE 100 60 ns tWDl lEADING Edge of WRITE to Data Valid 40 20 ns NOTES: 1. As-A'5 address Specs apply to 101M, So' and 5, except As-A'5 are undefined dUring T4·T6 of OF cycle whereas IOiliii, So' andS, are stable 2. Test conditions: tCYC=320ns (8085A)/200ns (8085A·2); CL = 150pF. 3. For all output timing where CL = 150pF use the following correction factors: 25pF" CL < 150pF: -O.10nsJpF 150pF < CL ..;; 300pF: +O.30ns/pF 4. Output timings are measured with purely capacitive load. 5. All timings are measured at output votage V L = O.8V, VH = 2.0V, and 1.5V with 20 ns rise and fall time on inputs. 6. To calculate liming specifications at other values of tCYC use Table 7. 7. Data hold time is guaranteed under all loading conditions. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT u=x > < x=: 0.45 2.0 0.8 TEST POINTS 2.0 0.8 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "1" AND 0 45V FOR DEVICE UNDER TeST I -::- C,0150 PF A LOGIC "0 " TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC "1" . AND 0 8V FOR A LOGIC "0 " Cl ""150pF C L INCWDES JIG CAPACITANCE 2·29 AFN-01242C 8155H/8156H/8155H-2/8156H-2 2048-81T STATIC HMOS RAM WITH I/O PORTS AND TIMER • Voltage Single +5V Power Supply with 11)% • '1Programmable Programmable 6-Bit I/O Port Margins • Timer 14-Blt Binary Counter/ • the 8155 andPower 30% Lower Consumption than 8156 • 8088 Compatible with 8085AH, 8085A and • 256 100% Compatible with 8155 and 8156 CPU • Completely Word x 8 Bits • Multiplexed Address and Data Bus • Internal Address Static Operation • Available in EXPRESS • 2 Programmable 8-Bit I/O Ports Latch - Standard Temperature Range • - Extended Temperature Range The Intel® 8155H and 8156H are RAM and 110 chips implemented in N-Channel, depletion load, silicon gate technology (HMOS), to be used in the 8085AH and 8088 microprocessor systems. The RAM portion is designed with 2048 static cells organized as 256 x 8. They have a maximum access time of 400 ns to permit use with no wait states in 8085AH CPU.The 8155H-2 and 8156H-2 have maximum access times of 330 ns for use with the 8085AH-2 and the 5 MHz 8088 CPU. The I/O portion consists of three general purpose I/O ports. One of the three ports can be programmed to be status PinS, thus allowing the other two ports to operate in handshake mode. A 14-bit programmable counterltimer is also included on chip to provide either a square wave or terminal count pulse for the CPU system depending on timer mode. PC, vee PC, PC, ~ TIMER IN PC, 10 1M RESET pC o PAO~7 pC s PB, ADo 7 256 X 8 flMEROUT PB, STATIC 10/'1 PBs ~ RAM CE OR CE' PB, * ps" , RJj PB, ALE WR PB, RD ALE PB, ADo PB o INR AD, PA, RESET TIMER G peo's AD, AD, PA, PAs TIMERCLK~ ~Vee AD, PA, 1+5VI ADs PA, TIMER OUT Vss (OV) AD, PA2 AD, PA, Vss PA o *S155H/8155H-2 = CE, 8156H/8156H·2 "" CE Figure 1. Block Diagram Figure 2. Pin Configuration Intel Corporation AS8um~s No Responsibilty for the Use of Any CirCUitry Other Than Circuitry Embodied In an Intel Product. No Other Circuit Patent Licenses are Implied. © INTEL CORPORATION. 1981 2-30 inter 8155H/8156H/8155H-218156H-2 Table 1. Pin Description Symbol Type Name and Function RESET I R•••t: Pulse provided by the 8085AH to initialize the system (connectto 8085AH RESET OUT). Input high on this line resets the chip and initializes the three I/O ports to input mode. The width of RESET pulse should typically be two 8085AH clock cycle times. ADO_7 I/O Addr••s/Data: 3-state Address/Data lines that interface with the CPU lower 8-bit Address/Data Bus. The 8-bit address is latched into the address I!ltch inside the 8l55H/56H on the falling edge of ALE. The address can be eitherforthe memory section or the I/O section depending on the 10/M input. The 8-bit data is either written into the chip or read from the chip. depending on the WR or RD input signal. CE ora I Chip Enabl.: On the 8l55H.this pin is CE and is ACTIVE LOW. On the 8l56H. this pin is CE ·and is ACTIVE HIGH. RD I Read Control: Input Iowan this line with the Chip Enable active enables andADO_7 buffers. If 10/M pin IS low. the RAM content will be read oulto the AD bus. Otherwise the content of the selected I/O port or command/status registers will be read to the AD bus. WR I Write Control: Input Iowan this line with the Chip Enable active causes the data on the Address/Data bus to be wrttten to the RAM or I/O ports and command/status register. depending on 10/M ALE I Address Latch Enable: This control signal latches both the address on the ADo_7 lines and the state of the Chip Enable and 10iM into the chip at the falling edge of ALE 10iM I I/O Memory: Selects memory if low and I/O and command/status registers if high. PAo-7(B) 1/0 Port A: These 8 pinS are general purpose 1/0 pins. The Inlout direcIlon IS selected by programming the command register PBO_7(B) 1/0 Port B: These B pins are general purpose 1/0 pins The in/out direction IS selected by programming the command register. PCo-s(6) I/O Port C: These 6 pinS can function as either Input port. output port. or as control signals for PA and PB. Programming IS done through the command register When PCo-s are used as control signals. they will provide the following: PC o - A INTR (Port A Interrupt) 'PC 1 - ABF (Port A Buffer Full) PC 2 - A STB (Port A Strobe) PC3 - B INTR (Port B Interrupt) PC4 - B BF (Port B Buffer Full) PC s - B STB (Port 13 Strobe) TIMER IN I Timer Input: Input to the counter-timer. TIMER OUT 0 Timer Output: This output can be either a square wave or a pulse. depending on the timer mode. Vee Voltage: T5 volt supply Vss Ground: Groul)d reference. FUNCTIONAL DESCRIPTION I I The 8155H/8156H contains the following: I I I I • 2k Bit Static RAM organized as 256 x 8 I I • Two 8-blt I/O ports (PA & PB I and one 6-blt 110 port (PC I I I • 14-blt timer-counter I I I I The 10/M (IO/Memory Selectl pin selects either the five I I registers (Command. Status. PAO-7. PBO-7. PCO-51 or I TIMER I the memory (RAM I portion I MODE I I I L ____ _ __ --' ______ ..J The 8-blt address on the Address/Data lines. Chip Enable Input CE or CEo and 10iM are all latched on-chip at the failing edge of ALE Figure 3. 8155H/8156H Internal Registers 2-31 AFN·01960C 8155H/8156H/8155H-2I8156H-2 CE(8155H) \ / \ OR CE (8156H) I \ / 101M \ / \ \. / X ADDRESS \ X DATA VALID AL E AD DRWR NOTE: FOR DETAILED TIMING INFORMATION, SEE FIGURE 12 AND A.C. CHARACTERISTICS. Figure 4. 8155H/8156H On-Board Memory Read/Write Cycle = PROGRAMMING OF THE COMMAND REGISTER T The command register consists of eight latches Four bits (0-31 define the mode of the ports, two bits 14-51 enable or disable the interrupt from port C when It acts DEFINES PAo., } 0== INPUT , == OUTPUT as control port, and tHe last two bits 16-7 I are for the timer. DEFINES PBO_7 The command regls,ter contents can be altered at any ~~: ~~:;! OO=ALTl time by using the 1/0 address XXXXXOOO during a WRITE 11 "'ALT2 DEFINES PC0.5 { operation with the Chip Enable active and 101M = 1. The meaning of each bit of the command byte is defined in Figure 5. The contents of the command register may L -_ _ _ _ _ _ _ _ _ _ _ _ ~::i~;~RTA 1 "" ENABLE never be read. } 0'" DISABLE L -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ~~:~~U~RTB 00 ~ NOP - DO NOT AFFECT COUNTER OPERATION 01 == STOP - NOP IF TIMER HAS NOT STARTED, READING THE STATUS REGISTER STOP COUNTING IF THE TIMER IS RUNNING The status register consists of seven latches, one for each 10'" STOP AFTER Te - STOP IMMEDIATELY AFTER PRESENT Te IS REACHED (I'JOP bit, SIX 10-51 for the status of the ports and one 16( forthe ---TIMER COMMAND IF TIMER HAS NOT STARTED) status of the timer 11 = START - LOAD MODe AND eNT LENGTH AND START IMMEDiATElY AFTER The status of the timer and the 1/0 section can be polled LOADING (IF TIMER IS NOT PRESENTLY RUNNING) IF liMER ls RUNNING, START by reading the Status Register (Address XXXXXOOO). THE NEW MODE AND CNT LENGTH IMMEDIATEl Y AFTER PRESENT TC Status word format IS shown In Figure 6. Note that' you IS REACHED may never write to the status register since the command register shares the same 1/0 address and the command register IS selected when a write to that address is Issued Figure 5. Command Register Bit Assignment 2.-32 AFN·01960C intJ 8155H/8156H/8155H-218156H-2 interrupt that the 8155H sends out. The second is an output signal indicating whether the 'buffer is full or empty, and the third IS an Input pin to accept a strobe for the strobed input mode. (See Table 2.) When the 'C' port is programmed to either ALT3 or AL T4, the control signals for PA and PB are initialized as follows: - - PORT A INTERRUPT REQUEST CONTROL INPUT MODE OUTPUT MODE L ~ PORT A BUFfER FULl/EMPTY (INPUT/OUTPUT) BF Low Low - PORT A INTERRUPT ENABLE INTR Low High PORT B INTERRUPT REQUEST STB Input Control Input Control PORT B BUFFER FUll/EMPTY (INPUT/OUTPUT) ' - - - - - - - - - - PORT 8 INTERRUPT ENABLED ' - - - - - - - - - - - _ TIMER INTERRUPT (THIS BIT IS LATCHED HIGH WHEN TERMINAL COUNT IS REACHED, AND IS RESET TO LOW UPON READING OF THE I/O ADDRESS' cIS REGISTER AND BY SELECTION HARDWARE RESET! A7 A6 AS A4 A3 A2 A1 AD X x x x x 0 0 0 Interval Command/Status Register X X X X X 0 0 1 General Purpose 1'0 Port A X X X X X 0 1 0 Gen€'ral Purpose I/O Pori B X X X X X 0 1 1 Port C - General Purpose 1,0 or Control X X X X X 1 0 0 Low-Order 8 bits of Timer Count X X X X X 1 0 1 High 6 bits of Timer Count and 2 bits of Timer Mode Figure 6. Status Reglste.r Bit Assignment X Don't Care t I/OAddress must be qualified by CE = 1 (B156H) or CE = 0 (B155H) and 101M = 11n order to select the appropnate register INPUT/OUTPUT SECTION The I/O section of the 8155H/8156H consists of five regis- ters: (See Figure 7.) Figure 7. I/O Port and Timer Addressing Scheme • CommandlStatus Register (CIS) - Both registers are assigned the address XXXXXOOO The CIS address serves the dual purpose Figure 8 shows how I/O PORTS A and B are structured When the CIS registers are selected dUring WRITE within the 8155H and 8156H: operation, a command is written Into the command register The contents of this register are not accessible through the pins 81551118158H ONE BIT OF PORT A OR PORT B When the CIS (XXXXXOOOI IS selected during a READ operation, the status Information of the 110 ports and the timer becomes available on the ADo-7 lines • PA Register - This register can be programmed to be either input or output ports depending on the status of the contents of the CIS Register Also depending on the command, this port can operate In either the baSIC mode or the strobed mode (See timing diagram I. The 1/0 pins assigned In relation to this register are PAO-7. The address ot'this register IS XXXXX001 • PB Register - This register functions the same as PA. Register The 1/0 pins assigned are PBO-7 The address of this register is XXXXX010 . • PC Reglster- This register has the addressXXXXX011 NOTES and contains only 6 bits. Tl:Je 6 bits can be program- (11 OUTPUT MODE } (4) = 1 FOR OUTPUT MODE (2) SIMPLE INPUT MULTIPLEXER med to be either Input ports, output ports or as control = 0 FOR INPUT MODE (3) STROBED INPUT CONTROL signals for PA and PB by properly programming the READ PORT = (IOIM=1) _ (RD=OI_ (CE ACTIVE) _ {PORT ADDRESSSELECTEOI AD2 and AD3 bits of the CIS register. WRITE PORT= {lOIM;;11_ {WA-OI- {CE ACTIVEI- (PORT AOORESSSELECTEOI When PCo-s IS used as a control port, 3 bits are assigned for Port A and 3 for Port B. The first bit is an Figure 8. 8155H/8156H Port Functions 2-33 AFN·Ol960C 8155H/8156H/8155H-218156H-2 Table 2. Port Control Assignment Pin ALT 1 ALT2 ALT3 ALT4 PCO Input Port Output Port A INTR (Port A Interrupt) A INTR (Port A Interrupt) PCl Input Port Output Port A BF (Port A Buffer Full) A BF (Port A Buffer Full) PC2 Input Port Output Port A STB (Port A Strobe) A STB (Port A Strobe) PC3 Input Port Output Port Output Port B INTR (Port B Interrupt) PC4 Input Port Output Port Output Port B BF (Port B Buffer Full) PC5 Input Port Output Port Output Port B SfB (Port B Strobe) Note m the diagram that when the 1/0 ports are pro- TIM~R SECTION grammed to be output ports, the contents of the output ports can still be read by a READ operation when appro- The timer is a 14-bit down-counter that counts the TIMER prlatelyaddressed. IN pulses and provides either a square wave or pulse when termmal count (TCIIS reaChed. The outputs olthe 8155H/8156H are" glitch-free" meaning that you can write a "1" to a bit position that was previ- The timer has the 1/0 address XXXXXl 00 for the low order ously "1" and the level at the output pin will not change. byte of the register and the 1/0 address XXXXX101 for the high order byte of the register. (See Figure 7.) Note also that the output latch IS cleared when the port enters the input mode. The output latch cannot be loaded To program the timer, the COUNT LENGTH REG IS by writing to the port if the port is in the input mode. The loaded first, one byte at a time, by selecting the timer result IS that each time a port mode is changed from input addresses. Bits 0-13 of the high order count register will to output, the output pins will,go low. When the 8155H/56H specify the length of the next count and bits 14-15 of the is RESET, the output latches are all cleared and all 3 ports high order register will specify the timer output mode ente(the il'lPut mode. (see Figure 10). The value loaded into the count length register can have any value from 2H through 3FFH In When in the ALT 1 or AL T 2 modes, the bits of PORT C Bits 0-13. are structured like the diagram above in the -simple iflput or output mode, respectively. 7 6 5 4 3 2 o Reading from an input port with nothing connected tothe pins Will provide unpredictable results. I II Figure 9 shows how the 8155H/8156H I/O ports might be TlMER'MODE MSB OF CNT LENGTH configured in a typical MC~5 system. 7 6 5 4 3 2 o , LSB OF CNT LENGTH Figure 10. Timer Format TO 8085AH RST INPUT There are four modes to choose from: M2 and M1 define PORT A OUTPUT PORT A the timer mode, as shown In Figure 11 ·--1""·-"~""~·" 1 } . A INTR (SIGNALS DATA RECEIVED) TIMER OUT WAVEFORMS A STB (ACKNOWL DATA RECEIVED) TO/FROM MODE START TERMINAL (TERMINAL) PORT C • B STB (LOADS PORT B LATCH) PERIPHERAL BITS COUNT COUNT COUNT B SF (SIGNALS BUFFER IS F=ULL) INTERFACE M2 M, + - + + PORT B B INTR (SIGNALS BUFFER READY FOR READING) INPUT .l TO INPUT PORT (OPTIONAL) o 0 1 SINGLE SQUARE WAVE ~-------~--- 2 CQNTINUOUSt SQUARE WAVE TO 8085AH RST INPUT 3 SINGLE PULSE ON TERMINAL COUNT \.r""---------- 4 CONTINUOUS PULSES u Figure 9. Example: Command Register = 00111OQ1 Figure 11. Timer Modes 2-34 AFN·01geOC intJ 8155H/8156H/8155H-2/8156H-2 Bits 6-7 (TM2 and TM1) of command register contents The counter in the 8155H is not initialized to any particular are used to start and stop the counter There are four mode or cou nt when hardware RESET occurs, but RESET commands to choose from: does stop the counting. Therefore, counting cannot begin TM2 TM1 following RESET until a START command is issued via the CIS register. o 0 NOP - Do not affect counter operation. o STOP - NOP if timer has not started; Please note that the timer circuit on the 8155H/8156H chip stop counting if the timer IS running. is designed to be a square-wave timer, not an event o STOP AFTER TC - Stop immediately counter. To achieve thiS, it counts down by twos twice after present TC IS reached (NOP if timer in completing one cycle. Thus, its registers do not con- has not started) tain values directly representing the number of TIMER IN START - Load mode and CNT length pulses received. You cannot load an Initial value of 1 Into and start immediately after loading (if the count register and cause the timer to operate, as ItS terminal count value IS 10 (binary) or 2 (deCimal I. (For timer is not presently running). If timer the detection of single pulses, it IS suggested that one IS running, start the new mode and CNT of the hardware interrupt pins on the 8085AH be used.) length immediately after present TC is After the timer has started counting down, the values reached. residing in the count registers can be used to calculate the actual number of TIMER IN pulses required to com- Note that while the counter is counting, you may load a plete the timer cycle if desired. To obtain the remaining new count and mode into the count length registers. count, perform the following operations in order: Before the new count and mode will be used by the counter, you must issue a START command to the 1. Stop the count counter. This applies even though you may only want to change the count and use the previous mode. 2. Read in the 16-blt value from the count length registers In case of an odd-numbered count, the first half-cycle 3. Reset the upper two mode bits of the squarewave output, which is high, IS one count longer than the second (low) half-cycle, as shown In 4. Reset the carry and rotate right one position all 16 bits through carry Figure 12. 5. If carry is set, add 1/2 of the full original count (112 full count - 1 if full count is odd). Note: If you started with an odd count and you read the count length register before the third count pulse occurs, you will not be able to discern whether one or two counts has occurred. Regardless of this, the 8155H/56H always 5 counts out the right number of pulses in generating the TIMER OUT waveforms. NOTE [3 AND 4 REFER TO THE NUMBER OF CLOCKS IN THAT TIME PERIOD Figure 12. Asymmetrical Square-Wave Output Resulting from Count of 9 2-35 AFN·01960C inter 8155H/8156H/8155H-218156H-2 808SA MINIMUM SYSTEM CONFIGURATION Figure 13a shows a minimum system using three chips, containing: • 256 Bytes RAM • 2K Byte's ROM • 38 I/O, PinS • 1 Interval Timer • 4 Interrupt Levels 8085 MINIMUM SYSTEM CONFIGURATION "- A8-15 A ~ - ADO 7 ~LE i>- ;:. RO I--- iI'IR I--- 101M I--- eLK r-- RESET OUT I--- READY I--- I--- Vee RESET TIMER IN WR AD ALE eE~ 7- 10/M , 7-:~~' 7~_~ EE I~/ ALE A15iO\'i eLK RS ROY ~ , '-to LATCHES J T6~~R_ B '--- CONTROL I + 256 II 8 RAM 8355 I ROM + I/O I OR. 8755A IPROM + 1/0\ 81l18li '---- t do$$$ BBB BB Figure 13a. 8085AH Minimum System Configuration (Memory Mapped 1/0) 2-36 AFN·Ol96OC 8155H/8156H/8155H-218156H-2 8088 FIVE CHIP SYSTEM • 381/0 Pins Figure l3b shows a five chip system containing: • 1 Interval Timer • 1.25K Bytes RAM • 2 Interrupt Levels • 2K Bytes ROM ,/' /' Vss Vee I I PORr~ S+- ~I-_WR CE RD PORT 8155"'2 B po(8) ALE PORT~ DATAl ,C (6) --y' ADDR IN_ 101M TIMER OUT ~ RESET Aa-A19 1------- - ADDR ~ lOW RD ADo -AD7 /1 ADDRIDATA P', ALE ~ CLK " \-~ to.. CE PORT A W ~ A8 _10 8088 'V 8355-21 r- READY 8755A-2 MN/M-X f--Vee DATAl -V ADDR Vee rDl ~ RST® ALE I-- f-- 101M PORT po I Rli I-- I-- I- X, X, ~- RESET B CLK WR I-- 1A- READY Vee READY ~ 101M I-- iOR.-J RES .--- I-- 8284 RESET I-- I II Vss Vee Voo LROG Vee I RDYl GND WR GND 'MANUAL RESET .... , RD (Vss) CD CE, 8185-2 ALE \ I-- CS. rl-- CE, I\-~ Aa,Ag V ADo_7 -v J 1 Vss Vee , Figure 13b. 8088 Five Chip System Configuration 2-37 AFN·Ol86OC 8155H/8156H/8155H·2/8156H·2 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................ O°C to +70° C tion of the device at these or any other conditions above Storage Temperature ............... -6S0Cto+1S0°C those Indicated In the operational sections of this Voltage on Any Pin specificatIon is not Implied. Exposure to absolute maxi- With Respectto Ground ............... -O.SV to +7V mum rating condItions for extended periods may affect Power DIssipation ................... . ........ 1 SW devIce reliabIlity D.C. CHARACTERISTICS (TA = ooe to 70°C, Vee = SV ± 10%) Symbol Parameter Min. Max. Units Test Conditions V,l Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 Vcc +O· 5 V VOL Output Low Voltage 0.45 V IOl = 2mA VOH Output High Voltage 2.4 V IOH = -400J,lA III Input Leakage ±10 J,lA OV.; VIN .; Vee ILO Output leakage Current ±1O J,lA 0.45V <; VOUT <; Vee Icc Vee Supply Current 125 mA IldCE) Chip Enable Leakage 8155H +100 MA OV .; VIN .; Vee 8156H -100 MA A.C. CHARACTERISTICS (TA = ooe to 70°C, Vee = SV ±10%) I 8155H/8156H 8155H·218156H·2 Symbol' Parameter Min. Max. Min. Max. Units tAL Address to latch Set Up Time 50 30 ns , tlA Address Hold Time after latch 80 30 ns tle Latch to READ/WRITE Control 100 40. ns tRO Valid Data Out Delay from READ Control 170 140 ns tAD Address Stable to Data Out Valid 400 330 ns tlL latch Enable Width 100 70 ns tROF Data Bus Float After READ 0 100 0 80 ns tCL READIWRITE Control to Latch Enable 20 10 ns tce R EADIWR ITE Control Width 250 200 ns tow Data In to WR ITE Set Up Time 150 100 ns two Data In Hold Time After WR ITE 25 25 ns tRV Recovery Time Between Controls 300 200 ns twp WR ITE to Port Output 400 300 ns tpR Port Input Setup Time 70 50 ns tRP Port Input Hold Time 50 10 ns tSBF Strobe to Buffer Full 400 300 ns tss Strobe Width 200 150 ns tRBE READ to Buffer Empty 400 300 ns tSI Strobe to I NTR On 400 300 ns 2-38 AFN·01960C 8155H/8156H/8155H-2/8156H-2 A.C. CHARACTERISTICS (Continued) (TA = O°C to 70°C, Vee = 5V ±10%) 8155H/8156H 8155H-2/8156H-2 Symbol Parameter Min. Max. Min. Max. Units tRDI READ to INTR Off 400 300 ns tpss Port Setup Time to Strobe Strobe 50 0 ns tpHS Port Hold Time After Strobe 120 100 ns tSSE Strobe to Buffer Empty 400 300 ns tWSF WR IT E to Buffer Full 400 300 ns tWI WR ITE to INTR Off 400 300 ns tlL TIMER-IN to TIMER-OUT Low 400 300 ns tTH TIMER-IN to TIMER-OUT High 400 300 ns tRDE Data Bus Enable from READ Control 10 10 ns t, TIMER-IN Low Time 80 40 ns t2 TIMER-IN High Time 120 70 ns A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 2. 0'5 =x:: > TEST POINTS ::x= < DEVICE UNDER TEST !JeL" 'SOpF -=- A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND a 45V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 CL = 150pF AND 0 BV FOR A LOGIC 0 C L INCLUDES JIG CAPACITANCE WAVEFORMS READ CE (8155H , \ DR CE(8156H , /' f\ / 101M \ \ 'AD 7 )< ADDRESS C ] DATA VALID ~ --tAl_ - t LA - - AL E / \ ( _t _ --'LL-- __ tRDE_ ROF RD [\--'RD-_ .v ---tlC- --tCl- \- _ t cc - - - - - - t RV - 2-39 AFN-O'960C inter 8155H/8156H/8155H-2/8156H-2 WAVEFORMS (Continued) / WRITE CE(8155H) \ ( \ DR CE(8158H) I 1\ / 101M \ V \ . ADO_7 ~ ADDRESS K } DATA VALID K ~tAL- - t LA - + ~tDW------' -'Cl- ALE I \ V -'"C~I -- tll - .....--- tWD~ 1---------- tee - k' . . . . . . . - - tRV I\- ------------ STROBED INPUT BF INTR \ '!i / ! 2-40 AFN-01960C 8155H/8156H/8155H-2/8156H-2 WAVEFORMS (Continued) STROBED__ OU_T_P_U_T________________ -JJ~\ ~r--------------- ~"': . 1-):-/ ~~ I ;rlr--- tWBF INTR 'x-J ________ ~ +-~ /____________________________________________ J 'WI ) Wi'i \ ) J ~ r-twp OUTPUT DATA TO PORT X BASIC INPUT BASIC OUTPUT RD INPUT DATA BUS· ',. t._!_'"'_fI ==:x---------k== ~=====~ _________ ~,.oo,· WA OUTPUT ==-=-.::-'::-_J<\-tr----t "DATA BUS TIMING IS SHOWN IN FIGURE 7 TIMER OUTPUT COUNTDOWN FROM 5 TO 1 I LOAD COUNTER FROM CLR ___ 2 I , I RELOAD COUNTER FROM CLR I 2 I 1 TIMER IN TIMER OUT (PULSE) " \- INGlE ___ 1) J " T1MEROITT (SOU ARE WAVE) " (NOTE \"., _ _ _ _ _11_ _ _ J " NOTE 1 THE TIMER OUTPUT IS PERIODIC IF IN AN AUTOMATIC RELOAD MODE 1M, MODE BIT = 11 2-41 inter 8155/8156/8155-2/8156-2 2048 BIT STATICMOS RAM, WITH I/O PORTS AND,TIMER • 256 Word x 8 Bits • 1 Programmable 6-Bit I/O Port • Single +5V Power Supply • Programmable 14-BIt Binary Counter/ Timer • Completely Static Operation • Compatible with 8085A and 8088 CPU • Internal Address Latch • Multiplexed Address and Data Bus • 2 Programmable 8 Bit I/O'Ports • 40 Pin DIP \ The 8155 and 8156 are RAM and I/O chips to be used in the 8085A and 8088 microprocessor systems. The RAM portion is designed with 2048 static cells organized as 256 x 8. They have a maximum access time of 400 ns to permit use with no wait states in 8085A CPU. The 8155-2 and 8156-2 have maxi mum access ti mes of 330 ns for use with the 8085A-2 and the 5 MHz 8088 CPU. The 1/0 portion consists of three general purpose 1/0 ports. One of the three ports'can be programmed to be status pins. thus allowing the other t""o ports to operate in handshake !'lode. A 14-bit programmable counter/timer is also included on chip to provide either a square wave or terminal count pulse for the CPU system depending on timer mode. PCa vee pc. pc. TIMER IN PC, 101M RESET PCo G PAo. . 7 PC. PB, ADO-7 256 X B TIMER OUT PBs STATIC 101M PBs RAM PB. * ALE RD G P"o-, RD WR ALE ADo PBa PB. PB, PBo WR AD, PA, G PC o_s RESET TIMER AD. PAs ADa PAs AD. PA. TIMER ClK Vee (+5V) AD. PA a fiiiillfO[j'f Vss (OV) AD. PAz AD, PA, Vss PAo • 8155/8155·2 = CE, 8156/8156·2 = CE Figure 1. Block Diagram Figure 2. Pin Configuration 2-42 AFN.()()2()lD inter 8155/8156/8155-2/8156-2 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................ O°Cto +70°C tion of the device at these or any other conditions above Storage Temperature ............... -65°Cto +150°C those indicated in the operational sections of this Voltage on Any Pin specification is not implied. Exposure to absolute maxi- With Respect to Ground ............... -O.5V to +7V mum rating conditions for extended periods may affect Power Dissipation ............................. 1.5W device reliability. D.C. CHARACTERISTICS ITA = O°C to 70°C; Vee = 5V ± 5%) SYMBOL PARAMETER MIN. MAX. UNITS TEST CONDITIONS Vil Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 Vee+O· 5 V Val Output Low Voltage 0.45 V IOl = 2mA VOH Output High Voltage 2.4 V 10 H = -400/.LA III In put Lea kage ±10 f.lA OV '" VIN '" Vee ILO Output Leakage Current ±10 /.LA 0.45V .;; VOUT .;; Vee Icc Vee Supply Current 180 mA Ill(CE) Chip Enable Leakage 8155 +100 p.A OV '" VIN '" Vee 8156 -100 p.A 2-43 AFN~OO201D inter 8155/8156/8155-2/8156-2 A.C. CHARACTERISTICS (TA = oOc to 70°C; VCC = 5V ± 5%) 8155/8156 81 !i5-2/8156-2 SYMBOL PARAMETER MIN. MAX. MIN. MAX. UNITS tAL Address to Latch Set Up Time 50 30 ns' fLA Address Hold Time after Latch 80 30 ns tlC Latch to R EAD/wR ITE Control 100 40 ns tRO Valid Data Out Delay from READ Control 170 140 ns tAD Address Stable to Data Out Valid 400 330 ns tll Latch Enable Width 100 70 ns tROF Data Bus Float After READ 0 100 0 BO ns tCl R EAD/WR ITE Control to Latch Enable 20 10 ns tce READ/WR ITE Control Width 250 200 ns tow Data In to WR ITE Set Up Time 150 100 ns two Data In Hold Time After WRITE 25 25 ns tRv Recovery Tim~ Between Controls, 300 200 ns twp WR ITE to Port Output 400 300 ns tpR Port Input Setup Time 70 50 ns tRP Port Input Hold Time 50 10 ns tSBF Strobe to Buffer Full 400 300 ns tss Strobe Width 200 150 ns tRBE READ to Buffer Empty 400 300 ns tSI Strobe to INTR On 400 300 ns tROI READ to INTR Off 400 300 ns tpss Port Setup T[me to Strobe Strobe 50 0 ns tpHS Port Hold Time After Strobe 120 100 ns tSBE Strobe to Buffer Empty 400 300 ns tWBF WR ITE to Buffer Full 400 300 ns tWI WR ITE to I NTR Off 400 300 ns tTL TIMER·IN to TlMER·OUT Low 400 300 ns tTH TIMER·IN to TIMER·OUT High 400 300 ns tROE Data Bus Enable from READ Control 10 10 ns t1 TIMER·IN Low Time BO 40 ns t2 TIMER·IN High Time 120 70 ns A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT "=X > 0.45 2.0 0.8 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 045V FOR ' A LOGIC 0' TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 08v FOR A LOGIC o· TEST POINTS < 2.0 0.8 x= DEVICE UNDER TEST C L ",,150pF I}CL~150PF CL INCLUDES JIG CAPACITANCE ( 2-44 AFN·00201D intel~ 8185/8185-2 1024 x 8-BIT STATIC RAM FOR MCS-85@ • Multiplexed Address and Data Bus • Low Standby Power Dissipation • Directly Compatible with 8085A and iAPX 88 Microprocessors • Single +5V Supply • Low Operating Power Dissipation • High Density 18-Pin Package The Intel@ 8185 is an 8192-bit static random access memory (RAM) organized as 1024 words by 8-bits using N-channel Silicon-Gate MOS technology. The multiplexed address and data bus allows the 8185 to interface directly to the 8085A and iAPX 88 microprocessors to provide a maximum level of system integration. The low standby power dissipation minimizes system power requirements when the 8185 is disabled. The 8185-2 is a high-speed selected version of the 8185 that is compatible with the 5 MHz 8085A-2 and the 5 MHz iAPX 88. ADO Vee AD, RD CS CE, AD2 WR CE2 RD R/W LDGIC AD:! ALE WR ALE AD, CS ADs CE, AD6 CE2 AD., A. DATA 1K x 8 ADo-AD-, BUS RAM Vss As BUFfER MEMORY ARRAY ADO-AD-, ADDRESS/DATA LINES As. A. ADDRESS LINES CS CHIP SELECT CE, CHIP ENABLE (101M) As."o----I CE2 CHIP ENABLE ALE ALE ADORESS LATCH ENABLE WR WRITE ENABLE Figure 1. Block Diagram Figure 2. Pin Configuration Intel Corporahon Aaaumea No Reaponslb,lly for the Use of Any CIrcUitry Other Than Circuitry EmbodIed In an Intel Product No Other Circuli Patent Licenses ale Imphed © INTEL CORPORATION, 1980 2-45 AFN·01230C 8185/8185-2 FUNCTIONAL DESCRIPTION The 8185 has been designed to provide for direct int\lrface III to the multiplexed bus structurp and bus timing of the 8085A microprocessor. . -- TRAp x, x, RESET, IN HOLD --- - AST7,5 HlOA At the beginning of an 8185 memory access cycle, the 8- bit address on ADo-7, As and As, and the status of GEl and CE2 are all latched internally in the 8185 by the falling edge -- AST6,5 AST5,5 8085A SOD SID - - [NTR S,_ RESET rNTA of ALE. If the latched status of both GEl and GE2 are ADDR/ OUT So- ADDR OAT A ALE RD WR 101M ROY elK active, the 81$5 powers itself up, but no action occurs until the GS line goes low and the appropriate RD or WR control (8' (81 VI' VI' signal input is activated. The GS input is not latched by the 8185 in order to allow I~I--'- CE POA~W the maximum amount of time for address decoding in selecting the 8185 chip. Maximum power consumption WA _ PORT A08156 B W (8) savings will occur, however, only when GEl and GE2 are ALE POAT~ activated selectively to power down the 8185 when it is not DATAl C (6) ADOR in use. A possible connection would beto wire the 8085A's 101M line to the 8185's GEl input, thereby keeping the " IN 8185 powered down during 1/0 and interrupt cycles. 101M RESET TIMER OUT ;:=: Table 1. rOW Truth Table for Ri5 Power Down and Function Enable W ALE PORT (CS*}[2] I~- CE A CE, CE2 CS 8185 Status 1 X X 0 Power Down and == V AS 10 8355/ 8755A Function Disable[l] DATA! ADDR X 0 X 0 Power Down and 0 1 1 0 Function Disable[l] Powered Up and 101M RESET PORT B ¢ ADY Function Disable[l] >-- elK 0 1 0 1 Powered Up and Enabled t tt t Vss Vee Voo PROG NOTES: X: Don't Care. WR 1: Function Disable Implies Data Bus in high impedance state Ri5 and not writing. GE, 8185 2: CS' = (CEl = 0) • (CE2 = 1) • (CS = 0) ALE CS' = 1 sigmfies all chip enables and chip select active 1-- ,,- CS, eE z A g ,A9 Table 2. ADo7 Truth Table for Control and Data Bus Pin Status vt ..IVee ~ ADO_7 During Data (CS*) RD WR Portion of Cycle 8185 Function 0 X X Hi-Impedance No Function 1 0 1 Data from Memory Read Figure 3. 8185 in an MCS-85 System 1 1 0 Data to Memory Write 4 Chips. 1 1 1 Hi-Impedance Reading, but not· 2K Bytes ROM Driving Data Bus 1.2SK Bytes RAM 38 I/O Lines NOTE: 1 Counter/Timer X' Don't Care. 2 Senal I/O Lines S Interrupt Inputs 2-46 AFN-Q123OC inter 8185/8185-2 iAPX 88 FIVE CHIP SYSTEM: • 1.25 K Bytes RAM • 2 K Bytes ROM • 38 I/O Pins • 1 Internal Timer • 2 Interrupt Levels 0. / ' Vss Vee f I : ~t- ~ POR!~ ~t---WR ~ Rli POR~ (8) 815&-2 ALE PORT~ DATAl C (8) A " ADDR y " IN_ 101M TIMER REser OUT :-- As-A19 r - AOOR --- ~ iOW Rli AD o -A0 7 ~ ~ ADDR/DATA ALE ,----- CLK '\-~ PORT " CE A ?~ " AS_tO ,--- READY 8088 MN/MX r-Vcc ;: 8355-21 8788A-2 DATAl ADDR Vee CDJ RST ® ALE Rli I-- I-- 101M PORT ~ I I-- I-- t - X, x, ~- RESET B l4 CLK WR I-- Vee READY READY r-- 101M I-- iOii -.J RES 82_ c----- I-- RESET I-- 111 Vss Vee Voo LROG RDY1 Vee ~ , GND Wli 6 'MANUAL RESET .... Rli GND (Vss) Q) CE~ 818&-2 ALE It- es. CE, If-t-, \-1-- Aa·Aa ADo_7 " JL Vss , Figure 4. IAPX 88 FIve ChIp System Conf,guratlon 2-47 AFN-0123DC 81'85/8185-2 ABSOLUTE MAXIMUM RATINGS* -NOTICE: Stresses above those listed IInder "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias .•..••..•..•.. o·c to +70·C tion of the device at these or any other conditions above Storage Temperature ...••...•..... -65·C to +150·C those indicated in the operationel sections of this specifi- Voltage on Any Pin cation is not implied. Exposure to absolute maximum with Respect to Ground ••.••......•.• -0.5V to +7V rating conditions for extended periods may affect device Power Dissipation .......•..•.....•....•...•••. 1.5W reliability. D.C. CHARACTERISTICS (TA = o·c to 70·C, Vcc = 5V ± 5%) Symbol Parameter Min. Max. Units TeB,t Conditions Vil Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 Vcc+0.5 V VOL Output Low Voltage 0.45 V IOl = 2mA VOH Output High Voltage 2.4 IOH = - 400j.lA ill Input Leakage ±10 j.lA OV ,;:VIN .;:Vee ILO Output Leakage Current ±10 j.lA 0.45V :S VOUT :S Vcc Icc Vcc Supply Current Powered Up 100 mA Powered Down 35 mA A_C_ CHARACTERISTICS (TA = o·c to 70·C, Vcc = 5V ± 5%) 8185 8185-2 Symbol Parameter Min. Max. Min. Max. Units tAL Address to Latch Set Up Time 50 30 ns tlA Address Hold Time After Latch 80 30 ns kc Latch to READIWRITE Control 100 40 ns tRO Valid Data Out Delay from READ Control 170 140 ns tlO ALE to Data Out Valid 300 200 ns tll Latch Enable Width 100 70 ns tROF Data Bus Float After READ 0 100 0 80 ns tCl READIWRITE Control to Latch Enable 20 10 ns tcc READ/WRITE Control Width 250 200 ns tow Data In to WRITE Set Up Time 150 150 ns two Data In Hold Time After WRITE 20 20 ns tsc Chip Select Set Up to Control Line 10 10 ns tcs Chip Select Hold Time After Control 10 1'0 ns tAlCE Chip Enable Set Up to ALE Falling 30 10 ns tlACE Chip Enable Hold Time After ALE 50 30 ns 2-48 AFN-0123OC inter 8185/8185-2 A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LQAD CIRCUIT INPUT/OUTPUT 2.' 0.45 ==>(2.0 > - 0.8 TEST POINTS <2.o)C 0.8 _ DEVICE UNDER TEST i}Cl~150PF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "1" AND 045V FOR -= A LOGIC' 0 " TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC' l' AND 0 BV FOR A LOGIC "0 " Cl = 150pF C L INCLUDES JIG CAPACITANCE WAVEFORM ALE (CE, =O~. ICE,"'i ADo-AD7 (READ CYCLE) (As, Ag) --~tcc----~I (WAITE CYCLE) \~__~/~__x_c~_. {SELECTED) ---x-- (DESELECTED) 2-49 AFN-01230C 8205 HIGH SPEED 1 OUT OF 8 BINARY DECODER • I/O Port or Memory Selector • Low Input Lo~d Current - .25 mA' max., 1(6 Standard TTL Input Load • Simple Expansion - Enable Inputs • Minimum Line Reflection - Low • High Speed Schottky Bipolar Voltage Diode Input Clamp Technology - 18ns Max. Delay • Outputs Sink 10 mA min. • Directly Compatible with TTL Logic Circuits • 16-Pin Dual-In-Line Ceramic or Plastic Package The Intel e 8205 decoder can be used for expansion of systems which utilize input ports, output ports, and memory components with active low chip select input. When the 8205 is enabled, one of its 8 outputs goes "low," thus a single row of a memory system is selected. The 3-chip enable inputs on the 8205 allow easy system expansion. For very large systems, 8205 decoders can be cascaded such that each decoder can drive 8 other decoders for arbitrary memory expansions. The 8205 is packaged in a standard l6-pin dual in-line package, and its performance is specified over the temperature range of O"C to +75°C, ambient. The use of Schottky barrier diode clamped transistors to obtain fast switching speeds results in higher performance than equivalent devices made with a gold diffussion process. AD A, Ao 16 Vee A, A, 15 00 A2 14 0, 8205 E, 4 13 °2 8205 E, E2 12 °1 E, E3 6 11 0, E, 0, 10 °5 GAO 8 9 06 ADDRESS fNABlE OUTPUTS , 2 '3 " • A, A 2, E, L " Ao D 3 4 1 L L L L H L H H H H H H H' H L L L L H H L H H H 4 H H L H L L L H H H L H H H H H H H L L L H H H H L H H H H L L H L L H H H H H L H H H H' L H L L H H H H H H L H H L H H H H H H H H X H X H X L L L L L H H L H H H " H H H H H H H H H H L H H L H AD A, E, E3 ADDRESS INPUTS ENABLE INPUTS L X X X H L L H H H H H H H H 00 07 DE.COOED OUTPUTS X X X L H L H H H H H H H H X X X H H L H H H H H H H H X X X H L H H H H H H H H H X X X L H H H H H H H H H H X X X H H H H H H H H H H H Figure 1. logic Symbol Figure 2. Pin Configuration ; 2-50 8205 FUNCTIONAL DESCRIPTION Decoder ... o~ The 8205 contains a one out of eight binary decoder. It ac- A, (Y, cepts a three bit binary code and by gating this input, crea,tes an exclusive .output that represents the value of the input A, 6; code. 0; DECODER For example, if a binary code of 101 was present on the AO, 0; A 1 and A2 address input lines, and the device was enabled, an active low signal would appear on ·the 05 output line. °5 Note that all of the other output pins are sitting at a logic high, thus the decoded output is said to be exclusive. The °6 decoders outputs wHI follow the truth table shown below in 0, the.same manner for all other input variations. Enable Gate ENABLE GATE E,---er...... (El E2 E3} E, When using a decoder it is often necessary to gate the out- E3---~.J puts with timing or enabling signals so that the exclusive output of the decoded value is synchronous with the overall Figure 3. Enable Gate system. The 8205 has a bu ilt-in function for such gating. The three enable inputs (E1, [2, E3) are ANDed together and create a single enable signal for the decoder. The combination of ADDRESS ENABLE OUTPUTS both active "high" and active "low" device enable inputs Ao A, A, E, E, E3 a 1 2 3 4 " G 7 provides the designer with a powerfully flexible gating func- L L L L L H L H H H H H H H H L L L L H H L H H H '1 H H tion to help reduce package count in his system. L H L L L H H H L H H H H H H H L L L H H H H L H '1 H H L L H L .L H H H H H L H H H H L H L L .H H H H H H L H H L H H L L H H H H H H H L H H f' H L L H H H H H H H H L X X X L L L H H H H H H H H X X X H L L H H H H H H H H X X X L H L H H H H H H H H X X X H H L H H H H H H H H X X X H L H H H H H H H H H X X X L H H H H H H H H H H X X X H H H H H H H H H H H 2-51 AFN-00204C 8205 Applications of the 8205 ray of 8205s can be used to create a simple interface to a , 24K memory system. The 8205 can be used in a wide variety of applications in microcomputer systems. I/O ports can be decoded from the The memory devices used can be either ROM or RAM and 'address bus, chip select signals can be generated to select are 1K in storage capacity. 2708s and 2114As are devices memory devices and the type of machine state such as in typically used for this application. This type of memory device has ten (1'0) address inputs and an active "low" 8008 systems can be derived from a simple decoding of the chip select (eS). The lower order address bits AO-AS state lines (SO, Sl, S2) of the 8008 CPU. which come from the microprocessor are "bussed" to all 1/0 PORT DECODER memory elements and the chip select to enable a specific device or group of devices comes from the array of 8205s. Shown in the figure below is a typical application of the The output of the 8205 is active low so it is directly compat- 8205. Address input lines are decoded by a group of 8205s ible with the memory components. (3). Each input has a binary weight. For example, AD is as· signed a value of 1 and is the LSB; A4 is assigned a value of Basic operation is that the CPU issues an address to identify 16 and is the MSB. By connecting them to the decoders as a specific memory location in which it wishes to "write" or shown, an active low signal that is exclusive in nature and "read" d~ta. The most significant address bits A 10-A 14 are represents the value of the input address lines, is available at decoded by the array of 8205s and an exclusive, active low, the outputs of the 8205s. chip select is generated that enables a specific memory de- This circllit can be used to generate enable signals for I/O vice. The least significant address bits AO-AS identify a ports or any other decoder related application. specific location within the selected device. Thus, all ad' dresses throughout the entire memory array are exclusive Note that no external gating is required to decode up to 24 in nature and are non-redundant. exclusive devices and that a simple addition of an inverter This technique can be expanded almost indefinitely to sup- or two will allow expansion to even larger decoder net· port even larger systems with the addition of a few inverters works. and an extra decoder (8205). CHIP SELECT DECODER Using a very similar circuit to the I/O port decoder, an ar- ",.,1 :> ~~MORIES A, fr.- 0, A" . A, CSo cs, A, A, o,fr.- A" A" A, CS, A, A, 0,0--- o,f>-- cs; 8205 8205 C54 0, fr.- Au E, cs, A, E, o,fr.- A, E, o,fr-- Au e; ~ CS] E, 0, p---- v" E, _A, 0, :>-- .. A, CSs CS 9 _A, 0, :>-- A, CS 10 _A, 0, :>-- 10 ~1 0, :>-- CHIP 8205 0,0--- '-2 " PORT NUMBERS 8205 SELECTS E, cs,; E, 0 , 0 - - 13 p---- ONO e; cs,4 EN E~ 0, o,p---- E, cs,s E, '----- '" oop-- " .. A, C5,6 cs;-; ' - - - A, o,~ L--A, o,p-- " 18 A, ES18 ~ o,p-- 8205 8205 o,p--- 20 cs;.; ;; cs;, E, o,p--- 21 e; CS; EN E, o,~ 22 E, CS;; E, o,p-- 23 Figure 4. 1/0 Port Decoder Figure 5. 24K Memory Interface 2-52 AFN-Q0204C 8205 ABSOLUTE MAXIMUM RATINGS* "NOTICE: Stresses above those listed under "Absolute Temperature Under Bias: Maximum Ratings" may cause permanent damage to the Ceramic .......................... -6S'C to +12S'C device. This is a stress rating only and functional opera- Plastic ............................ -6S'C to +7S'C tion of the device at these or at any other condition above Storage Temperature ............... -6S'C to +160'C those indicated in the operational sections of this specifi- All Output or Supply Voltages ........ -O.S to +7 Volts cation is not implied. Exposure to absolute maximum All Input Voltages .................. -1.0 to +S.S Volts rating conditions for extended periods may affect device Output Currents ............................. 12S mA reliability. D.C. CHARACTERISTICS (TA = O'C to + 7S'C. Vee = SV ±S%) Limit Symbol Parameter t-Mln:·-·· Unit Test Conditions IF INPUT LOAD CURRENT -025 rnA Vee = 5.25V. V F = 0.45V ---.--------i------+------ -----l---""'-------'------c-:--- IR INPUT LEAKAGE CURRENT 10 I'A Vee = 5 25V. V R = 525V Ve INPUT FORWARD CLAMP VOLTAGE -10 V Vee=475V.le=-50rnA ~-~.---+~---------------------+----+-------+------i---~~-----~~-------- VOL OUTPUT "LOW" VOL TAGE 0.45 V Vee = 4 75V. IOl = 10.0 rnA f--=----r----- ------- - --- -- - ~---e- ~N~~;~~:'~ ;JL\T::EE -- - -- --~~--f--08-5 _~ ~~~ : :.::V. I OH = -~5_rn!_ Il ____ ..._______ ___ _ V IH INPUT "HIGH" VOLTAGE 20 V f-_V--'e"'"e_=_5_._0V____ ____ _ Ise OUTPUT HIGH SH-6~----~40-- :::12f)-- ---rnA Vee = 5.0V. Vo~~ = OV CIRCUIT CURRENT --.--...-----+---~---+----+------------.--- OUTPUT "LOW" VOLTAGE 08 V Vee = 5 OV. lox = 40 rnA @ HIGH CURRENT POWER SUPPLY CURRENT 70 rnA Vee = S.25V A.C. CHARACTERISTICS (TA = O'C to + 7S'C. Vee = SV ±S%; unless otherwise specified) Symbol Parameter Max. Limit Unit Test Conditions ' t -, .. ADDRESS OR ENABLE TO 18 18 ns ns t, OUTPUT DELAY 18 ns - t 18 ns CIN (l, INPUT CAPACITANCE P8205 4ltyp) pF f : 1 MHz. vee: ov C8205 5ltyp) pF vBIAS : 2.0V. TAo 250 e 1 ThiS parameter IS perlodlcallv sampled and IS not 100 o.0 tested TYPICAL CHARACTERISTICS OUTPUT CURRENT VS. OUTPUT CURRENT VS. OUTPUT "LOW"' VOLTAGE OUTPUT "HIGH"' VOLTAGE DATA TRANSFER FUNCTION 50 40 20 , 0 , 0 , 0 20 30 40 50 4 6 8 10 1214 16 1820 OUTPUT "lOW' VOL lAGE ~V) OUTPUT 'HIGH" VOL lAGE (V) INPUT VOL T AGE IV) 2-53 AFN-00204C inter 8205 TYPICAL CHARACTERISTICS (Continued) ADDRESS OR ENABLE TO OUTPUT ADDRESS OR ENABLE TO OUTPUT DELAY VS. LOAD CAPACITANCE DELAY VS. AMBIENT TEMPERATURE ~r-----------------------~ 20r------------------------, VCC = 5.0V TA = 25'C ,..0 15 w;; ffi.s. ~~ Ww a:o 10 0,.. CI)::> Bll!: a:::> 00 SI 0 0':------:5"'0-----,:1OOc:-----:-l50=-----:~~ 0':-0------~25~--~--:5~0-------=75 LOAD CAPACITANCE (PF) AMBIENT TEMPERAT\lRE rC) SWITCHING CHARACTERISTICS TEST LOAD CONDITIONS OF TEST: TEST LOAD: 390n Input pulse amplitudes: 2.5V Input rJse and fall times: 5 nsec between 1V and 2V Measurements are made at 1.5V 2K All TranSistors 2N2369 or EQuivalent C l '" 30 pF WAVEFORMS ADDRESS OR ENABLE INPUT PULSE , -----"i t .. _,t++:4-" OUTPUT ______________ J x----------~---------x ~ _______________ _ 2-54 AFN-00204C 8212 8-BIT INPUT/OUTPUT PORT • Fully Parallel 8-Bit Data Register and Buffer • Asynchronous Register Clear • Service Request Flip-Flop for • Replaces Buffers, Latches and Interrupt Generation Multiplexers in Microcomputer • Low Input Load Current - .25mA Max. Systems • Three State Outputs • Reduces System Package Count .• Outputs Sink 15 mA • Available in EXPRESS • 3.65V Output High Voltage for - Standard Temperature Range Direct Interface to 8008, 8080A, or - Extended Temperature Range 8085A CPU The 8212 input/output port consists of an ,8-bit latch with 3-state output buffers along with control and device selection logic. Also included is a service request flip-flop for the generation and control of interrupts to the microprocessor. The device is multi mode in nature. It can be used to implement latches, gated buffers or multiplexers. Thus, all of the principal peripheral and input/output functions of a microcomputer system can be implemented with this device. SERVICE REQUEST FF '\ DS, vee MD INT DI, DI. DO, DO. DI2 DI, IT> MO ----+H_,/ D0 2 DO, I!J> STB ~-"""-i_.J OUTPUT DI3 DI. BUFFER D0 3 DO. DI, Dis [I> D I , - - - - - - - + + - I DO. DOs DATA LATCH STB ~LR [S> [) I, ---------'''''-+-1 GND DS2 011 Ole DATA IN 00,-00, DATA OUT ~.OS2 DEVICE, SELECT MO MODE STB STROBE INT INTERRUPT (ACTIVE LOW} @> DI, - - -_ _ _ _+~ CLR CLEAR (ACTIVE LOW) §>O,.--------'---~ Figure 1. Logic Diagram Figure 2. Pin Configuration 2-55 8212 FUNCTIONAL DESCRIPTION Service Request Flip-Flop Data Latch The (SR) flip-flop is used to generate and control interrupts in microcomputer systems. It is asynchron- The 8 flip-flops that make up the data latch are of a "0" type design. The output (a) of the flip-flop will follow the ously set by the ern input (active low). When the (SR) flip- flop is set it is in the non-interrupting state. data input (0) while the clock input (C) is high. latching will occur when the clock (C) returns low. The output of the (SR) flip-flop (a) is connected to an inverting input of a "NOR" gate. The other input to the The latched data is cleared by an asynchronous reset "NOR" gate is non-inverting and is connected to the input (ClR). (Note: Clock (C) Overrides Reset (cui).) device selection logic (OS1 • OS2). The output of the "NOR" gate (iNT) is active low (interrupting state) for connection to active low input priority generating circuits. Output Buffer The outputs of the data latch (a) are connected to 3-state, SERVice ReoueST FF non-inverting Ol!tput buffers. These buffers have a common control line (EN); this control line either enables the buffer to transmit the data from the outputs of the data latch (a) or disables the buffer, forcing the output into a high impedance state. (3-state) IT> DS' [i]> DS2 The high-impedance state-allows the designer to connect the 8212 directly onto the microprocessor bi-directional IT> MD ---+H,--"" data bus. OUTPUT BUF FE R Control Logic DO,@> The 8212 has control inputs OS1, OS2, MO and STB. These inputs are used to control device selection, data latching, output buffer state and service request flip-flop. DS1, DS2 (Device Select) These 2 inputs are used for device selection. When OS1 is low and OS2 is high (OS1 • OS2) the device is selected. In [[> D', - - - - - - - - - ' - + 1 the selected state the output buffer is enabled and the service request flip-flop (SR) is asynchronously set. Ii]> D '5 - - - - - - - - t - t 1 MD (Mode) This input is used to control the state of the output buffer and to determine the source of the clock input (C) to the data latch. When MO is high (output mode) the output buffers are DOS®> enabled and the source of clock (C) to the data latch is from the device selection logic (OS1 • OS2). When MO is low (input mode) the output buffer state is determined by the device selection logic (OS1 • OS2) and the source of clock (C) to the data latch is the STB (Strobe) input. ~MO~ (os, DS;)'~DATA-OUT eaUALsi ! 0 0 0 3 STATE I i ci ~ g ~!~:TlEATCH 1 1 0 DATA lATCH o 0 1 DATA LATCH 1 0 1 DATA IN STB (Strobe) I 0 1 1 DATA IN L.'_ 1 1 DATA IN ·'NTERNAL SR FLIP FLOP This input is used as the clock (C) to the data latch for the CLR ~ RESETS DATA LATCH SETS SR FLIP FLOP input mode MO = 0) and to synchronously reset the (NO EFFECT ON OUTPUT BUFFER) service request flip-flop (SR). Note that the SR ffip-flop is negative edge triggered. 2-56 AFN·OO731C intef 8212 ABSOLUTE MAXIMUM RATINGS* 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias Plastic •.••••• o·e to +70·e tion of the device at these or any other conditions above Storage Temperature •••••........• -65·e to +160·C those indicated in the operational sections of this specifi- All Output or Supply Voltages ••.•..•• -0.5 to +7 Volts cation is not implied. Exposure to absolute maximum All Input Voltages .................. -1.0 to 5.5 Volts rating conditions for extended periods may affect device Output Currents ............................. 100mA reliability. D.C. CHARACT-=:RIS-rICS (TA= oocto +75°C, Vcc= +5V ± 5%) Limits Symbol Parameter Unit Test Conditions Min. Typ. Max. IF Input Load Current, ACK, OS2, CR, 0\1-0Is Inputs -.25 mA VF = .45V IF Input Load Current MO Input -.75 mA VF =.45V IF Input'Load Current OS1 Input -1.0 mA VF- .45V IR Input Leakage Current, ACK, OS, CR, 0\1-0Is Inputs 10 p.A VR SVce IR Input Leakage Current MO Input 30 p.A VR SVce IR Input Leakage Current OS1 Input 40 p.A VR SVee Ve Input Forward Voltage Clamp -1 V Ie --5mA VIL Input "Low" Voltage .85 V VIH Input "High" Voltage 2.0 V VOL Output "Low" Voltage .45 V 10L = 15mA VOH Output "High" Voltage 3.65 4.0 V 10H - -lmA Ise Short Circuit Output Current -15 -75 mA Vo - OV, Vee = 5V 1101 Output Leakage Current High Impedance State 20 p.A Vo = .45V/5.25Vcc Icc Power Supply Current , 90 130 mA CAPACITANCE* (F = lMHz, VBIAS = 2.5V, SWITCHING CHARACTERISTICS Vcc = +5V, TA = 25·C) Conditions of Test ,Limits Input Pulse Amplitude = 2.5V Symbol Teat Input Rise and Fall Times 5ns Tyjl. Max. Between lV and 2V Measurements made at 1.5V CIN OS1 MO Input CapaCitance 9pF 12pF with 15mA and 30pF Test Load CIN O~, CLR, STB. 011-011! Input CapaCitance 5pF 9pF COUT 001-00S Output Capacitance 8pF 12pF 'This parameter is sampled and not 100% tested. NOTE' 1. Test CL' A1 A2 A.C. TESTING LOAD CIRCUIT tPD. tWE. tR. ts. tc 30pF 3000 6000 tEo ENABLEt 30pF 10KO 1KO ..,-Vcc tEo ENABLE I 30pF 3000 6000 R, te~DISABLEt 5pF 3000 6000 DEVICE tEo DISABLEI 5pF 10KO 1KO UNDER TEST .. 'Includes probe and Jig capacitance. c, INcwoes JIG CAPACITANCe 2-57 AFN'()0731C .8212 A.C. CHARACTERISTICS (TA = ()"C to + nrc, Vee = +5V ± 5%)" LImits symbol Parameter Unit Test' Conditions Min. Typ. Max. tpw Pulse Width 30 ns tPD Data to Output Delay 30 ns Note 1 tWE Write Enable to Output Delay 40 ns Note 1 tSET Data Set Up Time 15 ns tH Data Hold Time 20 ns tA Reset to Output Delay 40 ns Note 1 ts Set to Output Delay 30 ns Note 1 tE Output Enable/Disable Time 45 ns Note 1 te Clear to Output Delay 55 ns Note 1 "Note: For extended Temperature EXPRESS use M8212 AC Eleetrleals Parameters. APPLICATIONS Basic Schematic Symbols' Two examples of ways to draw the 8212 on system sehematies-(1) the top being the detailed view showing pin numbers, and (2) the bottom being the symbolic view showing the system input or output as a system bus (bus containing 8 parallel lines). The output to the data bus is symbolic in referencing 8 parallel lines. . INPUT DEVICE OUTPUT DEVICE -----,,, ".----- srB 4 3 STS 5 01 DO DI DO 6 ,. 10 (D~TAILED) 18 20 22 TNT 8212 CLR ,. 15 17 21 INPUT STROBE SYSTEM (S, MBOllC) SYSTEM INPUT OUTPUT GNO DATA BUS Figure 3. Basic Schematic Symbols Gated Buffer (3-State) Vee - . , - - - - - - - - - , The simplest use of the 8212 is that of a gated buffer. By ST. tying the mode signal low and the strobe input high, the data latch is acting as a straight through gate. The output INPUT OUTPUT buffers are then enabled from the device selection logic DATA 8212 DATA 5S1 and 082. (260 ~A) (15mA) (365V MIN) When the device selectipn logic is false, the outputs /ire 3- state. GATING { When the device selection logic is true, the input data from CONTROL , GNO IOO.oS2) - - -_ _ _ _---' the system is directly transferred to the output. The input data load is 250 micro amps. The output data can sink 15 milll amps. The minimum high output is 3.65 volts. Figure 4. Gated Buffer AFN.o0731C 8212 Bi·Directional Bus Driver Interrupt Instruction Port A pair of 8212's wired (back-to-back) can be used as a The 8212 can be used to gate the interrupt instruction, symmetrical drive, bi-directional bus driver. The devices normally RESTART instructions, onto the data bus. The are controlled by the data bus input control which is device is enabled from the interrupt acknowledge signal connected to DS1 on the first 8212 and to DS2 on the from the microprocessor and from a port selection signal. second. One device is active, and acting as a straight This signal is normally tied to ground. (OS1 could be used through buffer the other is in 3-state mode. This is a very to multiplex a variety of interrupt instruction ports onto a useful circuit in small system design. common bus). DATA BUS STB STB REST'AAT DATA r - - - - , ' \ 8212 t--'-----, DATA INSTRUCTION BUS BUS (RST 0 - RST 7) DATA BUS CONTROL (OSI) PORT SELECTION 10= L - RI INTERRUPT ACKNOWLEDGE - _ - _ - - ' II = R - LI STB Figure 7. Interrupt Instruction Port Output Port (With Hand-Shaking) The 8212 can be used to transmit data from the data bus to a system output. The output strobe could be a hand- shaking signal such as "reception of data" from the device GND that the system is outputting to. It in turn, can interrupt the system signifying the reception of data. The selection of the port comes from the device selection logic.( DS1 • DS2) Figure 5. Bidirectional Bus Driver DATA Interrupting Input Port BUS , - - - - OUTPUT STROBE This use of an 8212 is that of a system input port that STB accepts a strobe from the system input source, which in turn clears the service request flip-flop and interrupts the processor. The processor then goes through a service routine, identifies the port, and causes the device SYSTEM OUTPUT selection logic to go true - enabling the system input data onto the data bus. SYSTEM RESE T DATA l PORT SELECTION BUS SYSTEM ~ (LATCH CONTROl) INTERRUPT L..._ _ _~_ J IDS1.DS21 STB Figure 8. Output Port SYSTEM INPUT SYSTEM RESET PORT { SELECTION IDS1.0S21 -,----...,..... +-___ J~c~~~~~~~lCKT OR TO CPU INTERRUPT INPUT Figure 6. Interrupting Input Port 2-59 AFN'()0731C intJ 8212 808A Status Latch Here the 8212 Is used as the ststus latch for an 8080A .2 microcomputer system. The Input to the 8212 latch is SYNC directly from the 8080A data bus. Timing shows that when the SYNC signal is true, which is connected to the DS2 DATA 1-_,11.",1-+_ input and the phasEl 1 signal is true, which Is a TTL level STATUS }---f-A--i coming from the clock generator; then, the status data will be latched into the 8212. /:"8080A a,o 9 a 8 2 7 03 3 ~: : 0& 6 07 DATA BUS 19 SVNC DBIN .!l..- ¢1 02 STATUS 22 15 LATCH I 12V" ~ 0, Do ~ INTA ovJ \.......::: r------., ~, 7 ~ wo 9 16 fo- Ts- STACK HLTA 18 8212 F Ml OUT BASIC 20 "19 INP CONTROL 22 'f,- MEMR BUS CLOCK GEN. ~TLJ i""'- m " DRIVER ~ DS2 MD OS, 13 12 yl DBIN Note: The mode signal is tied high so th~t the output on the It is shown that the two areas of concern are the bi- latch is active ~nd enabled all the time. directional data bus of the microprocessor and the control bus. 2-60 AFN.(K)73'C 8212 TYPICAL CHARACTERISTICS INPUT CURRENT VS. INPUT VOLTAGE OUTPUT CURRENT VS. OUTPUT "LOW" VOLTAGE l00,------,-----r---...,-----, -50 vcc .. lsov ~ a ~ VCC=+50~ 801-----+---~---+---~ 1-'00 V / T A "25"C >- ili TA "O'C I i v/ TA " 75'C ~ -150 -- I------ ~-+ ::> " >- £ --, ---- ~ -200 ,- - I I i -250 -300 -3 -2 -1 +1 1- +2 +3 °O~-~~---~---~--~ INPUT VOLTAGE (V) OUTPUT "LOW" VOLTAGE (V) OUTPUT CURRENT VS. DATA TO OUTPUT DELAY OUTPUT "HIGH" VOLTAGE VS. LOAD CAPACITANCE 5Or--,---,---,----r---,---, Vee =+5 ov -51 I 40 -10 30 - ... -151-----T--+-~~- 10 50 °0L---5LO--'00L---,L50--20LO--2L50-.-J300· OUTPUT "HIGH . VOLTAGE (V) L9AO CAPACITANCE (pFI DATA TO OUTPUT DELAY WRITE ENABLE TO OUTPUT DELAY VS. TEMPERATURE VS. TEMPERATURE 22 40 +~ ov Ll-- 1 Vee = Vee'" +5 0V ---- 35 I 20 I !> , I ,,/ j I ! : I ~ 0 >- ~ 18 i ;~Jt",,, ."./ 30 : L i ~:J I----t----~ _,-~,-+ ! ! -"" >- ::> 0 16 ,. ,.", t-_ 25 , --I"" ST~~' 1,." t+_, I 0 I « >- ~ 14 j ! I -........' 20 DS2 DS;<~ ---;- t-_ r-- 0 12 15 '0 10 I -25 25 50 75 100 -25 25 50 75 '00 TEMPERATURE (OC) TEMPERATURE reI 2-61 AFN-00731C inter 8212 WAVEFORMS DATA ' 15VY-- -, - -- - - -- -- :"-Y,,5V , -------', /;==t pw '1. tH :.j'------- STB 0' 08, • DS2 l:svl \ , sv , I--twE=Jr_'---__---_ OUTPUT _ _ _ _ _ _ --.: _ _ _ _ _ -I\\",1_5V__________ 08,.002 ___________ 1_5~V~ ~1_5V __________ l_tE4r _________ ~~~~~ ___________ OUTPUT ~~ __ ~ ___ x'--________...;~ itpwi 15V~ ~15V I. tc '1 DO __________________ J~~----- DATA lSVX----------y15V -----.../~ tSET :t tH ~'---- STB 0' OS, • DS2 i I-- tPD-1 '~'______,---------_ ------------. ' , - - - - - - - - --- OUTPUT ______ _ -J\\",~_5V_ _ _ _ _ _ _ _ _ _ _ _ _ __ STe ____ -J~\",'_5V________________ Ltpw, 2-62' AFN'()0731C 8216/8226 4·BIT PARALLEL BIDIRECTIONAL BUS DRIVER • Data Bus Buffer Driver for 8080 CPU • 3.65V Output High Voltage for Direct Interface to 8080 CPU • Low Input Load Current - 0.25 mA • 3·State Outputs Maximum • Reduces System Package Coun.t • High Output Drive Capability for • Available in EXPRESS Driving System Bus - Standard Temperature Range The 8216/8226 is a 4-blt bidirectional bus driver/receiver. All inputs are low power TIL compatible. For driving MOS, the DO outputs provide a high 3.65V Vo H, and for high capacitance terminated bus structures, the DB outputs provide a' high 50 mA IOL capability. A non-inverting (8216) and an inverting (8226) are available to meet a wide variety of applica- tions for buffering in microcomputer systems. ·Note: The specIfications for the 32t613226 are Identical with those for the 821618226 8216 8226 01. cs Vee 01. DB. D0. 00. OlEN DO. DO. DB. 00, D~ DB, 01, 01, , 00, 01, DB, DB, 00, DO, DB, 00, 01, DB, 01, 01, GNO 01, DB, DB, DO, DO, 01, 01, DB, +---<> DB, 00, 00, DATA BUS Oa,.OB, BI-DIRECTIONAL 0'0.0 1, DATA INPUT 000 .003 DATA OUTPUT L_ OlEN ~_ _ _ -- _ -- j.... -.-J ----ocs L-_ _ -+_------<> cs OlEN OAT A IN ENABLE DIRECTION CONTROL OlEN 0--_-----' i! CHIP SelECT Figure 1. Block Diagrams Figure 2. Pin Configuration 2-63 inter 8216/8226 FUNCTIONAL DESCRIPTION Microprocessors like the 8080 are MOS devices and are generally capable of driving a single TTL load. The same is 01 0 o-------L:>--+--, DBo true for MOS memory. devices. While this type of drive is oooo---f-........c: ..-+---' sufficient in smail systems with few components, quite often it is necessary to buffer the microprocessor and memories 01, o---f--I>--+_--, when adding components or expanding to a multi-board DB, system. ~ DO,o---f-........c: ..-+--' The 8216/8226 is a four bit bi-directional bus driver specif- ically designed to buffer microcomputer system components. DB, Bidirectional Driver DO,o---I-........C\--+--' Each buffered line of the four bit driver consists of two 01, 0---1----4>-+--, separate buffers that are tri·state in nature to achieve direct DB, bus interface and bi-directional capability. On one side of DO,o---I--OC\--+--' the driver the output of one buffer and the input of another are tied together (DB), this side is used to interface to the system side components such as memories, 1/0, etc., be- cause its interface is direct TTL compatible and it has high cs drive (50mA). On the other side of the driver the inputs OlEN and outputs are separated to provide maximum flexibility. Of course, they can be tied together so that the driver can Figure 3a. 8216 Logic Diagram be used to buffer a true bi-directional bus such as the 8080 Data Bus. The DO outputs on this side of the driver have a 01 0 special high voltage output drive capability (3.65V) so that DBo direct interface to the 8080 and 8008 CPUs is achieved with 00 0 an adequate amount of noise immunity (350mV worst case). 01, Control Gating OlEN, CS DB, The CS input is actually a device select. When it IS "high" DO, the output drivers are all forced to their high· impedance 01, state. When it is at "zero" the device is selected (enabled) and the direction of the data flow is determined by the DB, DO, OlEN input. The OlEN input controls the direction of data flow (see 01, Figure 3) for complete truth table. This direction control DB, is accomplished by forcing one of the pair of buffers into its 00 3 0--- high impedance state and allowing the other to transmit Its data. A simple two gate Circuit is used for this function. The 8216/8226 i.s a device that will reduce component count L----4~~---o~ in microcomputer systems and at the same time enhance noise immunity to assure reliable, high performance op· eration. OlEN CS 0 0 01 ,DB , 0 DB' DO r+ ~ 1 1 }HIGH IMPEDANCE Figure 3b. 8226 Logic Diagram 2-64 AFN·00733C inter 821818228 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Temperature Under Bias ............. O°C to 70°C device. This is a str~ss rating only and functional opera- Storage Temperature . • . . . . . . . . .. -65°C to +150°C tion of the device at these or any other conditions above All Output and Supply Voltages. . • . . .. -0.5V to +7V those indicated In the operational sections of this specifi- cafion is not implied. Exposure to absolute maximum All Input Voltages ............... -1.0V to +5.5V rating conditions for extended periods may affect device Output Currents . . . . . . . . • . . . . . . . . . . •. 125 mA reliability. D.C. CHARACTERISTICS (TA = crc to +7crC, Vee = +5V ± 50/0) Limits Symbol Parameter Min. Typ. Max. Unit Conditions IFl Input Load Current OlEN, CS -0.15 -.5 mA VF =0.45 IF2 Input Load Current All Other Inputs -0.08 -.25 mA VF =0.45 IRl Input Leakage Current OlEN, CS 80 jJ.A VR =5.25V IR2 Input Leakage Current 01 Inputs 40 jJ.A VR =5.25V Ve Input Forward Voltage CI"mp -1 V Ic = -5mA Vil Input "Low" Voltage .95 V VIH Input "High" Voltage 2.0 V Output Leakage Current DO 20 jJ.A Vo = .45V15.25Vee 1101 (3-State) DB 100 8216 95 130 mA Icc Power Supply Current 8226 85 120 mA VOLl Output "Low" Voltage 0.3 .45 V DO Outputs IOl=15mA DB Outputs 10l =25mA 821Ei 0.5 .6 V DB Outputs 10l=55mA VO l 2 Output "Low" Voltage 8226 0.5 .6 V DB Outputs 10l=50mA VOHl Output "High" Voltage 3.65 4.0 V DO Outputs 10H = -1 mA VOH2 Output "High" Voltage 2.4 3.0 V DB Outputs 10H = -10mA los Output Short Circuit Curn!nt -15 -35 -65 mA DO Outputs Vo~OV, -30 -75 -120 mA DB Outputs Vcc=5.0V NOTE: TYPIcal values are f~r TA = 25°e. VCt:: a 5.0V. 2-65 AFN-00733C inter 8216/8226 CAPACITANCEIS) (VBIAS = 2.5V, VCC = 5.0V, TA = 25°C, f = 1 MHz) Limits Symbol Parameter Min. Typ.!l] Max. Unit CIN Input Capacitance 4 8 pF COUT1 Output Capacitance 6 10 pF COUT2 Output Capacitance 13 18 pF A.C. CHARACTERISTICS (TA = O°C to +70°C, Vcc = +5V ± 5%) Limits Symbol Parameter Min. Typ.ll] Max. Unit Conditions TpOl I nput to Output Delay DO Outputs 15 25 ns C L =30pF,R 1=300Q R2=600Q Tp02 Input to Output Delay DB Outputs 8216 19 30 ns C L =300pF, R 1=90Q 8226 16 25 ns R2 = 180Q Te Output Enable Time 8216 42 65 ns (Note 21 8226 36 54 ns (Note 31 \ To Output Disable Time 16 35 ns (Note 41 NOTE: Input pulse amplitude of 2.5V. Input rise and fall times of 5 ns between 1 and 2 volts. Output loading is 5 mA and 10 pF. Speed measurements are made at 1.5 volt levels. NOTES: 1. Typical valuM are for TA = 25°C, VCC = S.OV. 2. DO Outputs, CL = 30pF, Al = 300/10 Kn, A2 = 180/1Kn. DB Outputs, CL = 300pF, Al = 90/10 Kn, A2 = 180/1 K!1. 3. DO Outputs, CL = 3OpF, Rl = 300/10 Kn, R2 = 600/1 K; DB Outputs, CL = 30OpF, Rl = 90/10 Kn, R2 = 180/1 Kn 4. DO Outputs, CL = SpF, Rl = 300/10 Kn, R2 = 600/1 Kn. DB Outputs, CL = SpF, Rl = 90/10 Kn, R2 = 180/1 Kn. S. This parameter Is periodically sampled and not 100% tested. A.C, TESTING LOAD CIRCUIT """T'"" Vee DEVICE UNDER TEST 2-66 AFN-00733C 8216/8226 WAVEFORM INPUTS OUTPUT ENABLE ~tDj . r OUTPUTS 15VXr-----""~ •. IIoH --------------~ ~IIoL 5V 2-67 AFN-00733C infer 8218/8219 . BIPOLAR MICROCOMPUTER BUS CONTROLLERS FOR MCS-SO® AND 'MC8-85® FAMILIES • 8218 for Use in MCS-80® Systems • Reduces Component Count In • 8219 fol' Use inMCS-85® Systems Multimaster Bus Arbitration Logic • Coordinates the Sharing of a Common • Single +5 Volt Power Supply Bus Between Several CPU's • 28 Pin Package The 8218 and 8219 Microcomputer Bus Controllers consist of control logic which aUows a bus master device such as a CPU or DMA channel to interface with other masters on a' common bus, sharing memory and I/O devices. The 8218 and 8219 consist of: 1. Bus Arbitration Logic which operates from the Bus Clock (BCLK) and resolves bus contention between devices sharing a common bus. 2. Timing Logic which when initiated by the bus arbitration logic generates timing signals for the memory and I/O command lines to guarantee set-up and hold times of the address/data lines onto the bus. Thetiming logic also signals to the bus arbitration logic when the. current data transfer is completed and the bus is no longer needed. 3. Output Drive Logic which contains the logic and output drivers for the memory and I/O command lines. An external RC time constant is used with the timing logic to generate the guaranteed address set-up and hold times on the bus. The 8219 can interface directly to the 8085A CPU and the 8218 interfaces to the 80BOA CPU chip and the 8257 DMA controller. BCR1 vee (E) BUS ARBITRATION N.C. DYRD LOGIC iiS'i'B XSTR RSTB AlmI BCR1 OVRD (E) iii'R(j l!PRIl iiiffii DLYADJ BCLK ANYR ADEN TOTHEO ~TOJHE ROD iOSv BUS XSTR MASTER L..-VBUS Mlilil! iliWC XC1' iliAC MWfC GND DLYADJ xcv ANYR W! !lal! (A) lOi'iR loiM (A) (B) MW'fR WR (B) (C) iOiiii AD OUTPUT DRIVE LOGIC (D) MiiDR ASRli (C) (E) iCii2 BCR2 (D) ROD N.C '"' NO CONNECT . Figure 1. Block Diagram Figure 2. Pin Configuration 2-68 AFN-00208C inter 8218/8219 Table 1. Pin Description Signals Interfaced Directly to the System Bus Signals Generated or Received by the Bus Master Symbol TYpe Name and Function (Continued) BREQ 0 Bus Request: The Bus Request is used Symbol TYpe Name and Function with a central parallel priority resolution circuit. It indicates that the device needs to A'O'E'N 0 Address and Data Enable: Address and Data Enable indicates the Master has con- access the bus for one or more data trans- trol of the bus. It is often used to enable fers. It is synchronized with the Bus Clock. Address and Data Buffers on the bus, It is BUSY I/O Bus Busy: Bus Busy indicates to all master synchronous with Bus Clock. devices on the bus that the bus is in use. It ROD 0 Read Data: Read Data controls the direc- inhibits any other device from getting the tion of the bi-directional data bus drivers. It bus. It is synchronized with Bus Clock. is asynchronous to the Bus Clock. A high on BCLK I Bus Clock: The negative edge of Bus Clock ROD indicates a read mode by the master. is used to synchronize the bus contention OVRD I Override: Override inhibits automatic de- resolution circuit asynchronously to the select between transfers caused by a higher CPU clock. It has lOOns mono period, 35%- priority bus request. May be used for con- '65% duty cycle. It may be slowed, single secutive data transfers such as read- stepped or stopped. modify-write operations. It is asynchronous BPRN I Bus Priority In: The Bus Priority In indi- to the Bus Clock. cates to a device that no device of a higher XSTR I Transfer Start Request: Transfer Start Re- priority is requestong the bus. It is syn- quest indicates to the 8218/8219 that a new chronous with the Bus clock. data transfer cycle is requested to start. It is BPRO 0 Bus Priority Out: The Bus Priority Out is raised for each new word transfer in a mul- used with serial priority resolution circuits. tiple data word transfer. It is asynchronous Priorily may be transferred to the next lower to the ~us Clock. in priority as BPRN. XCP I Transfer Complete: Transfer Complete in- dicates to the 8218/8219 that the data has INIT I Initialize: The Initialize resets the 8218/ been received by the slave device in a write 8219 to a known internal state. cycle or transmitted by the' slave and re- MRBC 0 Memory Read Control: The Memory Read ceived by master in a read cycle. It is asyn- Control indicates that the Master is request- chronous to the Bus Clock. ing' a read operation from the addressed XCV 0 Data Transfer: Indicates that a data trans- location. It is asynchronous to the Bus fer is in progress. It is asynchronous to the Clock. Bus Clock. MWTC 0 Memory Write Control: The Memory Write WR. RD, I Write, Read, 10/Memory: WRITE, READ, Control indicates that data and an address 10/M 10/Memory are the control request inputs have been placed on the bus by the Master used by the 8085 and are internally decoded and the data is to be deposited at that loca- by the 8219 to produce the request signals tion. It is asynchronous to the Bus Clock. MRDR, MWTR, 10RR, 10WR. They are asyn- chronous to the Bus Clock. (8219 only) 10RC 0 I/O Read Control: The I/O Read Control in- ASRQ I Asynchronous Bus Request: Can be used dicates that the Master is requesting a read for interrupt status from the 8085. Acts like a operation from the I/O device addressed. It level sensitive asynch ronous bus is asynchronous to the Bus Clock. request-no RSTB needed. It is asynchron- 10WC 0 I/O Write Control: The I/O Write Control in- iiiiSiOthe Bus Clock. (8219 only) dicates that Data and an I/O device address MRDR, I Memory Read Request, Memory Write has been placed on the bus by the Master MWTR, Request, I/O Read Request, or I/O WrHe and the data is to be deposited to the I/O 10RR, Request: Indicate that address and data device. It is asynchronous to the Bus Clock. 10WR have been placed on the bus and the appro- Signals Generated or Received by the Bus Master priate request is being made to the ad- dressed device. Only one of these inputs BCR1/ I Bus Control Request: Bus Control Re- should be active at anyone time. They are BCR2 quest 1 or Bus Control Request 2 indicate to synchronous to the Bus Clock. (8218 only) the 8218/8219 that the Master device is mak- ing a request to control the bus. BCR2 is ANYR o Any Request: Any Request is the logical OR of the active state of MRDR, MWTR, active low in the 8218 .(BCR2). BCR2 IS ac- 10RR, i'OW'R. It may be tied to XSTR when tive high in the 8219. the rising edge of ANYR is used to initiate a transfer. . RSTB I Request Strobe: Request Strobe latches the status of BCR1 and BCR2 into the DLYADJ I Delay Adjust: Delay Adjust is used for con- 8218/8219. The strobe is active low in the nection of an external capacitor and resis· 8218 and negative edge triggered in the tor to ground to adjust the required set-up 8219. and hold time of address to control signal.' 2-69 AFN-00208C 8218/8219 FUNCTIONAL DESCRIPTION BPRO is used to allow lower priority devices to gain the bus when a serial priority resolving structure is used. The 8218/8219 is a bipolar Bus Control Chip which BPRO would go to BPRN of the next lower priority Master. reduces component count in the interface between a master device and the system Bus. (Master device: 8080, When priority is granted to the Master (a low on BPRN and 8085, 8257 (DMAU a high on BUSY) the Master outputs a BUSY signal on the next falling edge of BClK. The BUSY signal locks the The 8218 and 8219 serve three major functions: master onto the bus and prohibits the enable of any other 1, Resolve bus contention. masters onto the bus. ' 2, Guarantee set-up and hold time of address/data lines to I/O and Memory read/write control signals At the same time BUSY goes active, Address and Data (adjustable by external capacitor). Enable 1A'5ENi goes active signifying that the Master has 3. Provide sufficient drive on all bus command lines. control of the bus. ADEN is often used to enable the bus drivers. The Bus will be released only if the master loses priority; is Bus Arbitration Logic not in the middle of a transfer, and Override is not active or, If the Master stops requesting the bus, IS not In the !:lus Arbitration logic actjvity begins when the Master middle of a data transfer, and Override is not active. ADEN makes a request for use of the bus on BCR1 or BCR2. The then goes inactive. request is strobed in by RSTB. Following the next two falling edges of the bus clock (BClK) the 8218/8219 Provision has been made in the 8218 to allow bus- outputs a bus request (BREQ) and forces Bus Priority Out synchronous requests. This mode is activated when inactive (BPRO). See Figures 1a and 1b. BCR1, BCR2 and RSTB are all low. This action BREQ is used for requesting the bus when priority is asynchronously sets the synchronization flip flop (FF2) in decided by a parallel priority resolver circuit. Figure 3a. OVRIDE ~ - II- =u- -I =0-' SCRl BCR2 - 1 ] ./ SET SET ASVNCH. SYNCH PRIORITY REQUEST REQUEST AND Q D Q REOUEST LOGIC FFl FF2 r---< elK ClR elR I'-J I' ~ INIT Figure 3a. 8218 Bus Arbitration Logic 2-70 AFN-00208C 8218/8219 ADEN OVRIDE ASRq 1 SET ASYNCH SYNCH PRIORITY BUSY i!iillj BCRl REQUEST REOUEST AND BCR2 J ./ D Q D Q REQUEST LOGIC ""RN FF1 FF2 BPRO RSTB elK r------< elK elR elR I Figure 3b. 8219 Bus Arbitration Logic r I BCiJ( INIT Timing Logic Timing Logic activity begins with the rising edge of XSTR MRDR--~--------------~1 (Transfer Start Request) or weith ADEN going active, whichever occurs second. This action causes XCV IORR--~----------~r-~1 OUTPUT (Transfer Cycle) to go active. 50-200ns later (depending on CONTROL lOGIC resistance and capacitance at DL YADJ) the appropriate Control Outputs will go active If the control input is active. XSTR can be raised after the command goes active in the current transfer cycle so that a new transfer can be initiated immediately after the current transfer is complete. A negative going edge on XCP (Transfer Complete) will . cause the Control Outputs (MRDC, etc') to go inactive. CONTROL 50-200ns tater (depending on capacitance at DL YADJ) OUTPUT INACTIVE XCV will go inactive indicating the transfer cycle is completed. SET Additional logic Within the 8218/8219 guarantees that if a RDO -------------1.0 transfer cycle is started (XCY is active), but the bus is not elR requested (BREQ is inactive) and there is no command request input (ANYR is output low), then the transfer cycle will be cleared. This allows the bus to be released in applications where advanced bus requests are generated Figure 4a. 8218 Control Logic but the processor enters a HALT mode. 101M Control Logic DECODING AND AD OUTPUT The control outputs are generated in the 8219 by decoding CONTROL the 8085 system control outputs (I.e., RD, WR, 101M) or in LOGIC the 8218 by directly buffering the control inputs to the WR control outputs for use in an 8080 or DMA system (see Figures 4a and 4bl. The control outputs may be held high (inactive) by the Timing LogiC. Also the control outputs are ANYA enabled when ttie Master gains control of the bus and disabled when control is relinquished. CONTROL SET OUTPUT The Control LogiC also has two other outputs, ANYR (Any INACTIVE RDD Q Request) and ROD (Read Data). ANYR goes high (active) if any control requests (lOWR, etc') are active. ROD controls elR the direction of the Masters Bi-directional Data Bus Drivers. The Bus Driver will always be in the Write mode (ROD = Low) except from the start of a Read Control Request to 25 to 70ns after XCP is activated. Figure 4b. 8219 Control Logic AFN·0020BC 8218/8219 ABSOLUTE MAXIMUM RATINGS* "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ...... O°C to 70°C tion of the device at these or any other conditions above Storage Temperature •............. -65°C to +150°C those indicated in the operational sections of this specifi- Supply Voltage (Vee) . . . . . . . . . . . • . . . . .. -0.5V to +7V cation is not implied. Exposure to absolute maximum Input Voltage .............•.... -1.0V to Vee + 0.25V rating conditions for extended periods may affect device Output Current .....................•........ 100mA reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C; Vee = 5V ±5%) Limits Symbol Parameter Min. Typ. Max. Unit Test Conditions Ve Input Clamp Voltage -1.0 V Vee = O.OV, Ie = -5 mA IF Input Load Current . MRDR/INTA/MWTR/WR Vee = 5.25V IORR/RD, IOWR/IO/M -0.5 mA VF = 0.45V Other -0.5 mA IR Input Leakage Current 100 IlA Vee = 5.25 VR = 5.25 VTH Input Threshold Voltage 0.8 2.0 V Vee = 5V Icc Power Supply Current 200 240 mA Vee = 5.25V VOL Output Low Voltage Vee = 4.75 MRDC, MWTC, IORC, IOWC 0.45 V IOL = 32mA BREQ, BUSV 0.45 V IOL = 20mA XCV, ROD, ADEN 0.45 V 10L = 16mA BPRO,ANVR 0.45 V IOL = 3.2mA VOH Output High Voltage Vee = 4.75V MRDC, MWTC, IORC, IOWC 2.4 10H = -2mA All Other Outputs 2.4 10H = -4001lA los Short Circuit Output Current -10 -90 mA Vee = 5.25V, Vo = OV 10 (OFF) Tri-State Output Current -100 IlA Vee = 5.25V, Vo = 0.45V +100 IlA Vee = 5.25V, Vo = 5.25V CIN Input Capacitance Except Busy 10 20 pF CIO Input Capacitance Busy 25 35 pF 8218/8219 XSTR TO OUTPUT DEI,.AY (Tsco) 200 115 ~.J 150 125 DELAY 100 15 300pF 200pF .0 100pF H~0--'~OO~~~~'~3~00~~~~~~~~"~0~700~--.~OO~~_~-J OHMS One Shot, Delay Versus Delay Adjust Capacitance And Resistance 2-72 AFN-00208C inter 8218/8219 A.C. CHARACTERISTICS (TA = O°C to 70°C; Vcc = 5V ± 5%) Limits Symbol Parameter Min. Typ. Max. Unit Test Conditions tBCY Bus Clock Cycle Time 100 ns 35% to 65% Duty Cycle tpw Bus Clock Pulse Width 35 0.65 tBCY ns tROS RSTB to BCLK Set-Up Time 25 ns tcss BCR1 and BCR2 to RSTB 15 ns Set-Up Time tCSH BCR1 and BCR2. to RSTB 15 ns / Hold Time tROD BCLK to BREQ Delay 35 ns tpRNS BPRN to BCLK Set-Up Time 23 ns tBNO BRPN to BPRO Delay 30 ns tBYD BCLK to BUSY Delay 55 ns tCAD MRDR, MWTR, 10RR, 10WR 30 ns to ANYR Delay tsxD XSTR to XCV Delay 40 ns tSCD XSTR to MRDC, MWTC, 10RC, 50 200 ns Adjustable by External RIC 10WC Delay txsw XSTR Pulse Width 30 ns tXCD XCP to MRDC, MWTC, 10RC, 50 ns 10WC Delay txcw XCP Pulse Width 35 ns tCCD XCP to XCV Delay 50 200 ns Adjustable by External RIC tCMD MRDR, MWTR, 10RR, 10WR 35 ns to MRDC, MWTC, 10RC, 10WC tCRD MRDR, MWTR, 10RR, 10WR 25 ns to RDD Delay tRW RSTB Min. Neg. Pulse Width 30 ns tCPD BCLK to BPRO Delay 40 ns tXRD XCP to RDO Delay 25 70 ns A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE UNDER TEST - A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 045V FOR A lOGIC 0 TIMING MEASUREMENTS ARE MADE AT 1 5V FOA BOTH A LOGIC 1 AND 0 VL ~ 24V RL ~ 7500 CL ~ 100 pF CL INCLUDES JIG CAPACITANCE 2-73 AFN-00208C 8218/8219 WAVEFORMS SYNCHRONOUS BUS TIMING (System Bus Previously Not In Use) tROD lavo BUSY ADEN -------------------~~------'"---)~l----__1_-- CONTROL CYCLE (System Bus Previously Not In Use) MRi5R MWTR ~ lORA IOWR _tCAO_ f\--- !--tCAO_ \. ANYR / I---tCRD_ ROD . t~RD )J I -'"~} I XSTR V-t=- __ .1 - txsw xc. --'" \._-- tCCD- XCV _ _ _ _ _ _ ~ \ J _ tsxo_ _txco _ MRi5C MWTC I IORC lowe j \ tSCD _ _ ~tCMo_ tCMo 2-74 AFN-0020BC inter 8218/8219 WAVEFORMS (Continued) BUS CONTROL EXCHANGE (Master No.1 Leaving Bus And Master No.2 Getting On Bus) MRDR MWfR f6RR IOWR _ _M_A_ST_E_R_'_GE_T_S_OF_F_"_US-, MASTER 1 ANVR OUT AND XCP IN MASTER 1 XcV OUT ONE SHOT DELAY --:I MASTER 1 ADEN BUSY MASTER 1 HAS BUS MASTER 2 HAS BUS MASTER 2.A"fiE"N MRDR-----"'" MWi'R ~:~~~:T2S BUS 1llRl[ ii5WR DELAYED BY ONE SHOT FOR ADDRESS SETUP ' \ :~~~---------------------------------~~ ='RCm~2 ,un" iOWc " ~',,_ _ _ __ - MASTER 2 \'----- ·2-75 AFN-00208C inter 8218/8219 Ao·15 rD~ BOSDA ., ., 00-7 8228 8224 READY ,. READY MEMR MEMW MADR MWTR MADe MWTC ==: ffiB RESiN STSB lOR lOW 10RR IOWR IORC lowe ===: 00 03 BCRl seA2 8REa BUSY -- I RSTB ADEN 8218 BCLK SPRN --- --- DLYADJ BPRO - '1 W XSTR ±CE ANYR IN IT r RESET XACK (TRANSFER ACKNOWLEDGE) MC5-80® CPU With 8218 rD~ Ag·15 A°0-7 BOS5A WR WR MRDC RJj RO MWTC 101M 101M IORC INTA ASRO lowe READY ALE RSTB $- So BeR1 BREQ 8, seA2 REseT BUSY FF 8219 BClK ADEN iii>AN "-.,l. DLYADJ "1 ,± E BPRO XCP XSTR ANYR INIT 1 RESET XACK (TRANSFER ACKNOWLEDGE) MCS-85® CPU With 8219 2-76 AFN-oD208C 8218/8219 . ,--_ _ _ _ _ _ _ _ _ _ USE FALLING EDGE OF ALE TO INITIATE DECODE ~'"'"'.~"rn'~\ EXAMPLE OF BUS ACCESS DECODE LOGIC 8206 o 7475 ALE LEVEL ACTIVATED LATCH "TRANSPARENT" FLIP FLOP TO BCR2 AND XSTR AND GATE L----------------~ ____________ RESET L-----------------------------XACK (TRANSFER ACKNOWLEDGE) MCS-85® CPU With 8219 Using Local Memory 2-77 AFN-00208C 8218/8219 TO/FROM HIGHEST TO/FROM LOWEST PRIORITY BUS MASTER PRIORITY BUS MASTER 8218 8219 8218 BUS CLOCK "DAISY CHAIN" CONFIGURATION ~J REQUEST 1 ADEN 11 REQUEST I ADEN U REQUEST 1 ADEN 8219 8218 8219 BUSY BREQ SPRN ilCLR BUsY BREa SPAN BClK BUSY BAEO SPAN BelK t t t t t BUSCtOCK 1 I T ! ! PRIORITY RESOLVING LOGIC ~ I I PARALLEL REQUEST CONFIGURATION Two Methods of Connecting Multiple 8218/8219's To Resolve Bus Contention Among Multiple Masters 2-78 AFN-0020BC intJ 8224 CLOCK GENERATOR AND DRIVER FOR 801l0A CPU . • BOBOA Single Chip Clock Generator/Driver for CPU • Oscillator Timing Output for External System .' • Power-Up Reset for CPU • Crystal Controlled for Stable System Operati~n • Ready Synchronl:z;ing Flip-Flop • ~ectuces Sy~tem Pac~ageCount • Advanced Status Strobe • Available 11'1 EXPRESS ~ Sta~dard Tem~er~ture Range The Intel 8224 is a single chip clock generator/driver for the 8080A CPU. It is controlled by a crYl!tal, selected by the designer to meet a variety of system speed requirements. Also included are circuits to provi~e power-up reset, advance status strobe, and synchronization of ready. The 8224 provides the designer wit~ a significant reduction of packages used to gener!!te clocks am! timing for 8080A. RESET Vee ITh> XTAL1 osc 13> RESIN XTAL 1 IE> XTAL2 RDYIN X:rAL2 ~ ., ITI> TANK TANK " l!9 SYNC ., (TTL) ., osc .,(TTL)[9 STSTB 40, GND VOD [D SYNC STSTB!I> ID RESiN RESET II>. RrnN RESET INPUT -- IV RDVIN READY!!> RESET ROYIN READY RESET OUTPUT READY INPUT READY OUTPUT XTAL 1 XTAl2 TANK ! CONNECTIONS FOR CRYSTAL USED WITH OVERTONE XT At osc OSCI LLATOR OUTPUT sYNC STSTB SYNC INPUT STATUSSTB ., (TTL) .2 CLt5 (TTL LEVEL) ., (ACTIVE LOW) Vee +5V ~ !8080 1100 +12V CLOCKS GND ov Figure 1. Block Dla~ram Figure 2. Pin Configuration 2-79 8224 ABSOLUTE MAXIMUM RATINGS* "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Temperature Under Bias ....... ",' ...... O°C to 70°C device. This is a stress rating only and functional opera- Storage Temperature .............. -65°.C'to 150"C tion of the device at these or any other conditions above Supply Voltage, Vee ................ -0.5V to +7V those indicated in the operational sections of this specifi- Supply Voltage, Voo .............. -0.5V to +13.5V cation is not implied. Exposure to absolute maximum Input Voltage ..................... -1.5V to +7V rating conditions for extended periods may affect device Output Current ......................... 100mA reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C, Vee = +5.0V ±5%, Voo = +12V ±5%) Limits Symbol Parameter Min. Typ. Max. Units Test Conditions IF Input Current Loading -.25 mA VF = .45V IR Input Leakage Current 10 /J.A VR = 5.25V Ve Input Forward Clamp Voltage 1.0 V Ie = -5mA V1L I~put "Low" Voltage .8 V Vee = 5.0V V 1H Input "High" Voltage 2.6 V Reset Input 2.0. All Other Inputs V1WV1L RESIN Input Hysteresis .25 V Vee = 5.0V VOL Output "Low" Voltage .45 V (, Pulse Width 2tcy _ 20ns 9 2 Pulse Width Stcy _ 35ns t2 9 to, , to 2 Delay 0 ns t02 2 to , Delay 2tcy _ 14ns CL = 20pF to 50pF 9 2tcy 2tcy + 20ns t03 , to 2 Delay 9 9 tR , and 2 Rise Time 20 tF , and 2 Fall Time 20 to2 2 to 2 (TTL) Delay -5 +15 ns 2TTl,Cl=30 R,=300!.1 R 2=600!.1 6tcy _ 30ns 6tcy toss 2 to STSTB Delay 9 9 tcy _ 15ns STSTB,Cl=15pF tpw STSTB Pulse Width 9 R, = 2K RDYIN Setup Time to 50ns _ 4tcy R2 = 4K tORS Status Strobe 9 RDYIN Hold Time 4tcy tORH After STSTB 9 RDYIN or RESIN to 4tcy _ 25ns Ready & Reset tOR 2 Delay 9 Cl=10pF R,=2K R2=4K tcy tCLK ClK Period 9 Maximum Oscillating f max 27 MHz Frequency Cin I n put Ca pa cita nce 8 pF Vcc =+5.0V Voo=+12V VBIAS=2.5V f=l MHz 2-81 AFN·00732C 8224 A.C. CH~RACTERISTICS (Continued) (For tCY = 488.28 ns) (TA = DoC to 70°C, VOO = +5V ±5%, VOO = +12V ±5%) Limits Symbol Parameter MlH,' Typ. Max. Units Test Conditions t,p, 1/1, Pulse Width 89 ns tcy=488.28ns tt/>2 1/12 Pulse Width 236 ns t01 Delay 1/11 to 1/12 0 ns t02 Delay 1/12 to 1/1, 95, ns r- 1/1, & 1/12 Loaded to CL = 20 to 50pF t03 Delay 1/11 to 1/12 Leading Edges 109 129 ns t, Output Rise Time 20 ns tf Output Fall Time 20 ns toss 1/12 to STSTB Delay 296 326 ns tOt/>2 rfJ2 to 1/12 (TTL) Delay -5 +15 ns tpw Status Strobe Pulse Width 40 ns Ready & Reset Loaded tORS RDYIN Setup time to STSTB -167 ns to 2mA/l0pF tORH RDYIN Hoid Time after STSTB 217 ns All measurements READY or RESET 192 ns referenced to 1.5V tOR unless specified to 1/12 Delay otherwise. fMAX OScillator Frequency 18.432 MHz A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TE~mNC LOAb CIRCUIT IN~UT/duTPUT -,- Vee DEVICE UNDER TEST R, AC,TESTING INPUTSAAEDRivENAT2~VFORALOGIC"1"AND04SVFOR A LOGIC "0." TIMING MEASUREMENTS ARE MADE AT 2,01/ FOR A LOGIC "1" AND 0 BV FOR A LOGIC "0" (UNLESS OTHERWISE NOTED) Cl'NCLUDES JIG CAPACITANCE 2-82 AFN·OO732C 8224 WAVEFORMS '2 I------~------I~----- '0" 1/12(TTLI SYNC (FROM BOlDA) I I----------'oss,-------~_I_- i - - - - - - - t D R H " C ,- - - - - 1 "'\1,...--------"'\1, - - - - - - - - - - - - - - - - - - - - - - - - - - - - RDYIN OR RESIN READVOUT - - - - - - - - - - - - - - - - - - - ,-""-----1-------------- -------------,~ RESET OUT VOLTAGE MEASUREMENT POINTS: <1>,. <1>2 Logic "0" = 1.0V. Logic "'" = B.OV. All other signals m......red at '.5V. 2-83 AFN·00732C \ ' 8228/8238 SYSTEM CONTROLLER AND BUS DRIVER FOR 8080A CPU • Single Chip Syste~ Control for • User Selected Single Level Interrupt MCS·80@ Systems Vector (RST 7) • 28·Pln Dual In· LIne Package • Bullt·ln Bidirectional Bus Driver for Data Bus Isolation • Reduces System Package Count • 8238 Had Advanced IOW/MEMW for • Allows the Use of Multiple Byte Large System Timing Control Instructions (e.g. CALL) for Interrupt • Available in EXPRESS Acknowledge - Standard Temperature Range The Intele 8228 Is a single chip system controller and bus driver for MCS-80. It generates all signals required to directly Interface MCS-80 family RAM, ROM, and I/O components. A bidirectional bus driver Is Included to provide high system TTL fan·out. It also provides isolation of the 8080 data bus from memory and I/O. This allows for the optimization of control Signals, enabling the systems designer to use slower memory and I/O. The isolation of the bus driver also.provides for enhanced system noise immunity. A user selected single level interrupt vector (RST 7) is provided to simplify real time, interrupt driven, small system requirements. The 8228 also generates the correct control signals to allow the use of multiple byte instructions (e.g., CALL) In response to an interrupt acknowledge by the 8080A. This feature permits large, Interrupt driven systems to have an unlimited number of Interrupt levels. ' The 8228 is designed to support a wide variety of system bus structures and also reduce system package count for cost effective, reliable design of the MCS·80 systems. Note: The speclflcallons for the 322813238 ara Identical with thoaa for !he 8228/8238 CPU DATA BUS r- 0,_ °2- °3- 0,,- "'- 0,- 0,_ -~l -OB -os,1 :=: g:! _DO. -OS, _os, SYSTEM OAT A BUS ffiTi HLOA w- oalN 0" 1M vee iiiiW I/OR MEMR INTA ~ ..~ OS, ii:iiEN ImnI DO M!!fW LATCH DB3 Dae i701i 03 OS i70ii DB. 0 .. 1'rSf8 D. 01 DBIN - fOIlIj Wi! DBB DBl HlDA IIlTl\ GND Of D7DO DATA BUS 18080 SIDEI INT D87 D80 DATA BUS (SVSTEM SIDE) - I/O" I/O READ 170ii MEMR OBIN IIOWRITE MEMORY READ MEMORY WRITE OliN IFROM lOBO} lIN 1fI. NO ., BUi• ENABLE INPUT 0' OLTI 'fF.DM .... ) Figure 1. Block Diagram Figure 2. Pin Configuration 2-84 8228/8238 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias .............. - O·C to 70·C tion of the device at these or any other conditions above Storage Temperature .............. - 65·C to 150·C those indicated in the operational sections of this specifi- Supply Voltage, Vee ................. - 0.5V to + 7V cation is not limited. Exposure to absolute maximum Input Voltage ....................... - 1.5V to + 7V rating conditions for extended periods may affect device Output Current. .......................... 100 mA reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C. VCC = 5V ±5%) Limits Symbol Parameter Min. Typ.(1) Max. Unit Test Conditions Vc Input Clamp Voltage, All Inputs .75 -1.0 V Vc c =4.75V; Ic=-5mA IF Input Load Current, STSTB 500 JlA VcC=5.25V 02& 06 750 IJ.A VF=0.45V 0 0 ,01,04, Os, JlA & 07 250 All Other Inputs 250 JlA IR Input Leakage Current STSTB 100 JlA Vcc=5.25V DBo-DB7 20 JlA VR =5.25V All Other Inputs 100 JlA VTH Input Threshold Voltage, All Inputs 0.8 2.0 V Vcc=5V Icc Power Supply Current 140 190 mA VcC=5.25V VOL Output Low Voltage, 00-0 7 .45 V Vcc=4.75V; ioL =2mA All Other Outputs .45 V 10L = 10mA VOH Output High Voltage, 00-0 7 3.6 3.8 V Vcc=4.75V; low-1OIlA All Other Outputs 2.4 V 10H = -lmA lOS Short Circuit Current, All Outputs 15 90 mA VcC=5V 10(offl Off State Output Current, All Control Outputs 100 JlA VcC=5.25V; Vo=5.25 -100 IJ.A Vo=·45V -- liNT I NT A Current 5 mA (See INTA Test Circuit) Note 1. Typical values are for T A = 2S oC and nominal supply voltages. 2-85 AFN-00213C inter 8228/8238 CAPACITANCE (VB lAS = 2.5V, Vee = 5.0V, TA = 25·C, f = 1 MHz) This parameter is period,callv sampled and not 100% tested. Limits Symbol Parameter Min. Typ,l11 Max. Unit CIN I nput Capacitance 8 12 pF Output Capacitance CoUT 7 15 pF Control Signals I/O Capacitance I/O 8 15 pF (D or D8) A.C. CHARACTERISTICS (TA = ooc to 70·C, Vee = 5V ±5%) Limits Symbol Parameter Min. Max. Units Condition tpw Width of Status Strobe 22 ns tss Setup Time, Status Inputs Do·D7 8 ns tSH Hold Time, Status Inputs Do·D7 5 ns toc Delay from STSTB to any Control Signal 20 60 ns CL = l00pF tRR Delay from DBIN to Control Outputs 30 ns CL = 100pF tRE Delay from DBIN to Enable/Disable 8080 Bus 45 ns CL = 25pF tRO Delay from System Bus to 8080 Bus during Read 30 ns CL = 25pF twR Delay from WR to Control Outputs 5 45 ns CL = 100pF tWE Delay to Enable System Bus DBo·DB7 after STSTB 30 ns CL = 100pF two Delay from 8080 Bus Do·D 7 to System Bus ns CL = l00pF DBo·DB7 during Write 5 40 tE Delay from System Bus Enable to System Bus DB o ·DB 7 30 ns CL = 100pF tHO H LDA to Read Status Outputs 25 ns tos Setup Time. System Bus Inputs to HLDA 10 ns tOH Hold Time, System Bus Inputs to HLDA 20 ns CL = 100pF +12V A.C. TESTING LOAD CIRCUIT -,- Vee R, 8228 DEVICE UNDER TEST 23 INTA P - - - - - - - - ' For 00-07: Rl = 4KfI, R2 = -fl. CL = 25pF. For all other outputs: Rl =5OOfl,R2= lKn,cL = lOOpF. INTA Test Circuit (for RST 7) 2-86 AFN·OO213C 8228/8238 WAVEFORM 0, _ _ _ _- ' -tpw - ~ 8080 OAT A BUS )I( )I( DB IN ts:J.= -- tsri ~ --j tRR F \ t oc- I. HlDA tNT A, lOR. MEMR DURING HLDA \ - .J l-tHD ~ \_tos- _ tD~ ------------- SYSTEM BUS DURING READ -------- -------- ---I---. -- -r=t ~I- I)K -t::1 '- - - - - - - - - - - -- -r----p tRE 8080 BUS DURING READ -------- -------------- t RE - - ). 1 IOWOR MEMW WR *t oc- r 'wR-1 .1- ~11_twR Il- - - - - - - - - - - - ). 1 8080 BUS DURING WRITE --------- - --------- - ftWD5k SYSTEM BUS DURING WRITE SYSTEMBUSENAB~CE --------- - :1- }::1' SYSTEM BUS OUTPUTS - - - - - - - - - ~ - - - -t'~r - t---- > - - - - - - - - - - - - - - - < VOLTAGE MEASUREMENT POINTS: DO-D7 (when outputs) Logic "0" = a.8V. Logic "1" = 3 av. All other Signals measured at 1.5V. "ADVANCED IOW/MEMW FOR 8238 ONLY. 2-87 AFN~00213C 8237A/8237A-4/8237A-5 HIGH PERFORMANCE PROGRAMMABLE DMA CONTROLLER • Enable/Disable Control of Individual • High performance: Transfers up to 1.6M DMA Requests Bytes/Second with 5 MHz 8237A·5 • Directly Expandable to any Number of • Four Independent DMA Channels Channels • Independent Autoinitialization of all • End of Process Input for Terminating Channels Transfers • Software DMA Requests • Memory·to·Memory Transfers • Independent Polarity Control for DREQ • Memory Block Initialization and DACK Signals • Available in EXPRESS • Address Increment or Decrement - Standard Temperature Range The 8237A Multimode Direct Memory Access (DMA) Controller is a peripheral interface circuit for microprocessor sys· tems. It is designed to improve system performance by allowing external devices to directly transfer information from the system memory. Memory·to·memory iransfer capability is also provided. The 8237A offers a wide variety of pro· grammable control features to enhance data throughput and system optimization and to allow dynamic reconfigura· tion under program control. The 8237A is designed to be used in conjunction with an external 8·bit address register such as the 8282. It contains four independent channels and may be expanded to any number of channels by cascading additional controller chips. The three basic transfer modes allow programmability of the types of DMA service by the user. Each channel can be individually programmed to Autoinitialize to its original condition following an End of Process (EOP). Each channel has a full 64K address and word count capability. The 8237A·4 and 8237A-5 are 4 MHz and 5 MHz selected versions of the standard 3 MHz 8237A respectively. 110 BUFFER A. MEMW TIMING (NOTE 11) 5 'NO CONTROL BASE CURRENT "" ADDRESS (HI) WORD COUNT CURRENT ADDRESS (16) WORD COUNT HLDA (16) (16) AOSTB AEN 9 HRQ elK RESET OACK2 080-087 Figure 2. Figure 1. Block Diagram Pin Configuration 2-88 8237 A/8237A-4/8237 A-5 Table 1. Pin Description Symbol ,---------,---r------------------, Symbol Type Name and Function Type Name and Function Vee Power: + 5 volt supply. ory-to-memory operations, data from the memory comes into the Vss Ground: Ground. 8237A on the data bus during the ClK I Clock Input: Clock Input controls read-from·memory transfer. In the the internal operations of the write-to-memory transfer, the data 8237A and its rate of data trans· bus outputs place the data Into the fers. The input may be driven at up new memory location. to 3 MHz for the standard 8237A lOR I/O I/O Read: I/O Read is a bidirec- and up to 5 MHz for the 8237A-5. tional active low three-state line. In CS I Chip Select: Chip Select is an ac- the Idle cycle, it is an input control tive low input used to select the signal used by the CPU to read the 8237A as an I/O device during the control registers. In the Active cy- Idle cycle. This allows CPU com- cle, it is an output control signal munication on the data bus. used by the 8237 A to access data from a peripheral during a DMA RESET I Re••t: Reset is an active high in- Write transfer. put which clears the Command, Status, Request and Temporary lOW 110 I/O Write: 110 Write is a bidirec- . registers. It also clears the tional active low three-state line. In first/last flip/flop and sets the the Idle cycle, it is an input control Mask register. Following a Reset signal used by the CPU to load In- the device is in the Idle cycle. formation into the 8237 A. In the Ac- tive cycle, it is an output contral READY I Resdy: Ready is an input used to signal used by the 8237A to load extend the memory read and write data to the peripheral during a pulses from the 8237A to accom- DMA Read transfer. modate slow memories or 110 per· ipheral devices. Ready must not EOP I/O End 01 Process: End of Process is C make transitions during its speci· an active low bidirectional signal. fied setup/hold time. Information concerning the com- pletion of DMA services is avail- HlDA I Hold Acknowledge: The active able at the bidirectional EOP pin. high Hold Acknowledge from the The 8237 A allows an external sig- CPU indicates that it has relin- nal to terminate an active DMA quished control of the system service. This is accomplished by busses. pulling the EOP Input low with an DREQO-DREQ3 I DMA Request: The DMA Request external EOP signal. The 8237A al- lines are individual asynchronous so generates a pulse when the ter- channel request inputs used by pe- minal count (TC) lor any channel is ripheral circuits to obtain DMA reachedc This generates an EOP service. In fixed Priority, DREQO ~al which is output through the has the highest priority and EOP Line. The reception of EOP, DREQ3 has the lowest priority. A either internal or external, will request is generated by activating cause the 8237A to terminate the the DREQ line of a channel. DACK service, reset the' request, and, if will acknowledge the recognition Autoinitialize is enabled, to write of DREQ signal. Polarity of DREQ the base registers to the' current is programmable. Reset intializes registers of that channel. The mask these lines to active high. DREQ bit and TC bit in the status word must be maintained until the corre- will be set for the currently active sponding DACK goes active. chann",1 by EOP unless the channel is progrilmmed for Autoinitialize. In DBO-DB7 I/O Data Bus: The Data Bus lines are bidirectional three-state signals that case, the mask bit remains clear. During memory-lo-memory connected to the system data bus. The outputs are enabled in the Pro- transfers, EOP will be output when the TC for channel 1 occurs. EOP gram condition during the I/O Read should be tied high with a pull·up to output the contents of an Ad- resistor if it is not used to prevent dress register, a Status register, erroneous end of process inputs. the Temporary register or a Word Count register to the CPU. The out- AO-A3 110 Address: The four least significant puts are disabled and the inputs address lines are bidirectional are read during an 110 Write cycle three-state signals. In the IQle cy- when the CPU is programming the cle they are inputs and are used by 8237A control registers. During the 8237 A to address the control DMA cycles the most Significant 8 register to be loaded or read In the bits of the address are output onto Active cycle they are outputs and I the data bus to be strobed into an external latch by ADSTB. In mem- I provide the lower 4 bits of the out· put address. 2-89 AFN·00789D 8237A/8237A-4/8237~5 Table 1. Pin Description (Continued) Symbol Type Name and Function Symbol Type Name and Function A4-A7 0 Address: The four most significant AEN 0 Address Enable: Address Enable address lines are three-state out- enables the S-bit latch containing puts and provide 4 bits of address. the upper 8 address bits onto the These lines are enabled only during system address bus. AEN can also the DMA service. be used to disable other system bus HRO· 0 Hold Request: This Is the Hold Re- drivers during DMA transfers. AEN quest to the CPU and is used to re- is active HIGH. quest control of the system bus. If ADSTB 0 Address Strobe: The active high, the corresponding mask bit is Address Strobe is used to strobe the clear, the presence of any valid upper address byte into an external DR EO causes 8237A to issue the latch. HRO. After HRO goes active at MEMR 0 Memory Read: The Memory Read least one clock cycle (TCY) must signal is an active low three-state oecur before HLDA,goes active. output used to access data from the DACKO-DACK3 0 DMA Acknowledge: DMA Ac- selected memory location during a knowledge is used to notify the in- DMA Read or a memory-to-memory dividual peripherals when one' has transfer. been granted a DMA cycle. The MEMW 0 Memory Write: The Memory Write sense of these lines is program- is an active low three-state output mable. Reset initializes them to ac- used to write data to the selected tive low. memory location during a DMA Write or a memory-ta-memory FUNCTIONAL DESCRIPTION transfer. The 8237A block diagram includes the major logic be the 2 TTL clock from an 8224 or ClK from an blocks and all of the internal registers. The data inter- 8085AH or 8284A. For 8085AH-2 systems above 3.9 MHz, connection paths are also shown. Not shown are the the 8085 ClK(OUT) does not satisfy 8237A-5 clock lOW various control signals between the blocks. The 8237A and HIGH time requirements. In this case, an external contains 344 bits of internal memory in the form of clock should be used to drive the 8237A-5. registers_ Figure 3 lists these registers by name and shows the size of each. A detailed description of the DMA Operation registers and their functions can be found under Register Description. The 8237A is designed to operate in two major cycles. These are called Idle and Active cycles. Each device cy- Name Size Number cle is made up of a number of states. The 8237A can Base Address Registers 16 bits 4 assume seven separate states, each composed of one Base Word Count Registers 16 bits 4 full clock period_ 8tate I (81) is the inactive state. It Is Current Address Registers 16 bits 4 Current Word Count Registers 16bits 4 entered when the 8237A has no valid DMA requests Temporary Address Register 16 bits 1 pending. While in 81, the DMA controller is inactive but Temporary Word Count Register 16bits 1 . may be in the Program Condition, being programmed by Status Register 8bits 1 the processor. 8tate 80 (80) is the first state of a DMA Command Register 8bils 1 Temporary Register 8 bits 1 service. The 8237 A has requested a hold but the pro- Mode Registers 6bils 4 cessor has not yet returned an acknowledge. The 8237 A Mask Register 4bils 1 may still be programmed until it receives HlDA from the Request Register 4bils 1 CPU. An acknowledge from the CPU will signal that DMA transfers may begin. 81, 82, 83 and 84 are the working states of the DMA service. If more' time is Figure 3. 8237A Internal Registers needed to complete a transfer than is available with nor- The 8237A contains three basic blocks of control logic. mal timing, wait states (8W) can be inserted between 82 The Timing Control block generates internal timing and or 83 and 84 by the use of the Ready line on the 8237A. external control signals for the 8237 A_ ,The Program Note that the data is transferred directly from the I/O Command Control block decodes the various com- device to memory (or vice versa) with lOR and MEMW (or mands given to the 8237A by the microprocessor prior MEMR and lOW) being active at the same time. The data to servicing a DMA Request. It also decodes the Mode is not read into or driven out of the 8237A in I/O-to- Control word used to select the type of DMA during the memory or memory-to-I/O DMA transfers. servicing. The Priority Encoder block resolves priority Memory-to-memory transfers require a read-from and a contention between DMA channels requesting service write-to-memory to complete each transfer. The states, simultaneously. which resemble the normal working states, use two digit numbers for identification. Eight states are re- The Timing Control block derives internal timing from quired for a single transfer. The first four states (811, the clock input. In 8237A systems this input will usually 812, 813, 814) are used for the read-from-memory half 2-90 AFN·OO7B9D 8.237 A/8237 A-4/8237 A-5 and the last four states (S21, 522, 523, S24) for the write- becomes active. Again, an Autoinitialization will occur to-memory half of the transfer. at the end of the service if the channel has been pro- grammed for it. IDLE CYCLE Demand Trans.er Mode - In Demand Transfer mode the When no channel is requesting service, the 8237A will device is programmed to continue making transfers enter the Idle cycle and perform "51" states. Ln this until a TC or external EOP is encountered or until DREQ cycle the 8237A will sample the DREQ lines every clock goes Inactive. Thus transfers may continue until the 1/0 cycle to determine If any channel is requesting a DMA device has exhausted Its data capacity. After the 1/0 service. The device will also sample CS, looking for an device has had a chance to catch up, the DMA service is attempt by the microprocessor to write or read the Inter- re-established by means of a DREQ. During the time nal registers of the 8237A. When CS is low and HLDA is between services when the microprocessor is allowed low, the 8237A enters the Program Condition. The CPU to operate, the intermediate values of address and word can now establish, change or inspect the internal defini- count are stored in the 8237A Current Address and Cur- tion of the part by reading from or writing to the internal rent Word Count registers. Only an EOP can cause an registers. Address lines AO-A3 are inputs to the device Autoinitialize at the end of the service. EOP is generated and select which registers will be read or written. The either by TC or by an external signal. lOR and lOW lines are used to select and time reads or writes. Due to the number and size of the internal regis- Cascade Mode - This mode is used to cascade more ters, an internal flip-flop is used to generate an addi- than one 8237A together for simple system expansion. tional bit of address. This bit is used to determine the The HRQ and HLDA signals from the additional 8237A upper or lower byte of the 16-bit Address and Word are connected to the DREQ and DACK signals of a chan- Count registers. The flip:flop is reset by Master Clear or nel of the initial 8237A. This allows the DMA requests of Reset. A separate software command can also reset this the additional device to propagate through the priority flip-flop. network circuitry of the preceding device. The priority chain is preserved 'and the new device must wait for its Special software commands can be executed by the turn to acknowledge requests. Since the cascade chan- 8237A in the Program Condition. Thes!,£ommands are nel of the initial 8237 A is used only for prioritizing the decoded as sets of addresses with the CS and lOW. The additional device, it does not output any address or con- commands do not make use of the data bus. Instruc- trol signals of its own. These could conflict with the tions include Clear First/Last Flip-FLop and Master outputs of the active channel In the added device. The Clear. 8237A will respond to DREQ and DACK but all other out- ACTIVE CYCLE puts except HRQ will be disabled. When the 8237A Is in the Idle cycle and a non-masked Figure 4 shows two additional devices cascaded into an channel requests a DMA service, the device will output initial device using two of the previous channels. This an HRQ to the microprocessor and enter the Active cy- forms a two level DMA system. More 8237As could be cle. It is in this cycle that the DMA service will take added at the second level by using the remaining chan- place, in one of four modes: nels of the first level. Additional devices can also be added by cascading into the channels of the second Single Trans.er Mode - In Single Transfer mode the level devices, forming a third level. device is programmed to make one transfer only. The word count will be decremented and the address dec- 2ND LEVEL remented or incremented following each transfer. When the word count "rolls over" from zero to FFFFH, a Ter- minal Count (TC) will cause an Autoinitialize if the chan- nel has been programmed to do so. 1ST LEVEL 8237A MICROPROCESSOR DREQ must be held active until DACK becomes active in t-- HRQ DREQ 1- HRQ order to be recognized. If DREQ is held active through- I--- HLDA DACK ~ HLDA out the single transfer, HRQ will go inactive and release the bus to the system. It will again go active and, upon 8237A receipt of a new HLDA, another single transfer will be performet;!, in 8080A, 8085AH, 8088, or 8086 system this DREQ r-- HRQ will ensure one full machine cycle execution between DACK r-- HLDA DMA transfers. Details of timing between the 8237A and INITIAL DEVICE other bus control protocols,will depend upon the char- 8237A acteristics of the microprocessor involved. Block Trans.er Mode - In Block Transfer mode the device Is activated by DREQ to continue making trans- ADDITIONAL fers during the service until a TC, caused by word count DEVICES going to FFFFH, or an external End of Process (EOP) is encountered. DREQ need only be held active until DACK Figure 4_ Cascaded 8237As 2-91 AFN·00789D 8237 A/8237 A-4/8237 A-5 TRANSFER TYPES based upon the descending value of their number. The channel with the lowest priority is 3 followed by 2, 1 and Each of the three active transfer modes can perform the highest priority channel, O. After the recognition of three different types of transfers. These are Read, Write anyone channel for service, the other channels are pre- and Verify. Write transfers move data from an I/O device vented from interferrlng with that service until it is to the memory by activating MEMW and lOR. Read completed. transfers move data from memory to an I/O device by activating MEMR and lOW. Verify transfers are pseudo The second scheme is Rotating Priority. The last chan- transfers. The 823?A operates as in Read or Write nel to get service becomes the lowest priority channel transfers generating addresses, and responding to EOP, with the others rotating accordingly. etc. However, the memory and I/O control lines all remain inactive. Verify mode is not permitted during memory to , memory operation. 11' 2nd 3rd Service Service Service Memory·lo·Memory - To perform block moves of data highest o 2 _service \3_'service from one memory address space to another with a mini· 1 _service \ 3_ request 0 mum of program effort and time, the 823?A includes a 2 ,0 1 memory·to·memory transfer feature. Programming a bit lowest 3 1 2 in the Command register selects channels 0 and 1 to operate as memory·to·memory transfer channels. The transfer is initiated by setting the software DREQ for channel O. The 823?A requests a DMA service in the nor· With Rotating Priority In a single chip DMA system, any ,mal manner. After HLDA is true, the device, using eight· device requesting service is guaranteed to be recog- state transfers in Block Transfer mode, reads data from nized after no more than three higher priority services the memory. The channel 0 Current Address register is have occurred. This prevents anyone channel from the source for the address used and is decremented or monopolizing the system. incremented in the normal manner. The data byte read from the memory is stored in the 823?A inte~nal Tem· Compressed Timing - In order to achieve even greater porary register. Channel 1 ihen writes the data' from the throughput where system characteristics permit, the Temporary register to memory using the address in its 823?A can compress the transfer time to two clock Current Address register and incrementing or decre· cycles. From Figure 11 It can be seen that state S3 Is menting it in the normal manner. The channel 1 Current used to extend the access time of the read pulse. By Word Count is decremented. When the word count of removing state S3, the read pulse width is made equal to channel 1 goes to FFFFH, a TC is generated causing an the write pulse width and a transfer consists only of EOP output terminating the service. state S2 to change the address and state S4 to perform the read/write. S1 states will still occur when A8-A15 Channel 0 may be programmed to retain the same ad· need updating (see Address Generation). Timing for dress for all transfers. This allows a single word to be compressed transfers is found in Figure 14. written to a block of memory. Address Generation - In order to reduce pin count, the The 823?A will respond to external EOP signals during 823?A multiplexes the eight higher order address bits memory·to·memory transfers. Data comparators in on the data lines. State S1 is used to output the higher block search schemes may use this input to terminate order address bits to an external latch from which they the service when a match is found. The timing of may be placed on the address bus. The falling edge of memory·to·memory transfers is found in Figure 12. Address Strobe (ADSTB) is used to load these bits from Memory·to·memory operations can be detected as an the data lines to the latch. Address Enable (AEN) is used active AEN with no DACK outputs. to enable the bits onto the address bus through a three- state enable. The lower order address bits are outputby Autoinitialize - By programming a bit in tlie Mode reg· the 823?A directly. Lines AO-A? should be connected to ister, a channel may be set up as an Autoinitialize chan· the address bus. Figure 11 shows the time relationships nel. During Autoinitialize initialization, the original between CLK, AEN, ADSTB, DBO-DB7 and AO-A? values of the Current Address and Current Word Count registers are automatically restored from the Base During Block and Demand Transfer mode services, Address and Base Word count registers of that channel which include multiple transfers, the addresses gener- following EOP. The base registers are loaded simultane· ated will be sequential. For many transfers the data held ously with the current registers by the microprocessor in the external address latch will remain the same. This and remain unchanged throughout the DMA service. The data need only change when a carry or borrow from A7 mask bit is not set when the channel is in Autoinitialize. to A8 takes place in the normal sequence of addresses. Following Autoinitialize the channel is ready to perform To save time and speed transfers, the 823?A executes another DMA service, without CPU intervention, as soon S1 states only when updating of A8-A15 in the latch is as a valid DREQ is detected. necessary. This means for long services, S1 states and Priority - The 823?A has two types of priority encoding Address Strobes may occur only once every 256 trans- available as software selectable options. The first is fers, a savings of 255 clock cycles for each 256 FixfJd Priority which fixes the channels in priority order transfers. 2-92 AFN·00789D inter 8237 A/8237 A-4/8237 A·5 REGISTER DESCRIPTION Command Register /!: , , -,' 7654321 o _BIINumbar Current Address Register - Each channel has a 16-bit I I I " I I I I Current Address register. This register holds the value Yo Memory-lo-memory disable Memory.to.memory enable of the address used during DMA transfers. The address o Channel 0 address hold disable is automatically incremented or decremented after each trans·fer and the intermediate values of the address are -{ 1 X Channel 0 address hold enable If bit 0=0 stored in the Current Address register during the trans- fer. This register is written or read by the micro- I o Controller enable l 1 Controller disable processor in successive 8-bit bytes. It may also be reini- tialized by an Autoinitialize back to its original value. Autoinitialize takes place only after an EOP. I o1 Compressed Normal liming timing I X Ifb1t0=1 Current Word Register - Each channel has a 16-bit Cur· I o Fixed priority rent Word Count ,register. This register determines the l 1 Rotating priority number of transfers to be performed. The actual number of transfers will be one more than the number pro- grammed in the Current Word Count register (I.e., pro- Io 1 Late write selection Extended write selection gramming a count ot100 will result in 101 transfers). The I X If bit 3=1 word count is decremented after each transfer. The f o DREO sense active high intermediate value of the word count is stored in the reg- I DREO sense active low ister during the transfer. When the value in the register goes from zero to FFFFH, a TC will be generated. This I o DACK sense active low l DACK sense active high register is loaded or read in successive 8-bit bytes by the microprocessor in the Program Condition. Follow· Mode Register , ,'';, ~ ing the end of a DMA service it may also be reinitialized by an Autoinitialization back to it's original value. Auto- initialize can occur only when an EOP occurs. If it is not Autoinitialized, this register will have a count of FFFFH after TC. Base Address and 'Base Word Count Registers - Each 00 Verify transfer channel has a pair of Base Address and Base Word 01 Write lransfer Count registers. These 16-bit registers store the original L...._ _- { 10 Read lransfer value of their associated current registers. During Auto- 11 Illegal initialize these values are used to restore the current XX If bits 6 and 7= 11 registers to their original values. The base registers are "------1 0 Autoinitialization disable written simultaneously with their corresponding current 1 Autoinitialization enable register in 8-bit bytes in the Program Condition by the microprocessor. These registers cannot be read by the "--------1 0 Address increment select 1 Address decrement select microprocessor. 00 Demand mode select Command Register - This 8-bit register controls the ' - - - - - - - - - { ~~ ~:~~~e :o":ees:~~:~t operation of the 8237A. It is programmed by the micro- processor in the Program Condition and is cleared by 11 Cascade mode select Reset or a Master Clear instruction. The following table Request Register lists the function of the command bits. See Figure 6 for address coding. r'-,...:,...:,...:...,r=-,..=..,:...,-.:.., _ B i t Number Mode, Register - Each channel has a 6-bit Mode regis- ter associated with it. When the register is being written to by the microprocessor in the Program Condition, bits o and 1 determine which. channel Mode register is to be written. "-_ _-I. 0 Reset request bit 1 Set request bit Request Register - The 8237A can respond to requests rately under software control or is cleared upon genera- for DMA service which are initiated by software as weli tion of a TC or external EOP. The entire register is as by a DREQ, Each channel has a request bit associ- cleared by a Reset. To set or reset.a bit, the software ated with it in the 4-bit Request register. These are non- loads .the proper form of the data word. See Figure 5 for maskable and subject to prioritization by the Priority register address coding. In order to make a software re- Encoder network. Each register bit is set or reset sepa- quest, the channel must be in Block Mode. 2-93 AFN·OO789D intJ 8237 A't8237A-4/8237 A-5 o _ _ Bit Number {J tj Mask Register - Each channel has associated with it II r--,r'-r-'-r-'--r..--r-" mask' bit which can be set to disable the incoming 1 Channel 0 has reached TC DREQ, Each mask bit is set when its associated channel Channell has reached TC produces an EOP if the channel is not programmed for Channel 2 has reached TC Autoinitialize, Each bit of the 4·bit Mask register may Channel 3 has reached TC also be set or cleared separately under software control. The entire register is also set by a Reset. This disables Channel 0 request ' - - - - - - - - 1 Channell request all DMA requests until a clear Mask register instruction ' - - - - - - - - ' - - 1 Channel 2 request allows them to occur, The instruction to separately set ' - - - - - - - - - - 1 ,Channel 3 request or clear the mask bits is similar in form to that used with the Request register: See Figure 5 for instruction ad· Temporary Register - The Temporary register is used dressing, to hold data during memory·to·memory transfers, Fol· lowing the completion of the transfers, the last word moved can be read by the microprocessor in the Pro· 7 6 5 4 3 2 1 0 _ _ Bit Number gram Condition, The Temporary regi~ter always con· tains the last byte transferred in the previous memory· Select channel 0 mask bit to·memory operation, unless cleared by a Reset. Don't Care Select channell mask bit Select channel 2 mask bit Software Commands - These are additional special Select channel 3 mask bit software commands which can be executed in the Pro· gram Condition, They do not depend on any specifi9 bit '-----I 0 Clear mask bit pattern on the data bus. The two software commands 1 Set, mask bit are: ' 'i "1·'_1-; cti ~1 f C Clear Firs tlLas t Flip·Flop: This command is executed All four bits of the Mask register may also be written prior to writing or reading new address or word count with a single command, information to the 8237A. This initializes the flip·flop to a known state so that subsequent accesses to reg· 6 5 4 3 2 1 0 _ _ Bit Number /', " f' ister contents by the microprocessor will address upper and lower bytes in the correct sequence. o Clear channel 0 mask bit I ' 1. • ~ J .' ' Set channel 0 mask bit Master Clear: T~iS software'instruction has the same effect as the hardware Reset. The Command, Status, o Clear channell mask bit Set channell mask bit Request, Temporary, and Internal FirstlLast Flip·Flop registers are cleared and tlW Mask register is set. The '--_ _-{ 0 Clear channel 2 mask bit 8237A will enter the ,Idle cycle. 1 Set channel 2 mask bit r/r'f I" '1.y, ~', '-----I 0 Clear channel 3 mask bit Clear Mask Register: This command clears the mask 1 Set channel 3 mask bit bits of all four channels, enabling them to accept DMA requests. Figure 6 lists the address codes for the software com· Signals mands: Register Operation CS lOR lOW A3 A2 Al AO Signals Command Write 0 1 0 " 1 0 0 0 Mode Write 0 1 0 1 0 1 1 A3 A2 Al AO lOR lOW Operation Request Write 0 1 0 1 0 0 1 1 0 0 0 0 1 Read Status Register Mask SeUReset 0 1 0 1'\ 1 0 1 0 1 0 0 0 1 0 Write Command Register Mask Write 0 1 0 I- 1 1 1 1 Temporary 1" 1 1 0 0 1 0 1 Illegal Read 0 0 1 1 0 1 Status Read J 0 0 {; 1 0 0 0 1 0 0 1 1 0 Write Request Register 1 0 1 0 0 1 Illegal Figure 5. Definition of Register Co TEST POINTS 0.8 < 2.ox= 0.8 DEVICE UNDER TeST I C L-'50 PF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC '" AND 0 45V FOR A LOGIC' 0 " TIMING MEASUR£MENTS ARE MADE AT 2 OV FOR A LOGIC "" AND 0 BV FOR A LOGIC' 0 " CL -'50pF CL INCWDES JIG CAPACITANCE 1 2 _97 AFN-00789D intJ 8237A/8237~4/8237~5 A.C. CHARACTERISTICS-DMA (MASTER) MODE (TA=O·Cto 70·C,· Vee= +5V:l:5%, GND=OV) 8237A 8237A-4 8237~5 Symbol Parameter Min. Max. Min. Max. Min. Max. Unit TAEL AEN HIGH from CLK LOW (51) Delay TIme 300 225 200 ns TAET AEN LOW from CLK HIGH (51) Delay Time 200 150 130 ns TAFAB ADR Active to Float De!ay from CLK HIGH 150 120 90 ns TAFC READ or WRITE Float from CLK HIGH 150 120 120 ns TAFDB DB Active to Float Delay from CLK HIGH 250 190 170 ns TAHR ADR from READ HIGH Hold Time TCY-l00 TCY-l00 .TCY-l00 ns TAHS DB from ADSTB LOW Hold Time 50 40 30 ns TAHW ADR from WRITE HIGH Hold Time TCY-50 TCY-50 TCY-50 ns DACKValid from CLK LOW Delay Time (Note 7) 250 220 170 ns TAK EOP HIGH from CLK HIGH DelayTime 250 190 170 ns EOP LOW to CLK HIGH DelayTime 250 190 100 ns TASM ADR Stable from CLK HIGH 250 190 170 ns TA&S DB to ADSTB LOW Setup Time 100 100 100 ns TCH Clock High Time (Transitions<;;10 ns) 120 100 80 ns TCL Clock LOW Time (Transitlons<;;10 ns) 1,50 110 68 ns TCY CLK Cycle Time 320 250 200 ns TOCL CLK HIGH to READ or WRITE LOW Delay (Note 4) 270 200 190 ns TOCTR READ HIGH from CLK HIGH (54) Delay Time (Note 4) 270 210 190 ns TDCTW WRITE HIGH from CLK HIGH (54) Delay TIme (Note 4) 200 150 130 ns TOOl 160 120 120 ns HRO Valid from CLK HIGH Delay TIme (Note 5) TD02 250 190 120 ns TEPS EOP LOW from CLK lOW Setup TIme 60 45 40 ns TEPW EOP Pulse Width 300 225 220 ns TFAAB ADR Float to ActIve Delay from ClK HIGH 250 190 170 ns TFAC READ orWRITE Active from ClK HIGH 200 150 150 ns TFADB DB Float to Active Delay from CLK HIGH 300 225 200 ns THS HlDA Valid to ClK HIGH Setup Time 100 75 75 ns TIDH Input Data from MEMR HIGH Hold TIme 0 0' 0 ns TIDS Input Data to MEMR HIGH Setup Time 250 190 170 ns TODH Output Data from MEMW HIGH Hold TIme 20 20 10 ns TODV Output Data Valid to MEMW HIGH 290 125 125 ns TOS DR EO to ClK lOW (SI, 54) Setup Time (Note 7) 0 0 0 ns TRH ClK to READY lOW Hold TIme 20 20 20 ns TRS READY to ClK lOW Setup TIme 100 60 60 ns TSTl ADSTB HIGH from CLK HIGH Delay Time 200 150 130 ns TSTT ADSTEI lOW from ClK HIGH D!!layT!m~ 140 110 90 ns 2-98 AFN·OO789D inter 8237 A/8237 A-4/8237 A-5 A.C. CHARACTERISTICS-PERIPHERAL (SLAVE) MODE (TA = O°C to 70°C. VCC = 5.0V ±5%. GND';' OV) Symbol Parameter 8237A 8237A-4 8237A·5 'Unit Min. Max. Min. Max. Min. Max. TAR ADRValid or CS LOW to READ LOW 50 50 50 ns TAW ADRValid to WRITE HIGH Setup Time 200 150 150 ns TCW CS LOW to WRITE HIGH Setup Time 200 150 150 ns TOW DataValid to WRITE HIGH Setup Time 200 150 150 ns TRA ADR or CS Hold from READ HIGH 0 0 0 ns TRDE Data Access from READ LOW (Note 8) 200 200 140' ns TRDF DB Float Delay from READ HIGH 20 100 20 100 0 70 ns TRSTD Power Supply HIGH to RESET LOW Setup Time 500 500 500 ns TRSTS ,RESET to First IOWR 2TCY 2TCY 2TCY ns TRSTW RESET Pulse Width 300 300 300 ns TRW READ Width 300 250 200 ns TWA ADR from WRITE HIGH Hold Time 20 20 20 ns TWC CS HIGH from WRITE HIGH Hold Time 20 20 20 ns TWD Data from WRITE HIGH Hold Time 30 30 30 ns TWWS Write Width 200 200 160 ~s WAVEFORMS SLAVE MODE WRITE TIMING I, TCW -i I, TWWS - r TWC (NOTES) j I , TAW - -TWA AO-A3 ~ ---.J INPUT VALID TDW - !--TWD DBO-oB7 ==>- INPUT VALID Figure 9. Slave Mode Write K SLAVE MODE READ TIMING cs~ / ~------------------------------------~ AO-A3 ~~______~____________A_D_D_RE_S_S_M_U_ST_B_E_V_A_Ll_D______________________~(~______________ 0R TA_R_'_~h~ _=_=_=~=~=~=~=~=~=~=_=_=-_-T_-R_-DE_- ~- ~T~-R-W~ =~=~=~=~=~=~=~=~=~=:t-I-~=_-~=_-~=_=L~_:0_: _:,_9)3_ DBO-DB7 ___-_, __ Figure 10. Slave Mode Read _ ______ DATA OUT VALID _ 2-99 AFN·00789D inter 8237A/8237~4/8237AH5 , WAVEFORMS (Continued) DMA TRANSFER TIMING CLK j~rl~~,:H~~rLK.:.u~rt~lk --1-- · ~-r '" I----~ '- I- TOH DREO m' ' \\\\,\\\\\' (NOTE&)' T~_ ~ - ~ TDQ_ HRC THS_ - I HLOA /1/, ,\ ,\\\\\\\\\ .... TAELI-- H TAn~ \ TSTL Vt 1- - ~ - -TEPS "DOTE r r"\ \ TFAD_ I- jt-r. - I-r TA88 a ~ ""08' \ A Ali - \ .,- I-- 1 ==rtt· ADDRI!S8YALID - I - TAS. I- TAHW ADDRESS VALID I-- I--""A. +--TAHW ~ - I- -TAHA r-TAHR OOCK \ ~ \ TFAC I-- r---'\ ~ TDOT. ~ ~ TDeTR r--- - c-, _TAFe ~~ v~~- ~~~ TCCTW TCCTW- I 1I'O.1!XTI!.... w.m 7.c;L ~. I I ' T!I'W .Y IXTIIII' \ \ \ \ \ \ \ \ \ \ \' h l l l l l l l l l i l l Figure 11. DMA Transfer 2-100 AFN·00789D 8237A/8237~4/8237A-5 WAVEFORMS (Continued) MEMORY·TO·MEMORY TRANSFER TIMING ADSTB AO-A7 DBO-DB7 n TAK TEPS TEPW EXT EOP -----or-.\\C""T'""S't'"""'t"\\,....,\\l""""r""\"r"""I\\C""T'""ST"""t'\\""or-S't'"""'t"\\"""r"'\ .....\S""'\\ '""T"//r-T//"'-'Z'""T"ZZr-TO-r-lZ"--- Figure 12. Memory·lo·Memory Transf8r READY TIMING elK TDel--t~-1 TDel TDCTW_ EXTENDED~ READY ~~\\~.t:-1'l-r-;/}.-/r-~ _TRS_ Figure 13. Ready 2-101 AFN·00789D 8237A/8237~4/8237A-5 WAVEFORMS (Continued) COMPRESSED TRANSFER TIMING Figure 14. Compressed Transfer RESET TIMING r------------------------------------~II~' ----------- -----/lr. rl------ Vee . - - - - - - - T R S T D _ _ _ _ _ _ _ _-1 TRSTW - - - - RESET _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- - ' , - - - - - - - - - - - - - - - - - lOR OR lOW Figure 15. Resel 2-102 AFN·OO789D 8257/8257·5 PROGRAMMABLE DMA CONTROLLER • MCS-85® Compatible 8257-5 • Single TTL Clock • 4·Channel DMA Controller • Single + 5V Supply • Priority DMA Request Logie • Auto Load Mode • Channel Inhibit Logic • Available in EXPRESS • Terminal Count and Modulo 128 - Standard Temperature Range Outputs The Intel' 8257 is a 4-channel direct memory access (DMA) controller. It is specifically designed to simplify the transfer of data at high speeds for the Intel'" microcomputer systems. Its primary function is to generate, upon a peripheral request, a sequential memory address which will allow the peri,pheral to read or write data directly to or from memory. Acquisition of the system bus in accomplished via the CPU's hold function. The 8257 has priority logic that resolves the peripherals requests and issues a composite hold request to the CPU. It maintains the DMA cycle count for each channel and outputs a control signal .to notify the peripheral that the programmed number of DMA cycles is complete. Other output control Signals simplify sectored data transfers. The 8257 represents a significant savings in component count for DMA·based microcomputer systems and greatly simplifies the transfer of data at high speed between peripherals and memories. CH 0 OAO 0 ~ A, ORO 1 A, A, I/OW_ A. CLK-_ 0'A'C'K1 Te RESET-_ READ/ A, WRITE lOGIC A, AO - ORO 2 A, A, Ao A,_ HRO A, 0Acn es \ os eLK A. RESET Ie; 0ACi("2 A, DACi("J A, OR03 CONTROL READY-- lOGIC OR02 AND MOCE ORO 1 HRG SET DROO REG HlDA-- GND MEMR MEMW AEN ADSTB TC MARl( Figure 1. Blo~k Diagr~m Figure 2. Pin Configuration 2-1-03 8257/8257 -5 FUNCTIONAL DESCRIPTION Block Diagram Description 1. DMA Channels General The 8257 provides four separate DMA channels (labeled The 8257 is a programmable, Direct Memory Access CH-O to CH-3). Each channel includes two sixteen-bit (DMA) device which, when coupled with a single Intel® registers: (1) a DMA address register, and (2) a termi- 8212 I/O port device, provides a complete four-channel nal count register. Both registers must be initialized DMA controller for use in Intel® microcomputer systems. before a channel is enabled. The DMA address register is After being initialized by software, the 6257 can transfer a loaded with the address of the first memory location to be block of data, containing up to 16,384 bytes, between accessed. The value loaded into the low-order 14-bits of memory and a peripheral device directly, without further the terminal count register specifies the numher of DMA intervention required of the CPU. Upon receiving a DMA cycles minus one before the Terminal Count (TC) output transfer request from an enabled peripheral, the 8257: IS activated. For instance, a terminal count of 0 would cause the TC output to be active in the first DMA cycle for 1. Acquires control of the system bus. that channel. In general, if N = the number of desired DMA cycles, load the value N-1 Into the low-order 14-bits of the 2. Acknowledges that requesting peripheral which is terminal count register. The most significant two bits of the connected to the highest priority channel. terminal count register specify the type of'DMA operation 3. Outputs the least significant eighrbits of the memory for that channel address onto system address lines Ao-A7, outputs the most significant eight bits of the memory address to the 8212 1/0 port via the data bus (the 8212 places these address bits on lines As-Ad, and 4. Generates the appropriate memory and I/O read/ write control signals that cause the peripheral to receive-or deposit a data byte directly from or to the addressed location in memory. The 8257 will retain control of the system bus and repeat the transfer sequence, as long as a peripheral maintainS its DMA request. Thus, the 8257 can transfer a block of data to/from a high sJileed peripheral (e.g, a sector of data on a floppy diSk) In a single "burst". When the specified number of data bytes have been transferred, the 8257 activates ItS Terminal Count (TC) output, informing the CPU that the operation IS complete. The 8257 offers three different modes of operation: (1) DMA read, which causes data to be transferred from memory to a peripheral; (2) DMA write, which causes data to be transferred from a peripheral to, memory; and (3) DMA verify, which does not actually Involve the transfer of data. When an 8257 channel IS In the DMA verify mode, It will respond the same as described for transfer operations, except that no memory or I/O read/write control signals Will be generated, thus preventing the transfer of data. The 8257, however, will gain control of the system bus and Will acknowledge the peripheral's DMA request for each DMA cycle The peripheral can use these acknowledge signals to enable an Internal access of each byte of a data block In order to execute some verification procedure, such as the accumulallon of a CRC (Cyclic Redundancy Code) checkword For example, a block of DMA verify cycles might follow a block of DMA read cycles (memory to peripheral) to allow the peripheral to verify ItS Figure 3. 8257 Block Diagram Showing DMA newly acqUired data Channels 2-104 AFN-018400 inter 8257/8257·5 These two bits are not modified during a DMA cycle, but can be changed between DMA blocks. . BIT 15 BIT 14 TYPE OF OMA OPERATION Each channel accepts a DMA Request (DR an) onput and 0 0 Verily ollIA Cycle provides a DMA Acknowledge (DACKn) output 0 1 Write OMA Cycle 1 0 Re.d OMA Cycle (ORO O-DRO 3) 1 1 (Illegal) DMA Request: These are individual asynchronous chan- nel request inputs used by the peripherals to obtam a DMA cycle. If not in the rotating priority mode then ORO 0 has the highest priority'and ORO 3 has the lowest. A request can be generated by raising the request line and holding it high until DMA acknowledge. For multiple DMA cycles (Burst Mode) the request line is held high until the DMA acknowledge of the last cycle arrives. (DACK 0 - DACK 3) DMA Acknowledge: An active low level on the acknowl- edge output informs the peripheral connected to that channel that it has been selected for a DMA cycle. The DACK output acts as a "chip select" for the peripheral device requesting service. This line goes active (low) and inactive (high) once for each byte transferred even if a burst of data ~s being transferred. 2. Datil B,!s Buffer This three-state. bf-directional, eight bit buffer interfaces the 8257 to the system data bus. (0 0-01) Data Bus Lmes: These are bi-directlonal three-state lines When the 8257 IS pemg programmed by the CPU, eight- bits of data for a DMA address register, a terminal count register or the Mode Set register are received on the data bus. When the Cp'U reads a DMA address register, a term mal count register or the Status register, the data is sent to the CPU over the data bus During DMA cycles (when the 8257 is the bus master), the 8257 Will output the most significant eight-bits of the memory address (from one of the DMA address registers) to the 8212 latch via the data bus. These address bits Will be transferred at the begmnmg of the DMA cycle; the bus Will then be released to handle the memory data transfer dUring the balance of Figure 4. 8257 Block Diagram Showing Data Bus the DMA cycle. Buffer 2-105 AFN·01840D 8257/8257·5 3. ~eadlWrite Logic (Ao-All When the CPU is programming or reading one of the Address Lines: These least significant four address lines 8257's regi$ters (i.e., when the 8257 is a "slave" device on are bi~directional. In the "slave" mode they are inputs the system bus), the ReadlWrite Logic accepts the 110 which select one of the registers to be read or Read (i70R) or 1/0 Write (OOW) signal, decodes the IElast programmed. In the "master" mode, they are outputs significant four address bits, (Ao·A 3 ), and either writes which constitute the least significant four bits of the 16-bit the conlents of the data bus into the addressed register memory address generated by the 8257. (if IIOW is true) or places the contents of the addressed re,Jister onto the data bus (if iiOR is true). Dunng DMA cycles (i.e., when the 8257 is the bus ChIp Select: An actIve-low Input whIch enables the 1/0 "master"), the Read/Write Logic generates the I/O read Read or I/O Write Input when the 8257 is being read or and memory write (DMA write cycle) or I/O Write and programmed in the "slave" mode. In the "master" mode, memory read (DMA read cycle) signals which control the CS is automatically disabled to prevent the chIp from data link with the penpheral that has been granted the selecting Itself whIle performing the DMA functIon. DMA cycle Note that during DMA transfers Non-DMA I/O devices 4. Control logic should be de-selected (disabled) using "AEN" signal to inhibIt I/O devIce decoding of the memory address as an ThIS block controls the sequence of operallons dunng all erroneous devIce address. DMA cycles by generatIng the appropriate control signals and the 16-blt address that specIfIes the memory location to be accessed. I/O Read. An acllve-Iow, bi-dlrectional three-state line In the "slave" mode, it IS an input which allows the 8-blt status register or the upper/lower byte of a 16-bit DMA address register or terminal count regIster to be read. In the "master" mode, I/OR is a control output whIch is used to access data from a peripheral during the DMA write cycle. (1I0W) I/O Write An actIve-low, bl-directlonal three-state line In the "slave" mode, it is an input whIch ,allows the contents of the data bus to be loaded Into the 8-bit mode set register or the upper/lower byte of a 16-bit DMA address regIster or termInal count regIster In the "master" mode, I/OWlsa control output which allows data to be output to a peripheral dunng a DMA read cycle (ClK) Clock Input: Generally from an Intel'" 8224 Clock Gen· erator device. (<1>2 TIL) or Intel'" 8085A ClK output (RESET) Reset: An asynchronous input (generally from an 8224 or 8085 device) which disables all DMA channels by Figure 5. 8257 Block Diagram Showing clearing the mode register and 3-states all control lines. ReadlWrite Logic Function 2-106 AFN-01840D inter 8257/8257 ·5 (Te) Address Lines These four address lines are three-state Terminal Count: ThiS output notifies the currently outputs which constitute bits 4 through 7 of the 16-bit selected peripheral that the present DMA cycle should be memory address generated by the 8257 dUring all DMA the last cycle for this data block. If the TC STOP bit in the cycles Mode Set register IS set, the selected channel will be automatically disabled at the end of that DMA cycle. TC is (READY) activated when the 14-blt value In the selected channel's terminal count register equals zero Recall that the low- Ready: This asynchronous input is used to elongate the order 14-bits of the terminal count register should be memory read and write cycles In the 8257 with 'wait loaded with the values (n-1), where n =the deSired number states If the selected memory requires longer cycles. of the DMA cycles READY must conform to specified setup and hold times (MARK) (HRQ) . Modulo 128 Mark ThiS output notifies the selected peripheral that the current DMA cycle IS the 128th cycle Hold Request: This output requests control of the since the prevIOus MARK output MARK always occurs at system bus. In systems with only one 8257, HRQ will 128 (and all multiples of 128) cycles from the end of the normally be applied to the HOLD Input on the CPU HRQ data block Only If the total number of DMA cycles (n) IS must conform to specified setup and hold times evenly dlvlsable by 128 (and the terminal count register was loaded with n-1). Will MARK occur at 128 (and each (HLDA) succeeding multiple of 128) cycles from the beginning of Hold Acknowledge: ThiS Input from the CPU indicates the data block that the 8257 has acqUired control .of the system bus (MEMR) Memory Read. ThiS active-low three-state output IS used to read data from the addressed memory locallon dUring DMA Read cycles Memory Write' ThiS active-low three-state output IS used to write data Into the addressed memory location dUring DMA Write cycles. (ADSTB) Address Strobe. ThiS output strobes the most significant byte of the memory address into the 8212 deVice from the data bus. (AEN) Address Enable. ThiS output IS used to disable lfIoat) the System Data Bus and the System Control Bus It may also be used to disable Ifloatl the System Address Bus by use of an enable on the Address Bus drivers In systems to inhibit non-DMA deVices from responding dUring DMA cycles It may be further used to Isolate' the 8257 data bus from the System Data Bus to faCIlitate the transfer of the 8 most significant DMA address bits over the 8257 data I/O PinS without subjecting the System Data Bus to any timing constraints for the transfer When the 8257 IS used In an I/O deVice structure las opposed to memory mappedl, thiS AEN output should be used to disable the selecllon of an I/O deVice when the DMA address IS on the address bus The J/O deVice selection should be determined by the DMA acknowledge outputs for the 4 Figure 6. 8257 Block Diagram Showing Control channels Logic and Mode Set Register 2-107 AFN·01B40D in1:ef 8257/8257·5 5. Mode Set Register Note that rotating priority will prevent anyone channel When set. the various bits in the Mode Set register enable from monopolizing the DMA mode; consecutive DMA each of the four DMA channels. and allow four different cycles will service different channels if more than one options for the 8257: channel is enabled and requesting service. There is no overhead penalty associated with this mode of opera· 7 6 5 4 3 2 1 0 tion. All DMA operations began with Channel 0 initially -'"",-= ~rJ @'__ " '~'. aSSigned to the highest priority for the first DMA cycle. "O Extended Write Bit 5 Enables TC STOP Enables OMA Channell Enables EXTENDED WRITE Enables DMA Channel 2 Enables ROTATING PRIQRITY-- - - - Enables DMA Channel 3 If the EXTENDED WRITE bit is set, the duration of both the MEMW and IIOW signals is extended by activating them The Mode Set register is normally programmed by the earlier In the DMA cycle Data transfers within micro- CPU after the DMA address reglster(sl and terminal computer systems proceed asynchronously to allow count register(s) are initialized. The Mode Set Register is use of various types of memory and 1/0 devices with cleared by the RESET input. thus disabling all options. different access times. If a device cannot be accessed inhibiting all channels. and preventing bus conflicts on within a speCifiC amount of time it returns a "not ready" power-up. A channel should not be left enabled unless Its Indicallon to the 8257 that causes the 8257 to Insert one or DMA address and terminal count registers contain valid more wait states in ItS internal sequencing. Some devices values; otherWise. an inadvertent DMA request (DROn) are fast enough to be accessed Without the use of wait from a peripheral could Inillate a DMA cycle that would states. but If they generate their READY response with the destroy memory data. leading edge of the IIOW or MEMW signal (which generally occurs late In the transfer sequence). they The (various options which can be enabled by bits in the would normally cause the 8257 to enter a walt state' Mode Set register are explained below. because it does not receive READY In time For systems • With these types of devices. the Extended Write option Rotating Priority Bit 4 prOVides alternative timing for the 1/0 and memory write In the Rotating Priority Mode. the Priority of the channels signals which allows the devices to return an early READY has a Circular sequence After each DMA cycle. the and prevents the unnecessary occurrence of walt states In Priority of each channel changes The channel which -had the 8257. thus increasing system throughput Just been serviced Will have the lowest Prlorl'ty TC Stop Bit 6 If 'the TC STOP bit is set. a channel IS disabled (I e . Its enable bit IS reset) after the Terminal Count (TC) output goes true. thus automatically preventing further DMA operation on that channel. The enable bit for that channel must be re-programmed to conllnue or begin another DMA operation. If the TC STOP bit IS not set. the occurrence of the TC output has no effect on the channel enable bits In thiS case. It IS generally the responsibility of the peripheral to cease DMA requests In order to terminate a DMA operallon. If the ROTATING PRIORITY bit IS not set (set to a zero). each DMA channel has a fixed priority In the fixed Priority Auto Load Bit 7 mode. Channel 0 has the highest Priority and Channel 3 The Auto Load mode permits Channel 2 to be used for has the lowest griorlty If the ROTATING PRIORITY bit IS repeat block or block chaining operations. Without set to a one. the priOrity of each channel changes after Immediate software intervention between blocks Chan- each DMA cycle (not each DMA request) Each channel nel 2 registers are initialized as usual for the first data moves up to the next highest Priority assignment. while block. Channel 3 registers. however. are used to store the the channel which has Just been serviced moves to the block re-Inltlallzatlon parameters (DMA starting address. lowest Priority assignment terminal count and DMA transfer mode) After the first block of DMA cycles IS executed by Channel 2 (I e . after CHANNEL...... CH-O CH-l CH·2 CH-3 the TC output goes true). the parameters stored In the JUST SERVICED Channel 3 registers are transferred to Channel 2 dUring an "update" cycle Note that the TC STOP feature. described Prlorlty,_ Hlghelt CH-l CH-2 CH-3 CH·O above. has no effect on Channel 2 when the Auto Load bit ~ AsSignments CH-2 CH-3 CH-O CH-l IS set CH-3 CH-O CH-l CH-2 Lowest CH-O CH-1 CH-2 CH-3 2-108 AFN·01840D 8257/8257·5 If the Auto Load bit is set. the initial parameters for Channel 2 are automatically duplicated in the Channel 3 registers when Channel 2 is programmed. This permits repeat block operations to be set up with the programming TC STATUS FOR CHANNEL 0 of a single channel. Repeat block operations can be used TC STATUS FOR CHANNEL 1 in applications such as CRT refreshing. Channels 2 and 3 L~====TC STATUS FOR CHANNEL 2 TC STATUS FOR CHANNEL 3 can still be loaded with separate values if Channel 2 is loaded before loading Channel 3. Note that in the Auto Load mode. Channel :3 is still available to the user if the Channel 3 enable bit is set. but use of this channel will The TC status bits are set when the Terminal Count (TC) change the values to be auto loaded into Channel 2 at output is activated for that channel. These bits remain set update time. All that is necessary to use the Auto Load until the status register is read or the 8257 is reset. The feature for chaining operations IS to reload Channel 3 UPDATE FLAG. however, is not affected by a status registers at the conclusion of each update cycle with the register read operation. The UPDATE FLAG can be new parameters for the next data block transfer. cleared by resetting the 8257, by changing to the non-auto Each tim", that the 825.7 enters an update cycle. the update load mode (i.e., by resetting the AUTO LOAD bit in the flag in the status register is set and parameters in Channel Mode Set register) or it can be left to clear itself at the 3 "are transferred to Channel 2. non-destructively for completion of the update cycle. The purpose of the Channel 3. The actual re-initialization of Channel 2 occurs UPDATE FLAG is to prevent the CPU from inadvertently at the beginning of the next channel 2 DMA cycle after the skipping a data block by overwriting a starting address or TC cycle. This will be the first DMA cycle of the new data terminal count in the Channel 3 registers before those block for Channel 2. The update flag is cleared at the parameters are properly auto-loaded into Channel 2. conclusion of this DMA cycle. For chaining operations, the update flag in the st'lltus register can be monitored by the CPU to determine when the re-initialization process The user is cautioned against reading the TC status has been completed so that the next block parameters can register and using this information to reenable chan· be safely loaded into Channel 3. nels that have not completed operation. Unless the DMA channels are inhibited a channel could reach ter· 6. Status Register minal count (TC) between the status read and the mode The eight-bit status register indicates which channels write. DMA can be inhibited by a hardware gate on the have reached a terminal count condition and includes the HRQ line or by disabling channels with a mode word update flag described previously. before reading the TC status. _IPARAMETERSr- FOR BLOCK 1 l' _IPARAMETERSI_ fOR BLOCK 2 CHANNEL 2 UPDATE _IPA~AMETERSIc fOR BLOCK 3 CHANNel 2 UPDATE ! -I'ETC----- OCCURS HERE OCCUASHERE ~ 110 WRITE ORa 2 __________ ~rrnIUL __ I--OATABLOCK1_1 TC UPOATE FLAG Figure 7. Autoload Timing 2-109 AFN·01840D , 8257/8257·5 / OPERATIONAL SUMMARY Programming and Reading the 8257 Registers CONTROL INPUT cs IIOW iiOii A3 Program Half of a 0 0 1 0 There are four pairs of "channel registers": each pair Channel Reglltar consisting of a 16-bit DMA address register and a 16-bit terminal count register (one pair for each channel). The Read Half of a 0 1 0 0 8257 also includes two "general registers": one 8-bit Channel Register Mode Set register and one 8-bit Status register. The Program Mode Set 0 0 1 1 registers are loaded or read when the CPU executes a Regilter write or read instruction that addresses the 8257 device and the appropriate register within the 8257. The 8228 Read Stalus Register 0 1 0 1 generates the appropriate read or write control signal (generally IIOA or IIOW while the CPU places a 16-bit four channels. Because the "channel r.egisters" are 16- address on the system address bus. and either outputs the bits. two program instruction cycles are required to load data to be written onto the system data bus or accepts the or read an entire register. The 8257 contains a flrslliast data being read from the data bus. All or some of the most (F/L) flip flop which toggles at the completion of each significant 12 address bits A4-A15 (depending on the channel program or read operation. The F/L flip flop systems memory. 1/0 configuration) are usually decoded determines whether the upper or lower byte of the register to produce the chip select (CS) input to the 8257. An 1/0 is 10 be accessed. The F/L flip flop is reset by the RESET Write Input (or Memory Write In memory mapped 1/0 input and whenever the Mode Set register is loaded. To configurations. described below) specifies that the maintain proper synchronization when accessing the addressed register is ,to be programmed. while an 110 "channel registers" all channel command instruction Read input (or Memory Read) specifies that the addressed operations should occur in pairs. with the lower byte of a register is to be read. Address bit 3 specifies whether a register always being accessed first. Do not allow CS to "channel register" (AJ = 0) or the Mode Set (program clock while either IIOA or IIOW is active. as this will cause only)/Status (read only) register (A3 = 1) is tobe accessec;l. an erroneous F/L flip flop state. In systems utilizing an The least significant three address bits. Ao-Al. indicate the Interrupt structure. Il1terrupts should be disabled prior to specific register to be accessed When accessing the any paired programming operations to prevent an Mode Set or Status register. Ao-Al are all zero. When interrupt from splitting them The result of such a split accessing a channel register bit Ao differentiates between would leave the F/L F/F In the wrong state This problem IS the DMA address register (Ao = 0) and the terminal count particularly obvIous when other DMA channels are register (Ao = 1). while bits AI and A2 specify one of the programmed by an'interrupt structure, 8257 Register Selection ADDRESS INPUTS 'BI-DIRECTIONAL DATA BUS REGISTER BYTE F/L CH-O DMA Address LSB o o o o o A7 As As A4~A2A1Ao MSB o o o o 1 Als AI4 A13 An A11 A10 Ag As CH-O Terminal Count LSB o o o I o C7 Cs Cs C4 ~ C:z C1 Co MSB o o o 1 I Rd Wr C13 C12 C11 C10 Cg Ca o o o o -iT"i CH-1 DMA Addr... LSB 1 MSB o o 1 o I CH-1 Terminal Count LSB o o 1 1 o MSB o o 1 1 1 -ieri CH-2 DMA Address LSB o 1 o o o MSB o 1 o o I CH-2 Terminal Count LSB o 1 o 1 o MSB o 1 o 1 I CH-3 DMA Addres. LSB o 1 1 o o Same a. Channel 0 I , Msa o I I o I CH-3 Terminal Count LSB o 1 1 1 o MSB' o 1 1 1 I MODE SET (Program only) 1 o o o o AL TCS EW RP EN3 EN2 ENI END STATUS (Raad only) 1 o o o o o o o UP TC3 TC2 TCI TCO "Ao-AIS: DMA Starting Address. CO-CI3: Terminal Count val\le (N-1). Rd and Wr: DMA Ver.ify (00). Write (01) or Read (10) cycle selection. AL: Auto Load. TCS: TC STOP, EW: EXTENDED WRITE. RP: ROTATING PRIORITY, EN3-ENO: CHANNEL ENABLE MASK. UP: UPDATE FLAG. TC3-TCO: TERMIN~L COUNT STATUS BITS. 2-110 AFN·01840D 'inter 8257/8257·5 read and write commands and byte transfer occurs be- RElET tween the selected 1/0 device and memory. After ,the trans'fer is complete, the DArn< line is set HIGH and the HRO line is set LOW to indicate to the CPU that'the bus is now free for use. ORO must remain HIGH until OACK SI SAMPLE OROn LINES is issued, to be recognized and must go LOW before S4 SET HRO IF OROn = 1 of the transfer sequence to prevent another transfer from occuring. (See timing diagram.) +DROn Consecutive Trensfers If more than one channel requests service simultaneous· n SO Iy, the transfer will occur in the same way a burst does. SAMPLE HlDA RESOLVE OROn PRIORITIES No overhead is incurred by switching from one channel to another. In each S4 the ORO lines are sampled and the highest priority request is recognized during the next transfer. A burst mode transfer in a lower priority _ J~LOA channel will be overridden by a higher priority request. Once the high priority transfer has completed control -- will return to the lower priority channel if its ORO is still S1 PRESENT AND LATCH UPPER ADDRESS active. No extra cycles are needed to execute thisse- PRESENT LOWER ADDRESS quence and the HRO line remains active until all ORO lines go LOW. ~ Control Override S2 The continuous OMA transfer mode described above ACTIVATE READ COMMAND ADVANCED WRITE COMMAND can be interrupted,by an external ,device by lowering the AND DACKn HLOA line. After each OMA transfer the 8257 samples the HLOA line to insure that it is still active. If it is not active, the 8257 completes the current transfer, releases J r-- the HRO lin'e (LOW) and returns to the idle state. If ORO lines are still active the 8257 will raise the HRO iine in =-TI S3 READY SW the third cycle and pr.oceed normally. (See timing ACTIVATE WRITE COMMAND ACTIVATE MARK AND TC READY diagram.) IF APPROPRIATE LINE Not Ready l READY .. VERIFY '-- The 8257 has a Ready input Similar to the SOSOA and the 8085A. The Ready line is sampled in State 3. If Ready is S4 READY RESET ENABLE FOR CHANNEl N If LOW the 8257 enters a wait state. Ready is sampled duro TC STOP AND TC ARE ACTIVE DEACTWATE COMMANDS ing every wait state. When Ready returns HIGH the 8257 ~ DEACTIVATE OACKn. MARK AND TO SAMPLE OROn AND HLOA proceeds to State 4 t.o c.omplete the transfer. Ready is DROn RESOLVE OROn PRIORITIES used to interface memory or 1/0 devices that cannot RESET HAO IF HlOA" 0 OR ORO" 0 meet the bus set up times required by the 8257. l i-fLDA + OROn Speed 1 DROn REFERS TO ANY ORO LINE ON AN ENABLED DMA CHANNEL. The 8257 uses four clock cycles to transfer a byte of data. No cycles are lost in the master to master transfer maximizing bus efficiency. A 2MHz clOCk input will Figure 8. DMA Operation State Diagram allow the 8257 to transfer at a rate of 500K bytes/second. Memory Mapped 1/0 Configurations The 8257 can be connected to the system bus as a memory DMA OPERATION deVIce Instead of as an 1/0 deVIce for memory mapped 1/0 Single Byte Trensfers conf'gurallons by connecllng the system memory control A single byte transfer is initiated by the 1/0 device rais· lines t.o the 8257's 1/0 control lines and the system 1/0 ing the ORO line of one channel of the 8257. If the chan· control lines to the 8257's memory control lines nel is enabled, the 8257 will output a HRO to the CPU. ThIS confIguratIon permIts use of the 8080's conSIderably The 8257 now waits until a HLOA is received insuring larger repertplre of memory Instructions when reading or that the system bus is free for its use. Once HLOA is loading the 8257's regIsters Note that With thiS received the ~ line fot the requesting channel isac· connecllon. the programming of the Read (bIt 15) and tivated (LOW). The ~ line ~cts as a chip select for Wnte (bIt 14) bIts In the terminal count regIster will have a the requesting 1/0 device. The 8257 then generates the dIfferent meaning 2-111 AFN-018400 • inter 8~57/8257-5 BIT 15 BIT 14 ~------------~M~EM~R~Dn-------____ --mnw READ WRITE 8257 MEMw'Rt--------- I/O WR 0 0 OMA Verily Cycle iiO'RD '-lEMi'il5 0 1 OMA Read Cycle I/OWR MEMWR 1 0 OMA Write Cycle 1 1 Illegal Figure 9. System Interface for Memory Figure 10. TC Register for Memory Mapped Mapped 1/0 1/0 Only . SYSTEM APPLICATION EXAMPLES \ ADDRESS BUS \ (;- I II \ CONTROL BUS \ II 1J i70W II i70R I II II \ DATA BUS \ D D U DROO 11 D I DISK 1 UDU SYSTEM DACKO ORO 1 ------- RAM MEMORY 8257 DISK 2 DACK 1 AND 1------- ~12 OR02 DISK 3 OACK 2 OR03 ------- DACK 3 OlSK4 OMA COI\ITROLLER Figure 11. FI9PPY Disk Controller (4 Drives) ORO 8257 SYSTEM 8251 AND DACK USART RAM 8212 MEMORY MODEM TELEPHONE LINES Figure 12. High-Speed Communication Controller 2-112 AFN-01840D inter 8257/8257·5 A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT :c INPUT/OUTPUT ~=x > < 2.0 2.0 DEVICE 'l~-'" UNPER TEST POINTS TEST 0.8 0.8 0.45 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 0 BV FOR A LOGIC 0 C L INCLUDES JIG CAPACITANCE Tracking Parameters 'I. Signals labeled as Tracking Parameters (footnotes 1 and 5-7 under A.C. Specifications) are signals that follow similar paths through the silicon die. The propagation speed of these signals varies in the manufacturing process but the relationship between all these parameters is constant. The variation is less than or equal to 50 ns. Suppose the following timing equation is being evaluated, T A(MINI .+ T B(MAXI :s 150 ns arid only minimum specifications exist for T A and T B. If T A(MIN) is used, and if T A and T B are tracking parameters, T B(MAX) can be taken as TB(MIN) + 50 ns. TA(MIN) + (TB(MIN)· + 50 ns) :s 150 ns ··If TA and T B are tracking parameters WAVEFORMS-PERIPHERAL MODe WRITE _ _ _ -TAW CRiHrUC'l' READ DATA BUS _ _ _ _ _..J IIOWA RESET 2-113 AFN·OI840D 8257/8257 ·5 WAVEFORMS-DMA CONSECUTIVE CYCLES AND BURST MODE SEQUENCE ~ I ~ I • I ~ I a I a I ~ SI S2 a S4 SI SI SI CLOCK DRQ03 __~__~+- ______ tf~~ ____r-__ ~~~ ______-+____________ __4-____+-______ ~ HRQ _ _ _ _. I -I ~---H-+---+----~----~----------~ Toa THS- HLDA _ _ _ _ _ _ _-.1 - \._---- AEN _ _ _ _ _ _ _~-~ ADR 0 7 (LOWER ADR) _ _ _ DATAO 7 {UPPER ADRI _ _ _ ADR STB _ _ _ --If', READY Te/MARK CLOCK NOTE The clock wweform 11 duplicated fOl'clarlty The 8257 r(lqU1rI1I'5 only s. I so so 52 'I S3 I S4 I S' S2 S3 S4 SI SI SI oneclodl: '"put 2-114 AFN·01840D inter 8257/8257·5 WAVEFORMS (Continued) CONTROL OVERRIDE SEQUENCE 54 I S. s' I SO S1 I S2 CLOCK DROOJ ------,.,.-+--------~- - - --- HRa _____ -+~~THS HLOA "" AEN ..J NOT READY SEQUENCE CLOCK~SO I S1 S2 I S3 I SW I SW I 54 IS' is. IS. 1 I Tas ! . DR003 ------- , ________ _ \~__t_I---!----'r - '- --- ""MROII ORO _____J :' '~ I I' 7 '- ,-C ; 7 \.. ____ _ i MEMWRIIOWR _____ .1 READY _ _ _ _ _TR_' J".I_-or-\_TR _,_ _ __ TC/M~RK I \ 2-115 AFN·01840D 825718257·5 A.. ~~.I ADDRESS I ... I :::J I BUS r- A, 00,--00, ALE f---1.l ST. 0$2 13 V" 8212 m f,1LJ ,f- MO 01,--01 1 BS; 1 AD, 0, I ~ I ,I DATA 8US AD, r- ...5 Vco " 0, r-! A, ~ • r-lB, • - l1li 0, !JNII ~AJ r- - MlMl\ r--! BJ , I 7 ilfA ~AJ I , ~ ilfA CONTROL , ~ BUS ~Bl 12 lOW Wli O. r- i15W ~A. 13 B. CHIP ill SELlCT REAOV IO/G SEL fBI 1 L "1C. I· READY ~ HOLD Ao, I-- HLOA ~ 0, :' , eLK (DUn iiREl iN I-- iifffi RESET OUT ~ - '--- ....---!..: MiMR ----...!..c ilfA 82575 DROo DA'C~o A, I--- ,. 2. ORa, DACKo '--- ~ iji"MW ORO, " 24 ORO, U ~ lOW DACK, DACK, r--12- MRQ DA02 DACK, ..,. 17 ORO, OACK, r----2... HlDA ORO, OR03 15 6ACi(, 6Jm<, ~ CLK 36 TC TC ~ ~ RESET MARK • MARK AEN ADsn • • .t,- V" 13 OS2 m STB ~ 01, DO, , , , 8212 , - - , / 01, 00, MO im t l' Figure 13. Detailed System Interface Schematic 2-116 AFN-01840D ABSOLUTE MAXIMUM RATINGS· *NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O°C to 700C tion of the device at these or any other conditions above Storage Temperature ............... -65·C to +1500C those Indicated /n the operational sections of this specifi- Voltage on Any Pin cat/on is not implied. Exposure to absolute maximum With Respect to Ground .............. -0.5V to + 7V rating conditions for extended per/ods may affect device Power Dissipation ............................ 1 Watt reliability. . D.C. CHARACTERISTICS (8257: TA = O·C to 700C. Vee = 5.0V ±5%. GND = OV) (8257-5: TA = OOC to 700C. Vee = 5.0V ±10%. GND = OV) Symbol Parameter Min. Max. Unit Test Conditions VIL Input Low Voltage -0.5 0.8 Volts VIH Input High Voltage 2.0 Vee+· 5 Volts VOL Output Low Voltage 0.45 Volts ioL = 1.6 mA VoH Output High Voltage 2.4 Vee Volts ioH=-150IolA for AB. DB and AEN IOH =-80IolA for others VHH HRQ Output High Voltage 3.3 Vee Volts IOH = -801olA Icc Vee Current Drain 120 mA IlL Input Leakage ±10 lolA OV", VIN '" Vee IOFL Output Leakage During Float ±10 lolA 0.45V '" VOUT '" Vee CAPACITANCE (TA = 25·C; vee = GND = OV) Symbol Parameter Min. Typ. Max. Unit Test Conditions CIN Input Capacitance 10 pF fc= lMHz CliO I/O Capacitance 20 pF Unmeasured pins returned to GND 2-117 AFN·01840D inter 8257/8257·5 A.C. CHARACTERISTICS-PERIPHERAL (SLAVE) MODE (8257: TA = O°C to 70°C, VCC = 5.0V ±50/0, GND = OV) (8257-5: TA = O°C to 70°C, VCC = 5.0V ±100/0, GND = OV) 8080 Bus Parameters READ CYCLE 8257 8257·5 Symbol Parameter Min. Max. Min. Max. Unit Test Conditions TAR Adr or cS~ Setup to R D ~ 0 0 ns TRA Adr or cst Hold from RDt 0 0 ns ! TRO Data Access from R D ~ 0 300 0 220 ns TOF DB .... Float Delay from RDt 20 150 20 120 ns TRR RD Width 250 250 ns WRITE CYCLE 8257 8257·5 Symbol Parameter Min. Max. Min. Max. Unit Test Conditions TAW Adr Setup to WR i 20 20 ns TWA Adr Hold from WRt 0 0 ns Tow Data Setup to WR t 200 200 ns Two Data Hold from WRt 10 10 ns Tww WR Width 200 200 ns OTHER TIMING 8257 8257·5 Symbol Parameter Min. Max. Min. Max. Unit Test Conditions T RSTW Reset Pulse Width 300 300 ns T RSTO Power Supplyt (Vee) Setup to ReseU 500 500 j1S T, Signal Rise Time 20 20 ns Tf Signal Fall Time 20 20 ns TRSTS Reset to First I/OWR 2 2 tey A.C. CHARACTERISTICS-DMA (MASTER) MODE (8257: TA = O°C to 70°C, VCC = 5.0V ±50/0, GND = OV) (8257-5: TA = O°C to 70°C, VCC = 5.0V ±100/0, GND "" OV) TIMING REQUIREMENTS 8257 8257·5 Symbol Parameter Unit Min. Max. Min. Max. Tey Cycle Time (Period) 0.320 4 0.320 4 I'S Tu Clock Active (High) 120 .8Tcy 80 .8T CY ns Tas DROI Setup to ClKI (SI, S4) 120 120 ns TaH DROI Hold from HlDA1[1] 0 0 ns T HS HlDAl or ISetup to ClKI(SI, S4) 100 100 ns T AS READY Setup Time to ClKl(S3, Sw) 30 30 ns TAH READY Hold Time from ClKl(S3, Sw) 30 30 ns 2-118 AFN·01840D inter 825718257·5 A.C. CHARACTERISTICS-DMA (MASTER) MODE (8257: TA = O°C to 70°C, V CC = 5.0V ±50/0, GND = OV) (8257·5: TA = O°C to 70°C, VCC = 5.0V ±100/0, GND = OV) TIMING RESPONSES 8257 8257·5 Symbol Parameter Unit Min. Max. Min. Max. HRQj or tDelay from ClKj (51, 54) TOQ 160 160 ns (measured at 2.0V) HRQj or tDelay from ClKj (51, 54) TOQ1 250 250 ns (measured at 3.3V)[3) TAEL AENj Delay from ClKt (51) 300 300 ns TAET AENt Delay from ClKj (51) 200 200 ns TAEA Adr (AB) (Active) Delay from AENj (51 )[1) 20 20 ns TFAAB Adr (AB) (Active) Delay from ClKj (51)[2) 250 250 ns TAFAB Adr (AB) (Float) Delay from ClKj (51)[2) 150 150 ns TASM Adr (AB) (5table) Delay from ClKj (51 )[2) 250 250 ns TAH Adr (AB) (5table) Hold from ClKj (51)[2) TASM-:50 TASM -50 ns TAHR Adr (AB) (Valid) Hold from RDj (51,51)[1) 60 60 ns TAHW Adr (AB) (Valid) Hold from Wrj (51,51)[1) 300 300 ns TFAOB Adr (DB) (Active) Delay from ClKj (51)[2) 300 300 ns TAFOB Adr (DB) (Float) Delay from ClKj (52)[2) TSTT+20 250 TSTT+20 170 ns TASS Adr (DB) 5etup to Adr Stb~ (51-52)[1) 100 100 ns TAHS Adr (DB) (Valid) Hold from Adr 5tb~ (52)[1) 20 20 ns TSTL Adr 5tbj Delay from ClKj (51) 200 200 ns TSTT Adr 5tb~ Delay from ClKj (52) 140 140 ns TSW Adr 5tb Width (51-52)[1) TCy-100 TCy-100 ns TASC Rd~ orWr(Ext)t Delay from Adr 5tb~ (52)[1) 70 70 ns RD~ or WR~Ext)~ Delay from Adr (DB) TOBC 20 20 ns (Float) (52) 1) DACKj or ~ Delay from ClKt (52, 51) and TAK TC/Markj Delay from ClKj (53) and 250 250 ns TC/Markt Delay from ClKj (54)[4) RDt or Wr(ExtH Delay from ClKj (52) and 200 200 ns TOCL Wr~ Delay from ClKj (53)[2,5) Rdj Delay from ClK~ (51, 51) and TOCT 200 200 ns Wrj Delay from ClKj (54)[2,6) TFAC Rd orWr (Active) from ClKj (51)[2) 300 300 ns TAFC Rd orWr (Active) from ClKj (51)[2) 150 150 ns TRWM Rd Width (52-51 or 51)[1) 2TCy+TO-50 2TCY+ TO-50 ns TWWM WrWidth (53-54)[1) TCy-50 TCy-50 ns TWWME WR(Ext) Width (52-54)[1) 2TCy-50 2TCy-50 ns NOTES: 1. Tracking Parameter. 3. Load = VOH = 3.3V. 5. t.T DCL < 50 ns. 2. Load = + 50 pF. 4 ..nAK < 50 ns. 6. t.TDCT < 50 ns. 2-119 AFN·01840D 8259A/8259A-2/8259A-8 PROGRAMMABLE INTERRUPT CONTROLLER • IAPX 86, IAPX 88 Compatible • Individual Request Mask Capability • MCS-80®, MCS-85® Compatible • Single + 5V Supply (No Clocks) • Eight·Level Priority Controller • 28·Pln Dual·ln·Line Package • Expandable to 64 Levels • Available in EXPRESS - Standard Temperature Range • Programmable Interrupt Modes - Extended Temperature Range The Intel~ 8259A Programmable Interrupt Controller handles up to eight vectored priority interrupts for the CPU. It is cascadable for up to 64 vectored priority interrupts without additional circuitry. It is packaged in a 28-pin DIP, uses NMOS technology and requires a single + 5V supply. Circuitry is static, r~quiring no clock input. The 8259A is designed to minimize the software and real time overhead in handling multi·level priority interrupts. It has several modes, permitting optimization for a variety of system requirements. The 8259A is fully upward compatible with the Intel~ 8259. Software originally written for the 8259 will operate the 8259A in all 8259 equivalent modes (MCS-80/85, .Non·Suffered, Edge Triggered). DATA CONTROL LOGIC °roo BUS BUFFER CS WR Au iii) INTA IA7 IRO IA6 RD 'R' lAS WA 'R2 IRO IA2 cs 0, IA' 0" lAO CAS 0 INT CASO CAS! §OlEN GND CAS2 CA$1 CAS 2 '§PIEri ~INTERNAl8US Figure 1. Block Diagram Figure 2. Pin Configuration 2-120 8259A/8259A-218259A-8 Table 1. Pin Description Symbol Pin No. Type Name and Function Vee 28 I Supply: +5V Supply. GND 14 I Ground. CS 1 I Chip Select: A low on this pin enables RD and WR communication between the CPU and the 8259A. INTA functions are independent of CS. WR 2 0 Write: A low on this pin when CS is low enables the 8259A to accept command words from the CPU. RD 3 I Read: A low on this pin when CS is low enables the 8259A to release status onto the data bus for the CPU. D7-Do 4-11 I/O Bidirectional Data Bus: Control, status and Interrupt-vector information is transferred via this bus. CASo-CAS2 12,13,15 I/O Cascade Lines: The CAS lines form a private 8259A bus to control a multiple 8259Astructure. These pins are outputs for a master 8259A and inputs for a slave 8259A. SP/EN 16 I/O Slave Program/Enable Buffer: This is a dual function pin When in the Buffered Mode it can be used as an output to control buffer transceivers (EN). When not in the buffered mode it iiS used as an input to deSignate a master (SP = 1) or slave (SP = 0). INT 17 0 Interrupt: This pin goes high whenever a valid interrupt request is asserted. It is used to interrupt the CPU, thus it is connected to the CPU's interrupt pin. IRO-IR7 18-25 I Interrupt Requests: Asynchronous inputs. An interrupt request is executed by raising an IR input (low to high), and holding it high until it is acknowledged (Edge Triggered Mode), or just by a high level on an IR input (Level Trigger~d Mode). INTA 26 I Interrupt Acknowledge: This pin is used to enable 8259A interrupt-vector data onto the data bus by a sequence of interrupt acknowledge pulses issued by the CPU. Ao 27 I AO Address Line: This pin acts in conjunction with the CS, WR, and RD pins. It is used by the 8259A to decipher various Command Words the CPU writes and status the CPU wishes to read. It is typically connected to the CPU AO address line (A1 for iAPX 86, 88). 2-121 AFN·00221E inter 8259A18259A~218259A·8 FUNCTIONAL DESCRIPTION match his system requirements. The priority modes can be changed or reconfigured dynamically at any time dur- Interrupts in Microcomputer Systems lrig the main program. This means that the complete interrupt structure can be defined as required, based on Microcomputer system design requires that 1/0 devices the total system environment. such as keyboards, displays, sensors and other com- ponents receive servicing In an efficient manner so that large amounts of the total system tasks can be assumed by the microcomputer with little or no effect on through- CPU·DRIVEN put. MULTIPLEXOR CPU The most common method of servicing such devices Is the Polled approach. This Is where the processor must test each device in sequence and In effect "ask" each one if it needs servicing. It is easy to see that a large por- tion of the main' program is looping through this con- tinuous polling cycle and that such a method would RAM have a serious, detrimental effect on system through- put, thus limiting the tasks that could be assumed by the microcomputer and reducing the cost effectiveness of using such devices. A more desirable method would be one that would allow RDM the microprocessor to be executing its main program and only stop to service peripheral devices when it Is told to do so by the device Itself. In effect, the method would provide an external asynchronous Input that would inform the processor thElt it should complete whatever instruction that is currently being executed and fetch a new routine that will service the requesting device. Once this servicing is complete, however, the processor would resume exactly where It left off. This method Is called Interrupt. It is easy to see that Figure 38. Polled Method system throughput would drastically Increase, and thus more tasks could be assumed by the microcomputer to further enhance Its cost effectiveness. The Programmable Interrupt Controller (PIC) functions as an overall manager in an Interrupt-Driven system CPU INT environment. It accepts requests from the peripheral equipment, determines which of the incoming requests Is of the highest importance (priority), ascertains whether the Incoming request has a higher priority value than the level currently being serviced, and issues an RAM PIC interrupt to the CPU based on this determination. Each peripheral device or structure usually has a special program or "routine" that Is associated with its specific functional or operational requirements; this Is referred to as a "service routine". The PIC, after issuing an Inter- ROM 1/011) rupt to the CPU, must somehow Input information into the CPU that can "point" the Program Counter to the service routine associated with the requesting device. This "pointer" is an address In a vectoring table and will often be referred to, In this document, as vectoring data. 11012) The 8259A The 8259A Is a device specifically designed for use in real time, interrupt driven microcomputer systems. It manages eight levels or requests and has built-In fea- tures for expandability to other 8259A's (up to 64 levels). I 110 IN) I It Is progremmed by the system's software as an 110 I' 1 _____ JI peripheral. A selection of priority modes Is available to the programmer so that the manner In which the re- quests are processed by the 8259A can be configured to Figure 3b. Interrupt Method 2-122 AFN·OO221E -inter 8259A18259A-218259A-8 INTERRUPT REQUEST REGISTER (lRR) AND IN·SERVICE REGISTER (ISR) The interrupts at the IR input lines are handled by two registers in cascade, the Interrupt Request Register (IRR) and the In-Service Register (ISR)_ The IRR is used to store all the interrupt levels which are requesting ser- vice; and the ISR is used to store all the interrupt levels which are being serviced. PRIORITY RESOLVER This logic block determines the priorities of the bits set in the IRR. The highest priority is selected and strobed Into the corresponding bit of the ISR during INTA pulse. INTERRUPT MASK REGISTER (IMR) The IMR stores the bits which mask the interrupt lines to be masked. The IMR operates on the IRR. Masking of a higher priority input will not affect the interrupt request lines of lower priority. ~INTEANALBUS INT (lNTERRUP,!) This output goes directly to the CPU interrupt input. The VOH level on this line is designed to be fully compatible with the 808OA, 8085A and 8086 Input levels. Figure 4a. 8259A Block Diagram INTA (INTERRUPT ACKNOWLEDGE) INTA pulses will cause the 8259A to release vectoring Information onto the data bus. The format of this data depends on the system mode ("PM) of the 8259A. DATA BUS BUFFER This 3-state, bidirection~1 8-bit buffer is used to inter- face the 8259A to the system Data Bus. Control words and status Information are transferred through the Data Bus Buffer. READIWRITE CONTROL LOGIC The function of this block is to accept OUTput com- mands from the CPU. It contains the Initialization Com- mand Word (ICW) registers and Operation Command Word (OCW) registers which store the various control formats for device operation. This function block also allows the status of the 8259A to be transferred onto the Data Bus. CS (CHIP SELECT) ~'NTfR"'AlBUS A LOW on this Input enables the 8259A. No reading or writi'ng of -the' chip will occur unless the device is selected. Figure 4b. 8259A Block Diagram WR (WRITE) A lOW on this input enables the CPU to write control words (lCWs and OCWs) to the 8259A. Ao RD(READ) This input signal is used in conjunction with WR and RD A lOW on this input enables the 8259A to send the signals to write commands into the various command status of the Interrupt Request Register (IRR), In Service registers, as well as reading the various status registers Register (lSR), the Interrupt Mask Register (IMR), or the of the chip. This line can be tied directly to one of the ad- Interrupt level onto the Data Bus. dress lines. AFN·OO221E 2-123 ,8259A!8259A-2/8259A-8 THE CASCADE BUFFER/COMPARATOR If no interrupt request is present at step 4 of either sequence (i.e., the request was too short in duration) the This function block stores and compares the IDs of all 8259A will issue an interrupt level 7. Both the vectoring 8259A's used in the system. The associated three 1/0 bytes and the CAS lines will look like ali interrupt level 7 pins (CASO-2) are outputs when the 8259A is used as a was requested. master and are inputs when the 8259A is used as a slave. As a master" the 8259A sends the 10 of the inter· rupting slave device onto the CASO-2 lines. The slave thus .selected will send its preprogrammed subroutine address onto the Data Bus during the next one or two consecutive INTA pulses. (See section "Cascading the 8259A".) INTERRUPT SEQUENCE The powerful features of the 8259A in a microcomputer system are its programmability and the interrupt routine addressing capability. The latter allows direct or indirect jumping to the specific interrupt routine requested without any polling of the interrupting devices. The nor- mal sequence of events during an interrupt depends on the type of CPU being used. The events occur as follows in an MCS-80/85 system: 1. One or more of the INTERRUPT REQUEST lines (IR7-0) are raised high, setting the corresponding IRR bit(s). 2. The 8259A evaluates these requests, and sends an INT to the CPU, if appropriate. 3. The CPU acknowledges the INT and responds with an ~ INTERNAL BUS INTA pulse. 4. Upon receiving an INTA from the CPU group, the highest priority ISR bit is set, and the corresponding IRR bit is reset. The 8259A will also release a CALL in- struction code (11001101) onto the 8-bit Data Bus through its 07-0 pins. Figure 4c. 8259A Block Diagram 5. This CALL instruction will initiate two more INTA pulses to be sent to the 8259A from the CPU group. 6. These two INTA pulses allow the 8259A to release its preprogrammed subroutine address onto the Data \ ADDRESS BUS (16) \ Bus. The lower 8-bit address is released at the first INTA pulse and and the higher 8-bit address is re- I I leased at the second INTA pulse. \ CONTROL BUS \ 7. This completes the 3-byte CALL instruction released IIOR iTow INT INTA by the 8259A. In the AEOI mode the ISR bit is reset at \ DATA BUS (8) \ the end of the third INTA pulse. Otherwise, the ISR bit remains set until an appropriate EOI command is issued at the end of the -interrupt sequence. The events occurring in an iAPX 86 system are the same CA~ "" IJ °1- 0 0 RD iVA tNT INTA ~-,{= until step 4. CAS' 8259A 4. Upon receiving an INTA from the CPU group, the high- - LINES est priority ISR bit is set and the corresponding IRR CAS 2 Sf!IEN IRQ IRQ IRQ IRQ IRQ IRQ IRQ IRQ 7 6 5 4 3 2 0 , bit is reset. The 8259A does not drive the Data Bus PRooL~ I I I 1 1 -I I, during this cycle. 5. The iAPX 86/10 will initiate a second INTA pulse. SLAVE I During this pulse, the 8259A releases an 8-bit pointer ENABLE BUFFER I INTERRUPT onto the Data Bus where it is read by the CPU. REQUESTS 6. This completes the interrupt cycle. In the AEOI mode the ISR bit is reset at the end of the second INTA pulse. Otherwise, the ISR bit remains set until an appropriate EOI command is issued at the end of the .Figure 5_ 8259A Interface to Standard interrupt subroutine. . System Bus 2-124 AFN-00221E inter 8259A/8259A-2/8259A-8 INTERRUPT SEQUENCE OUTPUTS not issue any data to the processor and leaves its data bus buffers disabled. On the second interrupt acknowledge MCS-80®, MCS-85® cycle in iAPX 86 mode the master (or slave if so pro- This sequence is timed by three INTA pulses. During the grammed) will send a byte of data to the processor with first iiiifA pulse the CALL opcode is enabled onto the the ackndwledged interrupt code composed as follows data bus. (note the state of the ADI mode control is ignored and Content of First Interrupt As-A11 are unused in iAPX 86 mode): Vector Byte Content of Interrupt Vector Byte 07 06 05 04 03 02 01 DO for iAPX 86 System Mode CALL CODE I 1 0 0 0 1 I 07 06 05 04 03 02 01 00 IR7 T7 T6 TS T4 T3 1 1 1 During the second INTA pulse the lower address of the appropriate service routine is enabled onto the data bus; IR6 T7 T6 T5 T4 T3 1 1 0 When Interval = 4 bits A5-A7 are programmed, while Ao- IR5 T7 T6 T5 T4 T3 1 0 1 A4 are automatically inserted by the 8259A. When Inter- IR4 T7 T6 T5 T4 T3 1 0 0 = val 8 only As and A7 are programmed, while Ao-As are IR3 T7 TS T5 T4 T3 0 1 1 automatically inserted. IR2 T7 T6 T5 T4 T3 0 1 0 Content of Second Interrupt IR1 T7 T6 T5 T4 T3 0 0 1 Vector Byte IRO T7 T6 T5 T4 T3 0 0 0 IR Inl.,..1.4 07 D6 05 04 03 02 01 DO PROGRAMMING THE 8259A 7 A7 A6 A5 1 1 1 0 0 The 8259A accepts two types of command words gener- S A7 A6 A5 1 1 0 0 0 ated by the CPU: 5 A7 A6 A5 1 0 1 0 0 4 A7 A6 A5 1 0 0 0 0 1.lnitia/ization Command Words'(lCWs): Before normal A7 A6 A5 1 operation can begin, each 8259A in the system must 3 0 1 0 0 be brought to a starting point - by a sequence of 2 to 2 A7 AS A5 0 1 0 0 0 4 bytes timed by WR pulses. 1 A7 A6 A5 0 0 1 0 0 0 A7 A6 A5 0 0 0 0 0 2. Operation Command Words (OCWs): These are the command words which command the 8259A to oper- IR Int81'¥11=8 ate in various interrupt modes. These modes are: 07 06 05 04 03 02 01 00 a. Fully nested mode 7 A7 AS o b. Rotating priority mode ~6-4__A~7__~A~6_____________~__~_.__~ ___ ~ c. Special mask mode A7 AS o 0 0 d. Polled mode ~-4-------------------------------' 4 A7 A6 0 0 0 The OCWs can be written into the 8259A anytime after ~--A7 A6 0 1 1 · o~--O--o ~-- .-----------~------~------- initialization. 2 A7 AS 0 1 0 0 0 0 1 A7 A6 0 0 1 0 0 0 INITIALIZATION COMMAND WORDS --------~~--------~---~--------- o A7 AS 0 0 0 0 0 .. -~-- 0 (ICWS) GENERAL During the third INTA pulse the higher address of the appropriate service routine, which was programmed as Whenever a command is issued with AO 0 and D4 1, = = this is interpreted as Initialization Command Word 1 byte 2 of the initialization sequence (As - Ad, is (ICW1). ICW1 starts the initialization sequence during enabled onto the bus. which the following automatically occur. Content of Third Interrupt a. The edge sense circuit is reset, which means that fol- Vector Byte lowing initialization, an interrupt request (lR) input 07 06 05 04 03 02 01 DO must make a low-to-high transition to generate an A15 A14 A13 A12 All Al0 A9 AS interrupt .. b. The Interrupt Mask Register is cleared. iAPX 86; iAPX 88 c. IR7 input is assigned priority 7. iAPX 86 mode is similar to MCS-80 mode except that only d. The slave mode address is set to 7. two Interrupt Acknowled~e cycles are issued by the pro- e. Special Mask Mode is cleared and Status Read is set to cessor and no CALL opcode is sent to the processor. The IRR. first interrupt acknowledge cycle is similar to that of f. If IC4=O, then all functions selected in ICW4 are set to MCS-80, 85 systems in that the 8259A uses it to internally zero. (Non-Buffered mode', no Auto-EOI, MCS-80, 85 freeze the state of the interrupts for priority resolution and system). as a master it issues the interrupt code on the cascade lines at the end of the INTA pulse. On this fi.rst cycle it does • Note: Master/Slave in ICW4 18 only used In the buffered mode AFN·QQ221E 2-125 8259A18259A-2/8259A-8 INITIALIZATION COMMAND WORDS 1 AND 2 INITIALIZATION COMMAND WORD 3 (ICW3) (lCW1,ICW2) This word is read only when there is more than one As-A IS: Page starting address of service routines. In an 8259A in the system and cascading is used, in which MCS 80/85 system, the 8 request levels wi" generate case SNGL =O. It wi" load the 8·bit slave register. The CALLs t6 8 locations equally spaced in memory. These functions of this register are: can be programmed to be spaced at intervals of 4 or 8 a. In the master mode (either when SP =1, or in buffered memory locations, thus the 8 routines wi" occupy a mode when MIS = 1 in ICW4) a "1" is set for each page of 32 or 64 bytes, respectively. slave in the system. The master then wi" release byte The address format is 2 bytes long (Ao-Als!' When the 1 of the call sequence (for MCS·80/85 system) and routine interval is 4, Ao-A4 are automatically inserted by wi" enable the corresponding slave to release bytes 2 the 8259A, while As-AIS are programmed externally. and 3 (for iAPX 86 only byte 2) through the cascade When the routine interval is 8, Ao-As are automatically lines. inserted by the 8259A, while As-AIS are programmed externally. = b. In the shive mode (either when SP 0, or If BUF 1 ( = and MIS = 0 in ICW4) bits 2-0 identify the slave. The The 8·byte interval will maintain compatibility with cur· slave compares its cascade input with these bits and, rent software, while the 4·byte interval is best for a com· If they are equal, bytes 2 and 3 of the call sequence (or pact jump table. just byte 2 for iAPX 86 are released by it on the Data Bus. In an iAPX 86 system AIS-All are inserted in the five most INITIALIZATION COMMAND WORD 4 (ICW4) significant bits of the vectoring byte and the 8259A sets the three least significant bits according to the interrupt level. AlO-AS are ignored and ADI (Address interval) has = SFNM: If SFNM 1 the special fully nested mode Is programmed. no effect. BUF: If BUF = 1 the buffered mode is programmed. In buffered mode SP/EN becomes an enable outpul LTIM: If LTIM =1, then the 8259A wi" operate in the and the masterlslave determination is by MIS. level Interrupt mode. Edge detect logic on the = MIS: If buffered mode Is selected: MIS 1 means the interrupt inputs wi" be disabled. 8259A Is programmed to be a master, MIS = 0 ADI: CALL address Interval. ADI = 1 then Interval = 4; means the 8259A is programmed to be a slave. If = ADI 0 then interval 8.= BUF = 0, MIS has no function. SNGL: Single. Means that this is the only 8259A in the = AEOI: If AEOI 1 the automatic end of interrupt mode is programmed. system. If SNGL = 1 no ICW3 wi" be issued. "PM: Microprocessor mode: JLPM = 0 sets the 8259A for IC4: If this bit I,s set - ICW4 has to be read. If ICW4 MeS·80, 85 system operation, JLPM = 1 sets the Is not needed, set IC4 = O. 8259A for iAPX 86 system operation. NO (SINGL =- 1) NO (IC4 '" 0) Figure 6. Initialization Sequence 2-126 AFN-00221E 8259A18259A-2/8259A-8 ICW1 0, 0, 0" '" A, ' 0, 0. 0, 0, 1 lew" NEEDED 0: NO ICW" NEEDED 1 = SINGLE o = CASCADE MODE CALL At-DRESS INTERVAL 1· INTERVAL OF" 0" INTERVAL OF 8 1 = lEVEL TRIGGERED MODE o = EDGE TRIGGERED MODE A7 -A 5 01INTERRUPT VECTOR ADDRESS (MeS-SO / 85 MODE ONLY) ICW' A, 0, 0, 0. 0, A 15 -A a OF INTERRUPT VECTOR ADDRESS (MCseD/85 MODE) T 7- T 3 OF INTERRUPT ICW31MASTER DEVICE) VECTOR ADDRESS (8086 f 8088 MODE) 1 - IR INPUT HAS A SLAVE 0- IR INPUT ·DOES NOT HAVE A SLAVE leWJ ISLAVE DEVICE) 1 = BOBS/BOBB MODE o = Mes-eo 185 MODe 1 AUlD EOI 0: NORMAl EOI EEE§ ., 1 x 0- 1 NON BUffERED MODE - BUFFERED MODE/SLAVE - BUFFERED MODE/MASTER 1 = SPECIAL FUllY NESTED ' - - - - - - - - -... 0 "" ~g~~PECIAL FULLY NOTE 1- SLAVE 10 IS EaUAL TO THE CORRESPONPING NESTED MODe MASTER IR INPUT Figure 7. Initialization Command Word Format 2-127 AFN-00221E inter 8259A!8259A-2/8259A-8 OPERATION COMMAND WORDS (OCWs) OPERATION CONTROL WORD 1 tOCW1) After the Initialization Command Words (ICWs) are pro- OCW1 sets and ciears the mask bits in the interrupt grammed .into the 8259A, the chip is ready to accept Mask Register (IMR). M7 - Mo represent the eight mask Interrupt requests at its4nput lines. However, during the bits. M = 1 indicates the channel is masked 8259A operation, a selection of algorithin~ can com- = (inhibited), M 0 indicates the channel is enabled. mand the 8259A to operate in various modes through the Operation Command Words (OCWs). OPERATION CONTROL WORD 2 (OCW2) OPERATION CONTROL WORDS (OCWs) R, SL. EOI - These three bits control the Rotate and End of Interrupt modes and combinations of the two. A chart of these combinations can be found on the Opera- OCWI tion Command Word Format. 07 01 05 DC 03 02 01 DO L2 • L1 • Lo-These bits determine the interrupt level acted I M7 Me M5 M4 M3 M2 Ml MO I upon when the SL bit is active. OPERATION CONTROL WORD 3 (OCW3) OCW2 ESMM - Enable Special, Mask Mode. When this bit is IT] IR SL Eol 0 0 L2 Ll LO I set to 1 it enables the SMM bit to set or reset the Special Mask Mode. When ESMM = 0 the SMM bit becomes a "don't care". SMM - Special Mask Mode. If ESMM = 1 and SMM = 1 the 8259A will enter Special Mask Mode. If ESMM = 1 OCW3 and SMM = 0 the 8?59A will revert to normal mask mode. IT] 0 ESMM SMM 0 p RR RIS I When ESMM = 0, SMM has no effect. 2-128 AFN-00221E inter 8259A18259A-2/8259A-8 ocw, D. 0, INTERRUPT MASK 1 " MASK SET o .. MASK RESET .. D. .. .. D. OCW2 0, 0, 0, .. I· R I "'"I ED' I ' I'll, I', I .. I II L8V1LTO I I I •• ,, ,•~- , •• •, • , 3 7 • • ,• , ,, ,• •, ,, ,, • • "1 r rt,-{-' • r, , -""..- 1~ 1 r-; 0 1 -- flDTlUEOIiII NOfHP!CIptCeol~D l } ...""- •,r, It01JII'E .. AUTOMATIC ECM MODIIE') ro ,0 R01IUE .. AUTOMATIC 101 MODE -.,cmn: NO_... 1~ 0 '8IT""""" ___ ON IIMC..c 101 CDIIIIAND (CI.EM) } """""""'- ....".,.- or,-o L..:.., .......... "... ocw• .. 0. . . . . 0.0,0,0, .. 1' I IESM+-I ' I ' I pi .. I I 0 R.. ........... I L_ ....- 0 I , , , • J , READ , READ , IR REG IS REG NO ACTION ONNE'(T ON NEXT ii6PULSE ADPULS£ 1-POLLc:o.IAIID ....NO POLLco.IAND , I , , I • SPECiAl MASK MODE ., ,, NO ACT"'" .... ...... . . . .T SPECIAL SET _IAL Figure 8. Operation Command Word Format 2-129 AFN·OO221E inter 8259A18259A-2I8259A-8 \ FULLY NE;STED MODE AUTOMATIC ROTATION This mode is entered after initialization unless another (Equal Priority Devices) mode Is programmed. The interrupt requests are In some applications there are a number of Interr~ptlng ordered in priority form 0 through 7 (0 highest). When an devices of equal priority. In this mode a device, after Interrupt is acknowledged the highest priority request is being serviced, receives the lowest priprlty, so a device determined and Its vector placed on the bus. Additional· requesting an interrupt will have to walt, in the worst Iy, a bit of the Interrupt Service register (ISO-7) is'set. case until each of 7 other devices are serviced at most This bit remains set until the microprocessor issues an once. For example, If the priority and "in service" status End of Interrupt (EO I) command immediately before i.s: returning from the service routine, or If AEOI (Automatic End of Interrupt) bit is set, until the trailing edge of the 8.for. Rotat. (IR4 the highest priority requiring service) lasllNTA. While the IS bit I's set, all further Interrupts of the same or lower priority are inhibited, while higher 187 lSI lSI 184 183 182 18. ISO levels will generate an Interrupt (which will be acknowledged only if the mlc;roprocessor Internal Inter- "'IS"' Status 101·101·101010101 rupt enable flip-flop has been re-enabled through soft- Lowe•• PrIorlly ·H......~rtorIty I 7 f 6 I 5 I 4 1,3 I 2 I 11'0 I ware). Prlor.ty StatuI After the Initialization sequence, IRO has the highest priority and IR7 the low~st. Priorities can be changed, as will be explained, In the rotating priority mode. Aft.r Rotat. (I R4 was serviced, all other priorities END OF INTERRUPT (EOI) rotat~d correspondingly) The In Service (IS) bit can be reset either automatically 187 lSI lSI 184 183 182 18. ISO following the trailing edge of the last in sequence INTA pulse (when J\.EOI bit in ICWl is -set) or by a command "'IS"' Slatus 101 " 10 1 0 101010101 word that must be issued to the 8259A before returning HIII....1 Prlorily L_••t PrlorIly from a service routine (EOI command). An EOI command must be issued twice if in the Cascade mode, once for the master and once for the corresponding slave. Priority Status I2 111 I 7f!0 I I 0 4 3 There are two forms of EOI command: Specific and Non- Specific. When the 8259A I.s operated in modes which There are two ways to accomplish Automatic Rotation preserve the fully nested structure, it can determine using OCW2, the Rotation on Non-Specific EOI Command which IS bit to reset on EOI. When a Non-Specific EOI (R = 1, Sl = 0, EOI = 1) and the Rotate in Automatic EOI command is issued the 8259A will automatically reset Mode which is set by (R = 1, Sl = 0, EOI = 0) and cleared the highest IS bit of those that are set, since in the by (R = 0, Sl = 0, EOI = 0). ' fully nested mode the highest IS level was necessarily the last level acknowledged and serviced. A non-specific EOI SPECIFIC ROTATION can be issued with OCW2 (EO I = 1, Sl = 0, R = 0). (Specific Priority) When a mode is used whiclJ may disturb the fully nested The programmer can change priorities by programming structure, the 8259A may no longer be able to determine the bottom priority and thus fixing all other priorities; , the last level acknowledged. In this case a Specific End of i.e., 'if IR5 Is programmed as the bottom priority device, Interrupt must be issued whiC;h includes as part of the then IR6 will have the highest one. command the IS level to be reset. A specific EOI can be is~ sued with OCW2 (EOI = 1, Sl = 1, R = 0, and lO~l2 is the The Set Priority command is issued in OCW2 where: binary level of the IS bit to be reset). R = 1, Sl = 1; lO-l2 isthe binary priority level code of the bottom priority device. It should be noted that an IS bit that is masked by an Observe that in this mode internal status is updated by IMR bit will not be cleared by a non-specific EOI if the software control during OCW2. However, it IS independent 8259A is in the Special Mask Mode. of the'End of Interrupt (EOI) command (also executed by OCW2). Priority changes can be executed during an EOI AUTOMATIC END OF INTERRUPT (AEOI) MODE command by using the Rotate on Specific EOI command If ~EOI = 1 in ICW4, then the 8259A will operate in AEOI in OCW2 (R = 1, Sl = 1, EOI = 1 and lO-l2 = IR level to 'mode continuously until reprogrammed by ICW4. In this receive bottom priority). mode the 8259A will automatically perform a non- specific EOI operation at the trailing edge of the last INTERRUPT MASKS interrupt acknowledge pulse (third pulse in MCS-SOf85, Each Interrupt Request Input can be masked individu- second in iAPX 86). Note that .from a system standpoint, ally by the Interrupt Mask Register (lMR) programmed this mode should be used only when a nested multilevel through OCW1. Each bit in the IMR masks one Interrupt interrupt structure is not required within a single 8259A. channel If It Is set (1). Bit 0 masks IRO, Bit 1 masks IRl The AEOI mode can only be used in a master 8259A and and so forth. Masking an IR channel does not affect the not a slave. other channels operation. 2-130 AFN·OO221E inter 8259A18259A·218259A·8 SPECIAL MASK MODE POLL COMMAND Some applications may require an interrupt service In this mode the INT output is not used or the micropro- routine to dynamically alter the system priority struc· cessor internal Interrupt Enable flip-flop is reset, disabling ture during its execution under software control. For its interrupt input. Service to devices is achieved by example, the routine may wish to Inhibit lower priority software using a Poll command. requests for a portion of its execution but enable some The Poll command is Issued by setting P = "1" in OCW3, of them for another portion. The 8259A treats the next Fffi pulse to the 8259A (i.e., The difficulty here Is that if an Interrupt Request is RD = 0, ~ = 0) as an interrupt acknowledge, sets the acknowledged and an End of Interrupt command did not appropriate IS bit if there is a reque.:&.. and...!!!ads the reset Its IS bit (i.e., while executing a service routine), priority level. Interrupt is frozen from WR to RD, the 8259A would have Inhibited all lower priority requests with no easy way for the routine to enable The word enabled onto the data bus during m:> is: them DO D7 De D5 D4 D3 D2 D1 That is where the Special Mask Mode comes In. In the special Mask Mode, when a mask bit Is set In OCW1, it II W2 Wl wol inhibits further interrupts at that level and enables Inter· WO-W2: Binary code of the highest priority level rupts from al/ other levels (lower as well as higher) that requesting service. are not masked. ' I: Equal to a "1" if there is an interrupt. Thus, any interrupts may be selectively enabled by This mode is useful if there is a routine command com· loading the mask register. mon to several levels so that the rnTA sequence is not The special Mask Mode is set by OCW3 where: needed (saves ROM space). Another application is to SSMM=1, SMM=1, and cleared where SSMM=1, use the poll mode to expand the number of priority SMM=O. levels to more than 64. LTIM BIT TO OTME" PfillORTY CEllS 0" EDGE CLR ,... = 1 lEVel CLR Q ISPI I'T EDGE SET SENSE ~LA~T~CH~.J-_ _ +___.j..._-l-__ -~+---~ ...... LATC" NON MASKED .Ea a+-t+t--1 MCS-80.as! MODE rrm.~ nIITn IAPX86 INTAn I~ MODE { FREEZE r----- NOTES MAlnR CLEAR ACTIVE ONI. y DURING ICW1 '''UZE/IS ACTIVE DURING 1NTi'1 ANO P'OlL SEQUENCES ONI. V 3 TRUTH TAiLE FO" D-LATCH I • • I J~l I OPERATION C 1 D 01 FOllOW HOLD Figure 9. Priority Cell-Simplified Logic Diagram AFN·00221E 2-131 intJ 8259A18259A-2/8259A-8 READING THE 8259A STATUS EDGE AND LEVEl- TRIGGERED MODES The input status of several internal registers can be read to This modll is programr;ned using bit 3 in ICW1. update the user information on the system. The following registers can be read via OCW3 (IAA and ISA or OCW1 If LTIM = '0', an interrupt request will be recognized by a [IMA1). low to high transition on an IA input. The IA input can re- main high without generating another interrupt. \ Interrupt Request Register (lRR): 8-bit register which con- tains the levels requesting an interrupt to be acknowl- If LTIM = '1', an interrupt request will be recognized by a edged. The highest request level is reset frqm the IAA 'high' level on IA Input, and there is no need for an edge when an interrupt is acknowledged. (Not affected by IMA.) detection. The interrupt request must be removed bElfore In-SerVice Register (ISR): 8-bit register which contain~ the the EOI command is issued or the CPU interrupt is enabled priority levels that are being serviced. The ISA is updated to prevent a second interrupt from occurring. when an End of Interrupt Command is issued. The priority cell diagram shows a conceptual circuit of the Interrupt Mask Register: 8-bit register which contains the level sensitive and edge sensitive input circuitry of the interrupt request lines which are masked. 8259A. Be sure to note that the request latch is a transpar- The IAA can be read when, prior to the AD pulse, a Aead ent D type latch. HegisterCommand is issued with OCW3 (AA = 1, AIS = 0.) , In both the edge and level triggered modes the IA inputs The ISA- can be read when, prior to the AD pulse, a Aead must remain high until after the falling edge of the first Aegister Command is issued with OCW3 (AA = 1, AIS = 1). INTA. If the IA input goes low before this time a DEFAULT IA7 will occur w.hen the CPU acknowledges the interrupt. There is no need to write an OCW3 before every status This can be a useful safeguard for detecting interrupts read operation, as long as the status read corresponds caused by spurious noise glitches on the IA inputs. To im- with the previous one; i.e., the 8259A "remembers" plement this feature the IA7 routine is used for "clean up" whether the IAA or ISA has been previously selected by simply executing a return instruction, thus ignoring the the OCW3. This is not true when poll is used. interrupt. If IA7 is needed for other purposes a default IA7 can still be detected by reading the ISA. A normallR7 After initialization the 8259A is set to IAA. interrupt will set the corresponding ISR bit, a default IR7 For reading the IMA, no OCW3 is needed. The output data won't. If a default IA7 routine occurs during a normallA7 bus will contain the IMA whenever AD is active and AO =1 routine, however, the ISR will remain set. In this case it is (OCW1). necessary to keep track of whether or not the IR7 routine was previously entered. If another IA7 occurs it is a Polling overrjdes status read when P = 1, AA = 1 in OCW3. default. IR 8088/8088 808018085 INT _ _ _ _ -+_.1 8088/8088 INTA -----+------"'" 808018085 LATCH' EARLIESTIR LATCH' ARMED CAN BE REMOVED 'EDGE TRIGGERED MODE ONLY ARMED Figure 10. IR Triggering Timing Requ~rements 2-132 AFN·00221E 8259A18259A-2/8259A-8 THE SPECIAL FULLY NESTED MODE mode, whenever the 8259A's data bus outputs are ena- bled, the SP/EN output becomes active. This mode will be used In the case of a big system This modification forces the use of software program- where cascading is used, and the priority has to be con- ming to determine whether the 8259A is a master or a served within each slave. In this case' the fully nested slave. Bit 3 in ICW4 programs the buffered mode, and bit mode will be programmed to the master (using ICW4). 2 in ICW4 determines whether it is a master or a slave. This mode Is similar to the normal nested mode with the following exceptions: CASCADE MODE a. When an Interrupt request from a certain slave is in The 8259A can be easily interconnected in a system of one service this slave is not locked out from tht;! master's ,master with up to eight slaves, to handle up to 64 priority priority logic and further interrupt requests from levels. higher priority IR's within the slave will be recognized The master contrdls the slaves through the 3 line cascade by the master and will initiate interrupts to the proc- bus. The cascade bus acts like chip selects to the slaves essor. (In the normal nested mode a slave is masked during the INTA sequence, out when Its request is in service and no higher requests from the same slave can be serviced.) In a cascade configuration, the Slave interrupt outputs are connected to the master interrupt request inputs, When a b. When exiting the Interrupt Service routine the soft- slave request line is activated and afterwards acknowl- ware has to check whether the interrupt serviced was edged, the master will enable the corresponding slave to the only one from that slave. This is done by sending release the device routine address during bytes 2 and 3 of a non-specific End of Interrupt (EOI) command to the INTA, (Byte 2 only for 8086/8088), slave and then reading its In-Service register and The cascade bus lines are normally low and will contain checking for zero. If it is empty, a non-specific EOI the slave address code from the trailing edge of the first can be sent to the master too. If not, no EOI should be INTA pulse to the trailing edge of the third pulse. Each sent. 8259A in the system must follow a separate initialization sequence and can be programmed to work in a different BUFFERED MODE mode, An EOI command must be issued twice: once for When the 8259A Is used In a large system where bus the master and once for the corresponding slave. An driving buffers are required on the data bus and the cas- address decoder is required to activate the Chip Select cading mode Is used, there exists the problem of enabl- (CS) input of each 8259A Ing buffers. The cascade lines of the Master 8259A are activated only The buffered mode will structure the 8259A to send an for slave inputs, non slave inputs leave the cascade line enable signal on SP/EN to enable the buffers. In this inactive (low), \ ADDRESS BUS 1161 \ CONTROL BUS '" INT REO \ DATA BuS (8) \ -- --- - - -- - ~ - -- - - ,- -- - ~ - --f-- - - - -- - f--- ~ - c-- cs ..., 00-7 INTA r---' !NT cs ! A, 00-7 INTA I 'Nf cs ..., 00·7 INTA 'NT CAS 0 CASO CASO 825911. SLAVE A CAS 1 ,- f- 825911. ~lAVE B CAS 1 CAS 1 825911. MASTER iT-l CAS 2 CAS 2 SPIEN7 • 5 • J 2 SPIEN7 • 5 '. J 2 1 0 SPIENM7 Mti M5 Mol M3 M2 Ml MO G!O f f 7 • 1 5 1 1J 1 • 2 G!O 1 1 1 1 ] • 5 • II ! I LL1.1 1• I! 1 5 J 0 I I I INTERRUPT REOUESTS Figure 11. Cascading the 8259A 2-133 AFN-00221E inter 8259A/8259A·2/8259A·8 ABSOLUTE MAXIMUM RATINGS* 'NOTICE: Stresses above those listed under "Absolute Ambient Temperature Under Bias .......... O°C to 70°C Maximum Ratings" may cause permanent damage to the Storage Temperature .............. -6S"C to + lS0°C device. This is a stress rating only and functional opera- Voltage on Any Pin tion of the device at these or any other conditions abpve with Respect to Ground ............. -O.SV to + 7V those indicated in the operational sections of this specifi· Power Dissipation .......................... 1 Watt cation is not implied. D.C. CHARACTERISTICS [TA = O"C to 70"C, Vee = 5V ±5% (8259A·8), Vee = 5V ±10% (8259A, 8259A·2)l .Symbol Parameter Min. Max. Units Test Conditions VIL Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0' Vee +0.5V V VOL Output High Voltage 0.45 V IOL = 2.2mA VOH Output High Voltage 2.4 V IOH - -400/LA Interrupt Output High 3.5 V IOH = -100/LA VOH(lNT) Voltage 2.4 V IOH - -400/LA III Input Load Current -10 +10 /LA OV "VIN "Vee ILOL Oufput Leakage Current -10 +10 /LA 0.45V "VOUT "Vee lee Vee Supply Current 85 ., mA -300 /LA VIN - 0 ILiR IR Input Load Current 10 !J-A VIN = Vee • Nole: For Extended Temperature EXPRESS V,H = 2.3V. CAPACITANCE (TA = 25°C; Vee = GND = OV) Symbol Parameter Min. Typ. Max. Unit Test Conditions CIN Input Capacitance 10 pF fc = 1 MHZ CliO I/O Capacitance 20 pF Unmeasured pins returned to Vss A.C. CHARACTERISTICS [TA = O°C to 70°C, Vee = 5V ±5% (8259A-8), Vee = 5V ± 10% (8259A, 8259A-2)l TIMING REQUIREMENTS 8259A-8 8259A 8259A·2 Symbol Parameter Units Test Conditions Min. Max. Min. Max. Min. Max. TAHRL AO/CS Setup to RD/INTAt 50 0 0 ns TRHAX AO/CS Hold after RD/INTAt 5 0 0 ns TRLRH RD Pulse Width 420 235 160 ns TAHWL AO/CS Setup to WRi 50 0 0 ns TWHAX AO/CS Hold afterWRt 20 0 0 ns TWLWH WR Pulse Width 400 290 190 ns TDVWH Data Setup to WRr 300 240 160 ns TWHDX Data Hold after WRt 40 0 0 ns TJWH Interrupt Request Width (Low) 100 100 100 ns See Note 1 Cascade Setup to Second orThird TCVIAL 55 55 40 ns INTAt (Slave Only) End of RD to next RD TRHRL End of INTA to next INTA within 160 1.60 160 ns an INTA sequence only TWHWL End of WR to next WR 190 190 190 . ns 2-134 AfN-00221E 8259A/8259A-2/8259A-8 A.C. CHARACTERISTICS (Continued) 8259A·8 8259A 8259A·2 Symbol Parameter Units Test Conditions Min. Max. Min. Max. Min. Max. End of Command to next Command *TCHCL 500 500 500 ns (Not same command type) End of INTA sequence to next INTA sequence. ·Worst case timing for TCHCL in an actual microprocessor system is typically much greater than 500 ns (i.e. 8085A ~ 1.61-'8, 8085A-2 ~ 11-'S, B086 ~ 11-'s, B086-2 ~ 625 ns) NOTE: This is the low time required to clear the input latch in the edge triggered mode. TIMING RESPONSES 8259A-8 8259A 8259A-2 Symbol Parameter Unit. Test Conditions Min. Max. Min. Max. Min. Max. TRLDV Data Valid from RD/iNTA[ 300 200 120 ns C of Data Bus = 100pF TRHDZ Data Float after RD IINTA1 10 200 10 100 10 85 ns C of Data Bus Max text C ~ 100 pF TJHIH Interrupt Output Delay 400 350 300 ns Min. test C ~ 15 pF Cascade Valid from First INTA[ TIALCV 565 565 360 ns C'NT ~ 100 pF (Master Only) TRLEL Enable Active from RD [ or INTA[ 160 125 100 ns CCASCADE ~ 100 pF TRHEH Enable Inacllve from RD1 or INTAj 325 150 150 ns TAHDV Data Valid from Stable Address 350 200 200 ns TCVDV Cascade Valid to Valid Data 300 300 200 ns A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 2.' 0.45 =X2.> 0 0.8 TEST POINTS <2.o)C 08 DEVICE UNDER TEST lCL~100PF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A lOGIC 1 AND 0 45V FOR -= A LOGIC o· TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 0 BV FOR A LOGIC 0' CL = 100pF CL INCLUDES JIG CAPACITANCE WAVEFORMS WRITE ----TWLWH \ Ci - TAHWl - - TWHAX I--- ADDRESS IUS ) K -TDVWH~ -TWHDX DATA IUS ) L 2-135 AFN-00221 E inter 825SAl8259A-218259A-8 WAVEFORMS (Continued) READ/INTA iiilriNfA-------.... t - - - - - T I I L I I H - - - - - - i I~_ _ _ _ _ _ _ __ D--------~-~ TIILEL TRHAX a----------~ V-~------------------~~ ADDIIUS lUI ~ __________- J ~+----------~--JI -~ ~'H J _____ _ DATAIUI-- - - - - -~ - - - - -~~: - - - il..._______....Jr OTHER TIMING Ill! IIiITlI \ If=TRHRL=f\ / WR liIi \ if=TWHWL=J\ / IRTl \ c_~ WR WR & / , 2-136 AFN·00221E intJ 8259A/8259A-2/8259A-8 WAVEFORMS (Continued) INTA SEQUENCE I. INT _ _ _ _ _ _--J INTA--------~ 08-------- ____ _ -- -0-- ------- TCVIAL TCVDV- C02----------t--__~_-_~--~~-------~-- -TlAlCV_ NOTES: Interrupt output must remain HIGH at least until leading edge of first INTA. 1. Cycle 1 in iAPX 86, iAPX 88 systems, the Data Bus IS not active. 2-137 AFN·00221E 8355/8355-2 16,384-BIT ROM WITH 1/0 • 2048 Words x 8 Bits • Each 1/0 Port Line Individually Programmable as Input or Output • Single + SV Power Supply • Multiplexed Address and Data Bus • Directly Compatible with 808SA and iAPX 88 Microprocessors • Internal Address Latch • 2 G!i!neral Purpose 8·Bit 1/0 ports • 40·Pin DIP The Intel® 8355 is a ROM and I/O chip to be used in the 8085A and iAPX 88 microprocessor systems. The ROM portion is organized as 2048 words by 8 bits. It has a maximum access time of 450 ns to permit use with no wait states in the 8085A CPU. The I/O portion consists of 2 general purpose I/O ports. Each I/O port has 8 lines and each I/O port line is individually pro- grammable as input or output. The 8355-2 has a 300 ns access time for compatibility with the 8085A-2 and 5 MHz iAPX 88 microprocessors. CE l vee elK eE, PB, elK PB, RESET PBs N C (NOT CONNECTED)' PB, AD o_7 PB, ~ 101M PB, B PAo~7 fOR PB, Aa-l0 AD PBo lOW PA, ~ ROM ALE PA, 101M ADo PAs ALE PBO~7 AD, PA, AD AD, PA, lOW AD'3 PA, RESET iOR PA, PA o ~Vce AD, AlO (+5V) 'CD AD7 A. Vss (OV) Vss *For 8755A compatibility, pm 5 should be directly tied to Vee. Figure 1. Block Diagram Figure 2. Pin Configuration 2-138 AFN·00234D. intJ 8355/8355-2 Table 1. Pin Description Symbol Type Name and Function ALE I Add..... latch Enable: When high, ADo-7' 101M, Aa-10, C~, and CE1 enter the address latches. The signals (AD, I/OM, Aa-10, C~, CE1) are latched In at the trailing edge of ALE. ADO-7 I Add ....a/Data Bu. (Bldlractlonal): The lower 8-bits of the ROM or I/O address are applied to the bus lines when ALE is high. During an I/O cycle, Port A or B Is selected based on the latched value of ADo. If RD or lOR is low when the latched chip enables are active. the output buffers present data on the bus. Aa-10 I Addr••• Bu.: High order bits of the ROM address. They do not affect 1/0 operations. CE1 I Chip Enable Input.: CE1 Is active low and CE2 Is active high. The 8355 can be accessed only when BOTH Chip CE2 Enables are active at the time the ALE signal latches them up. If either Chip Enable input Is not active, the ADO-7 and READY outputs will be In a high Impedance state. 101M I 1/0 Memory: If the latched 101M is high when RI5 Is low, the output data comes from an I/O port. If it is low, the out- put data comes from the ROM. RD I R.ad: If the latched Chip Enables are active when RD ~s low. the ADo-7 output buffers are enabled and output either the selected ROM location or I/O port. When both RD and lOR are high. the ADO-7 output buffers are 3-stated. lOW I I/O Write: If the latched Chip Enables are active. a low on lOW causes the output port pointed to by the latched value of ADo to be written with the data on ADO-7' The state of 10iM is ignored. ClK I Clock: Used to force the READY Into Its high impedance state after It has been forced low by CE1 low, C~high and ALE high. READY 0 READY: A 3-state output controlled by CE1, CE2• ALE and ClK. READY is forceaJow when the Chip Enables are active during the time ALE Is high, and remains low until the rising edge of the next ClK. PAo-7 I/O Port A: General purpose I/O pins. Their inputloutput direction is determined by the contents of Data Direction Register (DDR). Port A is selected for write operations when the Chip Enables are active and lOW Is low and a owas previously latched from ADD, AD1. Read operation Is selected by either lOR low and active Chip Enables and ADo and AD1 low, or loiM high, RD low, active chip enables, and ADo and AD1, lOW. PBo-7 I/O Port B: This general purpose I/O port Is identical to Port A except that it Is selected by a 1 latched from ADo and a 0 from AD1. RESET I Reset: An Input high causes all pins In Port A and B to assume input mode. (Clear DER Register). lOR I 1/0 Read: When the Chip Enables are active, a low on lOR will outputthe selected I/O port onto the AD bus. lOR low performs the same function as the combination 101M high and RD low. When lOR is not used in a system. lOR should be tied to Vee ("1"). Vee Voltage: +5 volt supply. Vss Ground: Ground Reference. 2-139 AFN-00234D intJ 8355/8~55-~ FUNCTIONAL DESCRIPTION 8366 ONE BIT OF PORT A AND DOR A. ROM Section The 8355 contains an 8-bit address latch which allows it ' to interface directly to MCS-48, MCS-85, and iAPX 88/10 Microcomputers without additional hardware. The ROM section of the chip is addressed by an 11-bit address and the Chip Enables. The address and levels 0(1 the Chip Enable pins are latched into the address latches on the falling edge of ALE. If the latched Chip Enables are active and 101M is low when R!5 goes low, the contents of the ROM location addressed by the latched address are put out through ADo-7 output buffers. D, 1/0 Section ~ The 1/0 section of the chip is addressed by the latched READ PA value of ADo-,. Two 8-bilData Direction Registers (DDR I :::~~ ~~~ ~~~:~f~'~~~A:~~:tECsTl~~,:~i~~~:RA:~:~~SE:~i~~~~)ED) READ PA = {[(lOtM-1). (J8.=O)] + fiiiR=O)}. (CHIP ENABLES ACTIVE). (PORT A ADDRES$SElECTED) in 8355 determine the input/output status of each pin in the corresponding ports. A "0" in a particular bit position NOTE WRITE PA IS Not QUALIFIED BY 101M of a DDR signifies that the corresponding 1/0 port bit is in the input mode. A "1" in, a particular bit position signi- Figure 3. 8355 One Bit of Port A and DDR A fies that the corresponding 1/0 port bit is in the output mode. In this manner the 1/0 ports of the 8355 are bit-by- SYSTEM APPLICATIONS bit programmable as inputs or outputs. The table sum- marizes port and DDR designation. DDR's cannot be System Interface with 8085A and iAPX 88 read. A system uSing the 8355 can use either one of the two 1/0 Interface techniques . AD, ADo Selectll)n • Standard 1/0 • Memory Mapped 1/0 0 0 Port A 0 1 Port B If a standard I/O technique is used, the system can use 1 0 Port A Data Direction Register (DDR AI the feature of both 'CE2 and CE,. By using a combina· 1 1 Port B Data Direction Register (DDR B I tlon of unused address lines A,,_,s and the Chip Enable inputs, the system can use up to 5 each 8355's without requiring a CE decoder. See Figure 5a and 5b. When iOW goes low and the Chip Enables are active, the data on the AD0-7 is written into 1/0 port selected by the If a memory mapped I/O approach Is used the 8355 will latched value of ADo-,. During this operation all 1/0 bits be selected by the combination of both the Chip En· of the selected port are affected, regardless of their I/O abies and 10/M using ADS-IS address lines. See Figure mode an'd the state of 101M. The actual output level does 4. not change until lOW returns high (glitch free output). A port can be read out when the latched Chip Enables are active and either RD goes low with 101M high, or lOR goes low. Both input and output mode bits 'of a selected port will appear on lines ADo-7. A To clarify the function of the 1/0 ports and Data Direction ; AS-15 > Registers, the following diagram shows the configuration of one bit of PORT A ,and DD.R A. The same logiC applies to PORT Band DDR B. . 8085 ""LE RD A00-7 I-- :f:' ,v , Note that hardware RESET or writing a zero to the DDR I-- WA/ latch will cause the output latch's output buffer to be eLK (02) I-- disabled, preventing the data in the output latch from READV I-- being passed through to the pin. ThiS IS equivalent to I-- 101M ~ ! putting the port in the input mode. Note also that the data can be written to the Output Latch even though the Out- v\'" 7' , 7' I put Buffer has been disabled. This enables a port to be ADO~7 AI_II RD eLK 101M iDA ALE i1!W READY CE initialized with a value prior to enabling the output. The diagram also shows that the contents of PORT A and 8355 PORT B can be read even when the ports are configured as' outputs. Figure 4. 8355 in 8085A System (Memory-Mapped 1/0) 2-140 AFN·00234D 8355/8355-2 iAPX 88 FIVE CHIP SYSTEM: • 1.25 K Bytes RAM • 2 K Bytes ROM • 38 I/O Pins • 1 Internal Timer • 2 Interrupt Levels /) /). Vss Vee f I \-1--- :: POR!W >-r--WR ~ AD POR~ (8) 815&-2 ALE PORT~ (6)C A DATAl ADDR IN_ 101M TIMER OUT I-- RESET j- Aa-A19 ADDR lOW AD ~LlDo-A07 f-'" ~ ADDR/DATA ALE r------ J~ PORT CE A ~ AS _10 ,- READY 8088 f'= -V 835&-2 MN/MX -Vee DATAl AD DR rDl ALE AD r-- r-- r-- r- r- 101M PORT ~ f , - RST® ~.- RESET B X, X, ClK ViR r---- READY Vee r-- lOR ---.I READY 101M r-- RES ,--- r-- 82_ RESET r---- II , Vss Vee Voo LROG RDY' Vee ViR ...." AD CD CE, 8185002 ALE ~t- cs. 11+- CE, H-- As, Ag AOO_7 JJ Vss Vee 7 7' Figure Sa. iAPX 88 Five Chip System Configuration 2-141 AFN·00234D l "0-,. " 'A A" "'2 A'3 ..,. A,. V AIDfJ-7 r- r- - - - " "ALE ..8SA l- I- - - - AD l- I- - - - Wii t- t- - - - eLK (f1J,2) l- t- - - - READY I- r:-- - -'- - ~ en 101M - - - en ~ t- t- "'- ~ ~ g: ~ I vee vee vee vee T' :.- , :.- I'~~' lOR A.." (2KBYTES) 101M, :;:,RDiiiWeLKREADY tEl I' T' :.- iffii AID.., A.." :.- A~OW (2KBYTES) 'DilleEz RD eLKREADY 'I i'" iffiii ~0-1 :.- A..to RD ~iiii (2KBYTES) eLK 101M, " READY eE2 X ffiR ~ -"- .., (2K~ READY eE, A.... RD eLK 'Dill f 'II' ~0-7 iiiii " 7- A.... RD CLK 'DIM, ; ; .irifi READY eEz (2KBYTES) NOTE: Use CEl for the first 8355 ,n the system, and CE2 for the other 8355's. Permits up to 5-8355's in a system without CE decoder. Figure 5b. 8355 In 8085A System (Standard 1/0) > :l1 i 8355/8355-2 ABSOLUTE MAXIMUM RATINGS* 'NOTICE: Stresses above those listed under "Absolute Maximvm Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................ 0°Cto+70°C tion of the device at these or any other conditions above Storage Temperature ............... -65°Cto +150°C those indicated in the operational sections of this specifi- Voltage on Any Pin cation is not implied. Exposure to absolute maximum With Respect to Ground ............... -0.5V to +7V rating conditions for extended periods may affect device Power Dissipation ............................. 1.5W reliability. D.C. CHARACTERISTICS (TA = o°c to 70°C; Vee = 5V ±5%) Symbol Parameter Min. Max. Unit Test Conditions VIL. Input low Voltage -0.5 0.8 V Vee = 5.0V VIH Input High Voltage 2.0 Vee +O· 5 V Vee = 5.0V VOL Output low Voltage 0.45 V 10l = 2mA VOH Output High Voltage 2.4 V 10H = -400JlA III Input leakage 10 JlA OV '" V,N '" Vee ILO Output leakage Current ±10 JlA 0.45V ';:;;VOUT ';:;;Vee Icc Vee Supply Current 180 mA A.C. CHARACTERISTICS (TA = o°c to 70°C; Vee = 5V ± 5%) 8355 8355-.2 Symbol Parameter Min. Max. Min. Max. Units teyc Clock Cycle Time 320 200 ns Tl ClK Pulse Width 80 40 ns T2 ClK Pulse Width 120 70 ns tf.tr ClK Rise and Fall Time 30 30 ns tAL Address to latch Set Up Time 50 30 ns tLA Address Hold Time after latch 80 45 ns tLC latch to READ(WRiTE Control 100 40 ns tRO Valid Data Out Delay from READ Control' 170 140 ns tAD Address Stable to Data Out Valid" 450 300· ns tLl latch Enable Width . 100 70 ns tROF Data Bus Floafafte'r READ 0 100 0 85 ns tCl READ/WRITE Control to latch Enable 20 10 ns tcc READ/WRITE Control Width 250 200 ns tow Data In to Write Set Up Time 150 150 ns two Data In Hold Time After WRITE 30 10 ns twp WRITE to Port Output 400 300 ns tpR Port Input Set Up Time 50 50 ns tRP Port Input Hold Time 50 50 ns tRYH READY HOLD Time 0 160 0 160 ns tARY ADDRESS (CE) to READY 160 160 ns tRY Recovery Time Between Controls 300 200 ns tROE READ Control to Dllta Bus Enable 10 10 ns 'Or TAo-(TAL + TLe). whichever is greater. "Defines ALE to Data out Valid in conjunction with TAL. 2-143 AFN-00234D inter A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT "==X- > D.45 AND 0 6V FOR A LOGIC "0 .. 2.0 0.8 TEST POI~TS <- ', 2.0 0.8 x= A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "1" AND 0 45V FOR A LOGIC "0 " TIMING MEASUREMENTS ARE MADE AT 2 QV FOR A LOGIC 1" DEVICE UNDER TEST CL ,,"150pF '1CL.. 150PF Cl INCLUDES JIG CAPACITANCE ~AVEFORMS RON! READ AND 1/0 READ AND WR!TE ~ ADDRESS - - - - - - - - - tAO K ADo~7 ~ ADDRESS ) DATA 'CE 2 ",d' ALE ~ tLL ----:- r--- tLA - - tAL - r---tROE~ 1.0- t ROF • I---tRO- i - - - - tLC - J~ tRV tow _two~ _tcc _ t CL - • Please note that for 8755A compatibility, eEl should remain low for the entire read cycle. 8355 CLOCK SPECIFICATIONS O.BV 2-144 AFN..()0234D 8355/8355-2 WAVEFORMS (Continued) INPUT MODE =x:tl~ lID OR lOR PORT INPUT DATA" - - - - - - - )( BUS -- ---- - "'--------- OUTPUT MODE _______1" GLITCH FREE PORT - - - - - - - - ... - - - tw:=..t--- """'v /' OUTPUT OUTPUT _ _ _ _ _ _ _ _ _ _ _ _ ~"""F----- DATA" - - BUS - ____ _ - - ..A_______X"'____ '" "DATA BUS TIMING IS SHOWN IN FIGURE 4. WAIT STATE NOTE: Ready = O. 2-145 AFN.oo234D 8755A 18755A-2 16,384-8IT EPROM WITH 1/0 . • 2048 Words x 8 Bits , , . • 2 General Purpose 8·Bit 110 Ports • Single +SV Power Supply (Vee> • Each 110 Port Line Individually Programmable as ,Input or Output • Directly Compatible with 808SA, . Sind 8088 Microprocessors • Multiplexed Address and Data Bus . . .40·Pin DIP • U.V. Erasable and ElectrIcally Reprograrhrriable • Available in EXPRESS - Standard Temperature Range • Internal Address Latch - Extended Temperature Range The Intel@ 8755A Is an erasable and electrically reprogrammable ROM (EPROM) and 1/0 chip to be used In the 8085A and IAPX 88 microprocessor systems. THe EPROM portion is organized as 2048 words by 8 bits. It has a maximum access time of 450 ns to permit use with no walt states In an 8085A CPU. The 1/0 portion consists of 2 general purpose I/O pc;>rts. Each 1/0 port has 8 po~ lines, and each 1/0 port line Is Individually programmable as Input or output. The 8755A·2 Is a high speed selected version of the 8755A compatible with the 5 MHz 8085A·2 and the 5 MHz IAPX 88 microprocessor. PROG AND CE, 1 CLK-----, READV---; PB2 A"...,. _ _.....,/ CE2---.J loiM---~ 2KxS EPROM G ii5W ALE ""0 PA, ALE----i iID;---~ IOW----.j RESET---.J G PA, iOR----.j A,. PROG/CE 1 Vee 1+5VI voo----l L--_ _ v.. (OV) Figure 1. Block DIagram Figure 2. Pin Configuration Intel Corporation AS8um •• No Reaponslbrlty for the Use of Any Circuitry Other Than Circuitry Embodied In an Intel Product No other Circuit Patent Licenses aTe Implied © INTEL CORPORATION. 19BO '2-146 inter 8755A18755A-2 Table 1. Pin Description Symbol Type Name and Function Symbol ~pe Name and Function ALE I Addres. Latch Enabla: When Address READY 0 Ready Is a 3·state output controlled by latch Enable goes high. ADo-7. 10/M. eE" CE2, ALE and ClK. READY Is forc- Ae-10. CE2. and CE1 enter t~ address ed low when the Chip Enables are active latches. The signals (AD, 101M ADs- 1o, during the time ALE is high, and re- CE2, ee,) are latched in at the trailing mains low until the rising edge of the edge of ALE. next ClK. (See Figure 6c.) ADo-7 I Bidirectional AddresslData Bus: The PAo-7 I/O Port A: These are general purpose I/O lower a-bits of the PROM or I/O address pins. Their input/output direction is de- are applied to the bus lines when ALE is termined by the contents of Data Direc- high. tion Register (DDR). Port A is selected for During an 1/0 cycle, Port A or B is write operations When the Chip Enables selected based on the latched value of are active and lOW is low and a 0 was ADo. IF RD or lOR is low when the latched previously latched from ADo. AD1' Chip Enables are active, the output buf- Read Operation is selected by either lOR fers present data on the bus. low and active Chip Enables and ADo As-1o I Address Bus: These are the high order and AD 1 10w, or 10/M high, RD low. active bits of the PROM address. They do not Chip Enables. and ADo and AD1 low. affect 1/0 operations. Port B: This general purpose I/O port is PBO-7 I/O PROG/CE1 I Chip Enable Inputs: CE1 is active low identical to Port A except that It is CE2 and CE2 is active high. The 8755A can be selected by a 1 latched from ADo and a 0 accessed only when both Chip Enables from AD1' are active at the time the ALE signal RESET I Reset: In normal operatIon, an input latches them up. If either Chip Enable hIgh on RESET causes all pins in Ports A input is not active. the ADo-7 and and B to assume input mode (clear DDR READY outp!!!!. will be in a high impe- register), dance state.CE1 is also used as a pro- gramming pin. (See section on lOR I I/O Read: When the Chip Enables are programming.) active. a low on lOR will output the selected I/O port onto the AD bus. lOR 101M I I/O Memory: If the latched 10/M is high low performs the s~e functio~s the when RD is low. the output data comes combination of 101M high and RD low. from an 1/0 port. If it is low the output, When lOR is not used in a system. lOR data comes from the PROM. should be tied to Vee ("1"). RD I Read: If the latched Chip Enables are Power: +5 volt supply. Vee active when RD goes low. the ADo-7 output buffers are enabled and output Vss Ground: Reference. either ihe selected PROM Iodation or I/O Power Supply: Voo is a programming Voo port. When both RD and lOR are high. voltage, and must be tied to Vee when the ADo-7 output buffers are 3-stated. the 8755A is being read. lOW I I/O Write: If the latched Chip Enables are For programming, a high voltage is active. a low on lOW causes the output supplied with V DO = 25V, typical. (See port pointed to by the latched value of section on programming,) ADo to be writte'l.with the data on ADo-7' The state of 10/M is ignored. ClK I Clock: The ClK is used to force the READY into its high impedan~state after it has been forced low by CE1 low. CE2 high. and ALE high, 2-147 AFN-00843D inter 8755A18755A-2 FUNCTIONAL DESCRIPTION 8755A ONE BIT OF PORT A ANO DDR A PROM Section The 8755A contains an 8-bit address latch which allows it to interface directly to MCS-48, MCS-85 and iAPX 88/10 Microcomputers without additional hardware. ' The PROM section of the chip is addressed by the 11·bit address an!=! the Chip Enables. The address, eE, and eE2 are latched into the address latches on the falling ... ;! ed~ of ALE. If the latched Chip Enables are active and 101M is low when FtO goes low, ,the contents of the ~ r- i!! RESET I WRITE DDR A PROM location addressed by the latched address are put out on the ADO_71ines (provided that Voo is tied to 00 V ec ·) ~ READ PA I/O Section WRITE PA = !iOW-OI. (CHIP ENABLES ACTIVE) • (PORT A ADDRESS SELECTED) WAITE ODA A " (iOW=Ole (CHIP ENABlES ACTIVE) • (ODR A ADDRESS SELECTED) The 1/0 section of the chip is addressed by the latched READ PA" {((I01M:1). (Irn~OlJ + (ffiR .. O)) • (CHIP ENABLES ACTIVE) • (PORT A ADDRESS SElECTED) value of Abo-1, Two 8-bit Data Direction Registers (DDR) NOTE WRITE PA IS NOT QUALIFIED BY 10/;;( in 8755A determine the input/output status of each pin in the corresponding ports. A "0" in a particular bit posi- Note that hardware RESET or writing a zero to the DDR tion of a DDR signifies that the corresponding 1/0 port bit latch will cause the output latch's output buffer to be is in the input mode. A "1" in a particular bit position signi- disabled, preventing the data in the Output Latch from fies that'the corresponding 1/0 port bit is in the output being passed through to the Pin. ThiS is equivalent to mode In thiS manner the 110 ports of the 8755A are bit-by- putting the port in the input mode. Note also that the data bit programmable as inputs or outputs, The table can be written to the Output Latch even though the Output summarizes port and DDR designation. DDR's cannot be Buffer has been disabled, This enables a port to be ini- read. tialized with a value prior to enabling the output. AD1 ADo Selection The diagram also shows that the contents of PORT A and PORT B can be read even when the ports are configured 0 0 Port A as outputs, 0 1 Port B 1 0 Port A Data Direction Register (DDR A) TABLE 1. 8755A PROGRAMMING MODULE CROSS 1 1 Port B Data Direction Register (DDR B) REFERENCE When lOW goes low and the Chip Enables are active, MODULE NAME USE WITH the data on the ADo_7 is written into 110 port selected UPP 955 UPP(4) by the latched value of ADo_,. During this operation all UPP UP2(2) UPP 855 110 bits of the selected port are affected, regardless of PROMPT 975 PROMPT 80/85(3) their 110 mode and the state of 101M. The actual output PROMPT 48( 1 ) PROMPT 475 level does not change until lOW returns high. (glitch free output) NOTES: 1. Described on p. 13-34 of 1978 Data Catalog. A port can be read out when the latched Chi p Enables are 2. Special adaptor socket. active and either RDgoes low with 10iM high, or lOR goes 3. Described on p. 13-39 of 1978 Data Catalog. low. Both input and output mode bits of a selected port 4. Described on p. 13-71 of 1978 Data Catalog. will appear on lines ADo-? To clarify the function of the 110 Ports and Data Direction Registers, the following diagram shows the configuration of one bit of PORT A and DDR A. The same logic applies to PORT Band DDR B. 2-148 AFN-00843D 8755A18755A-2 ERASURE CHARACTERISTICS SYSTEM APPLICATIONS The erasure characteristics of the 8755A are such that System Interface with 8085A and -iAPX 88 erasure begins to occur when exposed to light with A system using the 8755A can use either one of the two I/O wavelengths shorter than approximately 4000 Angstroms Interface techniques: (A). It should be noted that sunlight and certain types of fluorescent lamps have wavelengths in the 3000-400010. • Standard I/O range. Data show that constant exposure to room level • Memory Mapped I/O fluorescent lighting could erase the typical 8755A in approximately 3 years while.it would take approximately 1 If a standard 1/0 technique is used, the system can use week to cause erasure when exposed to direct sunlight. the feature of both CE2 and CE,. By using a combina- If the 8755A is to be exposed to these types of lighting tion of unused address lines A"-15 and the Chip conditions for extended periods of time, opaque labels Enable inputs, the 8085A system can use up to 5 each are available from Intel which should be placed over the 8755A's without requiring a CE decoder. See Figure 4a 8755 window to prevent unintentional erasure. and 4b. The recommended erasure procedure for the 8755A is If a memory mapped I/O approach is used the 8755A will exposure to shortwave ultraviolet light which has a wave- be selected by Jhe combination of !;loth the Chip length of 2537 Angstroms (1).). The integrated dose (Le., Enables and 101M using ADs- 15 address lines. See UV intensity X exposure time) for erasure should be a Figure 3. minimum of 15W-sec/cm2. The erasure time with this dosage is approximately 15 to 20 minutes using an ultra- violet lamp with a 12000",W/cm2 power rating. The 8755A should be placed within one i'nch from the lamp tubes during erasure. Some lamps have a filter on their tubes and this filter should be removed before erasure. - A PROGRAMMING K A .. '5 "J ) Initially, and after each erasure, all bits of the EPROM ~ portions of the 8755A are in the "1" state. Information is introduced by selectively programming "0" into the SOS5A ~~'7 -/ ALE desired bit locations. A programmed "0" can only be f-- RD changed to a "1" by UV erasure. f-- Wl'i The 8755A can be programmed on the Intel® Universal elK (<1>2) f-- PROM Programmer (UPP), and the PROMPT'" 80/85 and READY f-- PROMPT-48'" design aids. The appropriate programming f-- 101M t modules and adapters for use in programming both Vee I-- 8755A's and 8755's are shown in Table 1. The program mode itself consists of programming a - r"'-.)" "'-.7 A/DO_7 A8_1Q RD elK I 101M single address at a·time, giving a single 50 msec pulse iDA ALE iiiW READY CE for every address. Generally, it is desirable to have a S755A verify cycle after a program cycle for the same address as shown in the attached timing diagram. In the verify cycle (Le., normal memory read cycle) 'VDD' should be at +5V. Preliminary timing diagrams and parameter values per- taining to th~ 8755A programming operation are con- Figure 3. S7SSA in SOSSA System tained ,in Figure 7. (Memory-Mapped I/O) 2-149 AFN·00843D 8755A/8755A-2 iAPX 88 FIVE CHIP SYSTEM Figure 4 shows a five chip system containing: • 1.2SK Bytes RAM • 2K Bytes ROM • 38 I/O Pins • 1 Interval Timer • 2 Interrupt Levels /'. Vss Vee I I rr- CE POR1~ >- t-- --- WR RO PORT 8155.2 B W ALE DATAl ADDR PORT C (6) W f" v IN_ 101M TIMER RESET OUT r- J As-A19 ~R---l'..., lOW RO ADo- AD7 f--", W AODRIOATA ALE ~~ ,------- ClK 'J PORT CE A ," s _ - - READY 8088 t= V A 10 8355-21 8755"'2 MNIMX I--Vcc DATAl ADDR v [OJ ~ RST® ALE RO ;--- - r- r- r-- 101M PORT W I ~- RESET B X, X, ClK WR ;--- Vee READY READY f-- 101M r- fOR -l RES .-- r- 8284 RESET r- 111 L Vss Vee Voo pRDG RDY1 Vee WR .... RO CD CE t 8185-2 ALE \ r- es. J-r- CE, I-r- As. A9 ADo_7 , 1 ! Vss Vee , 7 Figure 4a. iAPX 88 Five Chip. System Configuration 2-150 i "TI c· AS-1S :.) A" A12 A" A" A,. c Cil "'p-" AIOo-1 r- - r- r- r- v "ALE ...enen co 8085A AD r- - r- r- - > r- - r- r- - Q) ~ 3· co WR elK trJI21 r- r- - - r- r- r- r- - - "" CI1 CI1 0 co ~ § >en READY r- - r- r- - Q) !9 1/1 101M r- - r- r- - "" CI1 CI1 it , ~ 3 ~ en S" :::I 0- m a vee vee vee Vee Vee .9 f'Al°0-17 ? '( ? l 7 l' 1_ lOR AlD,_, A~" RD_CLK 101M- , ALE lOW READY CE, T" 11_ lOR AIDO-' " A~" ALERDiOWelKREADY101MeEl'II IDA '11- A~" ALERDiOWeLKREADY101MtE2 1" lOR A/DO-' AI-" RD CLK 101M, ALE iOi READY tE2 11_ lOR A/DO-' A~" ALE RD eLK iOW 101M, REAOY eEl I 8755A 8755A 8755A, 875SA 8755A 12K BYTES) (2K BYTES) 12K BYTES) 12K BYTES) 12K BYTES) Note: Use eel for the first 8755A in the system. and CE2 fa, the other 8755A·s. Permits up to 5-8755A·s in a system without CE decoder. » z" ~ " inter 8755A/8755A·2 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- TemperatureUnderBlas .... 0°Cto+70°C tion of the device at these or any other conditions above Storage Temperature ........ -65 C to +150° C 0 those indicated in the operational sections of this specifi- Voltage on Any Pin cation is not implied. Exposure to absolute maximum With Respect to Ground ............... -0.5V to -t 7V rating conditions for extended periods may affect device Power DIssipation .. . . . . . . . . . . . . . . . . . . . . .. . ... 1.5W reliability. D.C. CHARACTERISTICS (TA = O°C to 70°, Vee = Voo = 5V ± 5%; Vee = VOO = 5V ±10% for 8755A-2) SYMBOL PARAMETER MIN. MAX. UNITS TEST CONDITIONS VIL Input Low Voltage -0.5 0.8 V Vee = 5.0V VIH Input High Voltage 2.0 Vee+0.5 V Vee = 5.0V VOL Output Low Voltage 0.45 V 10L = 2mA VOH Output High Voltage 2.4 V 10 H = - 4OOIlA itL I n put Lea kage 10 Il A VSS os; VIN os; Vee ILO Output Leakage Current ±10 IlA 0.45V os; VOUT os; Vee Icc Vee Supply Current 180 mA 100 VOO Supply Current 30 mA VOO = Vee CIN Capacitance of Input Buffer 10 pF fe = l/LHz - Clio Capacitance of I/O Buffer 15 pF Ie = l!lHz D.C. CHARACTERISTICS- PROGRAMMING (TA = 0°Ct070°, vee = 5V ± 5%, Vss = OV, Voo = 25V ±1V; Vee = Voo = 5V ±10% for 8755A-2) Symbol Parameler Min. Typ. Max. Unit Voo Programming Voltage (during Write to EPROM) 24 25 26 V 100 Prog Supply Current 15 30 mA 2-152 AFN·00843D inter 8755A18755A·2 A.C. CHARACTERISTICS (TA = O°C to 70°, Vee = 5V ± 5%; Vee = VDD = 5V ±10% for 8755A-2) 8755A-2 8755A (Preliminary) Symbol Parameter Min. Max. Min. Max. Units tCYC Clock Cycle Time 320 200 ns T1 CLK Pulse Width 80 40 ns T2 CLK Pulse Width 120 70 ns It. tr CLK Rise and Fall Time 30 30 ns tAL Address to Latch Set Up Time 50 30 ns tlA Address Hold Time after Latch 80 45 ns tlC Latch to READ/WRITE Control 100 40 ns tRO Valid Data Out Delay from READ Control' 170 140 ns tAD Address Stable to Data Out Valid" 450 300 ns tll Latch Enable Width 100 70 ns tROF Data Bus Float after READ 0 100 0 85 ns tCl READ/WRITE Control to Latch Enable 20 10 ns tcc READ/WRITE Control Width 250 200 ns tow Data In to Write Set Up Time 150 150 ns two Data In Hold Time After WRITE 30 10 ns twp WRITE to Port Output 400 300 ns tPR Port Input Set Up Time 50 50 ns tRP Port Input Hold Time to Control 50 50 ns tRYH READY HOLD Time to Control 0 160 0 160 ns tARY ADDRESS ICEI to READY 160 160 ns tRY Recovery Time Between Controls 300 200 ns tROE READ Control to Data Bus Enable 10 10 ns NOTE: e LOAD = 150pF. 'Or TAD - (TAL + TLel. whichever is greater. "Delines ALE to Data Out Valid In conjunction with TAL' A.C. CHARACTERISTICS- PROGRAMMING (TA = O°Cto 7,?0. Vee = 5V ± 5%. VSS = OV, VDD = 25V ±1V; Vee = VDD = 5V ±10% for 8755A-2) Symbol Parameter Min. Typ., Max. Unit tps Data Setup Time 10 ns tPD Data Hold Time 0 ns ts Prog Pulse Setup Time 2 /JoS tH Prog Pulse Hold Time 2 /JoS tpR Prog Pulse Rise Time 0.01 2 /JoS tPF Prog Pulse Fall Time 0.Q1 2 /JoS tpRG Prog Pulse Width 45 50 msec 2-153 AFN.Q0843D inter . 8755A18755A·2 A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 24 =>(2.0 > <20)<= DeVICE UNDER 0.8 TEST POINTS 08 TEST lCL~15OPF 0.45 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC l' AND 0 45V FOR -=- A LOGIC 0' TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC l ' AND 0 BV FOR A LOGIC a C L ==150pF C L INCLUDES JIG CAPACITANCE WAVEFORMS CLOCK SPECIFICATION FOR 8755A PROM READ, I/O READ AND WRITE AB10 101M' ) ADDRESS J( ADDRESS tAD ADo7 ) ADDRESS ~--D DATA ~----< ADDRESS >- t tLL~ ALE V I--tAL~ f----tLA~ (PROG)/CE, \ ¥IJ VII, VII f- ~ CE, - ~tRDE - tRDF ~ lOR AD J L- r---tLC~ f---- tRl) tDw~ t--- -twD lOW tcc----·~ "- I----tCL- Please note that CEl must remain low for the entire cycle t"V 2-154 AFN·00843D 8755A18755A·2 WAVEFORMS (Continued) 1/0 PORT A. INPUT MODE RiSOR lOR tpA PORT INPUT ~~~A' - - - - - -: - -V --------"------------------------------ B. OUTPUT MODE GLITCH FREE 'wp /OUTPUT PORT OUTPUT DATA' - BUS - ____ _ - - - -V - - "_ _ _ _ _ _ _...J. X '-._ _ _ __ WAIT STATE (READY = 0) 2-155 I AFN-00843D 8755A18755A·2 WAVEFORMS (Continued) 8755A PROGRAM MODE FUNCTION 114.0-------- PROGRAM CYCLE - - - - - - - ;.. ~,t_I~OO_----VERIFY CYCLE" ---1_ PROGRAM CYCLE ALE DATA TO BE A/DO_7 PROGRAMMED tpo A8-10 CE2 +25 tps - Voo +5------------------------__-{ \J-- "VERIFY CYCLE IS A REGULAR MEMORY READ CYCLE (WITH VOO = +5V FOR 8755Al 2-156 AFN-00843D iAPX 86, 88, 186, 188 Microprocessors 3 iAPX 86/10 16-BIT HMOS MICROPROCESSOR 8086/8086-2/8086-1 • Direct Addressing Capability 1 Arithmetic in Binary or Decimal MByte of Memory Including Multiply and Divide • Assembly Architecture Designed for Powerful Language and Efficient • Range of Clock Rates: 5 MHz for 8086, High Level Languages. 8 MHz for 8086·2, 10 MHz for 8086·1 • 14 Word, by 16-Bit Register Set with Symmetrical Operations • MULTIBUSTM Interface System Compatible • 24 Operand Addressing Modes • Bit, Byte, Word, and Block Operations • -Available in EXPRESS Standard Temperature Range • 8 and 16·Bit Signed and Unsigned - Extended Temperature Range The Intel iAPX 86/10 high performance 16-bit CPU is available In three clock rates: 5, 8 and 10 MHz. The CPU is Implemented in N-Channel, depletion load, silicon gate technology (HMOS), and packaged in a 40-pin CerDIP package. The iAPX 86/10 operates in both single processor and multiple processor configurations to achieve high performance levels. EXECUTION UNIT BUS INTERfACE UNIT REGISTER fiLE ! RELOCATION REGISTER FILE I SEGMENT DATA REGISrERS POINTER AND AND INDEX REGS INSTRUCTION GND Vee (8 WORDS) POINTER 15 WORDS) A014 AD15 AD13 A161S3 A012 AU/54 AD11 AlB/55 r---"-"-,--~ iHElS, A,gJS~ A010 A191S6 AD9 SHE/S7 ADe MN/Mx flAGS AD7 RO AD6 ROIGTO IHOlD) ADS ROIGT1 (HlDA) 3 DllR 0Elii ALE AD. lOCK (WR) AD3 52 (MliO) AD2 51 (DTIR) 6 BYTE INSTRUCTION AD1 So (DEN) QUEUE ADO aso (ALE) NMI aS1 (INTA) TEST--,-_r----"'""'------, lNTR TEST INT·---_ elK REAOY NMI-- --- CONTROL & TIMING 2 05005, <;iND RESET iffi!GTo,W HOlO-- HLDA~---L-r_.---'_---._~ 40 LEAD RESET READY GNO V" Figure 1. iAPX 86/10 CPU Block Diagram . Figure 2. iAPX 86/10 Pin Configuration 3-1 iAPX 86/10 Table 1. Pin Description The following pin function descriptions are for iAPX 86 sy~tems in either minimum or maximum mode. The "Loca/ Bus" in these descriptions is the direct multiplexed bus interface connection to the 8086 (without regard to additional bus buffers). Symbol Pin No. Type Name and Function AD15-ADo 2-16,39 1/0 ,Address Data Bus: These lines constitute the time multiplexed memoryllO address (T 1) and data (T2, T3. TiN, T4)1bus. Ao is analogous ~o BRE for the lower byte of the data bus, pins D7-DO' It is LOW duting T 1 when a byte is to be transferred on the lower portion of the bus in memory or 1/0 operations. Eight-bit oriented devices tied to the lower half would normally use Ao to condition chip select functions. (See SHE.) These lines are active HIGH and float to 3-state OFF during interrupt acknowledge and local bus "hold acknowledge." A 1g1S6, 35-38 a Address/Status: During Tl these are the four most sign 1- A 1afS5, ficant address lines for memory operations. During I/O A17/S 4, operations these lines are LOW. During memory and 1/0 A'7/S4 A'S/S3 Characteristics A 1e/S3 operations, status information is available on these lines during T2, T3, T w, and T 4. The status of the interrupt o (LOW) 0 Alternate Data 0 1 Stack enable FLAG bit (Ssl is updated at the beginning of each CLK cycle. A 17/S 4 and Ale/S3 are encoded as shown. , '(HIGH) , 0 Code or None Data S6 IS 0 This information indicates which relocation register is (LOW) presently being used for data accessing. These lines float to 3-state OFF during local bus "hold acknowledge.'" BHE!S7 34 a Bus High Enable/Status: During Tl the bus high enable signal (BRE) should be used to enable data onto the most significant half of the data bus, pins D15·DS. Eight- BHE An Characteristics bit oriented devices tied to the upper half of the bus -- 0 0 Whole word would normally use SHE to condition chip select func- 0 1 Upper byte from! tions. SHE is LOW during T, for read, write, and inter- to odd address rupt acknowledge cycles when a byte is to be· transfer- 1 0 Lower byte froml ta even address red on the high portlon of the bus. The S7 status informa- 1 1 None tion is available during T 2, T3, and T 4. The signal is active ~---- -- LOW, and floats to 3-state OFF in "hold." It is LOW dur- ing T, for the first interrupt acknowledge cycle. 1---= RD 32 a Read: Read strobe indicates that the processor is performir:1g a memory of 1/0 read cy- cle, depending on the state of the S2 pin. This signal is used to read devices which reside on the 8086 local bus. RD is active LOW during T2, T3 and Tw of any read cycle, and is guaranteed to remain HIGH in T2 until the 8086 local bus has floated. This signal floats to 3-state OFF in "hold. acknowledge." READY 22 I READY: is the acknowledgement from the addressed memory or I/O device that it will complete the data transfer. The READY signal fr-om memory/IO is synchronized by the 8284A Clock Generator to form READY. This signal is active HIGH. The 8086 READY in- put is not synchronized. Correct operation is not guaranteed if the setup and hold times are not met. 1-- INTR 18 I Interrupt Request: is a level triggered input which is sampled during the last clock cy- cle of each instruction to determine if the processor should enter into an interrupt acknowledge operation. A subroutine is vectored to via an interrupt vector lookup table located in system memory. It can be internally masked by software resetting the inter- rupt enable bit. INTR is internally synchronized. This signal is active HIGH. TEST 23 I TEST: input is examined by the "Wait" instruction. If the TEST input is LOW execution continues, otherwise the processor waits in an "Idle" state. This input is synchronized internally during each clock cycle on the leading edge of CLK. 3-2 AFN.()1497D inter IAPX 86/10 Table 1. Pin Description (Continued) Symbol Pin No. Type Name an~ Function NMI 17 I Non·maskable Interrupt: an edge triggered input which causes a type 2 interrupt. A subroutine is vectored to via an interrupt vector lookup table located in system memory. NMlls not maskable internally by software. A transition from a lOW to HIGH initiates the interrupt at the end of the current instruction. This input is internally syn- chronized. RESET 21 I Reset: causes the processor to immediately terminate its present activity. The signal must be active HIGH for at least four clock cycles. It restarts execution, as described in the Instruction Set description, when RESET returns lOW. RESET is internally syn- chronized. ClK 19 I Clock: provides the basic timing for the processor and bus controller. It is asymmetric with a 33% duty cycle to ptovide optimized internal timing. Vee 40 Vce: + 5V power supply pin. GND 1,20 Ground MN/MX 33 I Mlnimum/Maximum: indicates what mode the processor is to operate in. The two modes are discussed in the following sections. The fol/owing pin function descriptions are for the 808618288 system in maximum mode (i.e., MNIMX = VssJ. Only the pin functions which are unique to maximum mode are described; aI/ other pin functions are as described above. 52,51, So 26-28 0 Status: active during T4, T1, and T2 and is returned to the. passive state (1,1,1) during T3 or during Tw when READY 82 8, So Characteristics is HIGH. This status is used by the 8288 Bus Controller o (LOW) 0 0 Interrupt to generate all memory and 110 access control signals. Acknowledge Any change by 52,5" or So during T4 is used to indicate 0 Q 0 1 1 0 Read 110 Port Write 1/0 Port the beginning of a bus cycle, and the return to the pas- o 1 1 Halt a sive state in T 3 or Tw is used to indicate the end of bus 1 (HIGH) 1 0 0 0 1 Code Access Read Memory cycle. 1 1 0 Wnte Memory 1 1 1 Passive These signals float to 3-state OFF in "hold acknowl-' edge." These status lines are encoded as shown. RO/GTo, 30,31 110 Request/Grant: pins are used by other local bus masters to force the processor to RO/Gi 1 release the local bus!!. the end of the processor's ~rrent bus cycle. Each pin is bidirectional with RalGTo having higher priority than Ra/GT1. RalGT has an internal pull-up resistor so may be left unconnected. The requestlgrant sequence is as follows (see Figure 9): . 1. A pulse of 1 ClK wide from another local bus master indicates a local bus request ("hold") to the 8086 (pulse 1). 2. During a T4 or TI clock cycle, a pulse 1 ClK wide from the 8086 to the requesting master _. (pulse 2), indicates that the 8086 has allowed the local bus to float and that it will enter the "hold acknowledge" state at the next ClK. The CPU's bus interface unit is discon- nected logically from the local bus during ",",old acknow!edge." 3. A pulse 1 ClK wide from the requesting master indicates to the 8086 (pulse 3) that the "hold" request is about to end and that the 8086 can reclaim ttle local bus at the next ClK. Each master-master exchange of the local bus is a sequence of 3 pulses. There must be one dead ClK cycle after each bus exchange. Pulses are active lOW. If the request is made while the CPU is performing a memory cycle, it will release the local bus during T4 of the cycle when all the following conditions are met: 1. Request occurs on or before T2 • 2. Current cycle is not the low byte of a word (on an odd address). 3. Current cycle is not the first acknowledge of an interrupt acknowledge sequence. 4. A locked instruction is not currently executing. 3-3 AFN-01497D intJ IAPX 86/10 Table 1. Pin Description (Continued) Symbol Pin '1110. Type Name and Function If the local bus is idle when the request is made the two possible events will follow: 1. Local bus will be released during the next clock. 2. A memory cycle will start within 3 clocks. Now the four rules for a currently active memory cycle apply with condition number 1 already satisfied. ~ 29 0 LOCK: output indicates that other system bus masters are not to gain control of the system bus while LOCK is active LOW. The LOCK signal is activated by the "LOCK" prefix instruction and remains active until the completion of the next instruction. This signal is active LOW, and floats to 3-state OFF in "hold acknowledge." QSh QSo 24,25 0 Queue Status: The queue status QS QSo CHARACTERISTICS is valid during the CLK cycle o (LOW) 0 No Operation after which the queue operation ~ 1 First Byte of Op Code from Queue is performed. (HIGH) 0 Empty the Queue QS1 and QSo provide status 'to 1 1 Subse_quent Byte from Queue allow external tracking of the Internal 8086 instruction queue. The fol/owing pin function descriptions are for the 8086 in minimum mod&(i.e., MN/MX = VccJ. Only the pm functions which are unique to mmimum mode are described; al/ other pin functions are as described above. MilO 28 0 Status line: logically equivalent to S2 in the maximum mode. It is used to distinguish a memory access from an I/O access. M/iO becomes valid in the T4 preceding a bus cycle and remains valid until the final T4 of the cycle (M = HIGH, 10 = LOW). M/iO floats to 3-state OFF in local bus "hold acknowledge." WR' 29 0 Write: indicates that the proces~r is performing a write memory or write I/O cycle, depending on the state of the MilO signal. WR is active forT2, T3and Tw of any write cy- cle. It is active LOW, and floats to 3-state OFF in local bus "hold acknowledge." INTA 24 0 INTA is used as a read strobe for interrupt acknowledge cycles. It is active LOW during T2, T3 and Tw of each interrupt acknowledge cycle. ALE 25 0 Address Latch Enable: provided by the processor to latch the address into the 82821 8283 address latch. It is a HIGH pulse active during T1 of any bus cycle. Note that ALE is never floated. DT/R 27 0 Data Transmit/Receive: needed in minimum system that desires to use an 8286/8287 data bus transceiver. It is used to control the direction of data flow through the transceiver. Logically DT/R is equivalent to S, in the maximum mode, and its timing is the same as for M/iO. (T = HIGH, R = LOW.) This signal floats to 3-state OFF in local bus "hold acknowledge." DEN 26 0 Data Enable: provided as an output enable for the 8286/8287 in a minimum system which uses the transceiver. DEN is active LOW during each memory and I/O access and for INTA cycles. For a read or INTA cycle it is active from the middle of T2 until the mid- dle of T 4, while for a write cycle it is active from the beginning of T2 until the middle of T4 • DEN floats to 3-state OFF in local bus "hold acknowledge." HOLD, 31,30 I/O HOLD: indicates that another master is requesting a local bus "hold." To be acknowl- HLDA edged, HOLD must be active HIGH. The processor receiving the "hold" request will issue HLDA (HIGH) as an acknowledgement in the middle of a T1 clock cycle. Simul- ,taneous with the issuance of HLDA the processor will float the local bus and control lines. After HOLD is detected as being LOW, the processor will LOWer the HLDA, and when the processor needs to run another cycle, it will again drive the local bus and control lines. / The same rules as for RQIGT apply regarding when the local bus will be released. , HOLD is not an asynchronous input. External synchronization should be provided if the system cannot otherwise guarantee the setup time. 3-4 AFN,01497D inter iAPX 86/10 FUNCTIONAL DESCRIPTION MEMORY ORGANIZATION The processor provides a 20-bit address to memory which locates the byte being referenced. The memory is orga- GENERAL OPERATION nized as a linear array of up to 1 million bytes, addressed as OOOOO(H) to FFFFF(H). The memory is logically divided The internal functions of the iAPX 86110 processor are into code, data, extra data, and stack segments of up to partitioned logically into two processing units. The first is 64K bytes each, with each segment falling on 16-byte the Bus Interface Unit (BIU) and the second is the Exe- boundaries. (See Figure 3a.) cution Unit (EU) as shown In the block diagram of Figure 1. All memory references are made relative to base addresses contained in high speed segment registers. The segment types were chosen based on the addressing These units can interact directly but for the most part needs of programs. The segment register to be selected is perform as separate asynchronous operational process- automatically chosen according to the rules of the follow- ors. The bus interface unit provides the functions related ing table. All information in one segment type share the to instruction fetching and queuing, operand fetch and same logical attributes (e.g. code or data). By structuring store, and address relocation. This unit also provides the memory into relocatable areas of similar characteristics basic bus control. The overlap of instruction pre-fetching and by automatically selecting segment registers, pro- provided by this unit serves to increase processor perfor- grams are shorter, faster, and more structured. mance through improved bus bandwidth utlli,zation. Up to 6 bytes of the instruction stream can be queued while Word (16-blt) operands can be located on even or odd waiting for decoding and execution. address boundaries and are thus not constrained to even boundaries as is the case in many 16·bit com· , The instruction stream queuing mechanism allows the puters. For address and data operands, the least signifi· BIU to keep the memory utilized very efficiently. When- cant byte of the word is stored in the lower valued ever there Is space for at least 2 bytes in the queue, the address location and the most significant byte in the BIU will attempt a word fetch memory cycle. This greatly next higher address location. The BIU automatically per· reduces "dead time" on the memory bus. The queue forms the proper number of memory accesses, one if acts as a First-In-First-Out (FIFO) buffer, from which the the word operand is on an even byte boundary and two if EU extracts instruction bytes as required. If the queue is it is on an odd byte boundary. Except for the perfor- empty (following a branch instruction, for example), the mance penalty, this double access is transparent to the first byte into the queue immediately becomes available software. This performance penalty does not occur for to the EU. instruction fetches, only word operands. Physically, the memory is organized as a high bank (01S-0a) and a low bank (0 7-001 of 512K 8·blt bytes The execution unit receives pre-fetched instructions addressed in parallel by the processor's address lines from the BIU queue and provides un·relocated operand I addresses to the BIU. Memory operands are passed A19 - Al. Byte data with even addresses is transferred on through the BIU for processing by the EU, which passes the 07-00 bus lines while odd addressed byte data (Ao results to the BIU for storage. See the Instruction Set HIGH) is transferred on the 015-08 bus lines. The process- description for further register set and architectural or provides two enable Signals, BHE and Ao, to selectively descriptions. allow reading from or writing into either an odd byte location, even byte location, or both. The instruction stream is fetched from memory as words and is addressed internally by the processor to the byte level as necessary. Memory Segment Reglste, Segment Reference Need Used Selection Rule Instructions CODE (CS) Automatic with all instruction prefetch. Stack STACK (55) All stack pushes and pops. Memory references relative to BP base register except data references. Local Data DATA (OS) Data references when: relative to stack, destination of string operation, or explicitly overridden. External (Global) Data EXTRA (ES) Destination of string operations: Explicitly selected using a segment override. 3-5 AFN'()1497D iAP)( 86/10 conSisting of a 16-bit segment address and a 16-bit off- .r---::J. FFFFFH set address. The pOinter elements are assumed to have rD} CODE SEGMENT been stored at the respective places in reserved memory prior to occurrence of interrupts. I ! + OFr SET - XXXXOH F== } STACK SEGMENT RESET 800TSTRAP PROGRAM JUMP FFFFFH FFFFOH t1 SEGMENT REGISTER FILE } DATA SEGMENT .~ 3FFH CS INTERRUPT POINTER SS FOR TYPE 255 OS 3FCH ES - . }EXTRA DATA SEGMENT 7H INTERRUPT POINTER FOR TYPE 1 4H 3H INTERRUPT POINTER ~OOOOOH FOA TYPE 0 OH Figure 3a. Memory Organization Figure 3b. Reserved Memory Locations In refe,rencing word data the BIU requires one or two memory cycles depending on whether or not the start- ing byte of the w6rd is on an even or odd address, MINIMUM AND MAXIMUM MODES respectively. Consequently, in referencing word oper- The requirements for supporting minimum and maximum ands performance can be optimized by locating data on iAPX 86/10 systems are sufficiently different that they even address boundaries. This is an especially useful cannot be done efficiently with 40 uniquely defined technique for using the stack, since odd address refer- pins. Consequently, the 8086 is equipped with a strap ences to the stack may adversely affect the context pin (M'NIMX) which defines the system configuration. switching time for Interrupt processing or task' multi- plexing. . The definition of a certain subset of the pins changes dependent on the condition of the strap pin. When Certain locations in memory are reserved for specific MNIMX pin is strapped to GND, the 8086 treats pins 24 CPU operations (see Figure 3b.) Locations from address through 31 in maximum mode. An 8288 bus controller FFFFOH through FFFFFH are reserved for operations interprets status information coded into 50,8 1,8 2 to gen- including a jump to the inItial program loading routine. erate bus timing and control signals compatible with Following RESET, the CPU will always begin execution the MULTIBUS™ architecture. When the MN/MX pin Is at location FFFFOH where the jump must be. Locations strapped to Vee, the 8086 generates bus control signals OOOOOH through 003FFH are reserved for interrupt itself on pins 24 through 31, as shown in parentheses in operations. Each of the 256 possible interrupt types has Figure 2. Examples of minimum mode and maXimum its service routine pOinted to by a 4-byte pointer element mode systems are shown in Figure 4. 3-6 AFN'()1497D iAPX 86/10 Vee r~UI MNIMX Vee 8284ACLOCK GENERATOR f- ClK Mira f- II£S f-- READY INTA f- RESET RO I ROY \VA 1 I G ND r-l--, DT/R r----, I I WAIT I ffi I- ---, I I I STATE I 8086 CPU I I r-----, I I GENERATOR I I I I I I L ___ ..J ALE STB I GND~ DE 8282 I I I LATCH AODR AOo-AD1S ~DDrT--v ~ A16- A19 2 OR 3 BHE I--~ ~ I I I I I I I rr----~ IL _ T - - - - , 1 I L_ ----16E 1I I ~ 828. 1 I I TRANSCEIVER DATA 11_ 14111 11f; II I (2) 1 1 BHE L ___ OPTIONAL I CSOH CSOL WE 00 CE OE CS RCWR FOR INCREASED OATA BUS DRIVE 2142 RAM (4) 2716-2 PROM (2) MeS-80 PERIPHERAL 121 (2) 1KxB I lKx8 2K)<)8~ 2Kx8 Figure 4a. Minimum Mode iAPX 86/10 Typical Configuration Vee lUI ~8284A MN/MX GND I ClK MADe ~r;~~~OR elK So SO MWTC +- II£S I- READY S; S; AMWC t - NC I- RESET S, S, 8288 1 ROY , . - - DEN C~~~R lowe IORC OND r-l-.., B086 CPU r - oTIA ALE AIOWC lNTA t-- NC 1 WAIT 1 1 STATE 1 1 GENERATOR 1 = t-NC L---:l 1 L ___ ...l STB 1 GND- I--- De ADo-AD15 8282 LATCH 1 A1S-A19 ~DDR/DA~ (2 OR 3) L-.JOOR BHE t-- - ~r- T L£>: DE 8286 TRANSCEIVER DATA -------'\ (2) BHE eSOH lioll J11T 11 CSOL WEOD CE OE es R1l \VA 2142 RAM (4) 21162 PROM (2) Mesao PERIPHERAL 12) (2) 1Kx8 I 1KIl8 2K x B 2K x 8 Figure 4b. Maximum Mode iAPX 86/10 Typical Configuration 3-7 AFN·01497D inter iAPX 86/10 BUS OPERATION' Status bits S3 through S7 are multiplexed with high· order address bits and the SHE signal, and are therefore The 86/10 has a combined address and data bus com- valid during T2 through T4. S3 and S4 indicate which monly referred to as a time multiplexed bus. This tech· nique provides the most efficient use of pins on the segment register (see Instruction Set description) was processor while permitting the use of a standard 40·lead used for this bus cycle in forming the address, accord· package. This "local bus" can be buffered directly and ing to the following table: used throughout the system with address latching pro· vided on memory and 1/0 modules. In addition, the bus S4 S3 CHARACTERISTICS can also be demultiplexed at the processor with a single o (LOW) 0 Alternate Data (extra 'segment) set of address latches if a standard non·multiplexed bus 0 1 Stack is desired f,or the system. 1 (HIGH) 0 Code or None Each processor bus cycle consists of at least four CLK 1 1 Data cycles. These are referred to as T T2, T3 and T4 (see " Figure 5). The address is emitted from the processor during T 1 and data transfer occurs on the bus during T3 S5 is a reflection of the PSW interrupt enable bit. S6=0 and and T4. T2 is used primarily for changing the direction of S7 is a spare status bit. the bus during read operations. In the event that a "NOT READY" indication is given by the addressed device, "Wait" states (T w) are inserted between T3 and T4. Each 1/0 ADDRESSING inserted "Wait" state is of the same duration as a CLK In the 86/10, I/O operations can address up to a maximum cycle. Periods can occur between 8086 bus cycles. of 64K I/O byte registers or 32K I/O word registers. The These are referred to as "Idle" states (T I) or inactive CLK I/O address appears in the same format as the memory cycles. The processor uses these cycles for internal address on bus lines A1s-Ao. The address lines A19 -A 16 housekeeping. are zero in I/O operations. The variable I/O instructions During T, of any bus cycle the ALE (Address Latch which use register OX as a pointer have full address capa- Enable) signal is emitted (by either the processor or the bility while the direct I/O instructions directly address one 8288 bus controller, depending on the MN/MX strap). At or two of the 256 I/O byte locations in page 0 of the I/O the trailing edge of this pulse, a valid address and cer· address space. tain status information for the cycle may be latched. I/O ports are addressed in the same manner as memory Status bits So, S" and S2 are used, in maximum mode, locations. Even addressed bytes are transferred on the by the bus controiler to identify the type of bus transac· 07-00 bus lines and odd addressed bytes on D15-D s. tion according to the following table: Care must be taken to assure that each register within an 8·bit peripheral located on the lower portion of the bus be addressed as even. S2 S; So CHARACTERISTICS o (LOW) 0 0 Interrupt Acknowledge 0 O. 1 Read 110 0 1 0 WntellO 0 1 1 Halt 1 (HIGH) 0 0 Instruction Fetch 1 0 1 Read Data from Memory 1 1 0 Wnte Data to Memory 1 1 1 Passive (no bus cycle) 3-8 AFN.(J1497D IAPX 86/10 ~'-------- 14+ Tl T2 NwAIT)= TCY T3 -------·~lfoo.------I4+ NwAITI= TCY ---~---+j' TWAIT' T", T1 T2 I I Ta TWAIT T4 I CLK ADDR/ STATUS' ADDH/DATA -----EX. . __ D_A_TA_O_U_T_'D_,,_-DoJ >- DC _ _ _.. READY READY READY WAIT WAIT DTIR MEMORV ACCI. . T I M I - \'---_.....1/ Figure 5. Basic System Timing 3-9' AFN-01497D iAPX 86/10 EXTERNAL INTERFACE ' sequence, which is used to "vector" through the ap· propriate element to the new interrupt service program PROCESSOR RESET AND INITIALIZATION location. Processor initial!zation or start up is accomplished with NON·MASKABLE INTERRUPT (NMI) activation (HIGH) of the RESET.pin. The 8086 RESET is The processor provides a single non-maskable interrupt required to be HIGH for greater than 4 elK cycles. The pin (NMI) which has higher priority than the maskable in- 8086 will terminate operations on the high-going edge of terrupt request pin (INTR). A typical use would be to ac· RESET and will remain dormant as long as RESET is tivate a power failure routine. The NMI is edge·triggered HIGH. The low-going transition of RESET triggers an on a lOW-to-HIGH transition. The activation of this pin internal reset sequence for approximately 10 elK cycles. causes a type 2 interrupt. (See Instruction Set descrip- After this interval the 8086 operates normally beginning tion.) with the instruction in absolute location FFFFOH (see Figure 3Bl. The details of this operation are specified in the NMI is required to have a duration in the HIGH state of Instruction Set description of the MeS-86 Family User's greater than two elK cycles, but is not required to be Manual. The RESET input is internally synchronized to the synchronized to the clock. Any high-gOing transition of processor clock. At initialization the HIGH-to-lOW trans- NMI is latched on-chip and will be serviced at the end of ition of RESET must occur no sooner than 50 JLs after the current instruction or between whole moves of a power-up, to allow complete initialization of the 8086. block-type instruction. Worst case response to NMI would be for multiply, divide, and variable shift instruc- NMI may not be asserted prior to the 2nd elK cycle fol- tions. There i.s no specification on the occurrence of the lowing the end of RESET. low-going edge; it may occur before, during, or after the servicing of NMI. Another high·going edge triggers INTERRUPT OPERATIONS another response if it occurs after the start of the NMI procedure. The signal must be free of logical spikes in Interrupt operations fall into two classes; software or general and be free of bounces on the low-going edge to hardware initiated. The software initiated interrupts and software aspects of hardware interrupts are specified in avoid triggering extraneous responses. the Instruction Set description. Hardware interrupts can MASKABLE INTERRUPT (INTR) be Classified as non-maskable or maskable. The 86/10 provides a single interrupt request input (INTR) which can be masked internally by software with the Interrupts result in a transfer of control to a new pro- resetting of the interrupt enable FLAG status bit. The gram location. A 256-element table containing address interrupt request signal is level triggered. It is internally pointers to the interrupt service program locations synchronized during each clock cycle on the high·going resides in absolute locations 0 through 3FFH (see edge of elK To be responded to, INTR must be present Figure 3b), which are reserved for this purpose. Each (HIGH) during the clock period preceding the end of the element in the table is 4 bytes in size and corresponds current instruction or the end of a whole move for a to an interrupt "type". An interrupting device supplies block-type instruction. During the interrupt response an 8-bit type number, during the interrupt acknowledge sequence further interrupts are disabled. The enable bit is reset as part of the response to any interrupt (INTR, NMI, software interrupt or single-step), although the I T, T, T3 T, I T, I T, I T, T3 ALEJ\~--t(n~_ COCK \ ) l t ( / INTA \ r l ~ \ ADo-AD,,, :=:) FLOAT 11 1 ( Figure 6. Interrupt Acknowledge Sequence \ TYPE VECTOR >- 3-10 AFN-01497D inter IAPX 86/10 FLAGS r~gister which is automatically pushed onto the to become active. It must remain active for at least 5 stack reflects the state of the processor prior to the CLK cycles. The WAIT instruction is re-executed interrupt. Until the old FLAGS register is restored the repeatedly until that time, This activity does not con- enable bit will be zero unless specifically set by an sume bus cycles. The processor remains in an idle state instruction. , while waiting. All 8086 drivers go to 3-state OFF if bus During the response sequence (figure 6) the processor "Hold"is entered, If interrupts are enabled, they may executes t¥'o successive (back·to-back) interrupt occur while the processor is waiting, When this occurs acknowledge cycles. The 8086 emits the LOCK signal the processor fetches the WAIT instruction one extra from T2 of the first bus cycle until T2 of the second. A time, processes the interrupt, and then re·fetches and local bus "ho'ld" request will not be honored' until the re·executes the WAIT instruction upon retwning from end'of the second bus cycle. In the second bus cycle a the interrupt. byte is fetchEld from the external interrupt system (e.g., 8259A PIC) which identifies the source (type) of the BASIC SYSTEM TIMING Interrupt. 'This byte is multiplied by four and' used as a pOinter into the interrupt vector lookup table. An INTR Typical systelT) configurations for the processor signal left H!f3H will be continually responde,d to within oper'lting in minimum mode and in maximum modE! are the limitations of the enable bit and sample period. The shown in Fig~res 4a and 4b, respectively. In minimum INTERRUPT RETURN instruction Includes a FLAGS pop mode, the MN/MX pin is strapped to Vee and the proc· which returns the status of the original interrupt enable essor emits bus conlrol signals in a manner similar to bit when it restorEls the FLAGS. the 8085, In maximum mode, the MN/MX pin is strapped to Vss and the processor emits coded status informa· HALT tion which the 8288 bus controller uses to generate MUI-TIBUS compatible bus control signals. Figure 5 il- When a software "HALT" instruction is executed the lustrates the signal tirning relationships. ' processor indicates that it is entering the "HALT" state in one of two ways depending upon which mode is strapped. In IT)jnimum mode, the processor issues one ALE with no qualifying bus control signals, In Maximum AX AH AL ACCUMULATOR Mode, the processor issues appropriate HALT status on BX BH BL BASE 525186 and the 8288 bus controller issues one ALE. The CX CH CL COUNT 8086 will not leave the "HALT" state when a local bus ox DH DL DATA "hold" is entered while In "HALT", In Ihis case, the processo'r reissues the HALT indicator, An interrupt request or RESET will force the 8086 out of the "HALT" rl.. SP BP STACK POINTER BASE POINTER state. SI SOURCE INDEX 01 DESTINATION INDEX READ/MODIFY/WRITE (SEMAPHORE) OPERATIONS VIA LOCK The LOCK status information is provided by the proc· essor when directly consequtive bus cycles are required I FLAGSH IP I FL~GSL I INSTRUCTION PQI'NTER STATUS FU\GS CS CODE SEGMENT during the execution of an instructiQn. This provides the OS DATA SEGMENT processor with the capability of performing read/modifyl L--- SS STACK SEGM~NT write operatio!1s on memory (via the lOx change Register ES EXTRA SEGMENT With Memory instruction, for example) without the possibility pf another system bus master receiving intervening memory cyc!es. This is useful in multi· Figure 7. iAPX 86/10 Register Model processor system config\Jrations to accomplish "test and set lock" operations. The LOCK signal is activated (forced LOW) In the clock cycle follOWing the one in SYSTE~ TIMING - MINIMUM SYSTEM which the software "LOCK" prefix instruction is , decoded by the EU. It is deactivated at the end of the The read cycle begins in T1 with the assertion of the last bus cyqle of the instruction following the "LOCK" Address Latch Enable (ALE) signal. The trailing (lOW- prefix instruction. While LOCK is active a request on a going) edge of this signal is used to latch the 'lddress RQ/GT pin will be reoorded and then honored at the end information, which is valid on the local bus at this time, of tl)e LOCK. into the 8282/8283 latch, The BHE and 11,0 signals address the low, high, or both bytes. From T1 to T4 the MilO signal indicates a memory or 1/0 operation, At T2 EXTERNAL SYNCHRONIZATION VIA TEST the address isremqved from the local bus and the bus As an alternative to the interrupts and general 1/0 goes to a high impedance state. The read control signal capabilities, the 8086 provides a single software· is also asserted at T2' The read (RD) signal causes the testable input known as the TEST signal. At any time the addressed device to enable its data bus drivers to the program may execute a WAIT instruction. If at that time local bus. Some time later valid data will be available on the TEST signal is Inactive (HIGH); program executi,on the bus and the addressed device will drive the READY becomes suspended while th!! processor waits for TEST line HIGH. When the processor returns 'tile read signal AFN·01497D 3-11 inter IAPX 86/10 to a HIGH level, the addressed device will again 3-state read (Fin) signal and the address bus is floated: (See Its bus drivers. If a transceiver (8286/8287) is requirE!d to Figure 6.) In the second of two successive INTA cycles, !lllffer the 8086 l,ccal bus, Signals DT/R and DEN are pro- a byte of information is read from bus lines D7-DO as vided by the 8086. ' supplied by the interrupt system logic (I.e., 8259A Prior· ity Interrupt Controller). This byte identifies the source A write cycle also begins with the assertion of ALE and (type) of the interrupt. It is multiplied by four and used the emission of the address. The M/iO signal is again as a pOinter into an interrupt vector lookup table, as asserted to indicate a memory or liD write operation, In _ described earlier. ' the T2 immediately following the address emillsion the processor emits the data to be written into the BUS TIMING-MEDIUM SIZE SYSTEMS addressed location. This data remains valid until the middle of T4• During T2, T3, and Twthe processor asserts For medium size systems the MN/MX pin is connected to the write control signal. The write (WR) signal becomes Vss and the 8288 Bus Controller is added to the system as active at the beginning of T2 as opposed to the read well as an 828218283 latch for latching the system address, which is delayed somewhat into T 2 to provide time for and a 8286/8287 transceiver to allow for bus 'loading _ the bus to·float. greater than the 8086 is capable of handling. Signals ALE, DEN, and DT/Fi are generated by the 8288 instead of the The BHE and Ao signals are used to select the proper processor in this configuration although their timing re- byte(s) of the memoryliO word to be read or written mains relatively the same. The 8086 status outputs (82 ,81 , according to the following table: and So) provide type-of-cycle information and become 8288' inputs. This bus cycle information specifies read (code, data, or I/O), write (data or I/O), interrupt acknowl- edge, or software halt. The 8288 thus issues control BHE AD CHARACTERISTICS signals specifying memory read or write, I/O read or write, 0 0 Whole word or interrupt acknowledge. The 8288 provides two types of write strobes, normal and advanced, to be applied as re- 0 1 Upper byte froml quired. The normal write strobes have data valid at the to odd address ,leading edge of write. The advanced write strobes have 1 0 Lower byte froml the same timing as read IItrobes, and hence data isn't valid to even address at the leading edge of write. The 8286/8287 transceivl!!: 1 1 None receives the usual T and DE inputs from the 8288's DT/R and DEN. The pOinter into the interrupt vector table, which is passed during the second INTA cycle, can derive from liD ports are addressed in the same manner as memory an 8259A located on either the local bus or the system location. Even addressed bytes are transferred on the bus, If the master &259A Priority Interrupt Controller is D7-DO bus lines and odd addressed bytes on D15-D 8• pOSitioned on the local bus, a TIL gate is required to The basic difference between the interrupt acknowl· disable the 8286/8287 transceiver when reading from the edge cycle and a read cycle is that the interrupt master 8259A during the interrupt acknowledge acknowledge signal (INTA) is asserted in place of the sequence -and software "poll", 3-12 AFN.()1497D inter iAPX 86/10 "NOTICE: Stresses above those listed under "Absolute ABSOLUTE MAXIMUM RATINGS· Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O·C to 70·C tion of the device at these·or any other conditions above Storage Temperature ............. - 6S·C to + 150·C those indicated in the operational sections of this specifi- Voltage on Any Pin with cation is not implied. Exposure to absolute maximum Respect to Ground .................. -1.0 to + 7V rating conditions for extended periods may affect device Power Dissipation ........................ 2.S Watt reliability. D.C. CHARACTERISTICS (8086: TA = O°C to 700C. Vee = SV ± 10%) I (8086-1: TA = O°C to 70°C. Vee = SV ± 5%) (8086-2: TA = O°C to 70°C. Vee = SV ± S%) Symbol Parameter Min. Max. Units Test Conditions Vil Input Low Voltage -O.S +0.8 V V IH Input High Voltage 2.0 Vee + 0.5 V Val Output Low Voltage 0.45 V , IOl=2.5 rnA VOH Output High Voltage 2.4 V 10H= -400 "A Icc Power Supply Current: 8086 340 8086-1 360 mA T A= 25°C 8086-2 350 III Input Leakage Current ± 10 "A OV ... VIN ... Vee ILO Output Leakage Current ± 10 "A 0.45V" VOUT " Vec VCl Clock Input Low Voltage -O.S +0.6 V VCH Clock Input High Voltage 3.9 Vee + 1.0 V Capacitance of Input Buffer C IN (All input except 15 pF fc= 1 MHz ADo - AD15. RQiGn Capacitance of liO Buffer Cia 15 pF fc= 1 MHz (AD o -AD 15• RQ/GT) 3-13 AFN.()1497D intel" iAPX 86/10 A.C. CHARACTERISTICS (8086: TA = O°C to 70°C. Vcc = 5V ± 10%) (8086-1: TA = O°C to 70°C. Vcc = 5V ± 5%) (8086-2: TA = O°C to 70°C. Vcc = 5V ± 5%) MINIMUM COMPLEXITY SYSTEM TIMING REQUIREMENTS Test Symbol Parameter 8086 8086-1 (Preliminary) 8086-2 Units Conditions Min. Max. Min. Max. Min. Max. TClCl CLt< Cycle Period 200 500 100 500 125 SOO ns TClCH ClK low Time 118 53 68 ns TCHCl ClK High Time 69 39 44 ns TCH1CH2 ClK Rise Time 10 10 10 ns From 1.0Vto 3.5V TCL2Cll ClK Fall Time 10 10 10 ns From 3.5Vto , 1.0V TDVCl Data in Setup Time 30 5 20 ns TClDX Data In Hold Time 10 10 10 ns TRlVCl 'RDY Setup Time 35 35 35 ns Into 8284A (Sae Notes " 2) TClR1X ROY Hold Time 0 0 0 ns into 8284A (See Notes " 2) TRYHCH READY Setup 118 53 68 ns Time into 8086 TCHRYX READY Hold Time 30 20 20 ns into 6086 TRYlCl READY Inactive to -B -10 -B ns ClK (See Note 3) THVCH HOLD Setup Time 35 20 20 ns TlNVCH INTR, NMI, TEST 30 15 15 ns Setup Time (See Note 2) TiltH Input Rise Time 20 20 20 ns From O.BVto (Except ClK) 2.0V TIHll Input Fall Time 12 12 12 ns From 2.0V to (Except ClK) O.BV 3-14 AFN·01497D inter iAPX 86/10 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES , Teet Symbol Parameter 8086 8088-1 (Preliminary) 8088-2 Unit. Condition. Min. Max. Min. Max. Min. Max. TCLAV Address Valid Delay 10 110 ·10 50 10 60 ns TCLAX Address Hold Time 10 10 10 ns TCLAZ Address Float TCLAX 80 10 40 TCLAX 50 ns Delay TLHLL ALE Width TCLCH-2O TCLCH-l0 TCLCH-l0 ns TCLLH ALE Active Delay 80 40 50 ns TCHLL ALE InactIve Delay 85 45 55 ns TLLAX Address Hold Time TCHCL-l0 TCHCL-l0 TCHCL-l0 ns to ALE Inactlvo TCLDV Data Valid Delay 10 110 10 50 10 60 ns 'CL = 20-100 pF for all 8088 Out· TCHDX Data Hold TIme 10 10 10 ns puts (In addl· TWHDX Data Hold TIme TCLCH-30 TCLCH-25 TCLCH-30 ns tion to 8088 self· AfterWR load) TCVCTV Control ActIve 10 110 10 50 10 70 ns Delay 1 TCHCTV Control Active 10 110 10 45 10 80 ns Delay 2 TCVCTX Control Inactive 10 110 10 50 10 70 ns Delay TAZRL Address Float to 0 0 0 ns READ ActIve TCLRL 1'ii5 Active Delay 10 165 10 70 10 100 n8 TCLRH RD Inactive Delay 10 150 10 60 10 80 ns TRHAV RD Inactive to Next TCLCL-45 TCLCL-35 TCLCL-4O ns Address ActIve TCLHAV HLDA Valid Delay 10 160 10 80 10 100 n8 TRLRH RDWldth 2TCLCL-75 2TCLCL-4O 2TCLCL-50 ns TWLWH WRWidth 2TCLCL-60 2TCLCL-35 2TCLCL-4O ns TAVAL Address Valid to TCLCH-60 TCLCH-35 TCLCH-4O ns ALE Low TOLOH Output Rise Tima 20 20 20 ns From O.BV to. 2.0V TOHOL Output Fall Time 12 12 12 ns From 2.0Vto O.BV .NOTES: 1. Signal at 8284A shown for reference only. 2. Setup requirement for asynchronous signal only to guarantee recognitIon at next CLK. 3. Applies only t~ T2 state. (8 ns into T3). 3-15 AFN.Q1497D inl:ef IAPX 86/10 A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING l.OAD CIRCUIT, INPUT/OUTPUT DEVICE '1"~'.". UNDER TEST A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1" AND 45V FOR a A LOGIC 0" TIMING MEASUREMENTS ARE MADE AT 1 SV FOR BOTH A LOGIC 1 AND 0" CL INCWDES JIG CAPACITANCE WAVEFORMS MINIMUM MODE T, T2 T3 Tw T4 ClK (8284A Output) ''" ,--,.f-- vt.. 1\ 1 - """v::=r"""]~ / t- ~CCl2Cllr''"'""\ ~ I L- - TCHCTV DK=- r---- TCHCl , , , - TClCH_ M/ICi TClAY- _ - TClDVI-" ' TCHDX_ I- TClAX- I-"J......,f---t---+---f----t"'"", jlr ,...____ ~liE, A, ....A,. 57-53 'V ~--~-J~r_--r_JI'_+--~-----+--~----_+--'A'-----­ TCllH- t TLH~l~ I \--TlLAX r-- ~I:---+_:_-+----t--+---+---J,~ ALE - f - - - t " ' .-:::!' TALL --- TCHll-1 - ~~TR1VCL RDY (8284A Input) SEE NOTE 4 " VIH~ VIL ~ " t~:~:~0~:'\' :< ' ,\~\~~ ", _ f1.--r~C~l~Rl~X~......",...ll:..=~r-~...;,.....:..~- -, TRVLCL- - - -TCHRYX _ TAVAl TLLAX~ _ 1--1 TR~HCHJ I:~~~ TClAV~ I-" - AD,.-ADo ",,-ADo DATA IN L _1-_ _ _ _ _ _ _ _T_AZj-R_l_-""rM re~- ~ c:''J-- AD ~--f~--------~JI READ CYCLE .::L r- TCHCTV TClRl 1---+-+---J'--TRlRH---+--~ -TCHCTV I (NOTE 1) tWlI,lNfA. VOH) ri ' \ '--------TC-V-C-T-V--+,-{t-+-----TC-V-C-T-X--+---+;-", ' - - _ _ _ _ _ _ _ _J 3-16 AFN"()1497D inter iAPX 86/10 WAVEFORMS (Continued) MINIMUM MODE (Continued) CLK (8284A Output) MIll! ALE AOn-ADo WRITE CYCLE Oles interrupts, it allows other inhibit interrupts from other lower-priority 80186 in- ,requests to be serviced. te rru pt so urces. Special procedures should be followed when reset- End-of-Interrupt Command ting IS bits at the end of interrupt service routines. The end-of-interrupt (EOI) command is used by the Software polling of the external master's IS register programmer to reset the In-Service (IS) bit when an is required to determine if there is more than one bit interrupt service routine is completed. THe EOI com- set. If so, the IS bit in the 80186 remains active and mand is issued ,by writing the proper pattern to the the next interrupt service routine is entered. EOI register. There are two types of EOI commands, specific and nonspecific. the nonspecific command does not specify which IS bit is reset. When issued, the intemjpt controller automatically resets the IS bit Operation in a Polled Environment of the highest priority source with an active service routine. A specific EOI command requires that the The controller may be used in a polled mode if inter- programmer send the interrupt vector type to the rupts are undesirable. When polling, the processor disables interrupts and then polls the interrupt con- interrupt controller indicating which source's IS bit is troller whenever it is convenient. Polling the inter- to be reset. This command is used when the fully rupt controller is accomplished by reading the Poll nested structure has been disturbed or the highest Word (Figure 31). Bit 15 in the poll word indicates priority IS bit that was set does not belong to the , to the processor that an interrupt of high enough sflrvice routine in progress. priority is requesting service. Bits 0-4 indicate to the processor the type vector of the highest- Trigger Mode priority source requesting service. Reading the The four external interrupt pins can be programmed Poll Word causes the In-Service bit of the highest- in either edge-or level~trigger mode. The control priority source to be set. ' register for each external source has a level-trigger I mode (LTM) bit. All interrupt inputs are active HIGH. It is desirable to be able to read the Poll Word infor- In the edge seriSe mode or the level-trigger mode, the , mation without guaranteeing service of any pending interrupt request must remain active (HIGH) until the interrupt, I.e., not set the indicated in-service bit. The interrupt request is acknowledged by the 80186 CPU. 80186 provides a Poll Status Word in addition to the In the edge-sense mode, if the level remains high conventiqnal Poll Word to allow this to be done. Poll after the interrupt is'acknowledged, the input is dis- Word information is duplicated in the Poll Status abled and no further requests will be generated. The Word, but reading the Poll Status Word does not set input level must go LOW for at least one clock cycle to the associated in-service bit. These words are lo- reenable the input. In the level-trigger mode, no such cated in two adjacent memory locations in the regis- provision is made: holding the interrlJpt input HIGH ter file. will cause continuous int~rrupt requests. 3-52 AFN·02211B inter iAPX 186 Interrupt Vectoring Interrupt Request Register The 80186 Interrupt Controller will generate inter- The internal in,terrupt sources have interrupt request rupt vectors for the integrated OMA channels and bits inside the interrupt controller. The format of this the integrated Timers. In addition, the Interrupt Con- register is snown in Figure 24. A read from this regis- troller will generate interrupt vectors for the external ter yields the status of these bits. The TMR bit is the interrupt lines if they are not configured in Cascade logical OR of all timer interrupt requests. DO and 01 or Special Fully Nested Mode. The interrupt vectors are the interrupt request bits for the OMA channels. generated are fixed and cannot be changed (see Table 4). The state of the external interrupt input pins is also Interrupt Controller Registers indicated. The state of the external interrupt pins is not a stored condition inside the interrupt controller, The Interrupt Controller register model is shown in therefore the external interrupt bits cannot be writ- Figure 23. It contains 15 registers. All registers can ten. The external interrupt request bits show exactly both be read or written unless specified otherwise. when an interrupt request is given to the interrupt controller, so if edge-triggered mode is selected, the In-Service Register bit in the register will be HIGH only after an inactive- This register can be read from or written info. The to-active transition. For internal interrupt sources, format is shown in Figure 24. It contains the In- the register bits are set when a request arrives and Service bit for each of the interrupt sources. The are reset when the processor acknowledges the In-Service bit is set to indicate that a source's service requests. routine is in progress. When an In-Service bit is set, the interrupt controller will not generate interrupts to the CPU when it receives interrupt requests from devices with a lower programmed priority level. The Mask Register TMR bit is the In-Service bit for all three timers; the This is a 16-bit register that contains a mask bit for DO and 01 bits are the In-Service bits for the two OMA each interrupt source. The format for this register is channels; the 10-13 are the In-Service bits for the shown in Figure 24. A one in a bit position corres- external interrupt pins. The IS bit is set when the ponding to a particular source serves to mask the processor acknowledges an interrupt request either source from generating interrupts. These mask bits by an interrupt acknowledge or by reading the poll are the exact same bits which are used in the individ- register. The IS bit is reset at the end of the interrupt ual control registers; programming a mask bit using service routine by an end-of-interrupt command is- the mask register will also change this bit in the sued by the CPU. individual control registers, and vice versa. 80186 INTO INT 8259A PIC fNTAlj INTA Figure 22. Cascade Mode Interrupt Connection 3-53 AFN-02217B iAPX 186 Priority Mask Register OFFSET This register is used to mask all interrupts below INT3 CONTROL REGISTER 3EH particular interrupt priority levels. The format of this register is shown in Figure 25. The code in the lower INT2 CONTROL REGISTER 3CH three bits, of this register inhibits interrupts of priority lower (a higher priority number) than the INTl CONTROL REGISTER 3AH code specified. For example, 100 written into this INTO CONTROL REGISTER register masks interrupts of level five f1 01), six (110), 38H and seven (111). The register is reset to seven (111) DMA 1 CONTROL REGISTER 38H upon RESET so all interrupts are unmasked. DMA 0 CONTROL REGISTER 34H Interrupt Status Register This register contains general interrupt controller TIMER CONTROL REGISTER 32H status information. The format of this register is shown in Figure 26. The bits in the status register INTERRUPT STATUS REGISTER 30H have the foll'owing functions: INTERRUPT REQUEST REGISTER 2EH DHLT: DMA Halt Transfer; setting this bit halts all DMA transfers. It is automatically set IN-SERVICE REGISTER 2CH whenever a non-maskable interrupt occurs, and it is reset when an IRET instruction is PRIORITY MASK REGISTER 2AH executed. The purpose of this bit is to allow MASK REGISTER 28H prompt service of all non-maskable inter- rupts. This bit may also be set by the CPU. POLL STATUS REGISTER 26H IRTx: These three bits represent the individual POLL REGISTER 24H timer interrupt request bits. These bits are used to differentiate the timer interrupts, EOI REGISTER 22H since the timer IR bit in the interrupt re- quest register is the "OR" function of all timer interrupt requests. Note that setting Figure 23. Interrupt Controller Registers anyone of these three bits initiates an inter- (Non-iRMX 86 Mode) rupt request to the interrupt controller. 15 14 10 9 8 7 4 o I 0 Figure 24. In-Service, Interrupt Request, and Mask Register Formats 15 14 2 1 0 I o I 0 I o IPRM21 PRMll PRMO I , ' - - - - - - - - - - - - - ' Figure 25. Priority Mask Register Format 7 6 4 2 1 0 , 0 o o o , 0 'IRT2 'IRTl , IRTO I Figure 26. Interrupt Status Register Format 3-54 AFN·02217B iAPX 186 Timer, DMA 0, 1; Control Registers level is preceded by an inactive-to-active These registers are the control words for all the inter- transition on the line. In both cases, the nal interrupt sources. The format for these registers level must remain active until the interrupt is shown in Figure 27. The three bit positions PRO, is acknowledged. PR1, and PR2 represent the programmable priority level of the interrupt source. The MSK bit inhibits interrupt requests from the interrupt source. The' MSK: Mask bit, 1 = mask; 0 = non mask. MSK bits in the individual control registers are the exact same bits as are in the Mask Register; modify- ing them in the individual control registers will also C: Cascade mode bit, 1 = cascade; 0 = direct modify them in the Mask Register, and vice versa. SFNM: Special fully nested mode bit, 1 = SFNM INTO-INT3 Control Registers These registers are the control words for the four external input pins. Figure 28 shows the format of the INTO and INT1 Control registers; Figure 29 shows the EOI Register format of the INT2 and INT3 Control registers. In The end of the interrupt register is a command regis- cascade mode or special fully nested mode, the con- ter which can only be written into. The format of this trol words for INT2 and INT3 are not used. register is shown in Figure 30. It initiates an EOI command when written to by the 80186 CPU. The bits in the various control registers are encoded as follows: The bits in the EOI register are encoded as follows: PRO-2: Priority programming information. Highest Sx: Encoded information that specifies an in- Priority = 000, Lowest Priority = 111 terrupt source vector type as shown in Table 4. For example, to reset the In-Service LTM: Level-trigger mode bit. 1 =' level-triggered; bit for DMA channel 0, these bits should be o = edge-triggered. Interrupt Input levels set to 01010, since the vector type for DMA are active high. In level-triggered mode, an channel 0 is 10. Note that to reset the single interrupt·is generated whenever the exter- In-Service bit for any of the three timers, the nal line is higH. In edge-triggered mode, an vector type for timer 0 (8) should be written interrupt will be generated only when this in this register. 15 14 4 3 2 1 0 I 0 0 Figure 27. Tlmer/DMA Control Register Formats 15 14 76543210 o I 0 I o ISFNMI c I LTM I MSK IpR2 I PR1 I PRO I Figure 28. INTO/INT1 Control Register Formats 15 14 5 4 3 2 1 0 o I 0 Figure 29. IN:r2lINT3 Control Register Formats 3-55 AFN·022178 iAPX 186 NSPEC/: A bit that determines the type of EOI com- Because of pin limitations caused by the need to SPEC mand. Nonspecific = 1, Specific = O. interface to an external 8259A master, the internal interrupt controller will no longer accept external Poll and Poll Status Registers inputs. There are however, enough 80186 interrupt These registers contain polling information. The for- controller inputs (internally) to dedicate one to each mat of these registers is shown in Figure 31. They can timer. In this mode, each timer Interrupt source has only be read. Reading the Poll register constitutes a its own mask bit, IS bit, and control word. software poll. This will set the IS bit of the highest priority pending interrupt. Reading the poll status The iRMX 86 operating system requires peripherals register will not set the IS bit of the highest priority to be assigned fixed priority levels. This is incom- pending interrupt; only the status of pending inter- patible with the normal operation of the 80186 inter- rupts will be provided. rupt controller. Therefore, the initialization software must program the proper priority levels for each Encoding of the Poll and Poll Status register bits are source. The required priority levels for the internal as follows: interrupt sources in iRMX mode are shown in Table 16. Sx: Encoded information that indicates the vector type of the highest priority interrupt- ing source. Valid only when INTREQ = 1. Table 16. Internal Source Priority Level INTREQ:This bit determines if an interrupt request is Priority Level Interrupt Source present. Interrupt Request = 1; no Interrupt Timer 0 0 Request = O. 1 (reserved) 2 DMAO iRMX 86 COMPATIBILITY MODE 3 DMA 1 4 Timer 1 5 Timer 2 This mode allows iRMX 86-80186 compatibility. The interrupt model of iRMX 86 requires one master and multiple slave 8259As in cascaded fashion. When iRMX mode is used, the internal 80186 interrupt con- These level assignments must remain fixed in the troller will be used as a slave controller to an external iRMX 86 mode of operation. master interrupt controller. The internal 80186 re- sources will be monitored through the internal inter- rupt controller, while the external controller iRMX 86 Mode External Interface functions as the system master interrupt controller. The configuration of the 80186 with respect to an Upon reset, the 80186 interrupt controller will be in external 8259A master is shown in Figure 32. The the non-iRMX 86 mode of operation. To set the con- iNTO input is used as the 80186 CPU interrupt input. troller in the iRMX 86 mode, bit 14 of the Relocation INT3 functions as an output to send the 80186 slave- Register should be set. interrupt-request to one of the 8 master-PIC-inputs. 15 14 13 4 0 Figure 30. EOI Register Format 15 14 13 5 4 3 2 Figure 31. Poll Register Format 3-56 AFN·022178 iAPX 186 8259A MASTER 80186 INT. IN INTA IRO <== REQUESTS FROM OTHER SLAVES INT 1 IR7 -- 80186 INTO r::. CASO-2 ~> t.. INTl SLAVE SELECT I CASCADE ADDRESS DECODER INT2 f--- I 80186 SLAVE INTERRUPT OUTPUT INT3 Figure 32. iRMX 86 Interrupt Controller Interconnection Correct master-slave interface requires decoding of Specific End-of-Interrupt the slave addresses (CASO-2). Slave 8259As do this internally. Because of pin limitations, the 80186 slave In iRMX mode the specific EOI command operates to address will have to be decoded externally. INn is reset an in-service bit of a specific priority. The user used as a slave-select input. Note that the slave vec- supplies a 3-bit priority-level value that points to an tor address is transferred internally, but the READY in-service bit to be reset. The command is executed input must be supplied externally. by writing the correct value in the Specific EOI regis- ter at offset 22H. INT2 is used as an acknowledge.o!Jtput, suitable to drive the INTA input of an 8259A. Interrupt Controller Registers in the iRMX 86 Mode Interrupt Nesting All control and command registers are located inside iRMX 86 mode operation allows nestjng of interrupt the internal peripheral control block. Figure 33 requests. When an interrupt is acknowledged, the shows the offsets of these registers. priority logic masks, off all priority levels except those with equal or higher priority. End-ot-Interrupt Register The end-of-interrupt register is a command register Vector Generation in the iRMX 86 Mode which can only be written. The format of this register is shown in Figure 34. It initiates an EOI command Vector generation in iRMX mode is exactly like that of when written by the 80186 CPU. an 8259A slave. The interrupt controller generates an 8-bit vector which the CPU multiplies by four and The bits in the EOI register are encoded as follows: uses as an address into a vector table. The significant five bits of the vector ,are user-programmable while 4: Encoded value indicating the priority of the the lower three bits are generated by the priority IS bit to be reset. logic. These bits represent the encoding of the priority level requesting service. The significant five In-Service Register bits of the vector are programmed by writing to the This register can be read from or written into. It Interrupt Vector register at offset ~OH. contains the in-service bit for each of the internal 3-57 AFN·02217B inter iAPX 186 interrupt sources. The format for this register is prx: 3-bit encoded field indicating a priority level shown in Figure 35. Bit positions 2 and 3 correspond for the source; note that each source must to the DMA channels; positions D, 4, and 5 corre- be programmed at specified levels. spond to the integral timers. The source's IS bit is set msk: mask bit for the priority level indicated by prx when the processor acknowledges its interrupt re- , bits. quest. Interrupt Request Register OFFSET LEVEL 5 CONTROL REGISTER This register indicates which internal peripherals (TIMER 2) 3AH have interrupt requests pending. The format of this LEVEL 4 CONTROL REGISTER register is shown in Figure 35. The interrupt request (TIMER 1) 38H bits are set when a request arrives from an internal source, and are reset when the ptocessor acknowl- LEVEL 3 CONTROL REGISTER 36H (DMA1) edges the request. LEVEL 2 CONTROL REGISTER (DMAO) 34H Mask Register This register contains a mask bit for each interrupt LEVEL 0 CONTROL REGISTER 32H (TIMER 0) , source. The format for this register is shown in Fig- ure 35. If the bit in this register corresponding to a INTERRUPT sTATUS REGISTER 30H particular interrupt source is set, any interrupts from that source will be masked. These mask bits are INTERRUPT·REQUEST REGISTER 2EH exactly the same bits which are used in the individual control registers, i.e., changing the state of a mask IN-8ERVICE REGISTER 2CH bit in this register will also change the state of the mask bit in the individual interrupt control register PRIORrrY-LEVEL MASK REGISTER 2AH corresponding to the bit. MASK REGISTER 28H Control Registers These registers are the control words for all the inter- SPECIFIC EOI REGISTER 22H nal interrupt sources. The format of these registers is, shown in Figure 36. Each of the timers and both of INTERRUPT VECTOR REGISTER 20H the DMA channels have their own Control Register. The bits of the Control Registers are encoded as Figure 33. Internipt Controller Registers follows: (iRMX 86 Mode) Figure 34. Specific EOI Register Format 15 14 '13 Figure 35. In-Service, Interrupt Request, and Mask Register Format 3-58 AFN·02217B inter iAPX 186 Interrupt Vector Register Interrupt Controller and Reset This register provides the upper five bits of the inter- rupt vector address. The format of this register is Upon RESET, the interrupt controller will perform the shown in Figure 37. The interrupt controller itself following actions: provides the lower three bits of the interrupt vector as' determined by the priority level of the interrupt • All SFNM bits reset to 0, implying Fully Nested request. Mode. The format of the bits in this register is: • All PR bits in the various control registers set to 1. tx: 5-bit field indicating the upper five bits of the This places all sources at lowest priority (level vector address. 111 ). Priorlty·Level Mask Register • All LTM bits reset to 0, resulting in edge-sense This register indicates the lowest priority-level inter- mode. rupt which will be serviced. • All Interrupt Service bits reset to O. The encoding of the bits in this register is: • All Interrupt Request bits reset to O. Illx: 3-bit encoded field indication priority-level value. All levels of lower priority will be • All MSK (Interrupt Mask) bits set to 1 (mask). masked. • All C (Cascade) bits reset to 0 (non-cascade). Interrupt Status Register • All PRM (Priority Mask) bits set to 1, implying no This register is defined exactly as in Non·iRMX levels masked. Mode. (See Fig. 26.) • Initialized to non-iRMX 86 mode. I':'H ~ H 15 14 13 1 : 1 : 1 : 1 : 1 : Figure 36. Control Word Format 1 : 1 : 1 : 1 : 1 : 1 : 1 : I: 1 : 1 Figure 37. Interrupt Vector Register Format 15 t4 13 I· I· I· I Figure 38. Priority Level Mask Register 3-59 AFN·02217B iAPX 186 Vee Xl X2 ucs~~-------------------------I ADO- .A- AD15 ~ ALE f - - F ~ 8282 OR STB 8283 LATCH OE ~ - r ADDRESS ,------_1 RESET ROM ~--{~~ 80186 ( RI) I---------j WR I - - - - - - - j r PROGRAM RAM I NMlh HOLD,* LOW RAM res I - - - - - - - j I ,TMRINO-....+5V I ( TMR OUT o l - - - - - - i , CLOCK DTIR PCSO All---.----i A21--t-~----j INTO .....-t---t-----j I DISK INTERFACE ~8 ~ 0 DISK INT1 .....--------------------_j HARDWARE PCS4~--------------------·1 DRQO~--------------------_j Figure 39. Typical iAPX 186 Computer 3-60 AFN-022178 inter iAPX 186 16 MHz rO~ Vee Xl X2 UCS CS fls RD RESET ROM r:=- .l RES 8282 OR 8283 Llf ~ r-----V LATCH STB OE STS OE LOW ALE + ~ RAM LeS CS BHE WR /\ ADO-AD19 b 8282 OR 8283 , LATCH STB OE ADDRESS BUS 80186 ~~- STB OE t t NMI HOLD ~ '-~ 8286 OR 8287 TRANSCEIVER 1 > DATA BUS +-~- MULTI MAST ER ~ CLKOUT 1 DT/A SYSTEM BUS CLK - ALE 8286 SO-52 BUS > BUS CONTROL SO-S2 ,v CONTROLLER COMMANDS r-r-- ~ CEN lOB AEN ~ 1 [ ----=> SO-S2 AEN 8289 CLK AR~;ER ;> ~~~Ti~~~ION -----<- PCSO SYSB/RESB PCSl lOB LOCK LOCK RESB l.+SV SRDY r- GND ARDY L "'-J XACK Figure 40. Typical iAPX 186 Multi·Master Bus Interface 3·61 AFN·022178 IAPX 186 PACKAGE NOTE: The lOT 3M Textool sa-pin JEOEC Socket The 80186 is housed in a 68-pin, lead less JEOEC type Is required for 12 ICETM·186 operatton.1 See ,Figure A hermetic chip carrier. Figure 41 illustrates the 42'for details. package dimensions. --lI F·094 (2.39) .050 II ~~:) .130 (3.30) .880 (24.38) Figure 41. 80186 JEDEC Type A Package 3-62 AFN·02217B intJ iAPX 186 268-5400-00 \0 268-5400-51 GUIDE BOSS 1 - - - - - - - ~;~ ~ 50--------1'1 I 3 PLes INDEX 1 -'i.--P=$O>I-_-j-_--+l+I----, 4i..-~FRONT PC BOARD PATTERN 'i\:SOCKET ORIENTATION PIN ~. ,. ~ ,PINN01 I '- ~1:1:~-r:l!l!~~ +0 • ~I C/ :~~~ATION..r+I FRONT ~ PIN ClR HOLE-I""i1 ~ VoLUMINUM LID DEVICE PADS ~ FORI .G2I OIA¥"+'I 100 (HEATSINK PROYISIONS OPTIONAL) -V7+1O.74)-.r.:-'i. (2SA) SHOWN FOR CONTACT LOCATION ~ I !+ J' I .r;1 .r+1 ~:) I TVP ~~~~~ ~\>-~~~~~~~-7} .!9.!! (0.38) L .Jo ~(2.54) 1):i .~ili'ili"~'ili.ili'ili'. .020::J (20.32) 1.00 TVP . OPEN 10.51) 8 5PCU.l00TOL NON ACCUM TVP 4 PLCS (2.54) CONTACT TAIL Figure 42. Textool 68 Lead Chip Carrier Socket 3-63 AFN·02217B inter iAPX 186 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and Ambient Temperature u'nder Bias ..... O°C to 70°C functional operation of the device at these or any Storage Temperature ........... -65°C to +150"C other conditions above those indicated in the opera- Voltage on Any Pin with tional sections of this specification is not implied. Respect to Ground .............. -1.0V to +7V Exposure to absolute maximum rating conditions Power Dissipation ........................ 3 Watt for extended periods may affect device reliability. D.C. CHARACTERISTICS (TA = OO-70°C;Vee k 5V ±100..4) Symbol Parameter Min. Max. Units Test Conditions VIL Input Low Voltage -0.5 +0.8 Volts VIH Input High Voltage 2.0 Vee + 0.5 Volts (All except X1 and RES) VIH1 Input High Voltage (RES) TBD Vee + 0.5 Volts VOL Output Low Voltage 0.45 . Volts la ;: 2.5 rnA for SO-S2 la = 2.0 rnA for all other outputs VOH Output High Voltage 2.4 Volts loa = -400 !LA ICC Power Supply Current 550 mA TA = 25°C III Input Leakage Current ±10 !LA OV < VIN < Vee ILO Output Leakage Current ±10 !LA 0.45V < VOUT < Vee VeLO Clock Output Low 0.6 Volts la = 2.5 rnA VeHO Clock Output High 4.0 Volts loa = -200 !LA VeLi Clock Input Low Voltage -0.5 0.6 Volts VeHI Clock Input High Voltage 3.9 Vee + 1.0 Volts GIN Input Capacitance 10 pF Cro 1/0 Capacitance 20 pF PIN TIMINGS A.C. CHARACTERISTICS (TA;: 0°-70°C. Vee = 5V ± 10%) 80186 Timing Requirements All Timings Measured At 1.5 Volts Unless Otherwise Noted. Symbol Parameter Min. Max. Units Test Conditions TDVCL Data in Setup (ND) 20 ns TGLDX Data in Hold (AID) 10 ns TARYHCH Asynchronous Ready (AREADY) active setup time' 20 ns TARYLCL AREADY inactive setup time 35 ns TCHARYX AREADY hold time 15 ns TSRYCL Synchronous Ready (SREADY) transition setup time 35 ns TGLSRY SREADY transition hold time 15 ns THVCL HOLD Setup' 25 ns TINVCH INTR. NMI. TEST, TIMERIN, Setup' 25 ns TINVCL DRQO, DRQ1, Setup' 25 ns 'To guarantee recognition at next clock. 3-64 AFN·02217B iAPX 186 A.C. CHARACTERISTICS (Continued) 80186 Master Interface Timing Responses Symbol Parameter Min. Max. Units Test Conditions TClAV Address Valid Delay 10 44 ns CL = 20-200 pF all outputs TClAX Address Hold 10 ns TClAZ Address Float Delay TClAX 35 ns -- TCHCZ Command Lines Float Delay 45 ns TCHCV Command Lines Valid Delay (after float) 55 ns TlHll ALE Width TClCl-35 ns TCHlH ALE Active Delay 35 ns TCHll ALE Inactive Delay 35 ns TllAX Address Hold to ALE Inactive TCHCl-25 ns TClDV Data Valid Delay 10 44 ns TClDOX Data Hold Time 10 ns TWHDX Data Hold after WR TClCl-40 ns TCVCTV Control Active Delay1 10 70 ns TCHCTV Control Active Delay2 10 55 ns TCVCTX Control Inactive Delay 10 55 ns TAZRl Address Float to RD Active 0 ns TClRl RD Active Delay 10 70 ns TClRH RD Inactive Delay 10 55 ' ns TRHAV RD Inactive to Address Active TClCL-40 ns TClHAV HlDA Valid Delay 10 50 ns TRlRH RD Width 2TClCl-50 ns TWlWH WR Width 2TClCl-40 ns TAVAl Address Valid to ALE low TClCH-25 ns TCHSV Status Active Delay 10 55 ns TClSH Status Inactive Delay 10 55 ns TClTMV Timer Output Delay 60 ns 100 pI max TClRO Reset Delay 60 ns TCHQSV Queue Status Delay 35 ns 80186 Chip·Select Timing Responses Symbol Parameter Min. Max. Units Test Conditions TClCSV Chip-Select Active Delay 66 ns TCXCSX Chip-Select Hold from Command Inactive 35 ns TCHCSX Chip-Select Inactive Delay 10 35 ns 3-65 AFN-02217B iAPX 186 A.C. CHARACTERISTICS (Continued) 80186 ClKIN Requirements Symbol Parameter Min. Max. Units Test Conditions TCKIN ClKIN Period 62.5 250 ns TCKHl ClKIN Fall Time 10 ns 3.5 to 1.0 volts TCKlH ClKIN Rise Time 10 ns 1.0 to 3.5 volts TClCK ClKIN low Time 25 ns 1.5 volts TCHCK ClKIN High Time 25 ns 1.5 volts 80186 ClKOUT Timing (200 pF load) Syt;nbol Parameter Min. Max. Units Test Conditions TCICO ClKIN to ClKOUT Skew 50 ns TClCl ClKOUT Period 125 500 ns TClCH ClKOUT low Time V. TCLCL-7.5 ns 1.5 volts TCHCl ClKOUT HighTime V. TClCl-7.5 ns 1.5 volts -- TCH1CH2 ClKOUT Rise Time 15 ns 1.0 to 3.5 volts TCl2Cll ClKOUT Fall Time 15 ns 3.5 to 1.0 volts 3-66 AFN-02217B IAPX 186 WAVEFORMS MAJOR CYCLE TIMING --~LJ ~... Rt=;,:J T, T3 ' Tw CLKOUT ~ ~ 1 - " ' - ,., ~ y--1.!C'!SlI\----I CL • ...,... ~ _ r -TCLSH 52·SO It s.," TC ~AV __ I-TC LAX::: II ... Ie, CUl' \ i:= S,-53 --- ") ~!CHCZ NOTE 1 ./1 I -1-' i ... A LE ~~ ~ f.T~ ,~L,: WRITE CYCLE TCH~ AD,5-A Do CLI~ I..... T, -... - I:: I A15~AO r\. DATAOU' TI;LAZ_ TCI R t-- ~ ~~ ~TE I~- ',""'" j .... TLLAl RQ,INTA, !lT/R ~ VOH N ........- 1- , .. ... ~ R J --+ ,i - TCLAZ ·'::.!.':'L~7 I/-!I'~ I- :CLDX \ A~ ".n, AD,5-A Do FLOAT 1 FLOAT INTACYCLE DTIii -=:t-----..I· -\ I TCHCTV I~ !l- I~ TA --- ~ NOTE 2 V .,..} II ..-.. -~ ......... A _ f-J DE N KI 50Fn"[ARE HALT-DE~ ~Vo Co RD, WR, INTA, DT/R ~ VOH PCS, TCLAV __ i'I~ IAQDRE55 MCS TCHC ~X_ I- s, [C ~ _TCLCSV MCS --+ TCXCSX--+ ,7- 3-67 AFN·022'7B inter iAPX 186 WAVEFORMS (Continued) MAJOR CYCLE TIMING (Continued) CLKOUT ~.~ --~----t------+-----r----~r----+--~~~~~r------r------------ BHE/S7,A19/S6-Al61S3 ALE TCHLH READ CYCLE RD DT/R DEN PCS, MCS ---------r~ LCS, MCS NOTES Followmg a Write cycle, the Local Bus IS floated by the 80186 only when the 80186 enters a "Hold Acknowledge" state . 2 INTA occurs one clock later In RMX·mode 3 Status inactive Just prior to T4 3-68 AFN-02217B inter IAPX 186 WAVEFORMS (Continued) CLKOUT - - TCLAV - TCLAV CLKOUT ,.m, INTD-3 TIMERIN CLKOUT QSO,QS1 3-69 AFN·02217B IAPX 186 WAVEFORMS (Continued) HOLD-HLDA TIMING CLKOUT ARDY TARYLCL CLKOUT SRDY T, C L K O U T : 8 •• THVCL _ , .. -1--+- HOLD HLDA AD15-ADO - - - - --, - I--TCLAV 80188 }--- _ _ oJ 80188 1iDI---- A191S6-A161S3, - - - - RI), Wft, 80188 }--- --, _ _ oJ TCHCV r- 80188 BHE,---- DT/ii, S2-SO 3-70 AFN-02217B IAPX 186 WAVEFORMS (Continued) TIMER ON 80186 CLKIN CLKOUT ~------------TC~L------------~ TINVCH TIMERIN ~~ TIMEROUT 1'4----------------------- 2-6 CLOCKS " --;--------r------'I 80186 INSTRUCTION TIMINGS • All word~data is located on eVen-add ress boundaries. The following instruction timings represent the mini- All jumps and calls include the time required to fetch mum execution -time in clock cycles for each instruc- the opcode of the next instruction at the destination tion. The timings given are based on the following address. assumptions: • The opcode, along with any data or displacement All instructions which involve memory reference can required for execution of a particular instruction, require one (and in some cases, two) additional has been prefetched and resides in the queue at clocks above the minimum timings shown. This is the time it is needed. due to the asynchronous nature of the handshake • No wait states or bus HOLDS occur. between the BIU and the Execution unit. AFN-02217B 3-71 iAPX186 INSTRUCTION SET SUMMARY Clock FUNCTION FORMAT 'Cycles Comments DATA TRANSFER MOV = Move: RegISter to ReglSter/Memory 11 000100w mod reg rim 2/12 Register/memory to register 11 000101w mod reg rim 2/9 Immediate to register/memory 11 1 0 0 0 1 1 w modOOO rim data datarfw = 1 12-13 8/16-bit Immediate to register 11 01 1 w reg data datarf w= 1 3-4 8/16-bit Memory to accumulator 11 010000w addr-Iow addr-hlgh 9 Accumulator to memory 11 010001w addr-Iow addr-hlgh 8 Register/memory to segment register 11 00 0 1 1 1 0 mod 0 reg rim 2/9 Segment register to register/memory 11 00 0 1 1 0 0 mod 0 reg rim 2/11 PUSH = Push' Memory 11 1 1 1 1 1 1 1 mod 11 0 rim 16 Register 10 1 0 1 0 reg 10 Segment regISter Ia 0 0 reg 1 1 0 I 9 '··~~.:;~!l\:;:;h;;:;i~lti;:;;;:;~:fiI;;;i;p~;,o;i;i.~)~W~'~J~l:r::""·J.'""':i"C1,M=;j'!", ·t" (; :'l1l,.!7l'r~17lJji;:$;.:1: '·TI;;.~!il:·;";i:4m7-l(!l11i;.:~1i~:;:;~~~!\~~.*~:{~'J;./~tJ~j{~l\tiWt;;i{JJ~~~~:~ POP = Pop: Memory 11 00 0 1 11 11 modOOO rim 20 Register 10 1 0 1 1 reg I 10 Segment register o 10 0 reg 1111 (reg-l-01) 8 .~~~"{" XCHG = Exchange: Register/memory with register 11 000011wl mod reg rim 4/17 Register with accumulator 11 00 1 0 reg I 3 tN = Input trom: FIXed port 11 1 1 0 0 1 0 w I port 10 Vanable port 11 1 1 0 1 lOw I 8 OUT = Outpulto: Fixed port 11 1 1 0 0 1 1 wi port 9 Vanable port 11 1 1 0 1 1 1 wi 7 XLAT = Translate byte to AL 11 1 0 1 0 1 1 11 11 LEA = Load EA to regISter I mod reg rim I 11 00 0 1 1 0 1 6 LOS = Load pOinter 10 OS I mod reg rim I 11 1 a 0 0 1 0 1 (mod -I- 11) 18 LES = Load pOlnterto ES 11 10001001 mod reg rim I (mod -I- 11) 18 LAHF = Load AH with flags 11 00 1 1 1111 2 SAHF = Store AH Into flags 11 00 1 1 1 1 0 I 3 PUSHF = Push flags 11 00 1 1 1 0 0 I 9 POPF = Pop flags 11 00 1 1 1 0 1 I 8 8EGMENT=Segment Override: CS Ia 0 1 0 1 1 1 a I 2 S8 10 0 1 1 a 1 1 0 I 2 os 10 0 1 1 1 1 1 0 I 2 ES 1001001101 2 Shaded areas indicate instructions not available in iAPX 86, 88 microsystems. 3-72 AFN'02217B iAPX 186 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments ARITHMETIC ADD = Add: Reglmemory wllh reglSler 10 either I mod reg rim I 10 00 0 0 0 d W 3/10 Immediate to register/memory 1100000swi mod 0 0 0 rim I data I data II s W ~ 01 I 4/16 Immediate to accumulator 10000010wl data I datalfw=1 I 3/4 8/16-bit ADC = Add with carry: Reg/memory with register to either 1000100dwi mod reg rim I 3/10 Immediate to register/memory 11 00000 s wi mod 0 1 0 rim I data I data II s w-Ol I 4/16 Immediate to accumulator 10001010wl data I datallw~1 I 3/4 8/16-bit INC:;;; Increment: Register/memory 11 111111 wi modOOO rim I 3/15 Register 10 1 0 0 0 reg I 3 SUB = Subtract: Reglmemory and regISter to either 1001010dwi mod reg rim I 3/10 Immediate from register/memory 1100000swi mod 1 01 rim I data I datallsw~OI I 4/16 8/16-bit Immediate from accumulator 10010110wl data I data Ilw= 1 I 3/4 SBB = Subtract with borrow: Reg/memory and register to either 1000110dwi mod reg rim I 3/10 Immediate from register/memory 11 OOOOOs wi modOll rim I data I datallsw~OI I 4/16 Immediate from accumulator 10001110wl data I datallw~1 I 3/4 8/16-bit DEC = Decrement· Register/memory 11 111111 wi mod 00 1 rim I 3/15 RegISter 10 1 0 0 1 reg I 3 CMP = Compare' ReglSterlmemory with regISter 10 0 1 1 101 w mod reg I rim 3/10 Register with register/memory 10 0 1 1 1 00 w mod reg I rim 3/10 Immediate with register/memory 1100000sw mod 111 rim I data I data lis w~O 1 I 3/10 Immediate with accumulator 10 0 1 1 1 lOw data I datallw~1 I 3/4 8/16-bit NEG = Change Sign 11 1 1 1 0 1 1 w mod 0 11 rim I 3 AM= ASCII adlust!or add 10 0 1 1 0 1 1 1 / 8 DAA~ DeCimal adlust lor add 10 o 1 0 0 1 1 1 4 AAS ~ ASCII adlust lorsubtract 10 o 1 1 1 1 1 1 7 DAS = DeCimal adlust lor subtract 10 o 1 0 1 1 1 1 4 MUL ~ Multiply (unSigned) RegISter-Byte 11 1 1 1 0 1 1 w mod 1 00 rim I 26-28 RegISter-Word 35-37 Memory-Byte 32-34 Memory-Word 41-43 I IMUL ~ Integer multiply (Signed) RegISter-Byte 11 1 1 1 0 1 1 wi mod 1 01 rim I 25-28 RegISter-Word 34-37 Memory-Byte 31-34 Memory-Word 40-43 ,~, ,li!f;l~ tm :'iC_lIIO',l!l1i il'/i.;: ~~_;:::r' !~':;;). '~: rr;:':\,; ~r~:,;;;- :'0, ,",r" ,r.'i.":":""" '.'I:',S',:':; :'j:,,:, ',r';' :'r,';; ':,'ji"'m,?,'" '.t:;;;>:;, ?::>It?0:!;i:Y!ll!r;:jI;~ ~~, DlV ~ D,vide (unSigned) RegISter-Byte 11 1 1 1 0 1 1 wi mod 11 0 rim I 29 RegISter-Word 38 Memory-Byte 35 Memory-Word 44 Shaded areas indicate instructions not available in iAPX 86, 88 microsystems. 3-73 AFN-02217B IAPX 186 INSTRUCTION SET SUMMARY Clock FUNCTION FORMAT Cycles Comments IDIV ~ Integer divide (signed) 11 l i t 011 wi madill rim 44-52 Register-Byte Register-Word 53-61 Memory-Byte 50-58 _Memory-Word 59-67 AAM ~ ASCII adlust lor multiply 11 10101001000010101 19 AAO = ASCII adlustlor divide 11 10101011000010101 t5 caw ~ Convert byte to word 11 00110001 2 cwo ~ Convert word to double word 11 00 1 1 00 1 I 4 LOGIC Shl1llRolate Insltuclions: ReglsterlMemory by 1 11 101000wl mod TIT rim 2/15 ReglsterlMemory by Cl 11 1 0 1 001 w I mod m rim 5+n/17+n m Inslruclion o0 0 ROl o0 1 ROR o1 0 RCl 01 1 RCR 1 0 0 SHUSAl 101 SHR 111 SAR ANO=And: Reglmemory and register to either 1001000dwi mod reg rim 3/10 Immediate to reglsterlmemOry 11000000wl mod 1 00 rim data datallw=1 4/16 Immediate to accumulator 10010010wl data datallw = 1 3/4 al16-bit TEST = And lunclion to Ilags, no res~lt: Register/memory and register 11 000010wi mod reg rim 3/10 Immediate data and reglsterlmemory 11 11 1 011 wi modOOO rim data datallw~1 4/10 Immediate data and accumulator I-I 0 1 0 1 0 0 w I data datallw~ 1 3/4 8/16-bit OR=Or' Reglmemory and register to either 1000010d w i mod reg rim 3/10 Immediate to reglsterlmemory 11000000wl modOOl rim data datallw=1 4/16 Immediate to accumulator 10000110wi data datallw~1 3/4 8/16-bit XOR = Exclusive or: Reglmemory and reglsterto either 1001100dwi mod reg rim 3/10 Immediate to reglsterlmemory 11000000wl mod 11 0 rim data datallw~1 4/16 Immediate to accumulator 10011010wl data datallw~ 1 " 3/4 8/16-bit NOT ~ Invert reglsterlmemory 11 11 1 01 1 wi modOl0 rim 3 STRING MANIPULATION: MOVS ~ Move byte/word 11 010010wl 1~ eMPS ~ Compare byte/word 11 01 00 1 1 wi 22 SCAS ~ Scan bytelword 15 lOOS = load byte/wd to AUAX 12 Shaded areas indicate instructions not available in iAPX 86,88 microsystems. 3-74 AFN·02217B inter IAPX 186 INSTRUCTION SET SUMMARY Clock FUNCTION FORMAT Cycles Comments Repeated by count In CX MOVS - Move string 11 1 1 1 0 0 1 1101oo10wl 8+8n CMPS - Compare string 11 1 1 1 0 0 1 zl1010011wl 5+22n SCAS - Scan string 11 1 1 1 0 0 1 z 11 0 1 0 1 1 1 wi 5+15n LOOS - Load string 11 1 1 1 0 0 1 6+11n 11 6+9n = CALL Call: Direct within segment 11 1 1 0 1 00 dlsp-Iow dlSp-hlgh 14' Re~lster/memory 11 111 111 mod 0 1 0 Tim 13/19 mdlrect wlthm segment Direct Intersegment 11 00 1 1 0 1 segment offset 23 segment selector Indirect Intersegment 11 1111111 mod 0 11 r'm (mod + 11) 38 = JMP Uncondllionallump: Short/long 11 1 1 0 1 0 1 dlsp-Iow 13 Direct wlthm segment 11 1 1 0 1 0 0 dlsp-Iow dlsp-hlgh 13 Register/memory. mdlrect within segment 11 111111 modl00 Tim 11/17 Direct mtersegment 11 1 1 0 1 0 1 o I segmenloffsel 13 I segment selector Indirect Intersegment 11 1111111 mod 1 01 r,m (mod ~ 11) 26 RET = Return trom CALL: Within segment 11 1 0 0 0 0 1 11 16 Within seg adding Immed to SP 11 1 0 0 0 0 1 01 data-low data-high 18 lntersegment 11 1 0 0 1 0 1 1 I 22 Intersegment adding Immediate to SP 11 1 0 0 1 0 1 oI data-low data-high 25 Shaded areas indicate Instructions not available In iAPX 86, 88 microsystems 3-75 AFN-02217B iAPX 186 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments CO"TROL TRANSFER (Contmued): JE/JZ = Jump on equallzero 10 1 1 1 0 1 0 0 disp 4/13 13 if JMP JL/JNGE = Jump on less/notgreaterorequal 10 1 1 1 1 1 0 0 dlSp 4/13 taken , JLE/JNG ~ Jump on less orequalmol grealer 10 1 1 1 1 1 1 0 dlSp 4 if JMP 4/13 not taken JB/JNAE ~ Jump on belowinol above or equal 10 1 1 1 0 0 1 0 drsp 4/13 JBE/JNA ~ Jump on below or equallnol above 10 1 1 1 0 1 1 0 dlSp 4/13 JP/JPE ~ Jump on pan~lpan~ even 10 1 1 1 1 0 1 0 dlSp 4/13 JO~Jumponovertlow 101110000 dlSp 4/13 JS~Jumpon,Slgn 10 1 1 1 1 00 0 dlSp 4/13 JNE/JNZ ~ Jump on nol equallnotzero 10 1 1 1 0 1 0 1 dlSp 4/13 JNL/JGE ~ Jump on nollossigrealerorequal 10 1 1 1 1 1 0 1 dlSp 4/13 JNLE/JG ~ Jump on notless or equallgrealer 10 1 1 1 1 1 1 1 dlSp 4/13 JNBIJAE ~ Jump on nol belowlabove or equal 10 1 1 1 0 0 1 dlSp 4/13 JNBE/JA = Jump on not below Of equal/above 10 1 1 1 0 1 1 1 dlSp 4/13 JNP/JPO ~ Jump on nol par!parodd 10 1 1 1 1 0 1 1 I dlSp 4/13 JNO ~Jumponnoloverllow 10 1 1 1 0 00 1 dlSp 4/13 JNS ~ Jump on notslgn 10 1 1 1 1 0 0 1 dlSp 4/13 LOOP ~ loop ex limes 11 1 1 0 0 0 1 0 dlSp 5/15 LOOPZlLOOPE ~ loopwhllezerolequal 11 1 1 0 0 0 0 1 dlSp 6/16 6/16 LOOPNZILOOPNE ~ Loop While nolzerolequal 11 1100000 dlsp 16 JMP taken/ JCXZ ~ Jump on ex ,ero 11 1 1 0 0 0 1 1 dlSp 5 JMP not taken ENTER ';,EnIW ~,q~~ i'. L~O ' ~ 'I ' 1\;u.vE "'Leave ~m:" INT; Interrupt: Type speclf19d 11 1 0 0 1 1 0 II type 47 Type 3 11 1 0 0 1 1 0 0 I 45 if INT. taken/ INTO ~ Interrupt on overflow 11 1 0 0 1 1 1 01 48/4 if INT. not taken IRET ~ Interrupt return 11 1 0 0 1 1 1 11 28 "BOutm~ DtItlletvall(e outllfralllit" Shaded areas indicate instructions not available in iAPX 86.88 microsystems. 3-76 AFN·02217B IAPX186 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments PROCESSOR CONTROL CLC = Clear carry 11 1 1 1 1 00 0 2 CMC = Complement carry 11 1 1 1 0 1 0 1 2 src = Set carry 11 1 1 1 1 00 1 2 CLO = Clear direction 11 1 1 1 1 1 0 0 2 sm = Set d"ectlOn 11 1 1 1 1 1 0 1 2 CLI = Clear Interrupt 11 1 1 1 1 0 1 0 2 STI = Set Interrupt 11 1 1 1 1 01 1 2 HLT=Halt 11 1 1 1 0 1 0 0 2 WAIT = Walt 11 00 1 1 0 1 1 6 if test = 0 LOCK = Bus lock pref,. 11 1 1 1 0 0 0 0 2 ESC = Processor Extension Escape 110011TTT mod LLL rim I 6 [TTl LLL are opcode to processor extension) Shaded areas indicate instructions not available in iAPX 86,88 microsystems. 3-77 AFN·02217B inter IAPX 186 FOOTNOTES The effective Address (EA) of the memory operand is REG is assigned according to the following table: computed according to the mod and rim fields: 16-Bit(w = 1) 8-Bit(w = 0) 000 AX 000 AL - if mod = 11 then rim is treated as a REG field 001 CX 001 CL if mod = 00 then OISP = 0', disp-Iow and disp-high 010 OX 010 OL are absent 011 BX 011 BL if mod = 01 then OISP = disp-Iow sign-extended to 100 SP 100 AH 16-bits, disp-high is absent 101 BP 101 CH ifmod = 10then OISP = disp-high: disp-Iow 110 SI 110 OH 111 01 111 BH if rim = 000 then EA = (BX) + (SI) + OISP if rim = 001 then EA = (BX) + (01) + OISP if rim = 010 then EA = (BP) + (SI) + OISP The physical addresses of all operands addressed by if rim = 011 then EA = (BP) + (01) + OISP the BP register are computed using the SS segment if rim = 100 then EA = (SI) + OISP register. The physical addresses of the destination op- if rim = 101 then EA = (01) + OISP erands of the string primitive operations (those ad- if rim = 110 then EA = (BP) + OISP' dressed by the 01 register) are computed using the ES segment, which may not be overridden. if rim = 111 then EA = (BX) + OISP OISP follows 2nd byte of instruction (before data if . required) "exceplifmod = 00 and rim = 110lhen EA = disp-hlgh:dlsp-Iow. NOTE: EA CALCULATION TIME IS 4 CLOCK CYCLES FOR ALL MODES. AND IS INCLUDED IN THE EXECUTION TIMES GIVEN WHENEVER APPROPRIATE. SEGMENT OVERRIDE PREFIX 10 0 1 reg 1 1 0 I reg is assigned according to the following: Segment reg Register 00 ES 01 CS 10 SS . 11 OS 3-78 AFN·02217B iAPX 88/10 8-BIT HMOS MICROPROCESSOR 808818088-2 • 8·Blt Data Bus Interface • 8·Blt and 16·Blt Signed and Unsigned Arithmetic In Binary or Decimal, • 16·Blt Internal Architecture Including Multiply and Divide • Mbyte Direct Addressing Capability to 1 of Memory • Compatible ,with 8155-2, 8755A·2 and 8185·2 Multiplexed Peripherals • IAPX Direct Software Compatibility with 86/10 (8086 CPU) . • Two Clock Rates: 5 MHz for 8088 • Symmetrical 14·Word by 16-Blt Register Set with Operations 8 MHz for 8088-2 • Available in EXPRESS • 24 Operand Addressing Modes - Standard Temperature Range - Extended Temperature Range • Byte, Word, and Block Operations The IntelS iAPX 88/10 is a new generation, high performance microprocessor implemented in N-channel, depletion load, silicon gate technology (HMOS), and packaged in a 4D-pili CerDIP package. The processor has attributes of both 8- and 16-bit microprocessors. It is directly compatible with iAPX 86/10 software and 8080/8085 hardware and peripherals. MEMORY INTERFACE C·BUS MIN MODE [:O~E} GND Vee A14 A15 A13 Al61S3 A12 A17/S4 All Al61S5 A1D Al9/S8 CS $SO (HIGH) BUS AS INTERFACE ss AS UN/Mit UNIT OS AD7 lID IP ADS HOLD (liO/G'RI) AD5 HlDA (imllffi) A·BUS AD4 Viii (meR) -AD3 IO/M (52) AD2 DTIR (81) AH Al ADl lim (SO) BH Bl (080) ADO ALE CH Cl DH Dl NMI lIITA (OSI) exECUTION UNIT SP INTR mT BP ClK READY 51 GND RESET 01 FLAGS Figure 1. IAPX 88/10 CPU Functional BIQc~.Dlagram Figure 2. IAPX 88/10 Pin Configuration Intel Corporation A.,um•• No Reaponlibilty for the U•• of Any Circuitry Other Than Circuitry Embodied in an Intel Product No Other Circuit Patent Licen••• .,.Implled @INTEl CORPORATION, 1880 3-79 AFN.(J()II28D iAPX 88/10 Table 1. Pin Description The following pin function descriptions are for·8088 systems ih either minimum or maximum mode. The "local bus" in these descriptions is the direct multiplexed bus interface connection to the 8088 (without regard to additional bus buffers). Symbol Pin No. Type Name and Function AD7-ADO 9-16 I/O Address Data Bus: These lines constitute the time 'multiplexed memory/IO address (T1) and data (T2, T3, Tw, and T4) bus. These lines are active HIGH and float to 3-state OFF during interrupt acknowledge and local bus "hold acknowl- edge". A15-A8 2-8,39 0 Address Bus: These lines provide address bits 8 through 15 for the entire bus cycle (T1-T4). These lines do not have to be latched by ALE to remain valid. A15-A8 are active HIGH and float to 3-state OFF during interrupt acknowledge and local bus "hold acknowledge". A19/86, A 18/85, 34-38 0 Address/Status: During T1, these are the four A17/84, A 16/83 most significant address lines for memory op- erations. During I/O operations, these lines are LOW. During memory and I/O operations, status information is available on these lines during .. r T2, T3, Tw, and T4. 86 is always low. The status of I., CHARACTERISTICS the interrupt enable flag bit (85) is updated at o(LOW} Alternate Oala o 1 Slack the beginning of each clock cycle. 84and 83are 1 (HIGH) 1 0 1 Code or None Data encoded as shown. S6Is0(LOW) This information indicates which segment reg- ister is presently being used for data accessing. These lines float to 3-state OFF during local bus "hold acknowledge". RD 32 0 Read: Read strobe indicates that the processor is performing a memory or I/O read cycle, depending on the state of the 10/fiil pin or 82. This signal is used to read devices which reside on the 8088 local bus. RD is active LOW during T2, T3 and Tw of any read cycle, and is guaranteed to remain HIGH in T2 until the 8088 local bus has floated. This signal floats to 3-state OFF in "hold acknowledge". READY 22 I READY: is the acknowledgement from the addressed memory or I/O device that it will complete the data transfer. The RDY signal from memory or I/O is syn- chronized by the 8284 clock generator to form READY. This signal is active HIGH. The 8088 READY input is not synchronized. Correct operation is not guaranteed if the set up and hold times are not met. INTR 18 I Interrupt Request: is a level triggered input which is sampled during the last clock cycle of each instruction to determine if the processor should enter into an interrupt acknowledge operation. A subroutine is vectored to via an interrupt vector lookup table located in system memory. It can be internally masked by software resetting the interrupt enable bit. INTR is internally synchronized. This signal is active HIGH. TE8T 23 I TEST: input is examined by the "wait for test" instruction. If the TE8T input is LOW, execution continues, otherwise the processor waits in an "idle" state. This input is synchroni;::ed internally during each clock cycle on the leading edge of CLK. NMI 17 I Non-Maskable Interrupt: is an edge triggered input which causes a type 2 interrupt. Asubroufine is vectored to via an interrupt vector lookup table located in system memory. NMI is not maskable internally by software. A transition from a LOW to HIGH initiates the interrupt at the end of the current instruction. This input is internally synchronized. 3-80 AFN·00826D inter iAPX 88/10 Table 1. Pin Description (Continued) Symbol Pin No. Type Name and Function RESET 21 I RESET: causes the processor to immediately terminate its present activity. The Signal must be active HIGH for at least four clock cycles. It restarts execution, as described in the instruction set description, when RESET returns LOW. RESET is internally synchronized. eLK 19 I Clock: provides the basic timing for the processor and bus controller. It is asymmetric with a 33% duty cycle to provide optimized internal timing. Vee 40 Vee: is the +5V ±10% power supply pin'. GND 1,20 GND: are the ground pins. MN/MX 33 I Minimum/Maximum: indicates what mode the processor is to operate in. The two modes are discussed in the following sections. The fol/owing pin function descriptions are for the 8088 minimum mode (i.e., MN/MX = Vee). Only the pin functions which are unique to minimum mode are described; aI/ other pin functions are as described above. 10/M 28 0 Status Line: is an inverted maximum mode 52. It is used to distinguish a memory access from an I/O access. 10/M becomes valid in the T4 preceding a bus cycle and remains valid until the final T4 of the cycle (I/O=HIGH, M=LOW). 10/M floats to 3-state OFF in local bus "hold acknowledge". WR 29 0 Write: strobe indicates that the processor is performing a write memory orwrite I/O cycle, depending on the state of the IO/M signal. WR is active for T2, T3, and Tw of any write cycle. It is active LOW, and floats to 3-state OFF in local bus "hold acknowledge" . INTA 24 0 INTA: is used as a read strobe for interrupt acknowledge cycles. It is active LOW during T2, T3, and Tw of each interrupt acknowledge cycle. ALE 25 0 Address Latch Enable: is provided by the processor to latch the address into the 8282/8283 address latch. It is a HIGH pulse active during clock low of T1 of a~y bus cycle. Note that ALE is never floated. DT/R 27 0 Data Transmit/Receive: is needed in a minimum system that desires to use an 8286/8287 data bus transceiver. It IS used to control the direction of data flow through the transceiver. Logically, DT/R is equivalent to 51 in the maximum mode, and its timing is the same as for 10/M (T=HIGH, R=LOW). This signal floats to 3-state OFF in local "hold acknowledge". DEN 26 0 Data Enable: is provided as an output enable for the 8286/8287 in a minimum system which uses the transceiver. DEN is active LOW during each memory and I/O access, and for INTA cycles. For a read or INTA cycle, it is active from the middle of T2 until the middle of T4, while for a write cycle, it is active from the beginning ofT2 until the middle of T4. DEN floats to 3-state OFF during local bus "hold acknowledge". HOLD,HLDA 30,31 1,0 HOLD: indicates that another master is requesting a local bus "hold". To be acknowledged, HOLD must be active HIGH. The processor receiving the "hold" request will issue HLDA (HIGH) as an acknowledgement, in the middle of a T4 or TI clock cycle. Simultaneous with the issuance of HLDA the processor will float the local bus and control lines. After HOLD is detected as being LOW, the processor lowers HLDA, and when the processor needs to run another cycle, it wjll again drive the local bus and control lines. Hold is not an asynchronous input. External synchronization should be provided if the system cannot otherwise guarantee the set up time. 550 34 0 !)tatus line: is logically equivalent to SO in th~ 101M OTIR SSO CHARACTERISTICS maximum mode. The combination of 550, 10/M , 1 (HIGH) 0 ,, , 0 , ~::,~ ':'~::: 0 and DT/R allows the system to completely de- 0 code the current bus cycle status. ~(COW( 0 , 9~" 0 : ,, , ~::~' 0 0 ''';,,;" 3-81 AFN·OO826D iAPX 88/10 Table 1. Pin Desc~lptlon (Continued) The fol/owing pin function descriptions are for the 8088,8228 system in maximum mode (i.e., MN/MX=GND.) Only the pin functions which are unique to maximum mode are described; al/ other pin functions are as described above. Symbol Pin No. Type Name and Function 82,81,80 26·28 o Status: is active during clock high of T4, T1, and T2, and is retu rned to the passive state, (1,1,1) during T3 or during Tw when READY is HIGH. This status is used by the 8288 bus can· troller to generate all memory and I/O access control signals. Any change by 82, 51, ~r SO during T4 is used to indicate the beginning of a ~(lOW) :1 SoG :~:~u:~::~~::::~~ o 1 Rna I/O pori ~ ~ ~~;~e 1/0 port bus cycle, and the return to the passive state in "" i(HIGH) o 0 Code acce~s T3 or Tw is used to indicate the end of a bus o 1 1 0 Aeadmemory Wnlememory cycle. 1 1 Pa8S,Ye These signals float to 3·state OFF during "hold acknowledge". During the first clock cycle after RE8ET becomes active, these signals are active HIGH. After this first clock, they float to 3·state OFF. RQ/GTO, 30, 31 I/O Request/Grant: pins are used by other local bus masters to force the processor RQ/GT1 to release the local bus at the end of the processor's current bus cycle. Each pin is bidirectional with RQ/GTO having higher priority than RQ/GT1. RQ/GT has an internal pull·up resistor, so may be left unconnected. The request/grant se· quence is as follows (8ee Figure 8): 1. A pulse of one ClK wide from another local bus master indicates a local bus request ("hold") to the 8088 (pulse 1). 2. During a T4 or TI clock cycle, a pulse one clock wide from the 8088 to the requesting master (pulse 2), indicates that the 8088 has allowed the local bus to float and that it will enter the "hold acknowledge" state at the next ClK. The CPU's bus interface unit is disconnected logically from the locill bus during" hold acknowledge". The same rules as for HOLD/HOLDA apply as for when the bus is released. 3. A pulse one ClK wide from the requesting master indicates to the 8088 (pulse 3) that the "hold" request is about to end and that the 8088 can reclaim the local bus at the next ClK. The CPU then enters T4. Each master·master exchange of the local bus is a sequence of three pulses. There must be one idle ClK cycle after each bus exchange. Pulses are active lOW. If the request is made while the CPU is performing a memory cycle, it will release the local bus during T4 of the cycle when all the following conditions are met: 1. Request occurs on or before T2. 2. Current cycle is not the low bit of a word. 3. Current cycle is not the first acknowledge of an interrupt acknowledge sequence. 4. A locked instruction is not currently executing. If the local bus is idle when the request is made the two possible events will follow: 1. local bus will be released during the next clock. 2. A memory cycle will start within 3 clpcks. Now the four rules for a currently active memory cyCle apply with condition number 1 already satisfied. 3·82 AFN·00826D inter iAPX 88/10 Table 1. Pin Description (Continued) Symbol Pin No. "tYPe Name and Function lOCK 29 0 LOCK: indicates that other system bus maste~ not to gain control of the system bus while lOCK is active (lOW). The lOCK signal is activated by the "lOCK" prefix instruction and remains active until the completion of the next instruction. This signal is active lOW, and floats to 3-state off in "hold acknowl- edge". aS1, aso 24,25 0 Queue Status: provide status to allow external os, tracking of the internal 8088 instruction queue. OS1 o(LOW) , CHARACTERI8T1C8 Nooper8l10n 0 1 Flrsl bY\B 01 opl.ode from queue 1 (HIGH) 0 Emplythequeue The queue status is valid during the ClK cycle 1 1 Subsequent byte from queue after which the queue operation is performed. - 34 0 Pin 34 Is always high in the maximum mode. 3-83 AFN.Q0826D IAPX 88/10 FUNCTIONAL DESCRIPTION the next ,higher address location. The BIU will auto· matically execute two fetch or write cycles for 16·bit Memory Organization operands. The processor provides a 20-bit address to memory which Certain locations in memory are reserved for specific locates the byte being referenced. The memory is orga- CPU operations. (See Figure 4.> Locations from ad· nized as a linear array of up to 1 million bytes, addressed dresses FFFFOH through FFFFFH are reserved for as OOOOO(H) to FFFFF(H). The memory is logically divided operations including a jump to, the initial system initial· into code, data, extra data, and'stack segments of up to ization routine. Following RESET, the CPU will always 64K bytes each, with each segment falling on 16-byte begin execution at location FFFFOH where the jump boundaries. (See Figure 3.) must be iocated. Locations OOOOOH through 003FFH are reserved for interrupt operations. Four·byte pointers All memory references are made relative to base consisting of a 16·bit segment address and a 16·bit off· addresses contained in high speed seg'ment registers. The set address direct program flow to one of the 256 possi· segment types were chosen based on the addressing ble interrupt service rou'tines. The pointer elements are needs of programs. The segment register to be selected is assumed to have been stored at their respective places automatically chosen according to the rules of the follow- in reserved memory prior to the occurrence of inter· ing table. All information in one segment type share the rupts. same logical attributes (e.g. code or data). By structuring memory into relocatable areas of similar characteristics and by automatically selecting segment registers, pro- Minimum and Maximum Modes grams are shorter, faster, and more structured. The requirements for supporting, minimum and maxi· Word (16·bit) operands can be located on even or odd ad· mum 8088 systems are sufficiently different t,hat they dress boundaries. For address and data operands, the cannot be done efficiently with 40 uniquely defined least significant byte of the word is stored in the lower pins. Consequently, the 8088 is equipped ,with a strap valued address location and the most significant byte in pin (MN/MX) which defines the system configuration. The definition of a certain subset of the pins changes, dependent on ~he condition of the strap pin. When the ~FFFFFH MN/MX pin is strapped to GND, the 8088 defines pins 24 -~ IO'} CODE SEGMENT XXXXOH through 31 and 34 in maximum mode. When the MN/MX pin is strapped to Vee, the 8088 generates bus control signals itself on pins 24 through 31 and 34. } STACK SEGMENT FFFFFH RESET BOOTSTRAP PROGRAM JUMP FFFFOH r--'-----+-~ 1 • • SEGMENT REGISTER FILE ( MSB } • 3FFH ~~~csss~~~~~~~W:OR~D~!~L~S~B~ INTERRUPT POINTER BYTE F6R TYPE 255 DATA SEGMENT 3FOH OS • ES }EXTRA DATA SEGMENT ·• INTERRUPT POINTER 7H FOR TYPE 1 4H L---i-_~ INTERRUPT POINTER 3H FOR TYPE 0 \ ~OOOOOH OH Figure 3. Memory Organization Figure 4. Reserved Memory Locations Memory Segment Register Segment Reference Need Used Selection Rule Instructions CODE (CS) Automatic with all instruction prefetch. Stack STACK (55) All stack pushes and pops. Memory'references relative to BP base register except data references. Local Data DATA (OS) Data references when: relative to stack, destination of string operation, or explicitly overridden. External (Global) Data EXTRA (ES) Destination of string operations: Explicitly selected using a segment override. 3-84 AFN·00826D inter IAPX 88/10 The minimum mode 8088 can be used with either a trol the transceiver, and ALE to latch the addresses. multiplexed or demultlplexed bus. The multiplexed bus This configuration of the minimum mode provides the configuration Is compatible with the MCS-85™ multi- standard demultiplexed bus structure with heavy bus plexed bus peripherals (8155, 8156, 8355, 8755A, and buffering and relaxed bus timing requirements. 8185). This configuration (See Figure 5) provides the user The maximum mode employs the 8288 bus controller. with a minimum chip count system. This architecture (See .l:!9ure 7,) The 8288 decodes status lines SO, Si, provides the 8088 processing power in a highly integrated and 52, and provides the system with all bus control form. signals. MOVing the bus control to the 8288 provides The demultiplexed mode requires one latch (for 64K ad- better source and sink current capability to the control dressability) or two latches (for a full megabyte of ad- lines, and frees the 8088 pins for extended large system dressing). A third latch can be used for buffering if the features. Hardware lock, queue status, and two requesU address bus loading requires it. An 8286 or 8287 trans- grant interfaces are provided by the 8088 in maximum ceiver can also be used if data bus buffering is required. mode. These features allow co-processors in local bus (See Figure 6,) The 8088 provides !lEN and DT/R to con- and remote bus configurations. 3-85 AFN.()()828D iAPX 88/10 /' Vee Tj H-- CE POR:f¢V. WR PORTpV RD B 8156 • ALE PORT~ DATAl C (6) ADDA V IN --.- loiM TIMER RESET ·OUT I-- A6- A19 ADDR lOW -V R5 ADo- ADr 0- ADD A/DATA -", , W ALE I~ r----- elK '\f PORT CE A "- l~ A 810 8088 V 8355 187S5A .---- READY "- DATAi MN/MX J--vcc AODR Vec r1 X, 0 X2 elK RESET ALE RD WR I-- r-- I- I-- P- I- 101M RESET PORT B ~ iaR ~c READY I - - 101M I- t------ RES 8284A RESET I-- I I!t Vss Vee v DO PROG I GND WR RD eEl 8185 ALE I ~P- CS, eE 2 , \-1-- A s ,A 9 ADo1 t t V" Vee , 'V Figure 5. Multiplexed Bus Configuration 3-86· AFN·00826D intJ iAPX 88/10 ~~ = ~NERATOPl ClK READY IlHlD rVcc 10I1i , - 51 RESET I ROY lUI WI! NO CPU iRTA .... t=.-==l DTIR r---:l I ..., STB GND--1+--: ALE I DE ADo-ADr I At-A,. ~ODRlOA~ t1~~~RH3) ADD"ESS ~ INTR p: T OE 8286 TRANSCEIVER DATA Jll lll( lllr 11 F t\ . .S. . INTERRUPT 1 - CONTROL I 2142 RAM (2) WEOOj ~ 27162 PROM " ] ( I CS ~~J MCS 80 PERIPHERAL INT ~I~.' Figure 6. Demultlplexed Bus Configuration lUI r 1 GND 8284A CLOCK GENERATOR liD ADY ClK READY RESET MN/M': .... CPU " S, s, OND SO S, S, . - - DEN C~~~R lowe r - - oTIR ALE " elK MRDe MWTC .. me r AiiWC Alowe iNfA r NC NC r---:l I ST' I GND- I----' OE I ADG-ADr AI-Atl ~DDAIDAr "" I,.ATCH (1,20R3) ADDRESS INT IJ p: T OE 8286 n TRANSCEIVER DATA ill 11 11 E , V INTs::tPT CONTADL - I 2142 RAM (2)WE WI I I 2116 2 PROM ~II ~ ~~ MCS 80 PERIPHERAL ¢==='AO.' - Figure 7. Fully Buffered System Using Bus Controller 3-87 AFN-OOB26D inter IAPX 88/10 Bus Operati~n tlon, the bus can be demultiplexed at the processor with II single address latch if a standard, non-multiplexed The 8088 address/data bus is broken into three parts - bus is desired for the system. the lower eight address/data bits (ADO-AD7), the middle eight address bits (A8-A15), and the upper four address Each processor bus cycle consists of at least four elK bits (A16-A19). The address/data bits and the highest cycles. These are referred to as T1, T2, T3, and T4. (See four address bits are time multiplexed. This technique Figure 8). The address Is emitted from the processor provides the most efficient use of pins on the proc- during T1 and data transfer occurs on the bus during T3 essor, permitting the use of a standard 40 lead package. and T4. T2 is used primarily for changing the direction of The middle eight address bits are not multiplexed, i.e. the bus during read operations. In the event that a "NOT they remain valid throughout each bus cycle. In addi- READY" Indication Is given by the addressed device, !------(4+NWAIf)=Tcv------i------(4+NwAIt)-TCV--------J T, 13 TWAIT I T.. T1 12 f3 eLK GOES INACTIVE IN THE STATE ~. ..••_ro" «lldll! ~ ADDRISTATUS S7-S~ ADOR AODRIDATA .-~---8. . .__D_AT_A_O_UT_(D_r_D~ _ _...... ~--OC READY DT/A MEMORY ACCESS TIME \'--_----If Figure 8. Basic System Timing 3-88 AFN.Q08280 intJ iAPX'SS/10 "wait" states (Tw) are inserted between T3 and T4. Each EXTERNAL INTERFACE inserted "wait" state is of the same duration as a ClK cycle. Periods can occur between 8088 driven bus cycles. Processor Reset and Initialization These are referred to as "idle" states (Ti), or inactive ClK Processor initialization or start up is accomplished with cycles. The processor uses these cycles for internal housekeeping. activation (HIGH) of the RESET pin. The 8088. RESET is required to be HIGH for greater than four clock cycles. The During T1 of any b,us cycle, the ALE (address latch enable) 8088 will terminate operations on the high-going edge of signal is emitted (by either the processor or the 8288 bus RESET and will remain dormant as long as RESET is HIGH. controller, depending on the MN/MX strap). At the trailing The low-going transition of RESET triggers an internal edge of this pulse, a valid address and certain status reset sequence for approximately 7 clock cycles. After this information for the cycle may be latched. interval the 8088 operates normally, beginning wit+! .ne 'Status bits So, 51, and S2 are used by the bus controller, in instruction in absolute location FFFFOH. (See Figure 4.) maximum mode, to identify the type of bus transaction The RESET input is internally synchronized to the proces- according to the following table: sor clock. At initialization, the HIGH to lOW transition of RESET mllst occur no sooner than 50 P.s after power up, to allow complete initialization of the 8088. 52 s; So CHARACTERISTICS If INTR is asserted sooner than nine clock cycles after the end of RESET, the processor may execute one instruction o (LOW) 0 0 Interrupt Acknowledge before responding to the interrupt. 0 0 1 Read 110 0 1 0 Write 110 All 3-state outputs float to 3-state OFF during RESET. 0 1 1 Halt Status is active in the idle state for the first clock after 1 (HIGH) 0 0 Instruction Fetch RESET becomes active and then floats to 3-state OFF. 1 0 1 Read Data from Memory 1 1 0 Write Data to Memory 1 1 1 Passive (no bus cycle) Interrupt Operations Interrupt operations fall into two classes: software or hardware initiated. The software initiated interrupts and Status bits S3 through S6 are multiplexed with high order software aspects of hardware interrupts are specified in address bits and are therefore valid during T2 through T4. the instruction set description in the iAPX 88 book or the S3 and S4 indicate which segment register was used for iAPX 86,88 User's Manual. Hardware interrupts can be this bus cycle in forming the address according to the classified as nonmaskable or maskable. following table: Interrupts result in a transfer of control to a new program location. A 256 element table containing address pointers 54 53 CHARACTERISTICS to the interrupt service program locations resides in abso- lute locations 0 through 3FFH (see Figure 4), which are o (LOW) 0 Alternate Data (extra segment) reserved for this purpose. Each element in the table is 4 0 1 Stack bytes in size and corresponds to an interrupt "type." An 1 (HIGH) 0 Code or None interrupting device supplies an 8-bit type number, during 1 1 Data the interrupt acknowledge sequence, which is used to vector through the appropriate element to the new inter- rupt service program location. S5 is a reflection of the PSW interrupt enable bit. S6 is always equal to O. Non-Maskable Interrupt (NMI) I/O Addressing The processor provides a single non-maskable interrupt In the 8088, I/O operations can address up to a maximum (NMI) pin which has higher priority than the maskable of 64K I/O registers. The I/O address appears in the same interrupt request (INTR) pin. A typical use would be to format as the memory address on bus lines A15-AO. The activate a power failure routine. The NMI is edge-triggered address lines A19-A16 are zero in I/O operations. The vari- on a lOW to HIGH transition. The activation of this pin able I/O instructions, which use register OX as a pointer, causes a type 2 interrupt. . have full address. capability, while the direct I/O instruc- NMI is required to have a duration in the HIGH state of tions directly address one Qr two of the 256 I/O·b)!te greater than tiNe clock 'cycles, but is -Rot required'tlt be locations in page 0 of the I/O address spa,ce. I/O ports are synchronized to the clock. Any higher going transition of addressed in the same manner as memory locations. NMI, is latched on-Chip and will be serviced at the end of Designers familiar with the 8085 or upgrading an 8085 'the current instruction or between whole moves (2 bytes in design should note that the 8085 addresses I/O with an the case of word moves) of a block type instruction. Worst 8-bit address on both halves of the 16-bit address bus. The case response to NMI would be for multiply, divide, and 8088 uses a full 16-bit address on its lower 16 address variable shift instructions. There is no speCification on lines. the occurrence of the low-going edge; it may occur 3-89 AFN-00826D iAPX 88/10 before, during, or after the servicing of NMI. and sample period. The interrupt return instruction in- Another high-going edge triggers another response if it cludes a flags pop which returns the status of the occurs after the start of the NMI procedure. The signal original interrupt enable bit when it restores the flags. must be free of logicai spikes in general and be free of bounces on the low-going edge to avoid triggering ex- traneous responses. HALT When a software HALT instruction is executed, the processor indicates that it is entering the HALT state in Maskable Interrupt (lNTR) one of two ways, depending upon which mode is strapped. In minimum mode, the processor issues ALE, The 8088 provides a single interrupt request input (INTR) delayed by one clock cycle, to allow the system to latch which can be masked internally by software with the the halt status. Halt status is avai lable on 101M', DT/R, resetting of the interrupt enable (IF) flag bit. The in- and SSO. In mallimum mode; the processor issues ap· terrupt request signal is level triggered. It is internally propriate HALT status on S2, S1, and SO, and the 8288 synchronized during each clock cycle on the high-going bus controller issues one ALE. The 8088 will not leave edge of CLK. To be responded to, INTR must be present the HALT state when a local bus hold is entered while in (HIGH) during the clock period preceding the end of the HALT. in this case, the processor reissues the HALT in- current instruction or the end of a whole move for a dicator at the end of the local bus hold. An interrupt re- block type instruction. During interrupt response se- quest or RESET will force the 8088 out of the HALT quence, further interrupts are disabled. The enable bit is state. reset as part of the response to any interrupt' (INTR, NMI, software interrupt, or single step), although the FLAGS register which is automatically pushed onto the Read/ModifylWrite (Semaphore) Operations stack reflects the state of the processor prior to the in- terrupt. Until the old FLAGS register is restored, the via LOCK enable bit will be zero unless specifically set by an in- struction. The LOCK status information is provided by the proc- essor when consecutive bus cycles are required during During the response sequence (See Figure 9), the proc- the execution of an instruction. This allows the proc- essor executes two successive (back to back) interrupt essor to perf6rm read/modify/write operations on acknowledge cycles. The 8088 emits the LOCK signal memory (via the "exchange register with memory" (maximum mode only) from T2 of the first bus cycle until instruction), without another system bus master receiv- T2 of the second. A local bus "hold" request will not be ing Intervening memory cycles. This is useful in multi- honored until the end of the second bus cycle. In the processor system configurations to accomplish "test second bus cycle, a byte is fetched from the external in- and set lock" operations. The ~ signal is activated terrupt system (e.g., 8259A PIC) which identifies the (LOW) in the clock cycle following decoding of the source (type) of the interrupt. This byte is multiplied by LOCK prefix instruction. It is deactivated at the end of four and used as a pointer into the interrupt vector the last bus 'cycle of the instruction following the LOCK lookup table. An INTR signal left HIGH will be continual- prefix. While [QCK is active, a request on a RQ/GT pin will ly responded to within the limitations of the enable bit be recorded, and then honored at the end of the LOCK. T1 I T2 T3 T4 T1 I T2 T, ALE J\'---_------'n'--_ _ -----'I \1.:--'_ _ FLOAT ADo-AOr Figure 9. Interrupt Acknowledge Sequence 3-90 AFN·008260 iAPX 88/10 External Synchronization via TEST a byte of information is read from the data bus, as sup- plied by the interrupt system logic (I.e. 8259A priority in- As an alternative to interrupts, the 8088 provides a terrupt controller). This byte identifies the source (type) single software-testable input pin (TEST). This input is of the interrupt. It is multiplied by four and used as a utilized by executing a WAIT instruction. The single pOinter into the interrupt vector lookup table, as de- WAIT instruction is repeatedly executed until the 'fEST scribed earlier. input goes active (LOW). The execution of WAIT does not consume bus cycles once the queue is full. If a local bus request occurs during WAIT execution, the 8088 3-states all output drivers. If interrupts are enabled, Bus Timing - Medium Complexity Systems the 8088 will recognize Interrupts and process them. (See Figure 10,) The WAIT instruction is then refetched, and reexecuted. For medium complexity systems, the MN/MX pin is con- nected to GND and the 8288 bus controller is added to Basic System Timing the system, as well as an 828218283 latch fOT latching ·the system address, and an 8286/8287 transceiver to In minimum mode, the MN/MX pin is strapped to Vcc allow for bus loading greater than the 8088 is capable of and the processor emits bus control signals compatible handling. Signals ALE, fiEjij, and DT/R are generated by with the 8085 bus structure. In maximum mode, the the 8288 instead of the processor in this configuration, MN/MX pin is strapped to GND and the processor emits although their timing remains relatively the same. The coded status information which the 8288 bus controller 8088 status outputs (82, S1, and SO) provide type of uses to generate MULTIBUS compatible bus control cycle information and become 8288 inputs. This bus signals. cycle information specifies read (code, data, or 110), write (data or I/O), interrupt acknowledge, or software halt. The 8288 thus issues control signals specifying System Timing - Minimum System -memory read or write, 110 read or write, or interrupt (See Figure 8,) acknowledge. The 8288 provides two types of write The read cycle begins in T1 with the assertion of the ad- strobes, normal and advanced, to be applied as required. dress latch enable (ALE) signal. The trailing (low going) The normal write strobes have data valid at the leading edge of this signal is used to latch the address informa- edge of write. The advanced write strobes have the tion, which is valid on the addressldata bus (ADO-AD7) same timing as read strobes, and hence, data is not at this time, into the 8282/8283 latch. Address lines A8 valid at the leading edge of write. The 8286/8287 trans- through A15 do not need to be iatched because they re- ceiver receives the usual T and OE inputs from the main valid throughout the bus cycle. From T1 to T4 the 8288's DT/R and DEN outputs. 101M signal indicates a memory or 1/0 operation. At T2 The pOinter into the interrupt vector table, which Is the address is removed from the addressldata bus and passed during the second INTA cycle, can derive from the bus goes to a high impedance state. The~ad con- an 8259A located on either the local bus or the system trol signal is also asserted at T2. The read (RD) signal bus. If the master 8289A priority interrupt controller is causes the addressed device to enable its data bus positioned on the local bus, a TTL gate is required to drivers to the local bus. Some time later, valid data will disable the 8286/8287 transceiver when reading from the be availabLe on the bus and the addressed device will master 8259A during the interrupt acknowledge se- drive the READY line HIGH. When the processor returns quence and software "poll". the read signal to a HIGH level, the addressed device will again 3-state its bus drivers. If a transceiver (8286/8287) is required to buffer the 8088 local bus, The 8088 Compared to the 8086 signals DT/R and DEN are provided by the 8088. The 8088 CPU .is an 8-bit processor designed around the A write cycle also begins with the assertion of ALE and 8086 internal structure. Most internal functions of the the emission of the address. The 101M signai is again 8088 are identical to the equivalent 8086 functions. The asserted to indicate a memory or I/O write operation. In 8088 handles the external bus the same way the 8086 T2, immediately following the address emission, the does with the distinction of handling only 8 bits at a processor emits the data to be written into the ad- time. Sixteen-bit operands are fetched or written in two dressed location. This data remains valid until at least consecutive bus cycles. Both processors will appear the middle of T4. During T2, T3, and Tw , the processor identical to the software engineer, with the exception of asserts the write control signal. The write (WR) signal execution time. The internal register structure is iden- becomes active at the beginning of T2, as opposed to tical and all instructions have the same end result. The the read, which is delayed somewhat into T2 to provide differences between the 8088 and 8086 are outlined time for tne bus 'to float. below. The engineer who is unfamiliar with the 8086 is The basic difference between. the interrupt Ilcknowl- referred to the iAPX 86, 88 User's Manual, Chapters 2 and edge cycle and a read cycle is that the interrupt 4, for function description and instruction set information. acknowledge (INTA) signal is asserted in place of the Internally, there are three differences between the 8088 read (Fill) signal and the address bus is floated. (See and the 8086. All changes are related to the 8-bit bus in- Figure 9.):,ln the second of two successive INTA cycles, terface. 3-91 AFN·OOB26D iAPX ~8/10 • The .queue length is 4 bytes in the 8088, wl1ereas the The hardware interface of the 8088 contai ns the major 808~ queue contains 6 bytes, or three words. The differences between the two CPUs. The pin assign- queue was shortened to prevent overuse of the bus by ments are nearly identical, however, with the following the .BIU when prefetching instructions. This. was re- functional changes: quired because of the additional time necessary to fet'ch instructions 8 bits.at a time. • A8-A 15 - These pins are only address outputs on the • To further optimize the queue, the prefetching algo- 8088. These address lines are latched internally and rithm was changed. The 8088 SIU will fetch a new in- remain valid throughout a bus cycle in a manner struction to load into the queue each time there is a 1 similar to the 8085 upper address lines. byte hole (space available) in the queue. The 8086 waits until a 2-byte space is available. • SHE has no meaning on the 8088 and has been elimi- • The internal execution time of the instruction set is nated. affected by the 8-bit interface. All 16-bit fetches and writes fromlto memory take an additional four clock • SSO provides the SO status information in the mini- cycles. The CPU is also limited by the speed of in- mum mode. This output occurs on pin 34 in minimum struction fetches. This latter problem only occurs mode only. DT/R, 101M, and SSO provide the complete when a series of simple operations occur. When the bus status in minimum mode. more sophisticated instructions of the 8088 are .being used, the qilJeue has time to fill and the execution pro- ceeds as fast as the execution unit will allow. • loiM has been inverted to be compatible with the MCS-85 bus structure. The 8088 and 8086 are completely sbftware compatible by virtu"re. of their identical execution units. Software that is system dependent may not be completely trans- • ALE is delayed by one clock cycle in the minimum ferable, but software that is not system dependent will mode when entering HALT, to allow the status to be operate equally as well on an 8088 or an 8086. latched with ALE. 3-92 AFN-ooa26D iAPX 88/10 T, T, T, T. ;--' 1M elK ---..I' / QS1,QSO X 8088 ------ S2, 51, ~ LILLI \".----- A19/56 - A16/53 A19-At6 56-53 ALE "\ ,- -- 8288 ROY 8284 -X READY 8088 AD7-ADO A7 AD DATA IN \ 8088 A15-A8 A15-AS RD I DT/Fi 8288 MRDe DEN / Figure 10. Medium Complexity System Timing 3-93 AFN-00826D iAPX 88/10 ABSOLUTE MAXIMUM RATINGS· ·NOTlCE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the deviqe. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O'C to 70'C tion of the device at these or any other conditions above Storage Temperature ............. - 65'C to + 150'C those indioated in the operational sections of this specifi- Voltage on Any Pin with oation is not implied. Exposure to absolute maximum Respect to Ground .................. - 1.0 to + 7V rating oonditions for extended periods may affect device Power Dissipation ........................ 2.5 Watt reliability. D.C. CHARACTERISTICS (8088: TA = O'C to 70'C. Vee = 5V ±10%)· . (8088-2: TA = O~C to 70'C. Vee = 5V ±5%) Symbol Parameter Min. Max. Units Test Conditions Vil Input Low Voltage -0.5 +0.8 V VIH Input High Voltage 2.0 Vee+ 0.5 V VOL Output Low Voltage 0.45 V IOl = 2.0 mA VOH Output High Voltage 2.4 V IOH = -400 p,A 8088 340 ICC Power Supply Current: 8088-2 350 mA TA = 25'C P8088 250 III Input Leakage Current ±10 p,A OV "'VIN ",Vee;; Output Leakage Current t10 p,A 0.45V '" VOUT '" ILO Vee Vel Clock Input Low Voltage -0.5 +0.6 V VeH Clock Input High Voltage 3.9 Vee+ 1.O V Capacitance if Input Buffer CIN (All input except 15 pF fe = 1 MHz ADO-AD7. RQ/GT Capacitance of I/O Buffer CIO 15 pF fc = 1 MHz (ADo-AD7. RQ/GT ·Note: For Extended Temperature EXPRESS Vcc=5V::!:5% 3-94 . AFN·00826D iAPX 88/10 A.C. CHARACTERISTICS (8088: TA = O°C to 70°C, Vee = 5V ±100/0)* , (8088-2: TA = O°C to 70°C, Vee = 5V ±5%) MINIMUM COMPLEXITY SYSTEM TIMING REQUIREMENTS 8088 8088·2 Test Symbol Parameter Min. Max. Min. Max. Units Conditions TCLCL CLK Cycle Period 200 500 125 500 ns TCLCH CLK Low Time 118 68 ns TCHCL CLK High Time 69 44 ns From 1.0V TCH1CH2 CLK Rise Time 10 10 ns to 3.SV From 3.5V TCL2CL1 CLK Fall Time 10 10 ns to 1.0V TDVCL Data in Setup Time 30 20 ns TCLDX Data in Hold Time 10 10 ns ROY Setup Time TR1VCL into 8284 (See 35 35 ns Notes 1, 2) ROY Hold Time TCLR1X into 8284 (See 0 Q ns Notes 1,2) READY Setup ns TRYHCH 118 68 Time into 8088 READY Hold Time TCHRYX 30 20 ns into 8088 READY Inactive to TRYLCL -8 -8 ns CLK (See Note 3) THVCH HOLb Setup Time 35 20 ns INTR, NMI, TEST TINVCH Setup Time (See 30 15 ns Note 2) Input Rise Time From 0.8V TILIH 20 20 ns (Except CLK) to 2.0V Input Fall Time From 2.0V TIHIL 12 12 ns (Except CLK) toO.8V "Note: For Extended Temperature EXPRESS Vcc=5V±5% 3-95 AFN-00826D iAPX 88/10 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES 8088 8088·2 Symbol Parameter Min. Max. Min. Max. Units Test Conditions TClAV Address Valid Delay 10 110 10 60 ns TClAX Address Hold Time 10 10 ns TClAZ Address Float Delay TClAX 80 TClAX 50 ns TlHll ALE Width TClCH-20 TCLCH-10 ns ' TCllH ALE Active Delay 80 50 ns TCHll ALE Inactive Delay 85 55 ns Address Hold Time to TllAX TCHCL-10 TCHCl-10 ns ALE Inactive TClDV Data Valid Delay 10 110 10 60 ns CL = 20-100 pF for TCHDX Data Hold Time 10 10 ns all 8088 Outputs in addition to TWHDX Data Hold Time After WR TClCH-30 TClCH-30 ns internal loads TCVCTV Control Active Delay 1 10 110 10 70 ns TCHCTV Control Active Delay 2 10 110 10 60 ns TCVCTX Control Inactive Delay 10 110 10 70 ns Address Float to READ TAZRl 0 0 ns Active TClRl RD Active Delay 10 165 10 100 ns TClRH RD Inactive Delay 10 150 10 80 ns RD Inactive to Next TRHAV TClCl-45 TClCl-40 ns Address Active TClHAV HlDA Valid Delay 10 160 10 100 ns TRlRH RDWidth 2TCLCl-75 2TClCl-50 ns TWlWH WRWidth 2TClCl-60 2TClCl-40 ns TAVAl Address Valid to ALE low TClCH-60 TClCH-40 ns TOLOH Output Rise Time 20 20 ns From 0.8V to 2.0V TOHOl Output Fall Time 12 12 ns From 2.0V to 0.8V A.C. TESTING INPUT, OUTPUT WAVEFORM - A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT , - DEVICE UNDER TEST i}CL 100pF 0 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR A lOGIC 0 THE CLOCK IS DRIVEN AT 4 3V AND 025V TIMING MEASURE- MENTS ARE MADE AT 1 5V FOR BOTH A LOGIC 1 AND 0 CL INCLUDES JIG CAPACITANCE 3-96 AFN.()0826D intJ iAPX 88/10 WAVEFORMS BUS TIMING-MINIMUM MODE SYSTEM T, T2 T3 Tw T4 . VCH " l - - - - h e T C l C l - . _~CH1CH2~1 I- TCl2Cl1 I elK (8284 Output) dc " ~r"~f\.-- ~ TCHCTV ~ I:.. TCHCL _TClCH_ 101M, SSii l'--.--+----+--+---r---t---+----J A'5 - Ae (Float durIng lNTA) TCLAV-- t--_T?lDV TCHDX- ~+T.;;;Cl::..A:;;.X-+-_'1 I TCllH- I: TlHtl-= I -TLLAX ALE .f.l -+--..----J TCHll- ~--~_+----+_----+--~------+_---Jj.~--­ j' -TR1VCl r-- ROY (8284 Input) SEE NOTE 5 - TRYHCH-- I !-TClAZ I - TDVCL- -TClDX_1 AD7-ADo AD7-AOo DATA INI L FlOA~-J' READ CYCLE (NOTE 1) AD -----z- -- TCHCTV TAZRl- TCLRL ff I TRLRH TCLRH- ---1 I-- TRHAV '" I ~ -TCHCTV ('HR, iNfA = VOH) Dr/A" . I I ~ TCVCTV- TCVC,TX- ! DEN 3-97 AFN·Q0826D inter iAPX 88/10 , WAVEFORMS (ContlnueGt) BUS TIMING-MINIMUM MODE SYSTEM (Continued) elK (8284 Output) AD7~ADO WRITE CYCLE NOTE 1 DTiR INTA CYCLE NOTES 1,3 (RD, WIi =VOH) SOFTWARE HALT - 0EN,R5:wR.iNfi. =- VOH A07-ADO INVALID ADDRESS SOFTWARE HALT DT/A INDETERMINATE TCLAV NOTES: 1. ALL SIGNALS SWITCH BETWEEN VOH AND VoL UNLESS OTHERWISE SPECIFIED. 2. ROY IS SAMPLED NEAR THE END OF T" T3, Tw TO DEteRMINE IF Tw MACHINES STATeS ARE TO BE INSERTED. 3. TWO INTA CYCLES RUN BACK·TO·BACK. THE 11088 LOCAL ADDAIDATA BUS IS. FLOATING DURING BOTH INTA CYCLES. CONTROL SIGNALS ARE SHOWN FOA THE SECONO INTA CYCLE. 4. SIGNALS AT8284 ARE SHOWN FOR REFERENCE ONLY. 5. ALL TIMING MEASUREMENTS ARE MADE AT 1.5V UNLESS OTHERWISE NotED. 3-98 AFN.()082SD IAPX 88/18 A.C. CHARACTERISTICS MAX MODE SYSTEM (USING 8288 BUS CONTROLLER) TIMING REQUIREMENTS 8088 8088·2 Symbol Parameter Min. Max. Min. Max. Units Test Conditions TCLCL CLK Cycle Period 200 500 125 500 ns TCLCH CLK Low Time 118 68 ns TCHCL CLK High Time 69 44 ns TCH1CH2 CLK Rise Time 10 10 ns From 1.0V to 3.5V TCL2CL1 CLK Fall Time 10 10 ns From 3.5V to 1.0V TDVCL Data In Setyp Time 30 20 ns TCLDX Data In Hold Time 10 10 ns ROY Setup Time into 8284 TR1VCL 35 35 ns (See Notes 1, 2) ROY Hold Time into 8284 TCLR1X 0 0 ns (See Notes 1, 2) READY Setup Time into TRYHCH 118 68 ns 8088 TCHRYX READY Hold Time into 8088 30 20 ns READY Inactive to CLK (See TRYLCL -8 -8 ns Note 4) " Setup Time for Recognition TINVCH (INTR, NMI, TEST) 30 15 ns (See Note 2) TGVCH RQ/GT Setup Time 30 15 ns TCHGX RQ Hold Time into 8086 40 30 ns Input Rise Time TILIH 20 20 ns From 0.8V to' 2.0'il (Except CLK) TIHIL Input Fall Time (Except CLK) 12 12 ns From 2.0V to 0.8V NOTES: 1. Signal at 8284 or 8288 shown for reference only. 2. Setup requirement for asynchronous signal only to guarantee recognition at next eLK. 3. Applies only to T2 state (8 ns into T3 state). 4. Applies only to T2 state (8 ns into T3 state). 3-99 AFN.()()B26D iAPX88/10 A.C. CHARACTERISTICS TIMING RESPONSES 8088 8088-2 Symbol Parameter Min. Max. Min. Max. Units Test Conditions Command Active Delay (See TClMl 1Q 35 10 35 ns Note 1) Command Inactive Delay (See TClMH 10 35 10 35 ns Note 1) READY Active to Status Passive TRYHSH 110 65 ns (See Note 3) TCHSV Status Active Delay 10 110 10 60 ns TClSH Status Inactive Delay 10 130 10 70 ns TClAV Address Valid Delay 10 110 10 60 ns TClAX Address Hold Time 10 10 ns TClAZ Address Float Delay TClAX 80 TClAX 50 ns Status Valid to ALE High (See , TSVlH 15 15 ns Note 1) Status Valid to MCE High (See TSVMCH 15 15 ns Note 1) ClK low to ALE Valid (See TCllH 15 15 ns Note 1) ClK low to MCE High (See TClMCH 15 15 ns ,Note 1) TCHll ALE Inactive Delay (See Note 1) 15 15 ns TClMCl MCE Inactive Delay (See Note 1) 15 15 ns CL = 20-100 pF for all 8088 Outputs TCLDV Data Valid Delay 10 110 10 60 ns in addition to TCHDX Data Hold Time 10 10 ns internal loads Control Active Delay (See TCVNV 5 45 5 45 ns Note 1) Control Inactive Delay (See TCVNX 10 45 10 45 ns Note 1) TAZRl Address Float to Read Active 0 0 ns TClRl RD Active Delay 10 165 10 100 ns TClRH RD Inactive Delay 10 150 10 80 ns RD Inactive to Next Address TRHAV TClCl-45 TClCl-40 ns Active Direction Control Active Delay TCHDTl 50 50 ns (See Note 1) Direction Control Inactive Delay TCHDTH 30 30 ns (See Note 1) TClGl GT Active Delay 85 50 ns TClGH GT Inactive Delay 85 50 ns TRlRH RDWidth 2TClCl-75 2TClCl-50 ns From 0.8V to TOlOH OUfput Rise Time 20 20 ns 2.0V From 2.0V to TOHOl Output Fall Time 12 12 ns 0.8V 3-100 AFN·00826D IAPX 88/10 WAVEFORMS BUS TIMING-MAXIMUM MODE T, T. T. T. ! - - T C L C L - TCH1CH2....j I- --J[TCL2CL1 Tw CLK VCH r-\ ,r--\, ,.,., r......... ..r-\. VCL....) TCLAV- 1'------' .1::. I - - TCHCL - :,------,r ~ i-TCL,C_H--I-_ _ _.... QSo.QS, A,--+__+--, '-_+-_-+-' '--+__+J '-_+-__ -J I - TCHSV - • TCLSH ~--~---4--~--_4--~~~m7.r+--~_..------ SO.Ii.SO (EXCEPT HALT) ~W(SEE NOTE 8) \ ~--4---4-----~--~~~~ '------ AU-A, ___ --+l""""I--~-T.f'fa~t:!!Xx~:_:::::r.~-,r:~T-C+LD-V-_+-+_-+_-_+-TC-H-DX--+_"\ -,...._ __ A19 oA1S I I TSVLH _ { : TCHLL TCLLH· r-- ALE (8288 OUTPUT) ~ ____ __ ~ ~+-~ __ ____ __- J .___ ~ I _ ~ SEE NOTE 5 I-J r f-- T 1VCL ROV (8284 INPUT) ~~'t~::~~~ -_.-m I TRYLCL __ - _TCHRYX Tr HSH - I- f:: 1 .... TCLAX ~--:T±:R".,VH.",C",.HJ_ READ CYCLE TCLAV-I TCLAZ - I TDVCL- -TCLDX- AD,-ADo AD,..ADo FrOAT '1\ DATA IN FLOAT I'-- TAZRL-i+- TCLRH I----IHFTRHAV----/ ------+--+-...."v RD TCHDTL - t-I--..JTCLRI ~+-------------4---'.~ TCHDTH - - - - - -__,\.1 I 1--1+--_-·TRLRHi----+----1 -"-7 DT/R ~----44~----------~---+~ TCLML- - 8288 OUTPUTS MiffiC OR tmIC SEE NOTES 5,6 TCVNV- It-- DEN _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- - f f TCVNX- ~I'-------- 3-101 AFN.()0826D iAPX 88110 WAVEFORMS (Continued) , , . r 3 BUS TIMING-MAXIMUM Li~ ,---,f\- MODE SYSTEM VCH ClK r-\ r--'- (USING 8288) VCl ~. '---' 52,5" so (EXCEPT HALT) ~(... note8) ----- ----_. WRITE CYCLE TCLAV- r- -TClD.~~ __ TCLAX ~ I--rCLSH TCHDX- t-- AOT-ADo A DATA DEN TCVNV- r-- TCVNX- r 8 . . . 0UJ1'VTS - r-TCLMl TCLMH- ~ SEE NOTES 5,6 AMWC OR Alowe - TCLMl - ...-TCLMH MWTC OR lowe INTA CYCLE A'S-Aa flOAT RESERVED FOR \ (SEE NOTES 3,4) CASCADE AD DR FLOAT FLOAT ADT ADo - l/rr z \ I--TDVCl- J/ POINTER t-TClDX FlO~ FLOAT (I 1. TClMCL--1 --- TSVMCH- ! 1 r-- t J +'" / I --- 1- J MCEI I'O£N TCLMCH- r:=..rCHDTH DT/R TClMl- \ f1- 82~ 0l1TPlITS see NOTES 5,6 INTA TCVNV --tJMH DEN SOFTWARE TCVNX-- -- - HALT - (DEN ... VOLiIm.~,Imre:,MW'i'e,.iMWC,IOWC.AJOWC,INTA,DT'A VOH. = ADr - ADo. A,s - Ita INVALID ADDRESS relAV ~ /r---------__' ------- \~--~ \.---.,.-- NOTES: 1 ALL SIGNALS SWITCH BETWEEN YOH AND VOL UNLESS OTHERWISE SPECIFIED. '". 2. ROY IS SAMPLED NEAR THE END OF T2, f3, Tw TO DETERMINE IF Tw MACHINES STATES ARE TO BE INSERTED. 3. CASCADE ADDRESS IS VALID BETWEEN FIRST AND SECOND INTA CYCLES. 4. TWO INTA CYCLES RUN BACK·TO·BACK. THE 8088 LOCAL ADDRIDATA 8US IS FLOATING DURING 80TH INTA CYCLES. CONTROL FOR POINTER ADDRESS IS SHOWN FOR SECOND INTA CYCLE. 5. SIGNALS AT 8284 OR 8288 ARE SHOWN FOR REFERENCE ONLY. 6. THE ISSUANCE OF THE 8288 COMMAND AND CONTROL SIGNALS (MRl)C, MWTC, ~, Rn(e, rowe, ~, lATA AND DEN) LAGS THE ACTIVE HIGH 8288 CEN. 7. ALL TIMING MEASUREMENTS ARE MADE AT 1.SV UNLESS OTHERWISE NOTED " 8. STATUS INACTIVE IN STATE JUST PRIOR TO T•. 3-102 AFN·00826D iAPX 88/10 W~VEFORMS (Continued) ASYNCHRONOUS BUS LOCK SIGNAL TIMING SIGNAL RECOGNITION (MAXIMUM MODE ONLy) m\ f\ Any elK cycle---l II =?:~L_,= CLK NMI INTR "0'" : NOTE. 1 SETUP REQUIREMENTS FOR ASYNCHRONOUS SIGNALS ONLY TO GUARANTEE RECOGNITION AT NEXT eLK REQUEST/GRANT SEQUENCE TIMING (MAXIMUM MODE ONLy) ~ I Prevlousgranl A1t18tA~1~ 1_----------------/ ADr-ADo 80lII COPROCESSOR ~:~ -----~---------_I 1-' (SEe NOTE 1, NOT£. 1 THE COPROCESSOR MAY NOT DRIVE THE BUSSES OUTSIDE THE REGION SHOWN WITHOUT RISKING CONTENTION. HOLD/HOLD ACKNOWLEDGE TIMING (MINIMUM MODE ONLy) ~ ' IClKeyeLE~ ,~.=" ~ elK _I THVCH (SEE NOTE I) HOlD~ I I I~:L - TClHAV 1-------~--~I-----i'.~---_T_e_lA_z. _____ C_OP_R~ ,.:-S -O-R _____ ~~ 3·103 AFN-00826D intJ iAPX 88/10 iAPX 86/10, 88/10 INSTRUCTION SET SUMMARY DATA TRANSFER NOV-Mov. 16502111 76543110 16543210 76543210 DEC Decnmenl 16543210 16543210 71&432111 16~43210 Reglsler/memory lallrom register ~o d w Imod reg ~ Regrster/memory j'11111'wlmodO~ F,~,~o~o~O;'~'tWtm~~~o~o~oi'~'m:t~~"~~"~ lii:iQii!iJ ~ ~ Immedlaleto reglslerlmemory Immediate lor~9Fsle, 1=1011 w reg data NfG Change sIgn lIlt 10'1 w imodO , 111m Memory to accumuialor II 0 1 00 0 0 w I addl low I add, high ~ eMP Comlln! Ac,umuialor 10 memo(y 11 0 I 00 0 1 W I ~ddl low I add, high ] Reglslerlmemory 10 segment reg Isler ~.11 0 ImodOleg ,1m I ReglstellmemQryand register 001' , 0 d w mod reg rim Segment register 10 reOIster/memory I ' 0001100 imOd 0 reg rim J Immediate w'th reglslel/memory 100000 s W mod' " rim dala data oj SW 01 Immedlale WJIM accum"laln' 00 11 I lOw PUSH Push US ASCliadlusllorsubtracl ~ Register/memory Register 1111111111mod~ ~ :-USl :::~;~ al:I~:,~~:rd~uOlract i':~:~:"':~; ,;, :,;, : lcm~od,"'-;:O-;:O-:'C:'mc-l w;,,' Segmenl register loooreQIIO I IMUl Integer muUrply ISlgnedl 11 I 1 I 0 I I W I mod I 0' rim AAM ASCII adlust lor multIply I 1010 100 0000 I 0 I 0 pop POll Ol~ D,v,de lunSlgnedl I I I 1 0 I , w mod I I 0 1'm Register/memory 1100011111mOdO~ IDIV Integfr dIVIde Is'gnedl I I I 101 1'1-1 mod " 1 ,'m Register 101011 reg I AAO ASCII ad,ust to. dmde I I 0 I 0 I 0' 0000 1 0 1 0 IOOOregl11 I caw Convell oyle to word 100 I 1 000 KeNS ~ helling. CWOConV€llwordlodoubleword ~ Regl$lerlmemoryw'lh register 1100001 I 'II Imod reg rim I Reglstel w'tl1 accumulator ~O~ IN~lnput from Ftxedport ~I port ~ ~aflable Don 1", 10110'11 I LOGIC OUT; OUIPUllO NOT Invert G'110 l'·i·"~~~ F'~ed POrl CG1QOI1;~~ SHLISAl Shift IO~lcal anlhmellc lett I, 0 I 00 v w mod 1 0 0 !1m Vanable port 11 1 10111'11 I SHA Sh,1I10glcal "9hl ItO I 00 v w !)lOd 101 Jim XllToTranslate byle to Al [iIOl0G}] SAR Shill anlhmet,c fight 110100 v W mOtl' 1 1 rim l£_-Load EA 10 register 1100011011mod~ ROl Rolate let! I 10 I 00 v W modO 0 0 rim laS-load pomler 10 DS 1 1000101 mod RDIIRoTale"q~1 111010ovwlmodO~ US'LoadpomterloES 1 1000100 mod reg rim IICl Rotate through carry tlag tell 110 I 0 0 v w mod 0 I 0 rim UNF-Load AH With !tags 1 1 00111111 ACII Rotate Ihroughcarly right 110 tOO v W '110110 ' 1 "m UNF-Slore AH Into flags 1,00,1,,0 I 'IIItIF'Pushflags 1,00,1,00 I AND And ,1t'F-Popllags 1 1 001110 1 1 Reg Imemorv aM reglstel 10 either Immed,ate to 'eglsiertmemory ~[i}}Y~0:1'~O!O!O ~ ~O~W~1m~od~~~g {} 0 000 w mod' 00 rim ~':;'m=t=:::E~:r=-=~G::Q tIata data II w 1 Immed,ate to ac{Umulato( 0 0 1 0 0 lOw dala It w 1 TEST And lunctlon to flag. no result ARITHMETIC Regrsterimemoryandfeglster @Too I Ow Imod reg I~ ADO AJump on panty/parity even \0 1 1 1 1 0 1 0 Cli Clear Interrupl 111111010 i JD=Jump on overflOW 10 1 I I 0000 STI Set Interrupt liiiiili:iJ JS~Jump on Sign 10 I 1 1 I 000 liLT Halt 11 1 11 0 I 00 I JIIE/JIIZ~Jump on nol equal/not lero 0 1 1 10 10 1 WAIT Walt 11 00 1 1 0 1 1 I JIl/J.E~~Ue~ea~n not less/greater F.o"","",~,"",";,""o;",+~~===="i ESC Escape Ito exlernal device I 1110 11 ~~¥0~/ffi] JlLE/J.~~~:~ron not less or equal! 1"'0'-"-.:'-.:'-.:'-.:,-.:,'-,'-1'-_='----' LOCK Bus lock prefix ~oT] AL '" 8-btt accumulator If s w ::;: 01 then 16 bits of ImmedIate data form the operand AX '" l&-btt accumulator II s w::;: 11 then an Immediate data byte IS sign extended to CX '" Count register form the 16-bIt operand OS -= Data segment If v::: 0 then "count"::: 1. If V = 1 then "count" m (eLl ES '" Extra segment Abovelbelow refers to unsigned value x::: don't care Greater'" more POSitive, l JS used for string prtmltlves for compartson Wlt~ Z,F FLAG Less'" less pOSItive (more negative) Signed values SEGMENT OVERRIDE PREFIX If d =1 then "to" reg, If d " 0 then "from" reg If w ~ 1 then word instruction, If w ~ 0 then byte Instruction 10 0 I "9 1 I 0 I If mod" 11 then rIm IS treated as a REG field REG IS assigned accordmg to the followmg table ,f mod" 00 then OISP " 0', d"p-Iow and d"p-h,gh are absenl It mod" 01 then OISP =' dlsp-Iow sign-extended to 16-blts, dlsp-hlgh IS absent t6-Bit (w' I) 6-Bltlw,O) Segment ,1 mod" 10 then OISP "dlsp,h,gh dlsp-Iow ' 000 AX 000 AL 00 ES 001 cx 001 CL 01 CS ,f rim" 000 then fA ~(BX) • (SI) .OISP 010 OX 010 OL 10 SS ,f rim" 001 then fA " (BX) • (01) • OISP 011 ex 011 BL 11 OS ,f rim" 010 then fA " (BP) • (SI) • OISP 100 SP 100 AH ,f rim" 011 then fA" (BP). (01). OISP 101 BP 101 CH II rim" 100 then fA " (SI) • OISP 110 SI 110 OH 111 01 111 BH ,f rim" 101 then fA " (01) • OISP ,f rim· 110 then fA· (BP) • OISP' If rim ·lllthen fA· (BX)' OISP OISP follows 2nd byte of instructIOn (before data If required) InstructIOns whIch reference the flag register file as a 16-bl! object use the symbol FLAGS to represent the file 'except ,f mod· 00 and rim" 110 then fA "d"p-h,gh dlsp-Iow FLAGS" XXXX (OF) (OF} (IF) (TF) (SF) (ZF) X(AF) X(PFi X(CF) Mnemonlcs© Intel, 1978 3-105 AFN·OO826D iAPX 188 HIGH INTEGRATION 8-BIT MICROPROCESSOR Integrated Feature Set 'III • Completely Object Code Compatible, -Enhanced 8088-2 CPU with All Existing iAPX 86, 88 Software -Clock Generator -10 New Instruction Types -2 Independent, High-Speed DMA • Direct Addressing Capability to Channels 1 MByte of Memory -Programmable Interrupt Controller -3 Programmable 16-bit Timers • Compatible with 8282183/86/87, 8288, -Programmable Memory and . 8289 Bus Support Components Peripheral Chip-Select Logic • Complete System Development -programmable Walt State Generator Support -Local Bus Controller' -Development Software: Assembler, • 8-Bit Data Bus Interface; 16-bit Internal PL/M, Pascal, Fortran, and System architecture Utilities , • High-Performance 8 MHz Processor -In-Circuit-Emulator (ICE™ -188) -2 Times the Performance of the -IRMXTM 86,88 Compatible (80130 Standard IAPX 88 OSF) -2 MByte/Sec Bus Bandwidth • Optional Numeric ,Processor Extension Interface -iAPX 188/20 High-Performance 80-bit Numeric Data Processor INT3/ilfiA1 INT2I1fi1Tn CLKOUT Vee GND ~ ! INTI TMRIN r TMR OUT 1 TMR OUT 0 TMRIN i rD~ NTI INITO ,1 1 • I I X, X, 'ExEcUTION iiNiTl ~ PROGRAMMABLE TIMERS I 0 1 2 ,.-IIIT I MAX COUNT ~ AW PROGRAMMABLE REGISTERB I I INTERRUPT CLOCK I CONTROLLER MAX COUNT GENERATOR REGISTER A ,.·BIT I GENERAL PURPOSE REGISTERS I I ..J CONTROL, REGISTERS I CONTROL REGISTERS 16·81T COUNT REGISTER 0 {( n { J U INTERNAL U ~ PROGRAMMABLE .-r DRGO DRQl DMAUNIT 0 1 CHIP-SELECT 2O-BIT SRDYr-f'o- UNIT SOURCE POINTERS ARDYr_ ... BUS INTERFACE 18-alT ~ 2O·BIT ,- ... Tn'!'F- ... UNIT DESTINATION I HOLD SEGMENT POINTERS REGISTERS :::- it 1 HLOA PROGRAMMABLE 16·BIT 4-IIYTE IiElIr__ PREFETCH R'i,C:lr~':-S TRANSFER COUNT RESET QUEUE I I CONTROL REGISTERS IIIH -1~ LOCK l~Ar.e AD ADO- All/S3- ilCS_ L~A2 LCS PCSS/Al DTIII 87 AD17 AlII/sa V A8-A15 ...:::L MCSO-3 PCSO-4 Figure 1. IAPX 188 Block Diagram Intel Corporatton Assumes No Respon8lb11tty for the use of Any Ctrcuttry Other Than CircUitry Embodted In an Intel Product NO Other CirCUit Patent Licenses are Imphed @INTELCORI'ORATION. 1982 OCTOBER 1982 3-106 ORDER NUMBER: 21l1708-001 iAPX 188 The Intel iAPX 188 (80188 part number) is a highly· integrated microprocessor with an 8-bit data bus interface and a 16-bit internal architecture to give high performance. The iAPX 188 effectively combines 15-20 of the most common iAPX 88 system components onto one. The 80188 provides two times greater throughput than the standard 5 MHz IAPX 88. The iAPX 188 is upward compatible with iAPX 86 and 88 software and adds 10 new instruction types to the existing set. TOP BOTTOM so .. 51 52 AROY CLKOUT RESET .X2 Xl vss ALE/aSO RD/aSMO WRiaSl TMR IN 1 TMR INO ORal , ORQO Figure 2. 80188 Pinout Diagram Table 1. 80188 Pin Description Pin Symbol No. Type Name and Function Vcc, Vcc 9,43 I System Power: +5 volt power supply. Vss, Vss 26,60 I System Ground. RESET 57 0 Reset Output Indicates that the 80188 CPU is being reset, and can be used as a system reset. It is active HIGH, synchronized with the processor clock, and lasts an integer number of clock periods corresponding to the length of the RES signal. X1, X2 59,58 I Crystal Inputs, X1 and X2, provide an external connection for a fundamental mode parallel resonant crystal for the internal crystal oscillator. X1 can inter- face to an external clock instead of a crystal. The input or oscillator frequency is Internally divided by two to generate the clock signal (CLKOUT). CLKOUT 56 0 Clock Output provides the system with a 50% duty cycle waveform. All device pin timings are specified relative to CLKOUT. CLKOUT has.sufficient MOS drive capabilities for the 8087 Numeric Processor Extension. RES 24 I System Reset causes the 80188 to immediately terminate its present activity, clear the internal logic, and enter a dormant state. This signal may be asyn- chronous to the 80188 clock. The 80188 begins fetching instructions approxi- , mately 7 clock cycles after RES is returned HIGH. RES is required to be LOW for greater than 4 clock cycles and is intern~synchronized. For proper initializa- tion, the LOW-to-HIGH transition of RES must occur no sooner than 50 microseconds after power up. This input is provided with a Schmitt-trigger to facilitate power-on RES generation via an RC network. When RES occurs, the 80188 will drive the status lines to an inactive level for one clock, and then tri-state them. 3-107 AFN,l)1483A intel' iAPX 188 Table 1. 80188 Pin Description (Contjnued) Pin Symbol No, Type Name afld FUnction TEST 47 I TEST IS examined by the WAIT instruction. If the TEST Input IS HIGH when "WAIT" execution begins, Instruction execution will suspend. TEST will be resampled until It goes LOW, at which time execution will resume. If interrupts are enabled while the 80188 IS waiting for TEST, Interrupts will be serviced. This Input IS synchronized Internally. TMR IN 0, 20 I Timer Inputs are used either as clock or control Signals, depending upon the TMR INl 21 I programmed timer mode. These Inputs are active HIGH (or LOW-to-HIGH tranSItions are counted) and internally synchronized. TMR OUT 0, 22 a Timer outputs are used to provide Single pulse or continuous waveform gener- TMR OUT 1 23 a atlon, depending UpOIl the timer mode selected. DRaO 18 I DMA Request IS driven 'HIGH by an external device when It desires that a ORal 19 I DMA channel (Channel 0 or 1) perform a transfer. These signals are active HIGH, level-triggered, and internally synchronized. NMI 46 I Non-Maskable Interrupt is an edge-triggered input which cCluses a type 2 Interrupt. NMI is no! maskable internally. A transition 'from a LOW to HIGH initiates the Interrupt at the next instruction boundary. NMI IS latched inter- nally. An NMI duration of one clock or more will guarantee service. This input IS internal!y synchronized. INTO,INT1, 45,44 I Maskable Interrupt Requests can be requested by strobing one of these pins. INT2/INTAO 42 I/O When configured as inputs, these pins are active HIGH. Interrupt Requests are INT3/INTAl 41 I/O synchronized Internally. INT2 and INT3 may be configured via software to prOVide Clctive-LOW Interrupt-acknowledge output signals. All Interrupt inputs may be configured via software to be either edge- or level-triggered. To ensure recognition, all interrupt requests must remain active until the interrupt is acknowleged. When iRMX mode is selected, the function of these pinS changes (see Interrupt Controller section of this data sheet). A19/S6, 65-68 a Address Bus Outputs (16-19) and Bus Cycle Status (3-6) reflect the four most A18/S5, a significant address bits during T1' These Signals are active HIGH. During T2, A17/S4, a T3, Tw, and T4, status Information IS available on these lines as encoded A16/S3 a below. Low High I 56 I Processor Cycle I DMA Cycle I 53,54, and 55 are defined as LOW during T2-T4. AD7-ADO 2,4,6,8, I/O Address/Data Bus (0-7) Signals constitute the time mutiplexed memory or I/O 11,13,15,17 address (Tl) and data (T2, T3, Tw, and T4) bus. The bus IS active HIGH. A15-A8 1,3,5,7 a Address-only Bus (8-15). containing valid address from T1-T4. The bus is active 10,12,14,16 HIGH. S7 64 a This signal is always HIGH to indicate that the 80188 has an 8-bit data bus, and is tri-state OFF during bus HOLD. 3-108 AFN-01483A iAPX 188 Table 1. 801(18 Pin Description (Continued) Pin Symbol No. Type Name and Function ALE/QSO 61 a Address Latch Enable/Queue Status 0 is provided by the 80188 to latch the address into the 8282/8283 address latches. ALE is active HIGH. Addresses are guaranteed to be valid on the trailing edge of ALE. The ALE rising edge is generated off the rising edge of the CLKOUT immediately preceding T1 of the associated bus cycle, effectively one· half clock cycle earlier than in the stan- dard 80188 The trailing edge is generated off the CLKOUT rising edge in T1 as in the 80188 Note that ALE is never floated. WR/QS1 63 a Write Strobe/Queue Status 1 indicates that the data on the bus is to be written into a memory or an I/O device. WR is active for T2, T3, and Tw of any write cycle. It is active LOW, and floats during" HOLD." It is driven HIGH for one clock during Reset, and then floated. When the 80188 is in queue status mode, the ALE/QSO and WR/QS1 pins provide information about processor/instruction queue interaction. QS1 QSO Queue Operation 0 0 No queue operation 0 1 First opcode byte fetched from the queue 1 1 Subsequent byte fetched from the queue 1 0 Empty the queue RD/QSMD 62 a Read Strobe indicates that the 80188 is performing a memory or I/O read cycle. RD is active LOW for T2, T3, and Tw of any read cycle. It is guaranteed not to go LOW in T2 until after the Address Bus is floated. RD is active LOW, and floats during "HOLD." RD is driven HIGH for one clock during Reset, and then the output driver is floated. Aweak internal pull-up mechanism on the RD line hols it HIGH when the line is not driven. During RESET the pin is sampled to determine whether the 80188 should provide ALE, WR, and RD, or if the Queue-Status should be provided. RD should be connected to GND to provide Queue-Status data. ARDY 55 I Asynchronous Ready informs the 80188 that the addressed memory space or I/O device will complete a data transfer. The ARDY input pin will accept an asynchronous input. and is active HIGH. Only the riSing edge is internally synchronized by the 80188. This means that the falling edge of ARDY must be synchronized to the 80188 clock. If connected to Vee, no WAIT states are inserted. Asynchronous ready (ARDY) or synchronous ready (SRDY) must be active to terminate a bus cycle. If unused, this line should be tied low. SRDY 49 I Synchronous Ready must be synchronized externally to the 80188. The use of SRDY provides a relaxed system-timing specification on the Ready input. This is accomplished by elimmating the one-half clock cycle which is required for internally resolving the signal level when using the ARDY input. This line is active HIGH. If this line is connected to Vee, no WAIT states are inserted. Asynchronous ready (ARDY) or synchronous ready (SRDY) must be active before a bus cycle is terminated. If unused, thislin~ should be tied low. LOCK 48 a LOCK output indicates that other system bus masters are not to gain control of the system bus while LOCK is active LOW. The LOCK signal is requested by the LOCK prefix instruction and is activated at the beginning of the first data cycle associated with the instruction following the LOCK prefix. It remains active until the completion olthe instruction following the LOCK prefix. No prefetches will occur while LOCK is asserted. LOCK is active LOW, is driven HIGH for one clock during RESET, and then floated. If unused, this line should be tied low. 3-109 AFN-01483A iAPX 188 Table 1. 80188 Pin Description (Continued) Pin Symbol No. Type Name and Function SO,S1,S2 52-54 0 Bus cycle status SO-~ are encoded to provide bus-transaction information: 80188 Bus Cycle Status Information ~ 51 SO Bus.Cycle Initiated 0 0 0 Interrupt Acknowledge 0 0 I Read I/O I 0 0 1 1 0 1 Write I/O Halt 1 0 0 Instruction Fetch 1 0 1 Read Data from Memory 1 1 0 Write Data to Memory 1 1 1 Passive (no bus cycle) The status pins float during "HOLD." S2 may be used ,as a logical M/IO indicator, and 51 as a DT/R indicator. The status lines are driven HIGH for one clock during Reset, and then floated until a bus cycle begins. HOLD (input) 50 I HOLD indicates that another bus master is requesting the local bus. The HOLD HLDA (output) 51 0 input is active HIGH. HOLD may be asynchronous with respect to the 80188 clock. The 80188 will issue a HLDA in response to a HOLD request at the end of T4 or TI. Simultaneous with the issuance of HLDA, the 80188 will float the local bus and control lines. After HOLD is detected as being LOW, the 80188 will lower HLDA. When the 80188 needs to run another bus cycle, it will again drive the local bus and control lines. UCS 34 0 Upper Memory Chip Select is an active LOW output whenever a memory reference is made to the defined upper portion (1 K-256K block) of memory. This line is not floated during bus HOLD. The address range activating UCS is software programmable. LCS 33 0 Lower Memory Chip Select is active LOW whenever a memory reference is made to the defined lower portion (1 K-256K) of memory. This line is not floated during bus HOLD. The address range activating LCS is software programmable. / MCSO-3 38,37,36,35 0 Mid-Range Memory Chip Select signals are active LOW when a memory reference is made to the defined mid-range portion of memory (8K-512K). These lines are not floated during bus HOLD. The address ranges activating MCSO-3 are software programmable. PCSO-4 25.27-30 0 Peripheral Chip Select signals 0-4 are active LOW when a reference is made to the defined peripheral area (64K byte I/O space). These lines are not floated during bus HOLD. The address ranges activating PCSO-4 are software programmable. PCS5/A1 31 0 Peripheral Chip Select 5 or Latched A1 may be programmed to provide a sixth peripheral chip select, or to provide an internally latched A1 signal. The address range activating PCS5 is software programmable. When programmed to provide latched A1, rather than PCS5, this pin will retain the previously latched value of A1 during a bus HOLD. AI is active HIGH. PCS6/A2 32 0 Peripheral Chip Select 6 or Latched A2 may be programmed to provide a seventh peripheral chip select, or to provide an internally latched A2 signal. The address range activating PCS6 is softwa~ogrammable. When pro- grammed to provide latched A2, rather than PCS6, this pin will retain the previously latched value of A2 during a bus HOLD. A2 is active HIGH. DT/R 40 0 Data Transmit/Receive controls the direction of data flow through the external 8286/8287 data bus transceiver. When LOW, data is transferred to the 80188. When HIGH the 80188 places write data on the data bus. DEN 39 0 Data Enable is provided as an 8286/8287 data bus transceiver output enable. DE~s active LOW during each memory and I/O access. DEN is HIGH whenever DT/R changes state. 3-110 AFN'()1483A intJ iAPX 188 FUNCTIONAL DESCRIPTION Segment Registers Four 16-bit special purpose registers select, at any Introduction given time, the segments of memory that are immedi- ately addressable for code, stack, and data. (For The following Functional Description describes the usage, refer to Memory Organization.) , base architecture of the iAPX 188. This architecture is common to the iAPX 86, 88, and 286 microprocessor families as well. The iAPX 186 is a very high integration Base and Index Registers 8-bit microprocessor. It combines 15-20 of the most Four of the general purpose registers may also be common microprocessor system components onto one used to determine offset addresses of operands in chip while providing twice the performance of the memory. These registers may contain base ad- standard iAPX 88. The 80188 is object code compatible dresses or indexes to particular locations within a with the iAPX 86,88 microprocessors and adds 10 new segment. The addressing mode selects the specific instruction types to the existing iAPX 86, 88 instruction registers for operand and address calculations. set. Status and Control Registers Two 16-bit special purpose registers record or alter iAPX 188 BASE ARCHITECTURE certain aspects' of the 80188 processor state. These The iAPX86, 88,186,188, and 286family all contain the are the Instruction Pointer Register, which contains same basic set of registers, instructions and addressing the offset address of the next sequential instruction' modes. The 80188 processor is upward compatible to be executed, and the Status Word Register, which with the 8086, 8088, 80186, and 80286 CPUs. contains status and control flag bits (see Figures 3a and 3b). Register Set The 80188 base architecture has fourteen 'registers as shown in Figures 3a and 3b. These registers are Status Word Description grouped into the following categories. The Status Word records specific characteristics of General Registers the result of logical and arithmetic instructions (bits Eight 16-bit general purpose registers used to con- 0, 2,4, 6, 7, and 11) and controls the operation of the tain arithmetic and logical operands. Four of these 80188 within a given operating mode (bits 8, 9, and (AX, BX, CX, and DX) can be used as 16-bit registers 10). The Status Word Register is 16-bits wide. The or split into pairs of separate 8-bit registers. function of the Status Word bits is shown in Table 2. 16-81T SPECIAL REGISTER l REGISTER NAME FUNCTIONS 7 o 15 0 Byre ADDRESSABLE AX AH AL } MULTIPLY/DIVIDE CS ~ CODE SEGMENT SELECTOR 110 INSTRUCTIONS (8-BIT OX DH DL OS DATA SEGMENT SELECTOR REGISTER NAMES cx CH CL ) LOOPISHIFTIREPEATICOUNT SS STACK SEGMENT SELECTOR SHOWN) ax aH aL ES eXTRA SEGMENT SELECTOR } BASE REGISTERS BP SEGMENT REGISTERS SI 01 SP } ) INDEX REGISTERS STACK POINTER F IP I 15 0 I STATUS WORD I------~ INSTRUCTION POINTER 15 STATUS AND CONTROL GENERAL REGISTERS REGISTERS Figure 3a. 80188 General Purpose Register Set 3-111 AFN··M483A inter iAPX 188 STATUS FLAGS CAARY - - - - - - - - - - - - - - - - . PARITY - - - - - - - - - - - - - - - - - AUXILIARY CARRY - - - - - - - - - - - - - - - - - - - , ZERO - - - - - - - - - - - - , SIGN ~---------__, CONTROL FLAGS ' - - - - - - - TRAP FLAG ' - - - - - - - - - INTERRUPT ENABLE '--~~------- DIRECTION FI,.AG ~ INTEL RESERVED Figure 3b. Status Word Format Table 2. Status Word Bit Functions manipulation, control transfer, high-level instruc- Bit tions, and processor control. These categories are Name Function summarized in Figure 4. Position 0 CF Carry Flag-Set on high-order bit An 80188 instruction can reference anywher.e from carry or borrow, cleared otherWise zero to several operands. An operand can reside in a 2 PF Panty Flag-Set If low-order 8 bits register, in the instruction itself, or in memory. Spe- of result contain an even number of cific operand addressing modes are discussed later 1-bltS, cleared otherWise in this data sheet. 4 AF Set on carry from or borrow to the low order four bits of AL, cleared otherWise Memory Organization 6 ZF Zero Flag-Set If result IS zero, cleared otherWise Memory is organized in sets of segments. Each seg- 7 SF Sign Flag-Set equal to high-order ment is a linear contiguous sequence of up to 64K bit of result (0 If positive, 1 If negative) (216 ) 8-bit bytes. Memory is addressed using a two- 8 TF component address (a pointer) that consists of a Single Step Flag-Once set. a sin- gle step Interrupt occurs after the 16-bit base segment and a 16-bit offset. The 16-bit next Instruction executes TF IS base values are contained in one of four internal cleared by the single step Interrupt. segment registers (code, data, stack, extra). The 9 IF Interrupt-enable Flag-When set, physical address is calculated by shi·fting the base maskable Interrupts Will cause the value LEFT by four bits and adding the 16-bit offset CPU to transfer contralto an inter- value to yield a 20-bit physical i'lddress (see Figure 5). rupt vector specified location. This allows for a 1 MByte physical address size. 10 OF Direction Flag-Causes string instructions to auto decrement All instructions that address operands in memory the appropriate index register must specify the base segment and the 16-bit offset when set. Clearing OF causes value. For speed and compact instruction encoding, auto increment. the segment register used for physical address gen- 11 OF Overflow Flag-Set if the signed eration is implied by the addressing mode used (see result cannot be expressed Table 3). These rules follow the way programs are within the number of bits in the destination operand; cleared written (see Figure 6) as independent modules that otherwise require areas for code and data, a stack, and access to external data areas. Instruction Set Special segment override instruction prefixes allow the implicit segment register selection rules to be The instruction set is divided into seven categories: overridden for special cases. The stack, data, and data transfer, arithmetic, shift/rotate/logical, string extra segments may coincide for simple programs. 3-112 AFN-01483A iAPX 1e8, GENERAL PURPOSE MOVS MOve byte cir word string' MOV Move byte or word INS Input bytes or word string PUSH Push word onto stack OUTS Output bytes or word string POP Pop word off stack CMPS Compare byte or word string PUSHA Push all registers on stack SCAS Scan byte or word string POPA Pop all registers from stack LODS Load byte or word string XCHG Exchange byte or word STOS Store byte or word string XLAT Translate byte REP, Repeat INPUT/OUTPUT REPElREPZ Repeat,whlle equal/zero ' IN Input byte or word REPNE/REPNZ Repeat while not equal/not zero OUT Output byte or word LOGICALS ADDRESS OBJECT NOT "Not" byte or word LEA Load effective address AND "And" byte or word LDS Load pOinter using DS OR ' "Inclusive or" byte or word LES Load pOinter uSing ES XOR "Exclusive or" byte or word FLAG TRANSFER TEST "Test" byte or word LAHF Load AH register from flags SHIFTS SAHF Store AH register in flags ' . , SHUSAL Shift logical/arithmetic left byte or word PUSHF Push flags onto stack' SHR Shift logical right byte or word POPF Pop flags off stack SA~ Shift arithmetic right byte or word ROTATES ADDITION ROL Rotate left byte or word ADD Add byte or word ROR Rotate right byte or word ADC Add byte or word with carry RCL Rotate through carry left byte or word INC Increment byte or word by 1 RCR Rotate through carry right byte or word AAA ASCII adjust for additIOn DAA DeCimal adjust for addition FLAG OPERATIONS SUBTRACTION STC Set carry flag SUB Subtract byte or word CLC Clear carry flag SBB Subtract byte or word With borrow CMC Complement carry flag DEC Decrement byte or word by 1 STD Set direction flag NEG Negate byte or word CLD CI~ar direction flag CMP Compare byte or word STI Set Interrupt enable flag. AAS ASCII adjust for subtraction CLI Clear Interrupt enable flag DAS DeCimal adjust for subtraction E)(T~RNAL SYNCHRONIZATION MULTIPLICATION HLT lialt until interrupt or reset MUL Multiply byte or word unsigned WAIT Walt for.TEST pin active IMUL Integer multiply byte or word ESC Escape tq extension processor AAM ASCII adjust for multiply LOCK Lock bus dUring next Instruction DIVISION ' NO OFiERATION DIV DIVide byte or word unsigned NOP , No oper!ltlon , IDIV Integer diVide byte or word HIGH LEVEL INSTRUCTIONS AAD ASCII adjust for diVISion ENTER Format stack for procedure entry CBW Convert byte to word LEAVE Restore stack for procedure eXit CWD Convert word to doubleword ·BOUND Detects values outside preSCribed range Figure 4. IAPX 188 Ins.ructlon Set 3·11G AFN-Q14B3A intJ iAPX188 CONDITIONAL TRANSFERS UNCONDITIONAL TRANSFERS JAlJNBE Jump If abovelnot below nor equal CALL Call procedure JAE/JNB Jump if above or equallnot below RET Return from procedure JB/JNAE Jump if belowlnot al:>ove nor equal JMP Jump JBE/JNA Jump if below or equallnot above JC Jump if carry ITERATION CONTROLS JE/JZ Jump if equal/zero JG/JNLE Jump if greater/not less nor equal LOOP Loop JGE/~NL Jump if greater or equal/not less LOOPE/LOOPZ Loop if equal/zero JUJNGE Jump if lesslnot greater nor equal LOOPNE/LOOPNZ Loop if not equal/not zero JLE/JNG Jump if less or equal/not greater JCXZ Jump if register CX = 0 JNC Jump if not carry JNE/JNZ Jump if not equal/not zero INTERRUPTS JNO Jump if not overflow JNP/JPO Jump If not parity/parity odd INT Interrupt JNS Jump If not sign INTO Interrupt if overflow JO Jump If overflow IRET Interq,Jpt return JP/JPE Jump if parity/parity even JS Jump If sign Figure 4. iAPX 188 Instruction Set (continued) To access operands that do not reside in one of the four immediately available segments, a full 32-bit r - - -, pointer can be used to reload both the base (seg- I I ~ ODE ment) and offset values. MODULE A DATA ;HfFT lEFT 4 BITS I 1 2 3 4 l~i~~ENT} I I I 15 0 LOGICAL 1 19 12"t i 01 ""1_ ---.., 0 0 0 2 2 JOFFSET ADDRESS CPU MODULE B f--~t--, r-~~_~15==:J l.~lo 0' 'I' ! CODE 15 0 I 1 2 3 6 2 I PHYSICAL ADDRESS DATA ~19--""'--!O TOMEMOAY STACK PROCESS EXTRA STACK SEGMENT Figure 5. 1\vo Component Address REG!STERS Table 3. Segment Register Selection Rules PROCESS Memory Segment DATA Reference Register Implicit Segment BLOCK 1 Needed Used Selection Rule Instructions Code (CS) Instruction prefetch and immediate data. Stack 8tack (S8) All stack pushes and PROCESSD DA'tA pops; any memory refer- BLOCK 2 ences which use BP Reg- ister as a base register. I I L ___ J External Extra (ES) All string instruction MEMORY Data references which use (Global) the 01 register as an index. Figure 6. Segmented Memory Helps Local Data Data (OS) All other data references. Structure Software 3-114 AFN-01483A intJ IAPX 188 Addressing Modes Data Types The 80188 provides eight categories of addressing The 80188·directly supports the following data types: modes to specify operands. Two addressing modes • Integer: A signed binary numeric value contained are provided for instructions that operate on register in an 8-bit byte or a 16-bit word: All operations or immediate operands: assume a 2's complement representation. Signed • Register Operand Mode: The operand is located in 32- and 64-bit integers are supported using the one of the 8- or 16-bit general reg isters. iAPX 188120 Numeric Data Processor. • Immediate Operand Mode: The operand is in- • Ordinal: An unsigned binary numeric value con- cluded in the instruction. tained in an 8-bit byte or a 16-bit word. • Pointer: A 16- or 32-bit quantity, composed of a Six modes are provided to specify the location of an 16-bit offset component or a 16-bit segment base operand in a memory segment. A memory operand component in addition to a 16-bit offset address consists of two 16-bit components: a seg- component. ment base and an offset. The segment base is sup- • String: A contiguous sequence of bytes or words. plied by a 16-bit segment register either implicity A string may contain from 1 to 64K bytes. chosen by the addressing mode or explicitly chosen by a segment override prefix. The offset, also called • ASCII: A byte representation of alphanumeric and the effective address, is calculated by summing any control characters using the ASCII standard of combination of the following three address character representation. elements: • BCD: A byte (unpacked) representation of the de- cimal digits 0-9. • the displacement (an 8- or 16-bit immediate value contained in the instruction); • Packed BCD: A byte (packed) representation of two decimal digits (0-9). One digit is stored in each • the base (contents of either the BX or BP base nibble (4-bits) of the byte. registers); and • Floating Point: A signed 32-, 64-, or 80-bit real • the index (contents of either the SI or 01 index number representation. (Floating point operands reg iste rs). are supported using the iAPX 188/20 Numeric Data Processor configuration.) Any carry out from the 16-bit addition is ignored. Eight-bit displacements are sign extended to 16-bit values. . In general, individual data elements must fit within defined segment limits. Figure 7 graphically represents the data types supported by the iAPX 188. Combinations of these three address elements define the six memory addressing modes, described below. I/O Space • Direct Mode: The operand's offset is contained in The I/O space consists of 64K 8-bit or 32K 16-bit the instruction as an 8- or 16-bit displacement ports. Separate instructions address the 110 space element. - with either an 8-bit port address, specified in the • Register Indirect Mode: The operand's offset is in instruction, or a 16-bit port address in the OX regis- one of the registers SI, 01, BX, or BP. ter. 8-bit port addresses are zero extended such that • Based Mode: The operand's offset is the sum of an A1s-Aa are LOW I/O port addresses 00F8(H) through 8- or 16-bit displacement and the contents of a OOFF(H) are reserved. base register (BX or BP). Interrupts • Indexed Mode: The operand's offset is the sum of an 8- or 16-bit displacement and the contents of an An interrupt transfers execution to a new program index register (SI or 01). location. The old program address (CS:IP). and ma- • Based Indexed Mode: The operand's offset is the chine state (Status Word) are saved on the stack to sum of the contents of a base register and an index allow resumption of the interrupted program. Inter- register. rupts fall into three classes: hardware initiated, INT • Based Indexed Mode with Displacement: The instructions, and instruction exceptions. Hardware operand's offset is the sum of a base register's initiated interrupts occur in response to an external . contents, an index register's contents, and an 8- or input and are classified as non-maskable or 16-bit displacement. maskable. 3-115 iiFN.:ol483A IAPX 1'88' Programs may cause an interrupt with, 'an INT in- struction. Instruction exceptions occur when an un- usual conQition, which prevents further instruction processing" is detected while attempting to execute 7 0 an, instruction., If the exception was caused by ex- SIGNED ITfTTT1'Tl , BYTE U-....:..-J ecuting an ESC instruction with the ESC trap bit set SIGN BIT J L--......J in the relocation register, the return instruction will MAGNITUDE point to the ESC instruction, or to the segment over- 7 0 UNSIGNED rrnT"T1 ride prefix immediately preceding the ESC instruc- BVTE~ tion if the prefix was present. In all other cases, the ~ return address from an exception will point at the MAGNITUDE 1514 + 1 8 7 0 instruction immediately following the instruction s~~~g II iii riii Iii iii iii causing the exception. SIGN BIT .../ 1....1'-..::M"iS:;'A:;;G;u.NIToTUo.;D;;;"E---' A table containing up to 256 pointers defines the SIGNED 31 +3 +2 1615 +1 'I 0 proper interrupt service routine for each interrupt. D~~~~~ Iii iii iii iii I' iii iii f iii I! ' I Iii' I InterrlJpts 0-31, some of which are used for instruc- SIGN BI.T J I....IL.::.M:::S::.B--"M"'A;;;GNillITToU"'D.E--,_ _ _- ' tion exceptions, are reserved, Table 4 shows the 80188 ,predefined types and default priority levels, , +7 +6 +5 +4 +3 +2·' +1 SIGNED 63 4847 32 31 1615 For each interrupt, an 8-bit vector must be supplied w~~~~11 I I I, to the' 80188 which identifies the appropriate table SIGN BIT JL1L....:;M:::S.::.B----,M"'A""G"'N=ITU"'D"'E--'-----' entry. ExcePtions supply the interrupt vector inter- nally, In addition, internal peripherals and rion- • 15 +1 0 cascaded external interrupts will generate their own ~NS~~~g )' I I I iii Iii 1iii I f vectors thrQugh the internal interrupt controller, INT ,LMSB MAGNITUDE instructions, bontain or imply the vector and allow 7 +1 07 0 access to all 256 interrupts. Maskabfe hardware in- BINARY 7 +N 0 ~ODED (TTTTTTTl )'iittil)'!'I"! I itiated interrupts supply the 8-bit vector to the CPU DECIMAL L....:...-J Be'D during an interrupt acknowledge bus sequence. DI~~~ N BCD (BCD) ,DIGIT 1 DIGIT 0 Non-maskable hardware interrupts use a predefined 7 +N 0 7 +1 07 0 internally supplied vector. ASCII~ liiililir"lii') ASCII CHARACTER. CHARACTER, ASCII ASCII CHARACTERo Interrupt Sources 7 +'1 0 7 +1 07 0 ,0 PACKED BCD rrnT"T1 L-L...J ",I lii'J iil Iii' I The 80188,can service interrupts generated by soft- L-..J L-..J ware or hardware, The software interrupts are MOST LEAST SIGNIFICANT DIGIT SIGNIFICANT DIGIT generated by specific instructions (INT, ESC, unl.lsed OP, etc.) or the, results of conditions specified by 715 ,+N ,0 715 +1, 0715 0 0 instructions (array bounds check, INTO, DIV, IDIV, STRING~ I'i.iliii)iiilii'l etc,). All interrupt soutces are serviced by an indirect B¥TE WORD N eYTE WORD 1 BYTE WORD 0 call through an element of a vector table, This vector 31 +3 ;-2 1615 +1 t' 0 0 POINTER Iii iii', iii' II Iii iii iii iii Iii iii iii table is Indexed by using the interrupt vector type (Table 4), multiplied by four. All hardware-generated I SELECTOR OFFSET interrupts are sampled at the end of each instruction, 79+9 +8 +7 +6 +5 +4 +3 +2 +1 Thus, the,softwareinterrupts will begin service first. Once the service routine is entered and interrupts are enabled, any hardware source of suffici,ent EXPONENT MAGNITUDE priority can interrupt the service routine in progress. NqI'E;, 'SUPPORTED BY IAPX 188120 NUMERIC DATA PROCESSOR ,The software gener,ted 80188 interrupts are described CONFIGURATION below. DIVIDE ERROR EXCEPTION (TYPE 0) Generated when a DIV or IDIV instruction quotient carrnot be expressed in the number of bits in the Figure 7. iAPX 188 Supported Data Types destination. 3-116 AFN-01483A IAPX 188 Table 4. 80188 Interrupt Vectors INTO .DETECTED OVERFLOW EXCEPTION (TYPE 4) Vector Default Related Generated during an INTO instruction if the OF bit is Interrupt Name Type Priority Instructions Divide Error 0 ., DIV,IDIV set. Exception ARRAY BOUNDS EXCEPTION (TYPE 5) Single Step 1 12··2 All Interrupt Generated during a BOUND instruction if the array NMI 2 1 All index is outside the array bounds'. The array bounds Breakpoint 3 ·1 INT are located in memory at a location indicated by one Interrupt of the instruction operands. The other operand indi- INTO Detected 4 .·1 INTO cates the value of ttie index to be checked. Overflow Exception Array Bounds 5 ·1, BOUND UNUSED OPCODE EXCEPTION (TYPE 6) Except!on Generated if execution is attempted on undefined Unused·Opcode 6 ·1 Undefined opcodes. Exception Opcodes ESC Opcode 7 *1··· ESC Opcodes Exception ESCAPE OPCODE EXCEPTION (TYPE 7) Timer 0 Interrupt 8 2A···· Generated if execution is attempted of ESC opcodes Timer 1 Interrupt 18 2B···· (08H-~FH). This exception will only be generated if a Timer 2 Interrupt 19 2C···· bit in the relocation register is set. The return ad- Reserved 9 3 dress of this exception will point to the ESC instruc- DMA 0 Interrupt 10 4 DMA 1 Interrupt 11 5 tion causing the exception. If a segment override INTO Interrupt 12 6 prefix preceded the ESC instruction, the return ad- INT1 Interrupt 13 7 dress will point to the segment override prefix. INT2 Interrupt 14 8 INT3 Interrupt 15 9 Hardware-generated interrupts are divided into two NOTES: groups: maskable interrupts and non-maskable in- ·1 These are generated as the result of an instruction terrupts. The 80188 provides maskable hardware in- execution, terrupt request pins INTO-INT3. In addition, ··2. This is handled as In the 8088 maskable interrupts may be generated by the 80188 ····3., All three timers constitute one source of request to the Interrupt controller The Timer Interrupts all have the same integrated OMA controller and the integrated timer default priority level With respect to all other Interrupt unit.· The vector types for these interrupts is shown in sources However, they have a defined Priority ordering Table 4. Software enables these inputs by se1ting the amongst themselves (Priority 2A IS higher Priority than interrupt flag bit (IF) in the Sta~us Word. The interrupt 29) Each Timer Interrupt has a separate vector type controller is discussed in the peripheral section of number 4 Default priorities for the Interrupt sources are used only If this data sheet. the user does not program each source into a unique Priority level Further maskable interrupts are disabled while ···5 An escape opcode will cause a trap only If the proper bit IS servicing an interrupt because the IF bit is reset as set In the peripheral coptrol block relocation register. part of the response to an interrupt or exception. The saved Status Word will reflect the enable status of the processor prior to the interrupt. The interrupt flag SINGLE-STEP INTERRUPT (TYPE 1) will remain zero unless specifically set. The interrupt Generated after most instructions if the TF flag is set. return instruction restores the Status Word, thereby Interrupts will not be generated after prefix·instruc- restoring the original status of IF bit. If the interrupt tions (e.g., REP), instructions which modify segment return re-enables interrupts, and another interrupt is registers (e.g., POP OS), or the WAIT instruction. pending, the 80188 will immediately service the highest-priority interrupt pending, I.e., no instruc- NON-MASKABLE INTERRUPT-NMI. (TYPE 2) tio~s of the main line program will be executed. An external interrupt source which cannot be masked. Non·Maskable Interrupt Request (NMI) BREAKPOINT INTERRUPT, (TYPE 3) A non-maskable interrupt (NMI) is also provided. A one-byte version of the INT instruction. It uses 12 This interrupt is serviced regardless of the state of as an index into the service routine address table the IF bit. A typical use of NMI would be to activate a (because it is a type 3 interrupt). power failure routine. Jhe activation of this input 3-117 AFN-01483A iAPX 188 causes an interrupt with an internally supplied vector the same end result. The differences between the . value of 2. No external interrupt acknowledge se- 80188 and 80186 are outlined below. Internally, there quence IS performed. The IF bit is cleared at the are three differences between the 80188 and the beginning of an NMI interrupt to prevent maskable 80186. All changes are related to the 8-bit bus interface. interrupts from being serviced. • The queue length is 4 bytes in the 80188, whereas the 80186 queue contains 6 bytes, or three words. The queue was shortened to prevent overuse of the Single-Step .Interrupt bus by the BIU when prefetching instructions. This was required because of the additional time neces- The 80188 has an internal interrupt that allows pro- sary to fetch instructions 8 bits at a time. grams to execute one instruction at a time. It is called • To further optimize the queue, the prefetching algo- the single-step interrupt and is controlled by the rithm was changed. The 80188 BIU will fetch a new single-step flag bit (TF) in the Status Word. Once this instruction to load into the queue each time there is bit is set, an internal single-step interrupt will occur a 1-byte hole (space available) in the queue. The after the next instruction has been executed. The 80186 waits until a 2-byte space is available. interrupt clears the TF bit and uses an internally • The internal execution time of the instruction is supplied vector of 1. The IRET instruction is used to affected by the 8-bit interface. All 16-bit fetches and set the TF bit and transfer control to the next instruc- writes from/to memory take an additional four clock tion to be single-stepped. cycles. The CPU may also be limited by the speed of instruction fetches when a series of simple opera- Initialization and Processor Reset tions occur. When the more sophisticated instruc- tions of the 801S8 ·are being used, the queue has Processor initialization or startup is accomplished by time to fill and the execution proceeds as fast as the driving the RES input pin LOW. RES forces the 80188 to execution unit will allow. terminate all execution and local bus activity. No instructionor bus activity will occur as long as RES is The 80188 and 80186 are completely software compat- active. After RES becomes inactive and an internal pro- ible by virture of their identical execution units. Soft- cessing interval elapses, the 80188 begins execution ware that is system dependent may not be completely withthe instruction at physical location FFFFO(H). RES transferable, but software that is not system depen- also sets some registers to predefined values as shown dent will operate equally well on an 80188 oran 80186. in Table 5. Table 5. 80188 Initial Register State after RESET The hardware interface of the 80188 contains the major differences between the two CPUs. The pin Status Word F002(H) assignments are nearly identical, however, with the Instruction Poi nter OOOO(H) Code Segment FFFF(H) following functional changes. Data Segment OOOO(H) • AS-A15- These pins are only address outputs on Extra Segment OOOO(H) the 80188. These address lines are latched internally Stack Segment OOOO(H) and remain valid throughout a bus cycle in a manner Relocation Register 20FF(H) similar to the S085 upper-address lines. UMCS FFFB(H) • BHE has no meaning on the 80188 and has been eliminated. THE 801·88 COMPARED TO THE 80186 The 80188 CPU is an 8-bit processor designed around IAPX 188 CLOCK GENERATOR the 80186 internal structure. Most internal functions of the 80188 are identical to the equivalent 80186 .func- The iAPX 188 provides an on-chip clock generator tions. The 80188 handles the external bus the same for both internal and external clock generation. The way the 80186 does with the distinction of handling clock generator features a crystal oscillator, a divide- only 8 bits at a time. Sixteen bit operands !ire fetched by-two counter, synchronous and asynchronous or written in two consecutive bus cycles. Both proces- ready inputs, and reset circuitty. sors will appear identical to the poftware engineer, with the exception of execution\ time. The internal r~gister.structure is identical and all instructions have 3-118 AFN-01483A iAPX 188 Oscillator The oscillator circuit of the iAPX 188 is designed to edge of ARDY must be synchronized to the CLKOUT be used with a parallel resonant fundamental mode Signal if it will occur during T2, T3 or Tw. HIGH-to-LOW crystal. This is used as the time base for the iAPX 186. transitions of ARDY must be performed synchronously The crystal frequency selected will be double the to the CPU clock. CPU clock frequency. Use of an LC or RC circuit is not recommended with this oscillator. If an external oscil- A second ready input (SRDY) is provided to interface lator is used, it can be connected directly to input pin with externally synchronized ready signals. This input is X1 in lieu of a 'crystal. The output of the oscillator is sampied atthe end ofT2, T3 and again atthe end of each not directly available outside the iAPX 188. The Tw until it is sampled HIGH. By Using this input rather recommended crystal configuration is shown in than the asynchronous ready input, the half-clock cycle Figure 8. resolution time penalty is eliminated. This input must satisfy set-up and hold times to guarantee proper operation of the circuit. x,I--------I In addition, the iAPX 188, as part of the integrated c::::J 16 MHz CRYSTAL chip-select logic, has the capability to program WAIT x,I--------I states for memory and peripheral' blocks. This is dis- 80188 cussed in the Chip Select/Ready Logic description. RESET Logic The iAPX 188 provides both a RES input pin and a synchronized RESET pin for use with other system components. The RES input pin on the iAPX 188 is Figure 8. Recommended iAPX 188 Crystal provided with hysteresis in order to facilitate power- Configuration on Reset generation via an RC network. RESET is guaranteed to remain active for at least five clocks Clock Generator given a RES input of at least six clocks. RESET may be delayed up to two and one-half clocks behind The iAPX 188 clock generator provides the 50% duty RES. cycle processor clock for the iAPX 188. It does this by dividing the oscillator output by 2 forming the sym- Multiple iAPX 188 processors may be synchronized metrical clock. If an external oscillator is used, the through the RES input pin, since this input resets state of the clock generator will change on the falling both the processor and divide-by-two internal count- edge of the oscillator signal. The CLKOUT pin pro- er in the clock generator. In order to insure that the vides the processor clock signal for use outside the divide-by-two counters all begin counting at the iAPX 188., This may be used to drive other system same time, the active going edge of RES must satisfy components. All timings are referenced to the output a 25 ns setup time before the falling edge of the clock. 80188'clock input. In addition, in order to insure that all CPUs begin executing in the same clock cycle, the READY Synchronization reset must satisfy a 25 ns setup time before the rising edge of the CLKOUT signal of all the processors. The iAPX 188 provides both synchronous and asynch- ronous ready inputs. Asynchronou~ readysynchroniza- tion is accomplished by circuitry which samples ARDY in the middle ofT2 , T3and again in the middle of eachTw until. ARDY is sampled HIGH. One-half CLKOUT cycle of resolution time is used. Full synchronization is per- formed only onthe rising edge of ARDY, i.e., the falling 3-119 AFN-01483A iAPX 188 LOCAL BUS CONTROLLER The iAPX 188 provides a local bus controller to change mechanism. This means multiple masters util- generate the local bus control signals. In addition, it izing the same bus can operate at separate clock fre- employs a HOLD/HLDA protocol for relinquishing quencies. The iAPX 188 provides a Single HOLD/HLDA .the local bus to other bus masters. It also provides pair through which all other bus masters may gain control lines that can be used to enable external control of the local bus. This requires external circuitry buffers and to direct the 'flow of data on and off the to arbitrate which external device will gain control of local bus. the.bus from the iAPX 188 when there·is more than one aiternate'local bus master. When the iAPX 188 relin- quishes control of the local bus, it floats 0E'i\l, 1m, WR, Memory/Peripheral Control SO-S2, C"OCK, ADO-AD-15, A16-A19, 57, and DT/R to allow another master to drive these lines directly.. The iAPX 188 provides ALE, RD, and WR bus control signals. The RD and WR signals are used to strobe data from memory to the iAPX 188 or to strobe data The iAPX 188 HOLD latency time, i.e., the time be- from the iAPX 188 to memory. The ALE line provides tween HOLD request and HOLD acknowledge, is a a strobe to address latches for the multiplexed ad- function of the activity occurring in the processor dress/data bus. The iAPX 188 local bus controller when the HOLD request is received. A HOLD request does not provide a memory/I/O signal. If this is re- , is the highest-priority activity request which the pro- quired, the user will have to use the 52 signal (which cessor may receive: higher than instruction fetching will require external latching), make the memory and or internal DMA cycles. However, if a DMA cycle is in I/O spaces nonoverlapping, or use only the in- progress, the iAPX 188 will complete the transfer tegrated chip-select circuitry. before relinquishing the bus. This implies that if a HOLD request is received just as a DMA transfer begins, the HOLD latency time can be as great as 4 Transceiver Control bus cycles. This will occur if a DMA word transfer operation is taking place from an odd address to an The iAPX 188 generates two control signals to be odd address. This is a total of 16 clocks or more, if connected to 8286/8287 transceiver chips. This capa- WAIT states are required. In addition, if locked trans- bility allows the addition of transceivers for extra fers are performed, the HOLD, latency time will be buffering without adding external log.ic. These con- increased by the length of the locked transfer. trollines, DT!A and UEN, are generated to control the flow of data through the transceivers. The operation of these signals is shown in Table 6. Local Bus Controller and Reset Table 6. Transceiver Control Signals Description Pin Name Function Upon receipt of a RESET pulse from the RES input, DEN (Data Enable) Enables the output drivers of the local bus controller will perform the following the transceivers. It IS active .LOW during memory, I/O, or actions: INTA cycles. • Drive DEN, RD, and WR HIGH for one clock cycle, DT/R (Data Transmit/ Determines the direction of then float. Receive) travel through the iransceivers. A HIGH level directs data away NOTE: RD is also provided with an internal pull-up from the processor during write device to prevent the processor from inadvertently operations, while a LOW level entering Queue Status mode during reset. directs data toward the proces- sor during a read operation. • Drive SO-52 to the passive state (all HIGH) and then float. Local Bus Arbitration • Drive LOCK HIGH and then float. • Tristate ADO-7, A8-19, 57, DT/R. The iAPX 188 uses a HOLD/HLDA system of local bus • Drive ALE LOW (ALE is never flo,ated). exchange. This provides an asynchronous bus ex- • Drive HLDA LOW. 3-120 AFN'()l483A inter iAPX 188 INTERNAL PERIPHERAL INTERFACE All the iAPX 188 integrated peripherals arE! con- The integrated iAPX 188 peripherals operate seml- trolled via 16-bit registers contained within an inter- autonomously from the CPU. Access to them for the nal 256-byte control block. This control block may be most part is via software readlwrite of the control and mapped into either memory or 1/0 space. Internal data locations in the control block. Most of these logic will recognize the address and respond to the registers can be both read and written. A few bus cycle. During bus cycles to internal registers, the dedicated lines, such as interrupts and DMA request bus controller will signal the operation externally provide real-time communication between the CPU (i.e., the RD, WR, status, address, data, etc., line" will and peripherals as iri a more conventional system be driven as.!n a normal bus cycle), but 0 7-0, SRDY, utilizing discrete peripheral blocks. The overall inter- and ARDY will be ignored. The base address of the action and function of the peripheral,blocks has not control block must be on an even 256-byte boundary substantially changed. The data access from/to the (i.e., the lower 8 bits of the base address are all 256-byte internal control block will always be 16-bit zeros). All of the defined registers within this control and done in one bus cycle. block may be read or written by the 80188 CPU at any time. The location of any register contained within CHIP-SELECT/READY GENERATION the 256-byte control block is determined by the cur- LOGIC rent base address of the control block. The iAPX 188 contains logic which provides pro- The control block base address is programmed via a grammable chip-select generation for both 16-bit relocation register contained within the con- memories and peripherals. In addition, it can be pro- trol block at offset FEH from the base address of the grammed to provide READY (or WAIT state) genera- control block (see Figure 9). It provides the upper 12 tion. It can also provide latched address bits A1 and, bits of the base address of the control block. Note A2. The chip-select lines are' active for all memory that mapping the control register block into an ad- and I/O cycles in their programmed areas, whether dress range corresponding to a chip-select range is they be generated by the CPU or by the integrated not recommended (the chip select circuitry is dis- DMA unit. cussed later in this data sheet). In addition, bit 12 of this register determines whether the control block will be mapped into 1/0 or memory space. If this bit is Memory Chip Selects 1, the control block will be ,located in memory space, whereas if the bit is 0, the control block will be lo- The iAPX 188 provides 6 memory chip select outputs cated in 1/0 space. If the control register block is for 3 address areas: upper memory, lower memory, mapped into 1/0 space, the upper 4 bits of the base arid midrangE! memory. One each is provided for up~ address must be programmed as 0 (since I/O ad- per memory and lower memory, while four are pro- dresses are only 16 bits wide). vided for midrange memory. The range for each chip select is user-programmable In addition to providing relocation information for and can be set to 2K, 4K, 8K, 16K, 32K, 64K, 128K the control block, the relocation register contains (plws 1K and 256K for upper and lower chip selects). bits which place the interrupt controller into iRMX In addition, the beginning or base address of the' mode, and cause the CPU to interrupt upon en- midrange memory chip select may also be selected. countering ESC instructions. At RESET, the reloca- Only one chip select may be programmed to be ac- tion register is set to 20FFH. This causes th~ cont~ol tive for any memory location at a time. All chip select block to start at FFOOH in I/O space. An offset maP sizes are in bytes. of the 256-byte control register block is shown in Figure 10. 3-121 AFN'()1483A inter iAPX188 Relocation Address Bits Rl9-R8 ET = ESC Trap I No ESC Trap (1/0) MIlO = Realster block located In Memory I VO Space (1/0) RMX = Normal Interrupt Controller mode I IRMX compatible Interrupt Con!roller mOde (0/1) Figure 9. Relocatiol1 Register Table 7. UMCS Programming Values Ofl;SET Relocation Register FEH Starting Address Memory UMCS Value (Base BIGck (Assuming Address) Size RO=R1 =R~=O) DAH DMA Descriptors Channell FFCOO 1K' FFF8H DOH FF800 2K FFB8H FFOOO 4K FF38H FEOOO 8K FE38H CAH 16K FCOOO FC38H DMA Descriptors Channel 0 COH F8000 32K F838H FOOOO 64K F038H EOOOO 128K E038H CODOC 256K C038H ASH Chl/>,Select Control Registers AOH The lower limit of this memory block is defined in the UMCS register (see Figure 11). This register is at 66H offset AOH in the internal control block. The legal Timer 2 Control Registers values for bits 6-13 and, the resulting starting ad- 60H SEH dress and memory block sizes are given in Table 7. Timer 1 Control Registers Any combination of bits 6-13 not shown in Table 7 58H' 56H will result in undefined operation. After reset, the Timer 0 Control Registers UMCS register is programmed for a 1K area. It must SOH be reprogrammed if a larger upper memory area is desired. 3EH Interrupt Controller Registers Any internally generated 20-bit address whose upper 20H 16 bits are greater than or equal to UMCS (with bits 0-5 "0") will cause UCS to be activated. UMCS bits R2-RO are used to specify READY mode for the area Figure 10. Internal Register Map of memory defined by this chip-select register, as explained below. Upper Memory CS Lower Memory CS' The iAPX 188 provides a chip select, called UCS, for the top of memory. The top of memory is usually used The iAPX 188 provides a chip select for low memory as the system memory because after reset the iAPX called LCS. The bottom of memory contains the inter- 188 begins executing at memory location FFFFOH. rupt vector table, starting at location OOOOOH. The upper limit of memory defined by this chip select The lower limit of memory defined by this chip select is always FFFFFH, while the lower limit is program- is always OH, while the upper limit is programmable. • mabie. By programming the lower limit, the size of By programming the upper limit, the size of the the select block is also defined. Table 7 shows the memory block is also defined. Table 8 shows the relationship between the base address selected and relationship between the upper address selected and the size of the memory block obtained. the size of the memory block obtained. 3-122 AFN-Q14B3A intJ iAPX 188 Table 8. LMCS Programming Values by bits 8-14 of the MPCS register (see Figure 13). This register is at location A8H in the internal control Memory LMCS Value block. One and only one of bits 8-14 must be set at a Upper Block (Assuming time. Unpredictable operation of the MCS lines will Address Size RO=R1 =R2=O) otherwise occur. Each of the four chip-select lines is 003FFH 1K 0038H active for one of the four equal contiguous divisions 007FFH 2K 0078H of the mid-range block. Thus, if the total block size is OOFFFH 4K 00F8H 01FFFH 8K 01F8H 32K, each chip select is active for 8K of memory with 03FFFH 16K 03F8H MCSO being active for the first range and MCS3 07FFFH 32K 07F8H being active for the last range. OFFFFH 64K OFF8H 1FFFFH 128K 1FF8H The EX and MS in MPCS relate to peripheral 3FFFFH 256K 3FF8H functionality as descibed a later section. The upper limit of this memory block is defined in the Table 9. MPCS Programming Values LMCS register (see Figure 12). This register is at offset A2H in the internal control block. The legal Total Block Individual MPCS Bits values for bits 6-15 and the resulting upper address Size Select Size 14-8 and memory block sizes are given in Table 8. Any 8K 2K 0000001B combination of bits 6-15 not shown in Table 8 will 16K 4K 0000010B result in undefined operation. After reset, the LMCS 32K 8K 0000100B 64K 16K 0001000B register value is undefined. However, the LCS chip- 128K 32K 0010000B select line will not become active until the LMCS 256K 64K 0100000B register is accessed. 512K 128K 1000000B Any internally generated 20-bit address whose upper 16 bits are less than or equal to LMCS (with bits 0-5 The base address of the mid-range memory block is "1") will cause LCS to be active. LMCS register bits defined by bits 15-9 of the MMCS register (see Fig- R2-RO are used to specify the READY mode for the ure 14). This register is at offset A6H in the internal area of memory defined by this chip-select register. control block. These bits correspond to bits A19-A13 of the 20-bit memory address. Bits A12-AO of the base address are always O. The base address may be Mid~Range Memory CS set at any integer multiple of the size of the total The iAPX 188 provides four MCS lines which are memory block selected. For example, if the mid- o active within a user-locatable memory block. This range block size is 32K (or the size of the block for block can be located ~nywhere within the iAPX 188 which each MCS line is active is 8K), the block could 1 M byte memory address space exclusive of the be located at 10000H or 18000H, but not at 14000H, areas defined by UCS and LCS. Beith the base ad- since the first few integer multiples of a 32K memory dress and size of this memory block are block are OH, 8000H, 10000H, 18000H, etc. After programmable. reset, the contents of both of these registers is un- defined. However, none of the MCS lines will be ac- The size of the memory block defined by the mid- tive until both the MMCS and MPCS registers are range select lines, as shown in Table 9, is determined accessed. 15 14 13 12 11 10 9 8 5 . cycle, grammed number of DMA cycles; but the DMA transfer will not stop • the relative priority of the DMA channel with when the contents of the TC register respect to the other DMA channel; reach zero. • whether the source pointer will be incremented, SYN: 00 No synchronization. decremented, or maintained constant after each (2 bits) NOTE: The ST bit will be cleared transfer; automatically when the contents • whether the source pointer addresses memory or of the TC register reach zero re- I/O space; gardless of the state of the TC bit. • whether the destination pointer will be incre- 01 Source synchronization. mented, decremented, or maintained constant af- 10 Destination synchronization. ter each transfer; and 11 Unused. • whether the destination pointer will address memory or I/O space. SOURCE:INC Increment source pointer by 1 after each transfer. The DMA channel control registers may be changed M/iO Source pointer is in M/IO space while the channel is operating. However, any (1/0). changes made during operation will affect the cur- DEC Decrement source pointer by 1 after rent DMA transfer. each transfer. DEST: INC Increment destination pointer by 1 DMA Control Word Bit Descriptions after each transfer. M/IO Destination pointer is in M/IO space ST/STOP: Start/stop (1/0) Channel. (1/0). CHG/NOCHG: Change/Do not change (1/0) DEC Decrement destination pointer by 1 ST/STOP' bit. If this bit is set when after each transfer. writing to the conVol word, the ST/STOP bit will be programmed by P Channel priority-relative to other the write to the contro.1 word. If this channel. bit is cleared when writing the con- o low priority. trol word, the ST/STOP bit will not 1 high priority. be altered. This bit is not stored; it Channels will alternate cycles if will always be a 0 on read. both set at same priority level. AFN-01483A 3-127 inter iAPX 188 TDRQ 0: Disable DMA requests from timer DMA Requests 2. 1: Enable DMA requests from timer Data transfers may be either source or destination 2. synchronized, that is either the source of the data or Bit3 Bit 3 is not used. the destination of the data may request the data transfer. In addition, DMA tran~fers may be un- If both INC and DEC are specified for the same synchronized; that is, the transfer will take place pointer, the pointer will remain constant after each continually until the correct number of transfers has cycle. occurred. When source or unsynchronized transfers are performed, the DMA channel may begin another transfer immediately after the end of a previous DMA DMA Destination and Source Pointer transfer. This allows a complete transfer to take place Registers every 2 bus cycles or eight clock cycles (assuming no wait states). No prefetching occurs when destination Each DMA channel maintains a 20-bit source and a synchronization is performed, however. Data will not 20-bit destination pointer. Each of these pointers takes be fetched from the source address until the destina- up two full 16-bit registers in the peripheral control tion device signals that it is ready to receive it. When block. The lower four bits of the upper register contain destination synchronized transfers are requested, the upper four bit~ of the 20-bit physical address (see the DMA controller will relinquish control of the bus Figure 18a). These pointers may be individually incre- after every transfer. If no other bus activity is in- mented or decremented after each transfer. Each poin- itiated, another DMA cycle will begin after two pro- ter may pOint into either memory or 1/0 space. Since the cessor clocks. This is done to allow the destination DMA channels can perform transfers to or from odd device time to r~move its request if another transfer addresses, there is no restriction on values for the poin- is not desired. Since the DMA controlier will relin- ter registers. quish the bus, the CPU can initiate a bus cycle. As a result, a complete bus cycle will often be inserted between destination synchronized transfers. These DMA Transfer Count Register lead to the maximum DMA transfer rates shown in Table 14. Each DMA channelllJaintains a 16-bit transfer count register (TC). This register is decremented after every DMA cycle, regardless of the state of the TC bit int he Table 14. Maximum DMA Transfer Rates DMA Control Register. Ifthe TC bit in the DMA control Type of Word is set or unsynchronized transfers are pro- Synchronization I grammed, DMA activity will terminate when the transfer Selected CPU Running CPU Halted I count register reaches zero. Unsynchronized 1MBytes/sec 1MBytesisec Source Synch 1MBytes/sec 1MBytesisec Destination Synch .65MBytesisec .75MBytes/sec HIGHER REGISTER xxx, xxx XXX Al9-A16 ADDRESS LOWER REGISTER Al5-A12 All-A8 A7-A4 A3-AO ADDRESS 15 Q xxx = DON'T CARE Figure 18a. DMA Memory Pointer Register Format 3-128 AFN'()1483A iAPX 188 DMA Acknowledge are programmed, a ORO must also have been generated. Therefore, the source and destination No explicit DMA acknowledge pulse is provided. transfer pointers, and the transfer count register (if Since both source and destination pointers are used) must be programmed before this bit is set. maintained, a read from a requesting source, or a write to a requesting destination, should be used as Each DMA register may be modified while the chan- the DMA acknowledge signal. Since the chip-select nel is operating, If the CHG/NOCHG bit is cleared lines can be programmed to be active for a given when the control register is written, the ST/STOP bit block of memory or I/O space, and the DMA pointers of the control register will not be modified by the can be programmed to point to the same given block, write. If inultiple channel registers are modified, it is a chip-select line could be used to indicate a DMA recommended that a LOCKED string transfer be acknowledge. used to prevent a DMA transfer from occur'ring be- tween updates to the channel registers. DMA Priority DMA Channels and Reset The DMA channels may be programmed such that one channel is always gillen priority over the other, or Upon RESET, the DMA channels will perform the they may be programmed such as to alternate cycles following actions: when both have DMA requests pending. DMA cycles • The Start/Stop bit for each channel will be reset to always have priority over internal CPU cycles except STOP. between locked memory accesses or word accesses • Any transfer in progress is aborted. the odd memory locations; however, an external bus hold takes priority over an internal DMA cycle. Be- cause an interrupt request cannot suspend a DMA operation and the CPU cannot access memory dur- TIMERS ing a DMA cycle, interrupt latency time will suffer The 80188 provides three internal 16-bit programma- during sequences of continuous DMA cycles. An ble timers (see Figure 19). Two of these are highly NMI request, however, will cause all internal DMA flexible and are connected to four external pins (2 activity to halt. This allows the CPU to quickly per timer). They can be used to count external respond to the NMI request. events, time external events, generate nonrepetitive waveforms, etc. The third timer is not connected to DMA Programming any external pins, and is useful for real-time coding and time delay applications. In addition, this third DMA cycles will occur whenever the ST/STOP bit of timer can be used as a prescaler to the other two, or the Control Register is set. If synchronized transfers as a DMkrequest source. DMA REQ. - T1 T2 INT. INT. REQ. REQ, T20UT TIMER 0 TIMER 1 MAX .COUNT· VALUE MAX COUNT VALUE TIMER 2 A A MAX COUNT VALUE CLOCK MAX COUNT VALUE MAX COUNT VALUE B B MODE/CONTROL WORD INTERNAL ADDRESS/DATA BUS ALL 16 BIT REGISTERS Figure 19. Timer Block Diagram 3-129 inter IAPX 188 I Timer Operation Since the count registers and the maximum count registers are all 16 bits wide, 16 bits of resolution are The timers are controlled by 11 16-bit registers in the provided. Any Read or Write access to the timers will internal peripheral control block. The configuration add one wait state to the minimum four-clock bus of these registers is shown in Table 15. The count cycle, howevet. This is needed to synchronize and register contains the current value' of the timer. It can coordinate the internal data flows between the inter- be read or written at any time independent of nal timers and the internal bus. whether tlie timer is running or not, The value of this register will be incremented for each timer event. The timilrs have several programmable options. Elich of the timers is equipped with Ii MAX COUNT register, which defines the maximum count the timer • All three timers can be set to halt or continue on a wiil reach. After reaching the MAX COUNT register terminal count. value, the timer count value will reset to zero during • Timers 0 and 1 can select between internal and that same clock, i.e., the maximum count value is external clocks, alternate b~tween MAX COUNT heveI stored in the count register itself. Timers 0 and registers and be set to retrigger on external events. 1 are, in addition, equipped with a secQnd MAx • The timers may be programmed to cause an inter- COUNT register, which enables the timers to alter- rupt on terminal count. nate their count between two different MAX COUNT values programmed by the user. If Ii single MAX These options are selectable via the timer model COUNT register is used, the timer output pin will controi word. switch LOW tor a single clock, 2 clocks after the maximum count value has beeh reached. in the dual Timer Mode/Control Register MAX COUNT register !,"ode, the output pin will indi- cate which MAX COUNT register is currently in use, The mode/control register (see Figure 20) allows the thus allowing nearly complete freedom in selecting user to program the specific mode of operation or waveform d4ty cycles. For the timers with two MAX check the current programmed status for any of the COUNT registers, the RIU bit in the control register three integrated timers . . determines which is used for the comparison. Each timer gets serviced every fourth CPU-clock cycle, and thus can operate at speeds up to one- Table 15. timer Control Block Format quarter the internal clock frequency (one-eighth the Register Offset ~rystal rate). External clocking of the timers may be done at up to a rate of one-quarter of the internal R~gl.ter Name Tmr.O Tmr.1 Tmr.2 CPU-clock rate (2 MHz for an 8 MHz CPU clock). Due Mode/Cohtrol Word 56H 5EH 66H to internal synchronization and pipelining of the Max Count B 54H 5CH not present timer circuitry, a timer output may take up to 6 clocks, Max Count A 52H' 5AH 62H Count Register 50H 58H ,60H to respond to any individual clock or gate input. 15 14 n 12 11 5 4 3 2 1 0 Figure 20. Timer Mode/Control Register 3-130 AFN.()l483A IAPX 188 ALT: the input pin is LOW, the timer will hold its value. As The ALT bit determines which of two MAX COUNT indicated previously, the input signal may be asyn- registers is used for count comparison. If ALT = 0, chronous with respect to the 80188 clock. register A for that timer is always used; while if ALT = 1, the comparison will alternate between register IA When RTG = 1, the input pin detects LOW-to-HIGH and register 8 when each maximum count is transitions. The first such transition stprts the timer reached. This alternation allows the user to change running, clearing the timer value to zero on the first one MAX COUNT register while the other is being clock, and then incrementing thereafter. Further used, and thus provides a method of generating non- transitions on the input pin will again reset the timer repetitive waveforms. Square w~ves and pulse o~t­ to zero, from which it will start counting up again. If puts of any duty cycle are a subset of available CONT = 0, when the timer has reached maximum signals obtained by not changing the final count count, the EN bit will be cleared, inhibiting further registers. The ALT bit also determines the function of timer activity. the timer output pin. If ALT is zero, the output pin will go LOW for one clock, the clock after the maximum count is reached. If ALT is one, the output pin will EN: reflect the current MAX COUNT register being used The enable bit provides programmer control over the (0/1 for 8/ A). timer's RUN/HALT status. When set, the timer is en- abled to increment !jubject to the input pin con- CONT: straints in the internal clock mode (discussed Setting the CONT bit causes the associated timer to previously). When cleared, the timer will be inhibited run continuously, while r~setting it causes the timer from counting. All input pin transitions during the to halt upon maximum count. If CONT = 0 and ALT time EN is zero will be ignored. If CO NT is zero, the =1, the timer will counttothe MAX COUNTregister A EN bit is automatically cleared upon maximum value, reset, count to the register 8 value, reset, and count. halt. INH: EXT: The inhibit bit allows for selective updating of the The external bit selects between internal and exter- enable (EN) bit. If INH is!! one during the write to the nal clocking for the timer. The external signal may be mode/control word, then the state of the EN bit will asynchronous with respect to the 80188 clock. If this be modified by the write. If INH is a zero during the bit is set, the timer will count LOW-to-HIGH trans- write, the EN bit will be unaffected by the operation. itions on the input pin. If cleared, it will count an This bit is not stored; it will always be a 0 on a read. internal clock while using the input pin for control. In this mode, the function of the external pin is defined INT: by the RTG bit. The maximum input to output transi- When set, the lNT bit enables interrupts from the tion latency time may be as much as 6 clocks. timer, which will be generated on every terminal However, clock inputs may be pipelined as closely count. If the timer is cQnfigured in dual MAX COUNT together as every 4 clocks without losing clock register mode, an interrupt will be generated each pulses. time the value in MAX COl.!NT register A is reached, and each time the value in MAX COUNT register 8 is P: reached. If this enable bit is cleared after the inter- ,The prescaler bit is ignored unless internal clocking rupt request has been generated, but before a pend- has been selected (EXT = 0). If the P bit is a zero, the ing interrupt is serviced, the interrupt request will timer will count at One-fourth the internal CPU clock still be in force. (The request is latched in the Inter- rate. If the P bit is a one, the output of timer 2 will be rupt Controller.) , used as a clock for the timer. Note that the user !'flust MC: initialize and start timer 2 to obtain the prescaled The Maximum Count bit is set whenever the timer clock. reaches its final maximum count value. If the timer is configured in dual MAX COUNT register mode, this bit RTG: will be set each time the value in MAX COUNT register Retrigger bit is only active for internal clocking (EXT A is reached, and each time the value in MAX COUNT = 0). In this case it determines the control function register 8 is reached. This bit is set regardless of the provided by the input pin'. timer's interrupt-enable bit. The Me bit gives the user the ability to "l0nitor timer status through software If RTG = 0, the input level gates the internal clock on instead of througfl interrupts. Programmer interven- and off. If the input pin is HIGH, the timer will count; if tion is required to clear this bit. 3-131 AFN'()1483A iAPX 188 RIU: Imernal interrupt sources (Timers and DMA chan- The Register In Use bit 'indicates which MAX COUNT nels) Cjin be disabled by 'their own control registers register is currently being used for comparison to the or by mask bits within the interrupt controller. The timer count value, A zero value indicates register A. 80188 interrupt controller has its own control regis- The RIU bit cannot be written, i.e., its value is not ters that set the mode of operation for the controller. affected when the control register is written. It is always cleared when the ALT bit is zero. The interrupt controller will resolve priority among Not all mode bits are provided for timer 2. Certain bits requests that are pending simultaneously: Nesting is are hardwired as indicated below: provided so interrupt service routines for lower priority interrupts may themselves be interrupted by ALT = 0, EXT = 0, P = 0, RTG = 0, RIU = ° higher priority interrupts. A block diagram of the interrupt controller is shown in Figure 21. Count Registers The interrupt controller has a special iRMX 86 com- Each of the three timers has a 16-bit count register. patibility mode that allows the use of the 80188 The current contents of this register may be read or within the iRMX 86 operating system interrupt struc- written by the processOr at any time. If the register is ture. The controller is set in this mode by setting bit written into while the timer is counting, the new value, 14 in the peripheral control block relocation register will take effect in the current count cycle. (see iRMX 86 Compatibility Mode section). In this mode, the internal 80188 interrupt controller func- Max Count Registers tions as a "slave" controller to an external "master" controller. Spe~ial initialization software must be in- ° Timers and 1 have two MAX COUNT registers, while timer 2 has a single MAX COUNTregister. These con- cluded to properly set up the 80188 interrupt control- ler in iRMX 86 mode. tain the number of events the timer will count. In ° timers and 1, the MAX COUNT register used can alternate between the two max count values whenever the current maximum count is' reached. NON-iRMX MODE OPERATION The condition which causes a timer to reset is equiv- alent between the current count value and the max count being used. This means that if the count is Interrupt Controller External Interface changed to be above the max count value, or if the max count value is changed to be below the current For external interrupt sources, five dedicated pins value; the timer will not reset to zero, but rather ,will are provided. One of these pins is dedicated to NMI, count to its maximum value, "wrap around" to zero, non-maskable interrupt. This is typically used for then count until the max count is reached. power-fail interrupts, etc. The other four pins may function either as four interrupt input lines with inter- nally generated interrupt vectors, as an interrupt line Timers and Reset and an interrupt acknowledge line (called the "cascade mode") along with two other input lines Upon RESET, the Timers' will perform the foliowir:Jg with internally generated interrupt vectors, or as two actions: interrupt input lines and two dedicated Interrupt ac- • All EN (Enable) bits are reset preventing timer knowledge Ouput lines. When the interrupt lines are counting. configured in cascade mode, the 80188 interrupt • All SEL (Select) bits are reset to zero. This selects' controller will' not generate internal interrupt MAX COlJNTregister A, resulting in the Timer Out vectors. pins going HIGH upon RESET. External sources in the cascade mode use externally INTEflRUPT CONTROLLER generated interrupt vectors. When an interrupt is acknowledged, two INTA cycles are initiated and the The 80188 can receive interrupts from a number of vector is read into the 80188 on the second cycle. The sources, both internal and external. The internal in- capability to interface to external 8259A program- terrupt controller serves to merge these requests on mable inter-rupt controller.s is thus provided when the a priority basis, for individual service by the CPU. 'inputs are configuretl in cascade mode. 3-132 AFN-01483A intJ iAPX 188 Interrupt Controller Modes of Operation before the issuance of the return from interrupt in- struction. If the fully nested structure has been The basic mod,es of operation of the interrupt con- upheld, the next highest-priority source with its IS bit troller in non-iRMX mode are similar to the 8259A. set is then serviced. I The interrupt controller responds identically to inter- nlill interrupts in all three modes: the difference is only in the interpretation of function of the four exter- Cascade Mode nal interrupt pins. The interrupt controller is set into The 80188 has four interrupt pins and two of them one of these three modes by programming the cor- have dual functions. In,the fully nested mode the four rect bits in the INTO and INn control registers. The pins are used as direct interrupt inputs and the cor- modes of interrupt controller operation are as responding vectors are generated internally. In the follows: cascade mode, the four pins are configured into in- terrupt input-dedicated acknowledge signal pairs. Fully Nested Mode The interconnection is shown in Figure 22. INTO is an When in the fully nested mode four pins are used as interrupt input interfaced to an 8259A, while direct interrupt requests. The vectors for these four INT2/1NTAO serves as the dedicated interrupt ac- inputs are generated internally. An in-service bit is knowledge signal to that peripheral. The same is true provided for every interrupt source. If a lower-priority for INT1 and INT3/INTA1. Each pair can selectively be device requests an interrupt while the in-service bit placed in the cascade or non-cascade mode by pro- (IS) is set, no interrupt will be generated by the inter- gramming the proper value into INTO and INT1 con- rupt controller. In addition, if another interrupt re- trol registers. The use of the dedicated acknowledge quest occurs from the same interrupt source while signals eliminates the need for the use of external the inservice bit Is set, no interrupt will be generated logic to generate INTA and device select signals. by the interrupt controller. This allows interrupt ser- vice routines to operate with interrupts enabled with- out being themselves interrupted by lower-priority The primary cascade mode allows the capability to interrupts. Since interrupts are enabled, higher- serve up to 128 external interrupt sources through priority interrupts will be serviced. the use of external master and slave 8259As. Three levels of priority are created, requiring priority When a service routine is completed, the proper IS resolution in the 80188 interrupt controller, the mas- bit must be reset by writing the proper pattern to the ter 8259As, and the slave 8259As. If an external inter- EOI register. This is required to allow subsequent rupt is serviced, one IS bit is set at each of these interrupts from this interrupt source and to allow levels. When the interrupt service routine is com- servicing of lower-priority interrupts. An EOI com- pleted, up to three E!nd-of-interrupt commands must mand is issued at the end of the service routine just be,issued by the programmer. DMA 1 INTO INTl INT2 INT3 NMI INTERRUPT REQUEST REG. 1----1' :~:~~~: DMAO CONTROL REG. DMA1 IN·SERVICE CONTROL REG. REG. INTERRUPT PRIOR. LEIL EXT. INPUT 0 PRIORITY MASK REG. CONTROL REG. RESOLVER EXT.INPUT1 INTERRUPT CONTROL REG. STATUS REG. EXT. INPUT 2 CONTROL REG. Figure 21. Interrupt Controller Block Diagram 3-133 AFN-Dl483A intJ iAPX 188 Special Fully Nested Mode Non-iRMX ,Mode Features This mode is entered by setting the SFNM bit in INTO or INT1 control register. It enables complete nestabil- Programmable Priority ity with external 8259A masters. Normally, an inter- The user can program the interrupt sources into any rupt request from an interrupt source will not be of eight different priority levels. The programming is recognized unless the in-service bit for that source is done by placing a 3-bit priority level (0-7) in the reset. If more than one interrupt source is connected control register of each interrupt source. (A source to an external interrupt controller, all of the interrupts with a priority level of 4 has higher priority over all will be funneled through the same 80188 interrupt priority levels from 5 to 7. Priority registers contain- request pin. As a result, if the external interrupt con- ing values ,lower than 4 have greater priority.) All troller receives a higher-priority interrupt, its inter- interrupt sources have preprogrammed default rupt will not be recognized by the 80188 c,ontroller priority levels (see Table 4). until the 80188 in-service bit is reset. In special fully nested mode, the 80188 interrupt controller will allow interrupts from an external pin regardless of the If two requests with the same programmed priority state of the in-service bit for an interrupt source in level are pending at once, the priority ordering order to allow multiple interrupts from a single pin. scheme shown in Table 4 is used. If the serviced An in-service bit will continue to be set, however, to interrupt routine reenables interrupts, it allows other inhibit interrupts from other lower-priority 80188 in- requests to be serviced. terrupt sources. Special procedures should be followed when reset- End-ot-Interrupt Command ting IS bits at the end of interrupt service routines. The end-of-interrupt (EOI) command is used by the Software polling of the external master's IS register programmer to reset the In-Service (IS) bit when an is required to determine if there is more than one bit interrupt-service routine is completed. The EOI com- set. If so, the IS bit in the 80188 remains active and mand is issued by writing the proper pattern to the the next interrupt service routine is entered. EOI register. There are two types of EO I commands, specific and nonspecific. The nonspecific command does not specify which IS bit is reset. When issued, the interrupt controller automatically resets the IS bit Ope{ation in a Polled Environment of the highest priority source with an active service routine. A specific EOI command requires that the The controller may be used in a polled mode if inter- programmer send the interrupt vector type to the rupts are undesirable. When polling, the processor dis- ables interrupts and then polls the interrupt controller interrupt controller indicating which source's IS bit is whenever it is convenient. Polling the interrupt con- to be reset. This command is used when the fully troller is accomplished by reading the Poll Word (Figure nested structure has been disturbed or the highest 31). Bit 15 in the poll'word indicates to the processor priority IS bit that was set does not belong to the that an interrupt of high enought priority is requesting service routine in progress. service. Bits 0-4 indicate to the processor the type vec- tor of the highest-priority source requesting service. Reading the Poll Word causes the In-Service bit of the Trigger Mode highest-priority source to be set. The four external interrupt pins can be programmed in either edge- or level-trigger mode. The control register for each external source has a level-trigger It is desirable to be able to read the Poll Word infor- mode (LTM) bit. All intern,Jpt inputs are active HIGH. mation without guaranteeing service of any pending In the edge sense mode or the level-trigger mode, the interrupt, Le., not set the indicated in-service bit. The interrupt request must remain active (HIGH) until the 80188 provides a Poll Status Word in addition to the interrupt request is acknowledged by the 80188 CPU. conventional Poll Word to allow this to' be done. Poll In the edge-sense mode, if the level remains high Word information is duplicated in the Poll Status after the interrupt is acknowledged, the input is dis- Word, but reading the Poll Status Word does not set abled and no further requests will be generated. The the associated in-se'rvice bit. These words are lo- input level must go LOW tor at least one clock cycle to cated in two adjacent memory locations in the regis- reenable the input. In the level-trigger mode, no such ter file. proviSion is made: holding the interrupt input HIGH will cause continuous interrupt requests. AFN..Q1483A 3-134 iAPX 188 Interrupt Vectoring Interrupt Request Register The 80188 Interrupt Controller will generate inter- The internal interrupt sources have interrupt request rupt vectors for the integrated OMA channels and bits inside the interrupt controller. The format of this the integrated Timers. In additi9n, the Interrupt Con- register is shown in Figure 24. A read from this regis- troller will generate interrupt vectors for the external ter yields the status of these bits. The TMR bit is the interrupt lines if they are not configured in Cascade logical OR of all timer interrupt requests. DO and 01 or Special Fully Nested Mode. The interrupt vectors are the interrupt request bits for the DMA channels. generated are fixed and cannot be changed (see Table 4). The state of the external interrupt input pins is also Interrupt Controller Registers indicated. The state of the external interrupt pins is not a stored condition inside the interrupt controller, The Interrupt Controller register model is shown in therefore the external interrupt bits cannot be writ- Figure 23. It contains 15 registers. All registers can ten. The external interrupt request bits show exactly both be read or written unless specified otherwise. when an interrupt request is given to the interrupt controller, so if edge-triggered mode is selected, the In-Service Register bit in the register will be HIGH only after an inactive- This register can be read from or written into. The to-active transition. For internal interrupt sources, format is shown in Figure 24. It contains the In- the register bits are set when a request arrives and Service bit for each of the interrupt sources. The are reset when the processor acknowledges the In-Service bit is set to indicate that a source's service requests. routine is in progress. When an In-Service bit is set, the interrupt controller will not generate interrupts to the CPU when it receives interrupt requests from devices with a lower programmed priority level. The Mask Register TMR bit is the In-Service bit for all three timers; the This is a 16-bit register that contains a mask bit for DO and D1 bits are the In-Service bits for the two DMA each interrupt source. The format for this register is channels; the 10-13 are the In-Service bits for the shown in Figure 24. A one in a bit position corres- external interrupt pins. The IS bit is set when the ponding to a particular source serves to mask the processor acknowledges an interrupt request either source from generating interrupts. These mask bits by an interrupt acknowledge or by reading the poll are the exact saine bits which are used in the individ- register. The IS bit is reset at the end of the interrupt ual control registers; programming a mask bit using service routine by an end-of-interrupt command is- the mask register will also change this bit in the sued by the CPU. individual control registers, and vice versa. 80188 INTO INT 8259A PIC INTAO INTA Figure 22. Cascade Mode Interrupt Connection 3-135 AFN..j)1483A iAPX 188 Priority Mask Register OFFSET This register is used to mask all interrupts below INT3 CONTROL REGISTER 3EH particular interrupt priority levels. The format of this register is shown in Figure 25. The code in the lower INT2 CONTROL REGISTER 3CH three bits of this register inhibits interrupts of priority lower (a higher priority number) than the INT1 CONTROL REGISTER 3AH code specified. For example, 100 written into this INTO CONTROL REGISTER 38H register masks interrupts of level five (101), six (110), and seven (111). The register is reset to seven (111) OMA 1 CONTROL REGISTER 38H upon RESET so all interrupts are unmasked. OMA 0 CONTROL REGISTER 34H Interrupt Status Register This register contains general interrupt controller TIMER CONTROL REGISTER 32H status information. The format of this register is shown in Figure 26. The bits in the status register INTERRUPT STATUS REGISTER 30H have the following functions: INTERRUPT REQUEST REGISTER 2EH \ DHLT: DMA Halt Transfer; setting this bit halts all DMA transfers. It is automatically set IN-SERVICE REGISTER 2CH whenever a non-maskable interrupt occurs, and it is reset when an IRET instruction is PRIORITY MASK REGISTER 2AH executed. The purpose of this bit is to allow MASK REGISTER 28H prompt service of all non"maskable inter- rupts. This bit may also be set by the CPU. POLL STATUS REGISTER 26H IRTx: These three bits represent the individual POLL REGISTER 24H timer interrupt request bits. These bits are used to differentiate the timer interrupts, EOI REGISTER 22H since the timer IR bit in the interrupt re- quest register is the "OR" function of all timer interrupt requests. Note that setting Figure 23. Interrupt Controller Registers anyone of these three bits initiates an inter- (Non-iRMX 86 Mode) rupt request to the interrupt controller. 15 14 10 9 8 7 4 3 o 1 0 o 0 011311211111001 DO Figure 24. In-Service, Interrupt Request, and Mask Register Formats 15 14 o 1 0 1 Figure 25. Priority Mask Register Format 'I.L__________I I OHLT 0 0 0 0 1 0 IIRT2 IRT1 IRTO I 1_5___1_4___________________________________5____4____3____2____1____0__________ I I I ~ Figure 26. Interrupt Status Register Format 3-136 AFN-01483A iAPX 188 Timer, DMA 0, 1; Control Registers level is preceded by an inactive-to-active These registers are the control words for all the inter- transition on the line. In both cases, the nal interrupt sources. The format for these registers level must remain active until the interrupt is shown in Figure 27. The three bit positions PRO, is acknowledged. PR1, and PR2 represent the programmable priority level of the interrupt source. The MSK bit inhibits interrupt requests from the interrupt source. The MSK: Mask bit, 1 = mask; 0 = non mask. MSK bits in the individual control registers are the exact same bits as are in the Mask Register; modify- ing them in the individual control registers will also C: Cascade mode bit, 1 = cascade; 0 = direct modify them in the Mask Register, and vice versa. SFNM: Spe,cial fully nested mode bit, 1 = SFNM INTo-INT3 Control Registers These registers are the control words for the four external input pins. Figure 28 shows the format of the INTO and INTl Control registers; Figure 29 shows the EOI Register format of the INT2 and INT3 Control registers. In The end of the interrupt register is a command regis- cascade mode or special fully nested mode, the con- ter which can only be written into. The format of this trol words for INT2 and INT3 are not used. register is shown in Figure 30. It initiates an EOI command when written to by the 80188 CPU. The bits in the various control registers are encoded as follows: The bits in the EOI register are encoded as follows: PRO-2: Priority programming information. Highest Sx: Encoded information that specifies an in- priority = 000, lowest priority = 111. terrupt'source vector type as shown in Table 4. For example, to reset the In-Service LTM: Level-trigger mode bit. 1 = level-triggered; bit for DMA channel 0, these bits should be o = edge-triggered. Interrupt Input levels set to 01010, since the vector type for DMA are active high. In level-triggered mode, an channel 0 is'10. Note that to reset the single interrupt is generated whenever the exter- In-Service bit for any of the three timers, the nalline is high. In edge-triggered mode, an vector type for timer 0 (8) should be written interrupt will be generated only when this in this register. 15 14 I 0 0 Figure 27. Timer/DMA Control Register Fo~mats 15 14 7 6 5 4 3 2 1 0 o ! o ! SFNMI c ! LTM!MSK! PR2! PR1! PRO I Figure 28. INTO/INT1 Control Register Formats 15 14 4 3 2 1 0 o ! 0 o !LTM!MSK! PR2! PR1!PROI Figure 29. INT2IINT3 Control Register Formats 3-137 AFN-014B3A inter iAPX·188 NSPEC/: A bit that determines the type of EOI com- Because of pin limitations caused by the need to SPEC mand. Nonspecific =,1, Specific = O. interface to an external 8259A master, the internal interrupt controller will no longer accept external Poll and Poll Status Registers inputs. There are however, enough 80188 interrupt These registers contain polling information. The for- controller inputs (internally) to dedicate one to each mat of these registers is shown in Figure 31. They can timer. In this mode, each timer interrupt source has only be read. Reading the Poll register constitutes a its own mask bit, IS bit, and control word. software poll. This will set the IS bit of the highest priority pending interrupt. Reading the poll status The iRMX 86, operating system requires peripherals register will not set the IS bit of the highest priority to be assigned fixed priority levels. This is incom- pending interrupt; only the status of pending inter- patible with the normal operation of the 80188 inter- rupts will be provided. rupt controller. Therefore, the initialization software must program the proper priority levels for each Encoding of the Poll and Poll Status register bits are source. The reql,Jired priority levels for the internal as follows: interrupt sources in iRMX mode are shown in Table 16. ' Sx: Encoded information that indicates 'the vector type of the highest priority interrupt- ing source. Valid only when INTREQ = 1. Table 16. Internal Source Priority Level INTREQ: This bit determines if an interrupt request is Priority Level Interrupt Source present. Interrupt Request = 1; no Interrupt 0 Timer 0 Request = O. 1 (reserved) 2 DMAO iRMX 86 COMPATIBILITY MODE 3 DMA1 4 Timer 1 5 Timer 2 This'mode allows iRMX 86-80188 compatibility. The interrupt model of iRMX 86 requires one master and multiple. slave 8259As in cascaded fashion, When iRMX mode is used, the internal'80188 interrupt con- These level assignments must remain fixed in the troller will be used as a slave controller to an external iRMX 86 mode of operation. master interrupt controller. The internal 80188 re- sources will be monitored through the internal inter- rupt controller, while the external controller iRMX 86 Mode External Interface functions as the system master interrupt controller. The configuration of the 80188 with respect to an Upon reset, the 80188 interrupt controller will be in external 8259A master is shown in Figure 32. The the non-iRMX 86 mode of operation. To set the con- INTO input is used as the 80188 CPU interrupt input. troller in the iRMX 86 mode, bit 14 of the Relocation INT3 functions as an output to send the 80188 slave- Register should be set. interrupt-request to one of the 8 master-PIC-inputs. 15 14 13 4 0 I:::~I 0 54 S3 92 S1 II so Figure 30. EOI Register Format 15 14 13 5 4 3 2 0 .' I:~ I I I 0 0 . I II I 0 54 93 S2 91 I I SO Figure 31. Poll Register Format 3-138 AFN-01483A iAPX 188 8259A <== MASTER INTA REQUESTS FROM IRO OTHER SLAVES 80188 INT. IN INT 1 IR7 - CASO-2 80188 ~; ~ INTO :> INT1 SLAVE SELECT I CASCADE ADDRESS DECODER INT2 ~ I 80188 SLAVE INTERRUPT OUTPUT INT3 Figure 32. iRMX 86 Interrupt Controller Interconnection Correct master-slave interface requires decoding of Specific End-of-Interrupt the slave addresses (CASO-2). Slave 8259As do this internally. Because of pin limitations, the 80188 slave In iRMX mode the specific EOI command operates to address will have to be decoded externally. INT1 is reset an in-service bit of a specific priority. The user used as a slave-select input. Note that the slave vec- supplies a 3-bit priority-level value that points to an tor address is transferred internally, but the READY in-service bit to be reset. The command is executed input must be supplied externally. by writing the correct value in the Specific EOI regis- ter at offset 22H. INT2 is used as an acknowledge output, suitable to drive the INTA input of an 8259A. Interrupt Controller Registers in the iRMX 86 Mode Interrupt Nesting All control and command registers are located inside iRMX 86 mode operation allows nesting of interrupt the internal peripheral control block. Figure 33 requests. When an interrupt is acknowledged, the shows the offsets of these registers. priority logic masks off all priority levels except those with equal or higher priority. End-ot-Interrupt Register The end-of-interrupt register is a command register Vector Generation in the iRMX 86 Mode which can only be written. The format of this register is shown in Figure 34. It initiates an EOI command Vector generation in iRMX mode is exactly like that of when written by the 80188 CPU. an 8259A slave. The interrupt controller generates an 8-bit vector which the CPU multiplies by four and The bits in the EOI register are encoded as follows: uses as an address into a vector table. The significant five bits of the vector are user-programmable while Lx: Encoded value indicating the priority of the the l.ower three bits are generated by the priority IS bit to be reset. logic. These bits represent the encoding of the priority level requesting service. The significant five In-Service Register bits of the vector are programmed by writing to the This register can be read from or written into. It Interrupt Vector register 1It offset 20H. contains the in-service bit for each of the internal 3.-139 AFN-01483A inter iAPX 188 interrupt sources. The format for this register is prx: 3-bit encoded field indicating a priority level shown in Figure 35. Bit positions 2 and 3 correspond for the source; note that each source must to the DMA channels; positions 0, 4, and 5 corre- be programmed at specified levels. spond to the integral timers. The source's IS bit is set msk: mask bit for the priority level indicated by prx . when the processor acknowledges its interrupt re- bits. quest. OFFSET Interrupt Request Register This register indicates which internal peripherals LEVEL 5 CONTROL REGISTER 3AH (TIMER 2) have interrupt requests pending. The format of this register is shown in Figure 35. The interrupt request LEVEL 4 CONTROL REGISTER 38H (TIMER 1) bits are set when a request arrives from an internal source, and are reset when the processor acknowl- LEVEL 3 CONTROL REGISTER 36H (OMA1) edges the request. LEVEL 2 CONTROL REGISTER 34H Mask Register (OMAO) This register contains a mask bit for each interrupt LEVEL 0 CONTROL REGISTER 32H source. The format for this register is shown in Fig- (TIMER 0) ure 35. If the bit in this register corresponding to a INTERRUPT STATUS REGISTER 30H particular interrupt source is set, any interrupts from that source will be masked. These mask bits are exactly the same bits which are used in the individual INTERRUPT REQUEST REGISTER 2EH control registers, i.e., changing the state of a mask bit in this register will also change the state of the IN-SERVICE REGISTER 2CH mask bit in the individual interrupt control register corresponding to the bit. PRIORITY·LEVEL MASK REGISTER 2AH MASK REGISTER 28H Control Registers These registers are the control words for all the inter- SPECIFIC EOI REGISTER 22H nal interrupt sources. The format of these registers is shown in Figure 36. Each of the timers and both of the DMA channels.have their own Control Register. , INTERRUPT VECTOR REGISTER 20H The bits of the Control Registers are encoded a~ follows: Figure 33. Interrupt Controller Registers (iRMX 86 Mode) 15 14 13 I II I " I I I I I I I L21 0 0 0 0 0 0 L1 I I LO Figure 34. Specific EOI Register Format 15 14 13 Figure 35. In-Service, Interrupt Request, and Mask Register Format 3-140 AFN-Q1483A inter iAPX 188 Interrupt Vector Register Interrupt Controller and Reset This register provides the upper five bits of the inter- rupt vector address. The format of this register is Upon RESET, the interrupt controller will perform the shown in Figure 37. The interrupt controller itself following actions: provides the lower three bits of the interrupt vector as determined by the priority level of the interrupt • All SFNM bits reset to 0, implying Fully Nested request. Mode. The format of the bits in this register is: • All PR bits in the various control registers set to 1. This places all sources at lowest priority (level tx: 5-bit field indicating the upper five bits of the 111 ). vector address. • All LTM bits reset to 0, resulting in edge-sense Priority-Level Mask Register This register indicates the lowest priority-level inter- mode. rupt whiGh will be serviced. • All Interrupt Service bits reset to 0. The encoding of the bits in this register is: • All Interrupt Request bits reset to 0. • All MSK (Interrupt Mask) bits set to 1 (mask). m' x. 3-bit encoded field indication priority-level value. All levels of lower priority will be • ° All C (Cascade) bits reset to (non-cascade). • All PRM (Priority Mask) bits set to 1, implying no masked. levels masked. Interrupt Status Register • Initialized to non-iRMX 86 mode. This register is defined exactly as in non-iRMX mode (see Figure 26). I: I: I: I: I: H~I ~ H Figure 36. Control Word Format Figure 37. Interrupt Vector Register Format 15 14 13 1-1-1-1 I:I:I:I:I:I:H~'H Figure 38. Priority Level Mask Register 3-141 AFN-01483A iAPX 188 r1 16 MHz 0 V( f, Xl X2 ~ UCS ...--- 7:- RES ADG-AD7, A A8-A15 ALE I-- r'<- f ~= r 8282 OR 8283 ,~,!)E STB ADDRESS RESET ROM (~ 80188 ~ Ii!) WR T PROGRAM RAM I iilCSIJ-3 SRDY 5V tr+ ARDY NMI HOLD h ~ h LOW RAM ~ I TMRINO _____ +5V I ( TMR OUT 0 ~ CLOCK • -: k=>s; 8288 OR 8287 :) TRANSCEIVER ..,... 00-07 T !)E SERIAL TERMINAL m 110 ---.J ~ )- Al A2 INTO I INTl PCS4 DISK INTERFACE HARDWARE k=>8 DISK DRQO Figure 39. TypicallAPX 188 Computer 3-142 AFN-Q1483A intJ IAPX 188 16 MHz rO~ XI X2 h UCS CS iiD RESET ROM re- .l m ~ 8282 OR 8283 Jf Lb LATCH STB OE STa OE LOW ALE + -:;:- RAM LCS cs WR {\ ADI).AD7 AB-A15 b 8282 OR 8283 LATCH STB OE .j> ~ ADDRESS BUS 80188 ~~- ~ ,B t R NMI 8288 OR HOLD """ TRANSCEIVER 8287 DATA BUS T OE MULTI MAST ER 1 DT/R SYSTEM BUS CLKOUT CLK L . . - - ALE DEN SO-S2 SO-52 ~tS: ;> BUS CONTROL COMMANDS ,----v' CONTROLLER r-t- I--- CEN lOB AEN -:;:- 1 I ~ SO-S2 AEN 8289 > ~~~T.}~~~ION CLK AR':f:ER PCSO SYSB/RESB PCS1 lOB LOCK LOCK RESB :L-sv _ _ GND SRDY ARDY r ""'-f XACK Figure 40. TyplcallAPX 188 Multi-Master Bus Interface 3-143 AFN-01483A iAPX 188 PACKAGE NOTE: The lOT 3M Textool 68-pin JEOEC Socket The 80188 is housed in a 68-pin, lead less JEOEC type is required for ICE™ operation. See Figure 42 for A hermetic chip carrier. Figure 41 illustrates the details. package dimensions. 050 (127) F . ·09. (2.39) ,066 (168) 1+= D n .800 (20.32) i= ~ 960 '"" j PINN(OOO'~':8~~-;~DD~~DOrn~Ili~~~~,, PIN NO. 1 ~ ________Jl " " ' - PIN NO 1 MARK 13. (3.30) 960 (2' 38) Figure 41. 80188 JEDEC Type A Package AFN-01483A 3-144 IAPX 188 268-5400-00 '" 268-5400-51 GUIDE 80SS ~ 3PLCS~ r'~frD~~aL~~~HEDD~~U1rrl -- (;;f~) so------ --1 ~INDEX 'i-~ FRONT -'~- PC BOARD PATTERN LSOCKET ORIENTATION PIN \"">- ~ ,PlNN01 I ' ..t:/-:~1:\1:l:l:l:~..r:t SOCKET r.:r. . FRONT .+~ ~I~~~~A~~~~. DEVICE PADS SHOWN FOR - L / CONTACT ~ 7 /-:I FOAl 021 DIA + (0.74)- I 100 r.l-'i. 2 ... .r:1 (1 ) TEST PROBE POINT ALUMINUM LID (HEATSINK PROVISIONS OPTIONAL) / CLOSED LOCATION ~ I r ..1 (2'::) TV' T~\'-§ ~ ~~~6-..~~T P.'~ ,,-)):>:» :> ~--} 1 7'-~~'~" 'i. I 015 .................. 00 (0.38) --j o tt I . ~ 800 -I h~ ..)T'(~ ----..J 020::J 1--i20]2i (0.51) 8 SPCS •. 100TOL NON ACCUM TY, .. PLes -.lQ.Q. (:.~) TYP 5 Pl~~ (2.") CONTACT TAIL 'i (254) Figure 42. Textool 68 Lead Chip Carrier Socket 3-145 AFN:.o1483A inter jAPX188 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and Ambient Temperature under Bias ..... O°C to 70°C functional operation of the device at these or any Storage Temperature ........... -65°C to +150°C other conditions above those indicated in the opera- Voltage on Any Pin with tional sections of this sPficification is not implied. Respect to qround .............. -1.0V to + 7V Exposure to absolut~ maximum rating conditions Power Dissipation ........................ 3 Watt for extended periods may affect device reliability. D.C. CHARACTERISTICS (TA = 0°_70°C, Vcc = 5V ±10"lo) Symbol P"rameter Min. Max. Units Test Conditions VIL Input Low Vqltage -0.5 +0.8 Volts VIH Input High Voltage_ 2.0 VCC+ 0.5 Vo.lts (Ali except Xl and RES) VIH1 Input High Voltage (RES) TBD VCC + 0.5 Volts VOL Output Low Voltage 0.45 Volts la = 2:5 mA for SO-S2 la = 2.0 mA for ali other outputs VOH Output High Voltage 2.4 Volts loa = -400 /LA ICC Power Supply Current 550 mA TA = 25·C III Input Leakage Current ±10 /LA OV < VIN < VCC ILO Output Leakage Current ±10 /LA 0.45V < VOUT < VCC VCLO Clock Output Low 0.6 Volts la = 2.5 mA VCHO Clock Output High 4.6 Volts loa = -200/LA VCLl Clock Input Low Voltage -0.5 0.6 Volts VCHI Clock Input High Voltage 3.9 VCC + 1.0 Volts CIN Input Capacitance 10 pF CIO I/O Capacitance 20 pF PIN TIMINGS A.C. CHARACTERISTICS (TA = QO-70·C, Vee = 5V ± 10"10) 80188 Timing Requirements All Timings Measured At 1.5 Volts Unless Otherwise Noted. Symbol Parameter Min . . Max. Units Test Conditions TDVCL Data in Setup (ND) 20 ns TCLDX Data in Hold (A/D) 10 ns TARYHCH Asynchronous Ready (AREADY) active ~etup time' 20 ns TARYLCL AREADY inactive setup time 35 ns TCHARYX AREADY hold time 15 ns TSRYCL Synchronous Ready (SREADY) transition setup time 35 ns TCLSRY SREADY transition hold time 1~ ns THVCL HOLD Setup' 25 ns TINVCH INTR, NMI, TEST, TIMERIN, Setup' 25 ns TlNVCL DRQO, DR01, Setup' 25 n~ 'To guarantee recognition at next clock. 3-146 AFN-01483A , inter iAPX 188 A.C. CHARACTERISTICS (Continued) B01BB Master Interface Timing Responses Symbol Parameter Min. Max. Units Test Conditions TCLAV Address Valid Delay 10 44 ns CL = 20-200 pF all outputs TCLAX Address Hold 10 ns TCLAZ Address Float Delay TCLAX 35 ns TCHCZ Command lines Float Delay 45 ns TCHCV Command Lines Valid Delay (after float) 55 ns TLHLL ALE Width TCLCL-35 ns TCHLH ALE Active Delay 35 ns TCHLL ALE Inactive Delay 35 ns TLLAX Address Hold to ALE Inactive TCHCL-25 ns TCLDV Data Valid Delay 10 44 ns TCLbox Data Hold Time 10 ns TWHDX Data Hold after WR TCLCL-40 ns TCVCTV Control Active Delayl 10 70 ns TCHCTV Control Active Delay2 10 55 ns TCVCTX Control Inactive Delay 10 55 ns TAZRL Address Float to RD Active 0 ns TCLRL RD Active Delay 10 70 ns TCLRH RD Inactive Delay 10 55 ns TRHAV RD. Inactive to Address Active TCLCL-40 ns TCLHAV HLDA Valid Delay 10 50 ns TRLRH RD Width 2TCLCl-50 ns TWLWH WR Width 2TCLCL-40 ns TAVAL Address Valid to ALE Low TCLCH-25 ns TCHSV Status Active Delay 10 55 ns TCLSH Status Inactive Delay 10 55 ns TCLTMV Timer Output Delay 60 ns 100 pf max TCLRO Reset Delay 60 ns TCHQSV Queue Status Delay 35 ns B01BB Chip-Select Timing Responses Symbol Parameter Min. Max. Units Test Conditions TCLCSV Chip-Select Active Delay 66 ns TCXCSX Chip-Select Hold from Command Inactive 35 ns TCHCSX Chip-Select Inactive Delay 10 35 ns 3-147 AFN...o1483A IAPX188 A.C. CHARACTERISTICS (Continued) 80188 ClKIN Requirements Symbol Parameter Min. Max. Units Test Conditions TCKIN ClKIN Period 62.5 250 ns TCKHl ClKIN Fall Time 10 ns 3.5 to 1.0 volts TCKlH ClKIN Rise Time 10 ns 1.0 to 3.5 volts TClCK ClKIN low Time 25 ns 1.5 volts TCHCK ClKIN High Time 25 ns 1.5 volts 80188 ClKOUT Timing (200 pF load) Symbol Parameter Min. Max. Units Test Conditions TCICO ClKIN to ClKOUT Skew "50 ns TClCl ClKOUT Period 125 500 ns , TClCH ClKOUT low Time 'h TClCl-7.5 ns 1.5 volts TCHCl ClKOUT High Time 'h TClCl-7.5 ns 1.5 volts TCH1CH2 ClKOUT Rise Time 15 ns 1.0 to 3.5 volts TCl2Cl1 ClKOUT Fall Time 15 ns 3.5 to 1.0 volts AFN-01483A 3-148 inter iAPX 188 WAVEFORMS MAJOR CYCLE TIMING ',. I~ .~'" """"'}:.:l,~ "~ CLKOUT :r-\ ~J ~ _TCHS\~ ... " .. ~ _ 1_' :3) '"Tci:cH 52-SO -- 1 - - - - 1\ ~J' A19 /5,;-A"/S, TC .AV_ I -T( LAX ::::: A10-A)5 rCLD\ .::: 5,;-50 - J .II r---- t-!CHCZ NOTE 1 u. ~~ ALE ., /r-- _T~~t~ TCH~ ~~ .... r:LAX :: - I~:ox T';LAZ_ I::: A,.Ao / V 1\ DATAOUl ~ WRITE CYCLE A15"Aa A,~-A8 \V- /1\ jlL- RQ,INTA, , .. ~-- ,,~1 - DT/R ~ VOH I- DEN TCVCTV_ -'t- !- iTLLAJ i J WR AD,Ao, - \ I_TCLAZ ~Ti;vCL- ~,"n' r- \ 'CLDX 'i~ JL A,.-Aa FLOAT / I FLOAT TCHCTV ~i: INTA CYCLE I--TCHCTV DT/R - ~ I .) INTA NOTE 2 V II RD, WR ~ VOH DEN TCVCT' ~ rJ TCVCTX- 1-; KI SOFnYARE HALT-DE!'! ~VOL' RD, WR, INTA, DT/R ~ VOH PCS, MCS LCS, MCS TCLAV_ - t _TCLCSV INVALID ADDRESS TCXCSX- -, ,- - 3-149 AFN-01483A iAPX 188 WAVEFORMS (Continued) MAJOR CYCLE TIMING (Continued) y,.~~. T, .!J. T, A Tw '~n'~A ~ veN{"""'"'"""\ TCH1CH2 ~(\ CLK OUT {"""'"'"""\ -- - Yo! I!CHCL.. ~L!i~NOle 3) ~ - 1 2-'80 TCHSV It.. W ITCLAV... ' I:=. . TCL~ '~L'" l- A19/S6-A 16/S3 '1 ITUI~ A,,-_ " 8 6;S3 f=" f--;-TLLAX ,-- ALE TCHLH-=:; -1- :d. TCHLL- TAt ~ ..;::. I - TLLAX· _ I+- TCLeX 1-1 CLAZ ' ",., tr TCLAV... yn !--TAVAL":'" AD ,-ADo A,-Ao .IN FLOAT or- FLOAT ~ 1....-- A wAs AwAs I~ READ CYCLE - RD TI ZRL __ vi TCLRH ....... ........ ... "'.~. -- - tTCHCTV TCLRL .Tal I '""''' DT/R DEN ,,,..,,' {t TCVCTX- ,ai-I PCS. ~ LCli, MCS ....:.. '\ -TCLCSII --C=- NOTes 1 Followmg a Write cycle, the Local Bus IS floated by the 80188 only when the 80188 enters a "Hold Acknowledge" state 2 INTA occurs one clock Jater In RMX·mode 3 Status Inactive Just prior to T4 ,AFN-01483A ' 3-150 IAPX 188 WAVEFORMS (Continued) CLKOUT - TCLAY - CLKOUT M+. INT0-3, TIMERIN=--_ _ _ _ _- - ' CLKOUT 1+--+1 TCHaSY aSO,aS1 3-151 AFN.(l1483A intJ iAPX 188 WAVEFORMS (Continued) HOLD-HLDA TIMING T2 T3 T2 CLKOUT ARDY TARYLCL_ _ CLKOUT SRDY T, CLKOUT HOLD HLDA AD7-ADO, - - - - --~ - jTCLAV, r A15-AS 80188 )--- __ oJ 80186 DEJiI---- TCHCV . A19/S6-A16/S3, - - - - --""'\ RD, Wfi, 80186 }--- _ _ oJ 80186 57, DT/A, 52-SO 3-152 AFN-()1483A iAPX 188 WAVEFORMS (Continued) TIMER ON 80188 CLKIN TCKHL TCHICH2 ~--TCLCHI--+OOJj<+---TCHCL--~ CLKOUT ~------TCLCL------~ I --../ TINVCH TIMERIN re~~ TIMEROUT _ _ ~:~~~~~~~~~~~~~~~~~~~~~~_2_-_6_CLOC __ KS_ _ _ _ _ _ _ _----t--~ 80188 INSTRUCTION TIMINGS • All word-data is located on even-address boundaries. The following instruction timings repres.ent the mini- All jumps and calls include the time required to fetch mum execution time in clock cycles for each instruc- the opcode of the next instruction at the destination tion. The timings-given are based on the following address. - assumptions: • The opcode, along with any data or displacement All instructions which involve memory reference can required for execution of a particular instruction, require one (and in some cases, two) additional has been prefetched and resides in the queue at clocks above the minimum timings shown. This is the time it is needed. due to the asynchronous nature of the handshake • No wait states or bus HOLDS occur. -between the BIU and, the Execution unit. 3-153 AFN-01483A iAPX 188 INSTRUCTION SET SUMMARY Clock FUNCTION FORMAT Cycles Comments DATA TRANSFER MOV ~ Mo,.· Register to Register/Memory 11 000100wl mod reg um] 2/12' Register/memory to register 11 000101wl mod reg rm I 2/9' Immediate to reglster,'memory 11 1 0 0 0 1 1 w I mod 000 rim I data data If w-o-1 12-13' S/16-blt Immediate to register 11 01 1 w reg I data I datal! w-l 3-4 S/16-bit Memory to accumulator 11 010000wl addr·low I addr-hlgh 9' Accumulator to memory 11 010001wl addr-Iow I addr high S' Register/memory to segment register 11 o 0 0 1 1 1 0 I mod 0 reg rim , 2/13 Segment register to register/memory 11 00 0 1 1 0 0 I mod 0 reg r"m I 2/15 PUSH ~ Push Memory lilt 1 1 1 1 1 mod 1 1 0 r'm 20 RegISter 10 1 0 1 0 reg 14 Segment regISter I~o~o~o~r;::eg~1;;t~O,:,'-=-=,.....,,,---r:---,..==.,...,,....,..,.. 13 ~;<:,:;;F.·./:P'l\';:::;:r.::;;:l(h11..!Lj.Q&:Q} ... ~ .fIa1a •. } . DatlifS·:o:·4:' POP ~ Pop Memory 11 0 0 0 1 1 1 l ' mOd 0 0 0 rim 24 Register 10 1 0 1 1 reg , 14 Segment register 1000regl11' (reg*OI) 12 XCHG '" Exchang. Register/memory with register 11 o 0 0 0 1 1 wi mod reg rim , 4/11' Register with accumulator 11 o 0 1 0 reg I 3 IN ~ Inpullrom: Fixed port 11 1 1 0 0 lOw I port 10' Variable port 11 1 1 0 1 lOw I S' OUT ~ Outputlo' Fixed port 11 1 1 0 0 1 1 wi port 9' vanable port 11 1 1 0 1 1 1 wi l' .XLAT - Translate byte to AL 11 1 0 1 0 1 1 1I 15 LEA - Load EA to regISter 11 00 0 1 1 0 1 I mod reg rim 6 LDS c Load pOinter to OS 11 1 0 0 0 1 0 11 mod reg rim (mod Til) 26 LES ~ Load pOlOter to ES I mod reg rim 11 1 0 0 0 1 0 o (mod * 11) 26 LAHF ~ Load AH with flags 11 00 1 111 1 I 2 SAHF ~ Store AH Into flags 11 o 0 1 111 01 3 PUSHF ~ Push flags 11 00 1 1 1 0 0 I 13 POPF ~ Pop flags 11 00 1 1 1 0 1 I 12 SEGMENT'" Segment Ovemde C5 ~tOlll 0 I 2 55_- 10 0 1 1 0 1 1 0 I 2 D5 10011111 U 2 ES 10 0 1 0 0 1 t 0 I 2 Shaded areas indicate instructions nut available In IAPX 86, 88 microsystems. 'Note: Clock cycles shown for byte transfer. For word operations, add 4 clock cycles for all memory transfers. 3-154 AFN-{)1483A IAPX 188 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments ARITHMETIC ADD = Add. Reg,memory with register to either 1000000dwi mod reg rm I 3/10' Immediate to register memory 11 00000 s wi modOOO rm I da1a I datatl s w - oj I 4/16" Immediate to accumulator 10000010wl data I datatlw - , I 3/4 8/16-bit ADC = Add with carry' Reg:memory with register to either 10 00 , 0 0 d wi mod reg rm I 3/10' Immediate to register memory 11 00000 s wi modO'O rm I data I data II s w - 01 I 4/16' Immediate to accumulator 10001010wl data I datatl w-1 I 3/4 8/16-bit INC = Increment· Reglster,'memory 11 1111' , wi modOOO r'm I 3/15' Register 10 1 000 reg I 3 SUB = Subtract: Reg/memory and register to either 1001010dwi mod reg rm I 3/10' Immediate from register/memory 1100000swl mod 101 rm I data I datallsw-01 I 4/16' Immediate from accumulator 10010110wl data I datatl w-1 I 3/4 8/16-bit SBB = Subtract With borrow Reg/memory and register to either 10 001 1 0 d wi mod reg rm I 3/10' Immediate from register/memory 1100000swl mod011 rm I data I datatlsw-01 I 4/16' Immediate from accumulator 10 00 1 1 10 wi data I datatlw -1 I 3/4 8/16-bit DEC = Decrement Reglsterfmemory 11 111'11 wi mod001 rm I 3/15' RegISter 10 1 0 0 1 reg I 3 CMP = Compare: Register/memory With register 10 01 1 1 01 w mod reg I rm 3/10' Register With register/memory 10011100w mod reg I urn 3/10' Immediate With register/memory 11 00000sw mod111 rim I data I datatlsw=01 I 3/10' Immediate With accumulator /' 10 01 1 1 1 0 w data I datatfw-1 I 3/4 8/16-bit NEG = Change sign 11 11 1 01 , w mod011 rim I 3 AM ~ ASCII ad,ust lor add 10 0 1 1 0 1 1 1 8 DAA - DeCimal adlust lor add 10 0 1 0 0 1 1 1 4 AAS ~ ASCII adlust for subtract 10 0 1 1 1 1 1 1 7 DAS ~ DeCimal ad,ust lor subtract 10 0 1 0 1 1 1 1 4 MUL = Multiply (unsigned) RegISter-Byte 11 11 101 1 w mod100 rim I 26-28 RegISter-WOrd 35-37 Memory-Byte 32-34 Memory-WOrd 41-43' IMUL ~ Integer multiply (signed) Register-Byte 11 11 1 01 , wi mod 1 01 rim I 25-26 RegISter-WOrd 34-37 Memory-Byte 31-34 Memory-Word 40-43' \slgneil) c_"" DIY ~ D,v,de (unsigned) RegISter-Byte 11 1 , 1 0 1 1 wi mod110rlm I 29 \ Register-Word 38 Memory-Byte 35 Memory-Word 44' Shaded areas Indicate instructions not available in IAPX 86,88 microsystems. 'Note: Clock cycles shown for byte transfer. For word operations, add 4 clock cycles for all memory transfers. 3-155. AFN.o1483A intJ iAPX 188 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments lolV ~ Integer divide (signed) 11 1 1 1 0 1 1 w I mod 111 r'm 44-52 Register-Byte Reglster·Word 53-61 Memory·Byle 50-58 Memory· Word 59-67* AAM ~ ASCII adlust for multiply 11 10101001 0 0 0 010101 19 AAO ~ ASCII adlust for divide 11 lOt 0 1 0 11000010101 15 CBW ~ Convert byle to word 11 00 1 1 0 0 o I 2 CWO ~ Convert word to double word 11 00 1 1 00 I 4 LOGIC Shift/Rotate Instr~tions' ReglsterlMemory by 1 It 101000wl mod TTT rim 2/15* ReglsterlMemory by CL It t 0 1 0 0 1 wi mod TTT rim 5+n/17+n* TTT InstrucllOn o 00 ROL o 0 1 ROR o 10 RCL o 1 1 RCR 1 0 0 SHLISAL 10 1 SHR 111 SAR ANO~And: Reg/memory and register to either 10 0 1 0 0 0 d wi mod reg rim 3/10' Immediate to register/memory 11000000wl mod 1 00 rim data datalf w ~ 1 4/16' Immediate to accumulator 10 0 1 0 0 lOw I data datalf w-l 3/4 8116-bit TEST ~ And function to nags, no result· Register/memory and register 11 0OOO1owi mod reg rim 3/10' Immediate data and register/memory 11 1 1 1 0 1 1 wi mod 000 rim data data Ifw"'" 1 4/10' Immediate data and accumulator 11 010100wl data datalf w ~ 1 3/4 8116-bit OR=Or: Reg/memory and register to either IOOOO10dwi mod reg rim 3/10' Immediate to register/memory 11000000wl modOO 1 rim data datalfw=1 4/16" Immediate to accumulator 10 00 0 1 lOw I data datalf w 01 3/4 8116-bit XOR ~ E,clusive or: Reg/memory and register to either IOO1100dwi mod reg rim 3/10' Immediate to register/memory 11000000wl mod 11 0 rim data datal! w 0 1 4/16' Immediate to accumulator IOO11010wl data datalfw~ 1 3/4 8/16-bit NOT = Invert register/memory 11 1 1 1 0 1 1 wi modOl0 rim 3 STRING MANIPULATION: MOVS ~ Move bylelword 11 0100JOWI 14' CMPS 0 Compare bylelword 11 o 1 0 0 1 1 wi 22" SCAS ~ Scan bylelword o10 1 15" LOOS ~ Load bylelwdto ALIAX 12* Shaded areas indicate instructions not available in iAPX 86, 88 microsystems. 'Note: Clock cycles shown for byte transfer. For word operations •.add 4 clock cycles for all memory transfers. 3-156 AFN-Q14B3A iAPX 188 INSTRUCTION SET SUMMARY Continued) Clock FUNCTION FORMAT Cycles Comments STRING MANIPULATION (Contmued) Repeated by count In ex MOVS Move string 11 11 1 0 0 1 1101oo1owl 8+8n' CMPS Compare strlnQ 11 11 1 0 0 1 1 11 0 1 0 0 1 1 wi 5+22n' SCAS Scan string 11 11 1 0 0 1 1 11 0 1 0 1 5+15n' LOOS 11 1 0 0 1 CONTROL TRANSFER CALL = Call Direct Within segment 11 11 o 1 o 0 1 dlsp"low dlsp-hlgh 18 Register memory 11 111 111 1 1 mod 0 1 arm 17/27 indirect Within segment Direct mtersegment !1 o 0 1 1 0 1 segment 01lsel 31 segment selector Indirect mtersegment 11 111 111 1 mod 0 11 r m Imod = 111 54 JMP = Unconditional lump Short long 11 11 o 1 o 1 11 dlsp-Iow 13 Direct wlthm segment 11 11 o 1 o 0 11 dlsp·low dlsp-hlgh 13 I Register memory indirect Within segment 1 11 11 11 11 mod 100 r m 11/21 Direct Intersegment 11 11 o 1 o 1 o 1 segment allset 13 1 segment selector Indirect mlersegment 11 111111 1 mod 1 01 r m 1 Imod = 111 34 RET = Return from CALL Within segment 11 1 0 0 0 0 1 11 -20 Within seg addmg Immed to SP 11 1 0 0 0 0 1 o 1 data-low data-high 22 Intersegment 11 1 0 0 1 o 1 11 30 Intersegment adding Immediate to SP 11 1 0 0 1 0 1 o 1 data-low data-high 33 Shaded ar eas Indicate Instructions not avatia.ble In IAPX 86, 88 mlcrosystems 'Note: Clock cycles shown for byte transfer. For word operations, add 4 clock cycles for all memory transfers. 3-157 AFN-Q1483A inter, 'iAPX 188 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments JElJZ-JumponeQualrero 10 1 1 1 0 1 0 0 dlsp 4/13 13 ifJMP JUJNGE - Jump on less not greater or equal 10 1 1 1 1 1 0 0 dlsp 4/13 taken JLElJNG - Jump on leSS or eoual nOI grealer 10 1 1 1 1 1 1 0 dlsp 4 ifJMP 4/13 not taken JBlJNAE - Jumpon below nol above or enuar 10 1 1 1 0 0 1 0 dlsp 4/13 JBElJNA - Jump on below or equ. nol,bove 10 1 1 1 0 1 1 0 dlsp 4/13 JP/JPE - Jump on pa,,~ pa,,~ even 10 1 1 1 1 0 1 0 dlsp 4/13 JO - Jump on ove~ow 1011100001 dlsp 4/13 JS-Jumponslgn 10 1 1 1 1 00 0 1 dlsp 4/13 JNE/JNZ =Jump on not equal not rero 10 1 1 1 0 1 0 1 dlsp 4/13 JNL/JGE - Jump on not less greale""qual, 10 1 1 1 1 1 0 1 dlsp 4/13 JNLElJG - Jump on not less or eoual grealer 10 1 1 1 1 1 1 1 dlsp 4/13 JNB/JAE =Jump on nOI belo. above or equal 10 1 1 1 0 0 1 1 dlsp 4/13 JNBElJA = Jump on not belo. or equal above 10 1 1 1 0 1 1 1 dlsp 4/13 JNPIJPO = Jump on nOI par par odd 10 1 1 1 1 0 1 1 dlsp 4/13 JNO - Jump on not overllow 10 1 1 1 0 00 1 dlsp 4/13 JNS = Jump on not Sign 10 1 1 1 1 0 0 1 dlsp 4/13 LOOP,,; loop ex limes 11 1 1 0 0 0 j 0 dlsp I 5/15 6/16 , LOOPZ/LOOPE =loop while rero equal 11 1 1 0 0 0 0 1 dlsp I 6/16 LOOPNZILOOPNE -loop while notrero equal 11 1100000 dlsp I· 16 JMP taken/ JeXZ =Jump on ex rero 11 1 1 0 0 0 1 1 dlSp I 5 JMP not taken INT = Inlerrupl: Type specilled 11 1 0 0 1 1 0 1 I type 67 Type 3 11 1 0 0 1 1 0 0 I 65 if INT. taken/ INTO = Interrupt on overflow 11 1 0 0 1 1 1 0 I 68/4 if INT. not taken IRET =Interrupt return 11 1 0 0 1 1 1 11 40 Shaded areas indicate instructions not available in iAPX 86, 88 mlcrosystems, 3-158 AFN'()l483A intJ iAPX 188 INSTRUCTION SET SUMMARY (Continued) Clock FUNCTION FORMAT Cycles Comments PROCESSOR CONTROL CLC = Clear carry ,, I' , , , , 0 0 0 I 2 CMC = Complement carry I' , , , 0 , 0 , I 2 STC = Set carry I' , , , , 0 0 11 2 CLO = Clear dlrec1lOn I' , , , 0 0 2 STD = Set directIOn I' " , , , 0 , 2 CLI = Clear Interrupt I' " , , 0 , 0 2 STt = Set Interrupt I' " , , 0' , 2 HLT = Halt I' , , , 0 , 0 0 2 WAIT = Walt I' 00 , , 0' , 6 if test = 0 LOCK = Bus lock prefix I' , , , 0 0 0 0 2 ESC = Processor ExtenSion Escape mod LLL r m I 6 I'(TTTOO"TTT LLL are opcode to processor extenSion) Shaded areas Indicate Instructions not available in iAPX 86, 88 microsystems. 3-159 AFN-QH83A iAPX 188 FOOTNOTES The effective Address (EA) of the memory operand is REG is assigned according to the following table: computed according to the mod and rim fields: = 16-Bit (w 1) 8-Bit (w = 0) 000 AX 000 AL if mod = 11 then rim is treated as a REG field 001 CX 001 CL it mod = 00 then OISP = 0*, dlsp-Iow and disp-high 010 OX 010 OL are absent 011 BX 011 BL if mod = 01 then OISP = dlsp-Iow Sign-extended to 100 AH 100 SP 16-bits, dlsp-hlgh is absent 101 BP 101 CH if mod = 10 then OISP = disp-high: disp-Iow 110 SI 110 OH 111 01 111 BH If rim = 000 then EA = (BX) + (SI) + OISP if rim = 001 then EA = (BX) + (01) + OISP if rim = 010 then EA = (BP) + (SI) + OISP The physical addresses of all operands addressed by If rim = 011 then EA = (BP) + (01) + OISP the BP register are computed using the SS segment If rim = 100 then EA = (SI) + OISP register. The physical addresses of the destination op- If rim = 101 then EA ;= (01) + OISP erands of the string primitive operations (those ad- If rim = 110 then EA = (BP) + OISP* dressed by the 01 register) are computed using the ES segment, which may not be overridden. if rim = 111 then EA = (BX) + OISP OISP follows 2nd byte of instruction (before data if required) 'except If mod = 00 and rim = 110 Ihen EA = dlsp-hlgh dlsp-Iow EA calculation time is 4 clock cycles for all modes, and is included in the execution times given whenever appropriate. SEGMENT aVE.RRIDE PREFIX I0 0 1 reg 1 1 0 I reg is assigned according to the following: Segment reg Register 00 ES 01 CS 10 SS 11 OS 3-160 AFN-Q1483A 8089 8 & 16-BIT HMOS I/O PROCESSOR • High Speed DMA Capabilities Including • Memory Based Communication with I/O to Memory, Memory to I/O, Memory CPU to Memory, and I/O to I/O • Supports LOCAL or REMOTE I/O Processing • iAPX 86, 88 Compatible: Removes I/O Overhead from CPU in iAPX 86/11 or • Flexible, Intelligent DMA Functions 88/11 Configuration Including Translation, Search, Word Assembly/Disassembly • Allows Mixed Interface of 8- & 16-Bit • MULTIBUS™ Compatible System Peripherals, to 8- & 16-Bit Processor Interface Busses • Available in EXPRESS • 1 Mbyte Addressability - Standard Temperature Range The Intel® 8089 is a revolutionary concept in microprocessor input/output processing. Packaged in a 40-pin DIP package, the 8089 is a high performance processor implemented in N-channel, depletion load silicon gate technology (HMOS). The 8089's instruction set and capabilities are optimized for high speed, flexible and efficient I/O handling. It allows easy interface of Intel's 16-bit iAPX 86 and 8-bit iAPX 88 microprocessors with 8- and 16-bit peripherals. In the REMOTE configuration, the 8089 bus is user definable allowing it to be compatible with any 8/16-bit Intel microprocessor, interfacing easily to the Intel multiprocessor system bus standard MULTIBUS™. The 8089 performs the function of an intelligent DMA controller for the Intel iAPX 86, 88 family and with its processing power, can remove I/O overhead from the iAPX 86 or iAPX 88. It may operate compietely in parallel with a CPU, giving dramatically improved performance in I/O intensive applications. The 8089 provides two I/O channels, each supporting a transfer rate up to 1.25 mbyte/sec at the standard clock frequency of 5 MHz. Memory based communication between the lOP and CPU enhances system flexibility and encourages software modularity, yielding more reliable, easier to develop systems. CPU 1/0 CHANNEL 1 r-=---~ OMA REQ1 I .I DMA I I I I STATUS A1TI54 A181S5 I~I I~I ADDRESS! DATA I/O CHANNEL 2 L_ =.J DRQ1 DRQ2 DMA r=tE02 DMA TERMINATE2 ASSEMBLY; DISASSEMBLY INSTRUCTION ~ _ _r RESET FETCH UNIT Figure 2. Figure 1. 8089 I/O Processor Block Diagram 8089 Pin Configuration Int,1 Corporatlon,AS8umes No Responslbllty for the Use of Any CircUitry Other Than Circuitry Embodied In an Intel Product No Other Circuit Patent licenses 81'e Implied '" INTEL CORPORATION, 1980 3-161 8089 Table 1. Pin Description , .~-----.--.----------------------------, Symbol Type Naine and Function Symbol' Type Name and Function . AO-A15/ I/O Multiplexed Address and Data Bus: the WCK 0 Lock: the lock output signal indicates to the DO-D15 function of these lines are defined by the bus controller ~hat the bus is needed for more state of SO. S1 .and S2 lines. The pins are than one contiguous cycle. It is set via the floated after reset and when the bus is not channel control register, and during the TSl acquired. A8-A15 are stable on transfers. to a instruction. The pin floats after reset and physical 8-bit data bus (same bus as 8088), when the bus is not.acquired. This output is and are multiplexecj with data on transfers to active low. a 16-bit Ilhysical bus. Reset: The receipt of a reset signal causes RESET I A16-A19/ o Address and Status: Multiplexed most the lOP to suspend all its activities and enter 53-56 sig(lificant address lines and status in- an idle state until a channel attention is formation. The address lines are active only received. The signal must be active for at when addressing memory. Otherwise, the least four clock cycles, status IinE!s are active and are encoded as ClK I Clock: Clock provides all timing needed for shown below. The pins are floated after reset internal lOP operation. and when the bus is not acquired. S6S5S4S3 CA I Channel Attention: Gets the attention of the 1 1 0 0 DMA cycle on CH1 lOP. Upon the falling edge of this signal, the 1 1 . ,0 1 QMA cycle on CH2 SEl input pin is examined to determine 1 1 1 0 Non-bMA cycle on CH1 Master/Slave or CH1/CH2 information. This 1 1 1 1, Non-DMA cycle on CH2 input is active high. o Bus High Enable: The Bus High Enable is SEl I Select: The first CA received after system used to enable data operations on the most reset informs the lOP via the SEl line, whe- significa~thaif of the data bus (D8:-D15). The ther it is a Master or Slave (0/1 for Mas- signal is active low when a byte is to be ter/Slave respectively) and starts the in- transferred on the upper half of the data bus. itialization sequence. During any other CA The pin is floated after reset and when the the SEl line signifies the selection of bus is not acquired. BHE does not have tO,be CH1/CH2. (0/1 respectwely.) latched. DRQ1-2 I Data Request: DMA request inputs which ~~,S2 o Status: These are the status pins that define signal the lOP that a peripheral is ready to transfer/receive data using channels 1 or 2 the iop activity during any given cycle. They are encoded as shown below: respectively. The signals must be held active 828180 high until the appropriate fetch/stroke is o 0 0 Instruction fetch; I/O space initiated. o 0 1 Data fetch; I/O space RQ/GT I/O Request Grant: Request Grant implements o 1 0 Data store; I/O space the communication dialogue required to ar- o 1 1 Not used bitrate the use of the system bus (between 1 0 0 Instruction fetch; System Memory lOP and CPU, lOCAL mode) or I/O bus when 1 0 1 Data fetch; System Memory two lOPs share.J!le same bus (REMOTE 1 1 0 Data store; System Memroy mode). The RQ/GT signal.!! l!£!ive low. An 1 1 1 Pa'ssive internal pull-up permits RQ/GT to be left The status lines are utilized by the bus floating if not used. controller and bus arbiter, to generate all SINTRl-2 0 Signal Interrupt: Signal Interrupt outputs memory and I/O control signals. The signals change during T4 if a new cycle is to be from channels 1 and 2 respectively. The entered while the return to passive state in T3 interrupts may be sent directly to the CPU or or Tw indicates the end of a cycle. The pins through the 8295A Interrupt controller. They are floated after system reset and when the are used to indicate to the system the ,bus is not acquired. occurrence of user defined events. EXT1-2 I External Terminate: External terminate READY I Ready: The ready signal received from the addressed device indicates that the device is inputs for channels 1 and 2 respectively. The EXT signals will cause the termination of the ready for data transfer. The signal is active current DMA transfer operation if the chan- high and is synchronized by the 8284 clock generator. nel is so programmed by the channel control register. The signal must be held active high until termination is complete. , Vee Voltage: +5 volt power input. Vss Ground. 3-162 AFN'()0840E inter 8089 FUNCTIONAL DESCRIPTION control. CRT control, such as cursor control and auto scrolling, is simplified with the 8089. Keyboard control, The 8089 lOP has been designed to remove I/O proces- communication control and general I/O are just a few of sing, control and high speed transfers from the central the typical applications for the 8089. processing unit. Its major capabilities include that of in- itializing and maintaining peripheral components and Remqte and Lc;»cal Modes supporting versatile DMA. This DMA function boasts flexible termination conditions (such as external termi· Shown in Figure 3 is th!l 8089 in a LOCAL configuration. nate; mask compare, single transfer afld byte count ex- The iAPX 86 (or iAPX 88) is used in its maximum mode. The pired). The DMA function of the 8089 lOP uses a two cy· 8089 and iAPX 86 reside on the same local bus, sharing the cle approach where the information actually flows same set of system buffers. Peripherals located on the through the 8089 lOP. This ClPproach to DMA vastly sim- system bus can be addressed by either the iAPX 86 or the plifies the bus timings and enhances compatibility with 8089. The 8089 requests the use of the LOCAL bus by memory and peripherals, in addition to allowing opera- means of the FlQ/GT line. This performs a similar f4nction tions to be performed on the data as it is transferred. to that of HOLD and HLDA on the Intel 808SA, 8080A and Operations can include such constructs as translate, IAPX 86 minimum mode, but is implemented on one where the 8089 automatically vectors through a !obkup physical line. When the iAPX 86 relinquishes the syste"1 table and mask compare, both on the "fly". bus, the 8089 uses the same bus control, latches and transceiver components to generate the system address, The 8089 is functionally compatible with Intel's iAPX 86, 88 control and data lines. This mode allows a more family. It supports any combination of 8/16-bit busses. In economical system configuration at the exp!"nse of the REMOTE mode it can be used to complement other reduced CPU thr4Put du~ to lOP bus utilization. Intel processor families. Hardware and communication architecture are designed to provide simple mechanisms for system upgrade. A typical REMOTE configuration is shown in Figure 4. In this mode, the lOP's bus is physically separated from The only direct communication between the lOP and the system bus by means of system buffersllatches. The CPU is handled by the Channel Attention and Interrupt lOP maintains its own local bus and can operate out of lines. Status information, parameters and ta$k pro- iocal or system 'memory. The system bus interface con- grams are passed via blocks of shared memory, simpli· tains the following components: fying hardware interface and encouraging structured programming. • Up to Huee 8282 bufferllatches to latch the address to The 8089 can be used in applications such as file and the system bus. buffer management in hard disk or floppy disk control. It • Up to two 8286 devices bidirectionally buffer the can also provide for soft error recovery routines and sc!!n system data bus. CLK MNIMX [-GND so S1 so 51 8288 MWTC """" AMWC ,NC ..... .... S2 !i2 BUS CON ll>Rc l _ DeN TROLLER lowe CPU , - - OTIA Alowe ~ N C iHE f-- elK READY ALE 'NTA RESET 110101' L-------, -------, 0 T NO .... CLOCK GENERATOR RESET RQ/GT I ..., -r-------, OND OE f- ~ STB Ii 8282 LATCH 11,20R3) II F ADOR BHE .... =- READY 51 L... CLK I )-bt !HE I ,op f--AoDRI~ '28' DATA TRANSCEIVER I ~~'- (1 OR 2) CA ..... I I itff r IcrHl1 1 I~ I~ I~ 18 I~ 2716.2 I~ I~ Me! I; ~:cs.ao ~ -t<:::rl III A, lowe )§ I: 2142 RAM 1'1 (2~ 1K0c8 1Kd (2) : EPROM 2K"a 2K..s PER'PHERAL INT OMQ OMAC PER,PHERAL DMQ INT DMAC "8"'OAOOR: DECODE I I 'L NOTE ONLY ONE LATCH IS NEEDED IF CONFIQURED WITH 8088 AND ONLY 641( ADDRESSING IS USED ONLY ONE TRANSCEIVER IS NEEDED IF USING A PHYSICAl8·8IT DA'TA BUS (8088) . Figure 3. Typical iAPX 86/11, 88/11 Configuration with 8089 In LOCAL Mode, 8088, 8086 In MAX Mode AF~-o0840E 3-163 • An ,8288 bus controller supplies the control signals the lOP which channel Is being addressed: Communica· necessary for buffer operation as well as MRDC tion from the 10P"to the processor can be performed in a (Memory Read) and MWTC (Memory Write) signals. similar manner via a system interrupt (SINTR 1,2), if the • An 8289 bus arbiter peHorms all the functions CPU has enabled interrupts for thl's purpose. Addition- necessary to arbitrate the use of the system bus. This ally, the 8089 can store messages in memory regarding is used in place of the RQ/GT logic in'the LOCAL its status and the status of any peripherals. This com- mode. This arbiter decodes type of cycle information munication mechanism Is supported by a hierarchial from the 8089 status lines to determine if the lOP data structure to provide a maximum amount of flexi· desires to perform a transfer over the "com'mon" or bility of memory use with the ac!ded capability of handl· system bus. ing multl'ple lOP's. The peripheral devices PER1 and PER2 are supported on Illustrated in Figure 5, is an overview of the communica· their own data and address bus. the 8089 communicates tion data structure hierarchy that exists for the 8089 I/O with the peripherals without affecting system bus opera- processor. Upon the first CA from RESET, if the lOP is tion. Optional buffers may be used on the local bus when initialized as the BUS MASTER, 5 bytes of Information are capacitive loading conditioRS so dictate. 1/0 programs and read into the 8089 starting at location FFFFS (FFFFS, RAM buffers may also reside on the local bus to further FFFF8-FFFFB) where the type of system bus (1S-bit or 8- reduce system bus utilization. bit) and pointers to the system configuration block are obtained. This is the only fixed location the 8089 accesses. The 'remaining addresses are obtained via the data struc- COMMUNICATION MECHANISM ture hierarchy. The 8089 determines addresses in the Fundamentally, communication between the CPU and same manner as does the iAPX 8S; i.e., a 1S-bit relocation lOP is performed through messages prepared in shared pOinter is offset left 4 bits and added to the 1S-bit address memory. The CPU can cause the 8089 to execute a pro· offset, obtaining a 20-bit address. Once these 20-bit ad- gram by placing it in the 8089's memory space and/or dresses are formed, they are stored as such, as all the 8089 directing the 8089's attention to it by asserting a hard· address registers are 20 bits long. After the system con- ware Channel Attention (CA) signal to the lOP, ac· figuration pointer address is formed, the 8089 lOP ac- tivating the proper I/O channel. The SEL Pin indicates to cesses the system configuration block. ; IW T~ru:L iimi { iOli iNTA ~ O2 elK MEMORY ADMlRAM 51 .... BUS ARBITRATION MULTlIUS } ARBITRATION StQNALS """"7'" (OPTIONAl.-IF so IiEIi NEEDED TO REDUCE LOADING ON 8088) ,--j r~-=1.~-:'-:'" r-- PDEN Af:N DEN .... - .:D"~~ DTIA S2 BUS s; CON J---;- iJ. !iii --D TROLLER t----MEMR "4. _______J, ALE --R t----MEMW r: elK J.:::==:-"::::-:il 808" lOCAL BUS c ~ ~7 STa or II M'·'AD.B'l L 8212183 .> I t ' 4 LATCH C.U '-'1" ~ Q SYSTEM c " S, So BUS oRQ, ~ :1 PER, ---------, , VL J lJ>; ~ I I D'DO OR f'r ,~ EXT' I),. D'~DO ~ 81J89 ADDRESSIDATA Vc-----4 82B8/8' ,...------. TRANC If -V Ilk DRo, .~ elK I I I READY :I PE.. EXT2 GT RQI RESET I-- '--.. LJ ·· I TC)ANOTHER lOP I- AEN .... _READY -RESET YDf-l Figure 4. Typical REMOTE Configuration 3-164 AFN-00840E inter 8089 the lOP, allowing the lOP to operate concurrently with the CPU, or reside in system memory_ The advantage of this type of communication between the processor, lOP and peripheral, is that it allows for a very clean method for the operating system to handle SYSTEM 1/0 routines. Canned programs or "Task Blocks" allow CONFIGURATION BLOCK for execution of general purpose 1/0 routines with the CB RELOCA liON I status and peripheral command information being passed via the Parameter Block ("data" memory). Task CONTAOL BUSY I CCW Blocks (or "program" memory) can be terminated or BLO,CK { PB ADDRESS CHANNEL restarted by the CPU, if need be. Clearly, the flexibility ~~·r-- PB RELOCATION 1 of this communication lends itself to modularity and ap- BUSY I CCW plicability to a large number of peripheral devices and PB ADDRESS CHANNEL upward compatibility to future end user systems and 2 PB RELOCATION microprocessor families. I--=::':~~)--------, TASK BLOCK J Register Set '1---'---,,-J. lOP TASK T T The 8089 maintains separate registers for its two 1/0 T T PROGRAM channels as well as some common registers (see Figure 6). There are sufficient registers for each channel to sus· Figure 5. Communication Data Structure Hierarchy tain its own DMA transfers, and process its own instruc- tion stream. The basic DMA pointer registers (GA, GB - The System Configuration Block (SCB), us.ed only dur- 20 bits each), can point to either the system bus or local ing startup, pOints to the Control Block (CB) and provides bus, DMA source or destination, and can be autoincre- lOP system configuration data via the SOC byte. The mented. A third register set (GC) can be used to allow SOC byte initializes lOP 1/0 bus width to 8/16, and translation during the DMA process through a lookup defines 'one of two lOP RQ/GT operating modes. For table it pOints to. Additionally, registers are provided for a RQ/GT mode 0, the lOP is typically initialized as SLAVE masked compare during the data transfer and can be set and has its RQ/GT line tied to a MASTER CPU (typical up to act as one of the termination conditions. Other LOCAL configuration). In this mode, the CPU normally registers are also provided. Many of these registers can be has control of the bus, grants control to the lOP as need- used as general purpose registers during program execu- ed, and has the bus restored to it upon lOP task comple- tion, when the lOP is not perforn:ing DMA cycles. tion (lOP request-CPU grant-lOP done). For RQ/GT mode 1, useful only in remote mode between two lOPs, MASTERISLAVE designation is used only to initialize USER PROGRAMMABLE bus control: from then on, each lOP requests and grants TAG 19 0 G P ADDRESS A (GAl as the bus is needed (IOP1 request-IOP2 grant-IOP2 G P ADDRESS B (Gal request-IOP1 grant). Thus, each lOP retains bus con- G P ADDRESS C (GC) -- trol until the other requests it. The completion of in- TASK POINTER (TP) itialization is signalled by the lOP clearing the BUSY _ _ 1·BlT POINTER TO EITHER 110 OR SYSTEM MEMORY SPACE 15 0 flag in the CB. This type of startup allows the user to INDEX (IX) have the startup pointers in ROM with the SCB in RAM. BYTe COUNT (BC) Allowing the SCB to be in RAM gives the user the flex- MASK I COMPARE (Me) . ibility of being able to initialize multiple lOPs. CHANNEL CONTROL (CC) NON USER PROGRAMMABLE (ALWAYS POINTS TO SYSTEM MEMORy) The Control Block furnishes bus control Initialization for the lOP operation (CCW or Channel Control Word) and provides pointers to the Parameter Block or "data" 19/ I PARAMETER POINTER (PP) P memory for both channels 1 and 2. The CCW is retrieved and analyzed upon all CA's other than the first after a I CHANNEL CONTROL POINTER (CP) I reset. The CCW byte is decoded to determine channel operation_ Figure 6. Register Model The Parameter Block contains the address of the Task Block and acts as a messge center between the lOP and Bus Operation CPU. Parameters or variable information is passed from the CPU to its lOP in this block to customize the soft- The 8089 utilizes the same bus structure as the ware interface to the peripheral device. It is also used iAPX 86, 88 in their maximum mode configurations (see for transferring data and status information between the Figure 7). The address is time multiplexed with the data lOP and CPU. on the first 16/8 lines. A16 through A19 are time multi- plexed with four status lines S3-S6. For 8089 cycles, S4 The Task Block contains the instructions for the respec- and S3 determine what type of cycle (OMA versus non- tive channel. This block can reside on the local bus of DMA) is being performed on channels 1 or 2. S5 and S6 AFN·00840E 3-165 inter are a unique code assigned to the 8089 lOP, enabling 16-bits wide with either an ~blt peripheral (under byte the user to detect which processor Is performing a bus column) or 16·blt peripheral (word column) being shown. cycle In a multipr0cesslng environment. The latency refers to the worst case response time by The first three status lines, 80-82, are used with an 8288 the lOP to a DMA request, without the bus arbitration bus controller to determine if an Instruction fetch or times. Notice that the word transfer allows 50% more data. transfer is being performed In 110 or system bandwidth. This occurs since three bus cycles are re- memory space. . quired to map 8-bit data into a 16-blt location, versus two DMA transfers require at least two bus cycles' with each for a 16·blt to 16·bit transfer. Note that It Is possible to bus cycle requiring a minimum of four clock cycles. Ad· fully saturate the system bus in the LOCAL mode ditional clock cycles are added if wait states are reo whereas in the REMOTE mode this Is reduced to a max· imum of 50% .. quired. This two cycle approach simplifies considerably the bus timings In burst DMA. The 8089 optimizes the Table 2, Achievable 5 MHz 8089 Operations with transfer between two different bus widths by using a 16-Blt System Bus three bus cycles versus four to transfer 1 word. More than one read (write) is performed when mapping an LOCII' Remote 8·bit bus onto a 16-bit bus (vice versa). For example, a Byte Word Byte Word data transfer from an 8·blt peripheral to a 16-bit physical location in memory Is performed by first. doing two Bandwidth 830 KBiS 1250 KBIS 830KBIS 1250 KBIS reads, with word assembly within the lOP assembly Latency 1.012.4 ~eec' .1.012.4 ~ec' 1.0/2.4~' 1.012.4 ~ec' register file and then one write. 2.4~c 1.6~c O.8·~c O.8~ec System Bus PER PER PER As can be expected, the data bandwidth of the lOP is a UtilizatIon PER function of the physical bus width of the system and 1/0 TRANSFER TRANSFER TRANSFER TRANSFER busses. table 2 gives the bandwidth, latency and bus '2.4 ~ec if intetleavlng with other channel and no wait states. l~eec If utilization of the 8089: The system bus is assumed to be channel is waiting for request. i-----f4+ N w A I T I - ' C ' f - - - - - + - - - - ( 4 +HWAlTI-'o.-----I T, Tt I 'a rWAIT I T, T, Tt 13 TWAIT I T. \ ADDAISTATU$ In NOTE 1 ADOIl/OATA j1,11T ,"Y8ICAL8UII -----<:::X'-__ D._T._OU_T(D_,,_ ...._~~--OC OlIR NOTI1 1RlIliITAilLE lie. NON MUL nPlEXED) THROUGHOUT EAOH TMNSFER CYCLE At-Atl ARE ALSO ITAIlI ON TMNlnRI TO A PHYSICAL' an IU' Figure 7, 8089 Bus Operation 3-166 AFN-00I!40E in1:ef 8089 ABSOLUTE MAXIMUM RATINGS* "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O'C to 70'C tion of the device at these or any other conditions above Storage Temperature •............ - 65'C to + 150'C those indicated in the operational sections of this Voltage on Any Pin with specification is not implied. Exposure to absolute maxi- Respect to Ground ..•...........•.. - 1.0 to 7V + mum rating conditions for extended periods may affect Power Dissipation ................•....... 2.5 Watt device reliability. D.C. CHARACTERISTICS (TA = o·c to 70·C. Vee = 5V ±10%) Symbol Parameter Min. Max. Units Test Conditions VIL Input Low Voltage -0.5 +0.8 V V IH Input High Voltage 2.0 Vcc+1.0 V VOL Output Low Voltage 0.45 V IOL=2.0 mA VOH Output High Voltage 2.4 V 10H = - 400,..A Icc Power Supply Current 350 mA TA =25·C III Input Leakage Current!1) ± 10 ,..A OV < VIN < Vee Ilo Output Leakage Current ± 10 ,..A 0.45V.; Your .; Vee VCl Clock Input Low Voltage -0.5 +0.6 V VCH Clock Input High Voltage 3.9 Vcc + 1.0 V Capacitance of Input Buffer C IN (All input except 15 pF fc = 1 MHz ADo- AD 15• RO/GT) Capacitance of 1/0 Buffer Cia 15 pF fc = 1 MHz (ADo- AD 15• RQ/GT) A.C. CHARACTERISTICS (TA = o·c to 70·C. Vee = 5V ±10%) 8089/8086 MAX MODE SYSTEM (USING 8288 BUS CONTROLLER) TIMING REQUIREMENTS Symbol Parameter Min. Max. Units Test Conditions TClCl ClK Cycle Penod 200 500 ns TClCH ClK low Time (213 TClCl) - 15 ns TCHCl ClK High Time (VlTClCl)+ 2 ns TCH1CH2 ClK Rise Time 10 ns From 1.0V to 3 5V TCL2Cl1 ClK Fall Time 10 ns From 3.5V to 1.0V TDVCl Data In Setup Time 30 ns TClDX Data In Hold Time 10 I ns TRtvCl ROY Setup Time into 8284 (See Notes 1, 2) 35 ns TClR1X ROY Hold Time Into 8284 (See Notes 1, 2) 0 ns TRYHCH READY Setup Time Into 8089 (2!JTClCl) -15 ns TCHRYX READY Hold Time Into 8089 30 ns TRYlCl READY Inactive to ClK (See Note 4) -8 ns TINVCH Setup Time Recognition (ORO 1,2 RESET, Ext 1,2) (See Note 2) 30 ns TGVCH RO/GT Setup Time 30 ns TCAHCAL CA Width 95 ns TSlVCAl SEl Setup Time 75 os TCAlSlX SEl Hold Time 0 ns TCHGX GT Hold Time into 8089 40 ns TILIH Input Rise Time (Except ClK) 20 ns From 0.8V to 2.0V TlHll Input Fall Time (Except ClK) 12 ns From 2.0V to 0.8V 3-167 AFN·00840E inter 8089 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES Symbol Parameter Min. Max. Units Test Conditions TCLML Command Active Delay (See Note 1) 10 35 ns CL=80 pF TCLMH Command Inactive Delay (See Note 1) 10 35 ns ~ TRYHSH READY Active to Status Passive ($ee Note 3) 110 ns TCHSV Status Active Delay 10 110 ns TCLSH Status Inactive Delay 10 130 ns TCLAV Address Valid Delay 10 110 ns TCLAX Address Hold Time 10 ns TCLAZ Address Float Delay TCLAX 80 ns --------- TSVLH Status Valid to ALE High (See Note 1) 15 ns TCLLH CLK Low to ALE Valid (See Note 1) 15 ns CL= 150 pF TCHLL ALE Inactive Delay (See Note 1) 15 ns TCLDV Data Valid Delay 10 110 ns f-- TCHDX Data Hold Time' 10 ns TCVNV Control Active Delay (See Note 1) 5 45 ns TCVNX ContrOl Inactive Delay (See Note 1) 10 45 ns TCHDTL Direction Control Active Delay (See Note 1) 50 ns TCHDTH Direction Control Inactive Delay (See Note 1) 30 ns TCLGL RQ Active Delay 0 85 ns CL = 100 pF TCLGH RQ Inactive Delay 85 ns Note 5: CL = 30 pF -~-- ~~- TCLSRV SINTR Valid Delay 150 ns CL = 100 pF -- TOLOH Output Rise Time 20 ns From O.BV to 2.0V TOHOL Output Fall Time , 12 ns From 2.0V to 0.8V NOTES: 1 Signal at 8284 or 8288 shown for reference only 4 Applies only to T2 state 2 Setup reqUirement for asynchronous signal only to guarantee recogmtlon at next elK 5 Applies only If RQ/GT Mode 1 CL=30pf, 27 KO pull up to Vee 3 Aplles only to T3 and TW states A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE ~CL~100PF UNDER TEST A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR -= A LOGIC a THE CLOCK IS DRIVEN AT 4 3V AND a 25V TIMING MEASURE- MENTS ARE MADE AT 1 5V FOR BOTH A LOGIC l' AND a CL '=' 100 pF C L INCLUDES JIG CAPACITANCE 3-168 AFN..Q0840E intJ 8089 WAVEFORMS 8089 BUS TIMING USING 8288 1 2 , .' CH1CH2- - - - I-TCL2CLl Tw _ _ TCLCL_,_ _ elK veHr--\ ,,---... r--'I r~ ~ 1- I~ ,.-A15 ON TRANSFERS vel""" TelAv- , I: I--- TeHeL _TeLcH .... TCHDX 1 SEE NOTE 7 TO AN 8·BIT PHYSICAL BUS AND BHE ~'---b----1~-----+----~------1r----t-------r-~~FlOAT -+-----t--' - - _ TCHSV -TClSH (SEE NOTE 3) §2.S1.SO (EXCEPT HALTI 1 - relAY --I TCLDV .1. I- .1 TCLAX- A"A16 r J("" l ---T-SV-l-H-tt..J~ • TCllH- _ - TeHll n- r-- \~---~--+~-+---+----+---¥~--- AtE (8288 OUTPUT) §l~I:i-~~~ SEE NOTE 4 RDY (8284 INPUT) TRYLCL_ _ READY (8089 IN pun I ~TCHRYX TRYHSH -Ir-t-----t---, T~ SEe NOTE 7 f AND ABOVE 1 AD15-ADo TelAv- ---+-k~I, 1- - TeLAX!- TelAZr-- r I--TDvel--!-TelDX- A'5 Ao FLOAT DATA IHI ll--:F::"lO=A:!j=--rK. (IRE) _ _ _ _ _I-T.,erH_O_Tl_---f---..{ - fTCHDTH ~----+---~-------r----~ TCtMl- { TCLMH- --++---+--+----- 8288 OUTPUlS seE NOTES 4, 5 TeVNV - I:::.lr-'+--_____-1__'\, ---+-+--+--+---+-,' , TeVNX- WRITE - (Rii,iiiiDC,IORC,DTlR =Vo", TCHDX- FlOAT 1 ~ SEE NOTE 7 DATA our AND ABOVE (IHE/ AD1S-ADo 3, NOTE DEN TCYNV- TCVNX- ,I - -TCLML TelMH- to- 8... OUTPUTS SEE NOTES 4,5 - TClML - i-TeL'I'H I , AU.8IGNAUlSWITCH aETWEENvQK"""DVo~"'"lESSOTHERWl8ESfIECIF'ED 2 ROY IS SAMPlED NEAll THE END OF T2.T3 Tw TO DETERMINE IF Tw M.-cHINE STATES ARE TO BE INSERTED 3 FOLLOWING A WlllTE CYCLE DATA REMAINS VAlID ON THE 80BII LOCAL BUS UNnL A LOCAL BUS MASTER DECIDES TO AUN ANOTHER BUS CYCLE THE LOCAL BUS IS FUlATED BYTHEeoegWflEN THE8D18 ENTEIIS A REQUEST BUS.-cIlNOW!.EOGE STATE ~ SlGNALSAT f284DRIWIIIAIIESHOWNFORREFERENCEDNLY - - - - - - - $ ~.=::~~~~:IWIIICDMMANDANDCONTflOl.SIIJNALSIMRDC MWTC AMWC IOFiC lowe AIOWC INTA ... ND DEN) LAGS TI"IE S ALlTlMING MEAStJREMENTS ARE MADE AT 15V UNLESS OTHERWI&E NOTED 7 A1-A'sARESTABLEONTRANSFERSTOAN8BITPHYSICALDATABUS,e A._A" DON T FLOAT ON A READ FROM AN 8 BIT PHYSICAL BUS OR MULTIPLEX WITH DATA ON A WRITE TO AN S81T PHYSICAL BUS "If'Ii!! IS STABlE (NON MUlTiPlEJlEOI FOR All TRANSFERS 3-169 AFN.(J()84DE 8089 WAVEFORMS (Continued) ASYNCHRONOUS SIG~AL RECOGNITION ClK ~ 1 SETUP REQUIREMENTS FDA ASYNCHRONOUS SIGNALS ONLY TO GUARANTEE NEGAllVE EDGE TRIGGERED RECOGNITION AT NEXT elK. 3. DAG BECOMING ACTIVE OREATER THAN 30 ns AFTER THE RISING EDOE OF elK .2 ALL INPUTS EXCePT CA ARE LATCHED ON A elK EDGE THE CA INPUT IS WILL GUARANTEE NON-RECOGNITION UNTIL THE NEXT RISING CLOCK EDGE BUS LOCK SIGNAL TIMING AND SINTR TIMING Any elK eye •• --! eLK eLK '----_TCLMVj~ .,OT.,.•: _ "----. 1 REQUEST/GRAN! SEQUENCE TIMINGS nL "1 8089 AS SLAVE (MODE 0) ~tT TCLOl .... IilIOUTPUYJ 8088 iff INPUT (TO MASTER) (FROM MASTER) .... AS MASTE. tM:~:~QLESTS BUS ~ .. WAITS 1" I BUS TCHGX raveH 1089 iii OUTPUT (OLD MASTER BECOMES NEW SLAVE) t..-aoeJ FLOATS AID BUS I -1 r TCLGH TCLGL I, TCHGX ,...........-T~1-- 8019 RQ INPUT ''-.-'.. "'''iIi==Y,-OUT-PUT-...J' 8089 ii'Ei:iA§E INPUT (FROM CURRENT SLAVE) (OLD MASTER !JECOMES NEW SLAVE) (TO MASTER) 'CPU provides active pull-up. 3-170 AFN'()0840E intJ 8089 WAVEFORMS (Continued) EXTERNAL TERMI,.ATE SETUP TIMING eLK EXT1.2:I-_" _ _ _ _ _- - J SEL SETUP AND TIMING TCAHCAL_ a CA \ SEL ,_'SLVCAL_I-'CALSLX 3-171 AFN.()()84()E 8089 8089 INSTRUCTION SET SUMMARY Data Transfers POltojTER INSTRUCTIONS OPCODE 7 0 7 0 LPD P,M Load Pointer PPP from Addressed Location P P P 0 o A A 1 1 000 1 OMM LPDI P,I Load Pointer PPP Immediate 4 Bytes P P P 1 000 1 o 0 0 0 1 000 MOVPM,P Store Contents of Pointer PPP in Addressed Location P P P 0 o A A 1 100 1 1 OMM MOVP P,M Restore Pointer P P P 0 oA A 1 1 0 0 0 1 1 MM MOVE DATA OPCODE Move from Source to Destination Source- o 000 OAAW 1 o0 1 OOMM MOV M,M o 000 OAAW 1 1 0 0 11M M Destination- MOV R,M Load Register RRR from Addressed Location R R R 0 OAAW 1 000 OOMM MOV M,R Store Contents of Register RRR in Addressed Location R R R 0 OAAW 1 000 o1MM MOVI R Load Register RRR Immediate (Byte) Sign Extend RRR wb OOW o0 1 1 o0 0 0 MOVI M Move Immediate to Addressed Location 000 wb AAW o1 0 0 11 MM Control Transfer CALLS OPCODE 7 07 0 'CALL Call Unconditional 11 o0 dd AAWj100 1 1 1MMI JUMP OPCODE JMP Unconditional 100 dd OOW o 0 1 0 o0 0 0 JZ M Jump on Zero Memory 000 dd AAW 1 1 1 0 0 1 MM JZ R Jump on Zero Register R R R dd o 0 0 0 100 o1 0 0 JNZ M Jump on Non-Zero Memory 000 dd AAW1 1 1 0 OOMM JNZ R Jump on Non-Zero Register R R R dd o0 0 0 1 o0 o0 0 0 JBT Test Bit and Jump if True BBB dd A A 0 1 0 1 1 11M M JNBT Test Bit and Jump if Not True B B B .dd A A 0 1 0 1 1 10M M JMCE Mask/Compare and Jump on Equal 000 dd A AO 1 0 1 1 OOMM JMCNE Mask/Compare and Jump on Non-Equal 000 dd A A0 1 0 1 1 o1MM Arithmetic and Logic Instructions INCREMENT, DECREMENT OPCODE 7 07 0 INC M Increment Addressed Location o0 0 0 OAAW 1 1 1 0 1 OMM INC R Increment Register R RR 0 o0 0 0 o0 1 1 1 000 DEC M Decrement Addressed Location o0 0 0 o A AW 1 1 1 0 1 1MM DEC R Decrement Register RR R 0 o0 0 0 o0 1 1 1 100 3-172 AFN-00840E intJ Arithmetic ,and Logic Instructions ADD OPCODE 7 o7 0 ADDI M,I ADD Immediate to Memory 000 wb AAW 1 1 0 0 OOMM ADDI R,I ADD Immediate to Register RRR wb o b W o 0 1 0 o0 0 0 ADD M,R ADD Register to Memory R R R 0 OAAW 1 101 OOMM ADD R,M ADD Memory to Register RRRO o A AW 1 0 1 0 OOMM AND OPCODE ANDI M,I AND Memory with Immediate 000 wb AAW 1 100 10MM ANDI R,I AND Register with Immediate RRR wb OOW 001 0 1 000 AND M,R AND Memory with Register R R R 0 o A AW 1 1 0 1 1 OMM AND R,M AND' Register with Memory RRRO OAAW 101 0 1 OMM OR OPCODE ORI M,I OR Memory with Immediate 000 wb AAW 1 1 0 0 o 1MM ORI R,I OR Register with Immediate RRR wb AAW o 0 1 0 o10 0 OR M,R OR Memory with Register R R R 0 OAAW1 101 01MM OR R,M OR Register with Memory R R R 0 o A AW 1 0 1 0 0 1MM NOT OPCODE NOT R Complement Register RRRO o 0 0 0 001 0 1 100 NOT M Complement Memory o 0 0 0 o A AW 1 101 1 1MM NOT R,M Complement Memory, Place in Register RRRO OAAW 101 0 1 1 MM Bit Manipulation and Test Instructions BIT MANIPULATION OPCODE 7 07 ,0 SET Set the Selected Bit IB B B 0 OAAol111 1 o 1MMI CLR Clear the Selected Bit IB B B 0 OAAol111 1 10MMI TEST OPCODE TSL Test and Set Lock 10001, 1 A A 0 11 o 0 1 o 1 MM I Control Control, OPCODE , 7 07 0 HLT Halt Channel Execution 001 0 o 000 o 1 0 0 1 000 SINTR Set Interrupt Service Flip Flop o10 0 000 0 o 0 0 0 o 0 0 0 NOP No Operation 000 0 o 000 o 0 0 0 000 0 XFER Enter DMA Transfer o1 1 0 o0 0 0 o0 0 0 o0 0 0 WID Set Source, Destination Bus Width; S,D 0 = 8, 1 = 16 1 S D 0 o0 0 0 o 0 0 0 o0 0 0 3-173 AFN'()084OE inter 8089 'AAField in call instruction can be 00,01,10 only. NOTES: "OPCODE is second byte fetched. BBB Bit Select Field All instructions consist of at least 2 bytes, while some instructions may use up to 3 additional bytes to specify The bit select field replaces the RRR field in bit manipu- literals and displacement data. The definition of the lation instructions and is used to select a bit to be oper- various fields within each instruction is given below: ated on by those instructions. Bit 0 is the least signifi- cant bit. wb o 7 01 1 byte literal ·1 R R ppp BBB R1w b 1 A A 1w1 opcooe 1M M I 10 2 byte (word) literal dd" 01 1 byte displacement 10 2 byte (word) displacement. AA Field 00 The selected pointer contains the operand address. M M Base Pointer Select 01 The operand address is formed by adding an 8-bit, unsigned, offset contained in the instruction to the 00 GA selected pOinter. The contents oUhe pOinter are un- 01 GB changed. 10 GC' 11 PP 10 The operand address is formed by adding the con- tents of the Index register to the selected pointer. Both registers remain unchanged. RRR Register Field 11 Same as 10 except the Index register is post auto- incremented (by 1 for 8-bit transfer, by 2 for 16-bit The RRR field specifies a 16-bit register to be used in transfer). the instruction. If GA, GB, GC or TP, are referenced by the RRR field, the upper 4 bits of the registers are load- ed with the sign bit (Bit 15). PPP registers are used as 20-bit address pOinters. W Width Field o The selected operand is 1 byte long. The selected operand is 2 bytes long. RRR 000 rO GA 001 r1 GB 010 r2 GC Additional Bytes 011 r3 BC ; byte count OFFSET: 8-bit unsigned offset. 100 r4 TP ; task block SDISP : 8/16-bit signed displacement. 101 r5 IX ; index register 110 r6 CC ; channel control (mode) LITERAL: 8/16-bit literal. (32 bits for LDP)). 111 r7 MC ; mask/compare The order in which the above optional bytes appear in lOP instructions is given below: PPP OFFseT I 000 pO GA 001 p1 GB 010 p2 GC 100 p4 TP ; task block pointer Offsets are treated as unsigned numbers. Literals and displacements are sign extended (2's complement). AFN·00840E iAPX 86/20 iAPX 88/20 NUMERIC DATA PROCESSOR 8087-3 • High Performance 2-Chip Numeric • Support 8 Data Types: 8-, 16-, 32-, 64- Data Processor . Bit Integers, 32-, 64-, 80-Bit Floating • Standard iAPX 86/10, 88/10 Instruction Point, and 18-Digit BCD Operands Set Plus Arithmetic, Trigonometric, • 8x80-Bit Individually Addressable Exponential, and Logarithmic Register Stack plus 14 General Instructions For All Data Types Purpose Registers • All 24 iAPX 86/10, 88/10 Addressing • 7 Built-in Exception Handling Modes Available Functions • Conforms To Proposed IEEE Floating • MULTI BUS System Compatible Point Standard Interface The Intel iAPX 86/20 and iAPX 88/20 are two-chip numeric data processors (NDP's). They provide the instruc- tions and data types needed for high-performance numeric applications. The NDP provides 100 times the performance of an iAPX 86/10, 88/10 CPU alone for numeric' processing. The iAPX 86/20 consists of an iAPX 86/10 (16-bit 8086 CPU) and a numeric processor extension (NPX), the 8087. The iAPX 88/20 consists of the NPX in conjunction with the iAPX 88/10 (8-bit 8088 CPU). The NDP conforms to the proposed IEEE Floating Point Standard. Both components of the iAPX 86i20 and iAPX 88/20 are implemented in N-channel, depletion load, silicon gate technology (HMOS), housed in two 40-pin packages. The iAPX 86/20, 88/20 adds 68 numeric processing instructions to the iAPX 86/10, 88/10 instruction set and eight 80-bit registers to the register set. {~~E} MAX MODE 8086 GND Vee GND , , r::--------, (A14) AD14 (A13) AD13 AD1S A161S3 (A14) AD14 (A13) AD13 3 A161S3 I J A17/S4 4 A17/S4 . (A12) AD12 4 37 (A12) AD12 []] ....., I 5 (A11) AD11 5 A18/sS (A11)AD11 " A18/SS ., 6 A19!S6 I (A10) AD10 A19!S6 (A10)AD10 35 (A9)AD9 1iRE/S7 (A9) AD9 [ , iiiiE/S7 (HIGH) REQUEST/ GRANT QUEUE STATUS I (A6)AD8 8 33 J iiO{GT1 (A8)AD8 33 ' MN....X I AD7 " ' INT AD7 " 'AD ADS iiOlGTO ADS iiO,mo ADS " ADS Ne " iiOIGT1 LOCK AD4 Ne REQUESTI QUEUE GRANT STATUS AD3 52 52 .51 ~ AD2 14 51 NPX AD1 SO SO ADO GSa 080 L _ _ _ _ _ _ --1'88120.88120 Ne Ne 081 BUSY NMI " 081 fEST eLK READY READY GND RESET RESET Figure 1. iAPX 86/20, 88/20 Block Diagram Figure 2. iAPX 86/20, 88/20 Pin Configuration Intel Corporation Assumes No Responslbilty for the Use of Any Circuitry Other Than Circuitry Embodied in an Intel Product No Other CIrcuit Patent Licenses ara Implied. @INTELCORPORATION, 1981 3-175 A~~~~~:~ inter IAPX 86/20, 88/20 Table 1. 8087 Pin Description Symbol lYpe Name and Function A015-AOO 1/0 Address Data: These Ii nes. ponstitute the time multi plexed memory address (T1) and data (T2, c T3, Tw, T4) bus. AO is analogous to BHE for the lower byte of the data bus, pins 07-00. It is lOW during T1 when a byte is to be transferred on the lower portion of the.bus in memory operations. Eight-bit oriented devices tied to the lower half of the bus would normally use AO to condition chip select functions. These lines are active HIGH. They are input/output lines for 8087 driven bus cycles and are inputs which the 8087 monitors when the 8086/8088 is in control of the bus. A15-A8:do not require an address latch in an iAPX 88/20. The 8087 will supply an address for the T1-T4 period. A19/86, I/O Address Memory: During T 1 these are the four most significant address lines A18/85, for mEl mary operations.- During memory operations, status information is available on A17!84, these lines during T2, T3, Tw, and T4. For 8087 controlled bus cycles, 86, 84, and 83 A16/83 are reserved and currently one (HIGH), while 85 is always lOW These lines are inputs which the 8087 monitors when the 8086/8088 is in control of the bus. BHE/87 I/O Bus High Enable: During T1 the bus high enable signal (BHE) should be used to enable data onto the most significant half of the data bus, pins 015-08. Eight-bit oriented devices tied to , the upper half of the bus would normally use BHE to condition chip select functions. BHE IS lOW during T1 for read and write cycles when a byte is to be transferred on the high portion of the bus. The 87 status information is available during T2, T3, Tw, and 1'4. The sig~al is active lOW 87 is an input which the 8087 monitors during 8086/8088 controlled bus cycles. 82, 81, SO i/O Status: For 8087 driven bus cycles, these status lines are encoded as follows: S2 S1 SO o (lOW) X X Unused , 1 (HIGH) 0 0 Unused 1 0 1 Read Memory , 1 1 0 Write Memory 1 1 1 Passive 8tatus is driven active during T4, remains 'valid during T1 and T2, and is returned to the passive state (1,1,1) during T3 or during TW when READY is HIGH. This status is used by the 8288 Bus Controller to generate all memory access control signals. Any change in 82, 81, or 80 during T4 is used to indicate the beginning of a bus cycle, and the 'return to the passive state in T3 or Tw is used to indicate the end of a bus cycle. These signals are monitored by the 8087 when the 8086/8088 is in control of the bus. RQ/GTO 1/0 Request/Grant: This request/grant pin is used by the NPX to gain control of the local bus from the CPU for operand transfers or on behalf of another bus master. It must be connected to one of the two processor request/grant pins. The request grant sequence on this pin is as follows: 1. A pulse one clock wide is passed to the CPU to indicate a local bus request by either the 8087 or the master connected to the 8087 RQ/GT1 pin. 2. The 8087 waits for the grant pulse and when it is received Will either initiate bus transfer activity in the clock cycle following the grant or pass the grant out on the RQ/GT1 pin in this clock if the initial request was for another bus master. 3. The 8087 will generate a release pulse to the CPU one clock cycle after the comllietion of the last 8087 bus cycle or on receipt of the release pulse from the bus master on RQ/GT1. 3-176 AfN.01820D inter iAPX 86/20, 88/20 Table 1. 8087 Pin Description (Continued) Symbol lYpe Name and Function RQ/GT1 I/O Request/Grant:This requesVgrant pin is used by another local bus master to force the 8087 to request the local bus. If the 8087 is not in control of the bus when the request is made the requesVgrant sequence is passed through the 8087 on the RQ/GTO pin one cycle later. Subsequent grant and release pulses are also passed through the 8087 with a two and one clock delay, respectively, for resynchronization. RQ"/(jf1 has has an internal pullup resistor, and so may be left unconnected. If the 8087 has control of the bus the requesVgrant sequence is as follows: 1. A pulse 1 CLK wide from another local bus master indicates a local bus request to the 8087 (pulse 1). 2. During the 8087's next T4 or T1 a pulse 1 CLK wide from the 8087 to the requesting master (pulse 2) indicates that the 8087 has allowed the local bus to float and that it will enter the "RQ/GT acknowledge" state at the next CLK. The 8087's control unit is disconnected logically from the local bus during "RQ/GTacknowledge." 3. A pulse 1 CLK wide from the requesting master indicates to the 8087 (pulse 3) that the "RQ/GT" request is about to end and that the 8087 can reclaim the local bus at the next CLK. Each master-master exchange of the local bus is a sequence of 3 pulses. There must be one dead ClK cycle after each bus exchange. Pulses are active lOW. QS1, I OS1, OSO: QS1 and QSO provide the 8087 with status to allow tracking of the CPU QSO instruction queue. OS1 OSO o (LOW) 0 No Operation 0 1 First Byte of Op Code from Queue 1 (HIGH) 0 Empty the Queue 1 1 Subsequent Byte from Queue INT 0 Interrupt: This line is used to indicate that an unmasked exception has occurred during numeric instruction execution when 8087 interrupts are enabled. ThiS signal is typically routed to an 8259A. INT is active HIGH. BUSY 0 Busy: This signal indicates that the 8087 NEU is executing a numeric instruction. It is con- nected to the CPU's TEST pin to provide synchronization. In the case of an unmasked exception BUSY remains active until the exception is cleared. BUSY is active HIGH. READY I Ready: READY is the acknowledgment from the addressed memory device that it will complete the data transfer. The ROY signal from memory is synchronized by the 8284A Clock Generator to form READY. This signal is active HIGH. RESET I Reset: RESET causes the processor to immediately terminate its present activity. The Signal must be active HIGH for at least four clock cycles. RESET is internally synchronized. ClK I Clock:"The clock provides the basic timing for the processor and bus controller. It is asym- metric with a 33% duty cycle to provide optimized internal timing. Vcc Power: VCC is the +5V power supply pin. GND GrOund: GND are the ground pins. NOTE: For the pin descriptions of the 8086 and 8088 CPU's reference those respective data sheets (iAPX 86/1 0, iAPX 88/10). AFN·01820D inter iAPX 86/20, 88/20 APPLICATION AREAS FUNCTIONAL DESCRIPTION The iAPX 86/20 and iAPX 88/20 provide functions The iAPX 86/20, 88/20 Numeric Data Processor's ar- meant specifically for high performance numeric chitecture is designed for high performance processing requirements. Trigonometric, logarith- numeric computing in conjunction with general mic, and exponential functions are built into the purpose processing. processor hardware. These functions are essential in scientific, engineering, navigational, or military The 8087 is a numeric processor extension that applications. provides arithmetic and logical instruction support for a variety of numeric data types in iAPX 86/20, The NDP also has capabilities meant for business or 88/20 systems. It also executes numerous built-in commercial computing. An iAf>X 86/20, 88/20 can transcendental functions (e.g., tangent and log process Binary Coded Decimal (BCD) numbers up functions). The 8087 executes instructions as a to 18 digits without roundoff errors. It can also per- coprocessor to a maximum mode 8086 or 8088. It form arithmetic on integers as large as 64 bits effectively extends the register and instruction set of (±1018). an iAPX 86/10 or 88/10 based system and adds several new data types as well. Figure 3 presents the registers of the iAPX 86/20. Table 2 shows the range PROGRAMMING LANGUAGE SUPPORT of data types supported by the NDP. The 8087 is treated as an extension to the iAPX 86/10 or 88/10, Programs for the iAPX 86/20 and iAPX 88/20 can be providing register, data types, control, and instruc- written in A8M-86, the iAPX 86,88 assembly lan- tion capabilities at the hardware level. At the pro- guage, PUM-86, FORTRAN-86, and PA8CAL-86, In- grammers level the iAPX 86/20, 88/20 is viewed as a tel's high-level languages for iAPX 86, 88 systems. , single unified processor. Details iAPX 86/20, 88/20 System Configuration The remainder of the data sheet will concentrate on As a coprocessor to an 8086 or 8088, the 8087 is the numeric processor extension (refered to as NPX wired in parallel with the CPU as shown in Figure 4. or 8087). For iAPX 86/10 or iAPX 88/10 CPU details The CPU's status (80-82) and queue status lines refer to those respective data sheets. (Q80-Q81) enable the 8087 to monitor and decode E 8087 iAPX 86/10, 88110 DATA FIELD TAG FIELD AX 15 ax FILE' 0 iI N':'T'78'-:E:::X::':PO:::N=EN':::T.;,.64T6;;,;3_~S:::IG::-:N:::IF:-::'C':':AN':::0~---1° ~1 R1 o.::S;G=9 R2~~~~~~+-----~~~----~ 0 cx I R31----+----+---------I ox I R.~--~------+---------------~ SI I R5r---~------+----------------~ 01 I R8~--~------+---------------~ UP I R7r---~------+---------------~ SP I R8r---~------+---------------~ ______ ~~ _______________J ~ L _ _ ., 15 IP I CONTROL REGISTER FLAGS I STATUS REGISTER IL _ _ _ _ --, INSTRUCTION POINTER I gI-I------------l I I I I OATAPOINTER Figu~e S. iAPX 86/20 Architecture 3-178 AFN·01820D intJ iAPX 86/20, 88/20 Table 2. iAPX 86/20, 88/20 Data Types Data Most Significant Byte Range Precision Formats 7 017 017 017 017 017 017 017 017 017 01 Byte Integer 102 8 Bits 17 101 Two's Complement Word Integer 104 16 Bits 115 IcJ :rwo's Complement Short Integer 109 32 Bits 131 101 Two's Complement Long Integer 1018 64 Bits )1 Two's 163 10 Complement Packed BCD 1018 18 Digits S I - 0 17 0 , .1 10 1 Dol Short Real 10±38 24 Bits SI E7 EoIF1 \ F231 Fo Implicit Long Real 10±308 53 Bits S IE10 EoIF1 FS21 Fo Implicit Temporary Real . 10±4932 64 Bits S IE14 EolFo F631 Integer: I Real: (_1)8(2E-BIA8)(FooF1 ... ) Packed BCD: (-1)8(017 ... 00) Blas=127 for Short Real 1023 for Long Real 16383 for Temp Real r - -.., I 8259A INT t----~ INTR I PIC L IRn_ .J ,APX86 MUlTIMASTER BUS SYSTEM INTERFACE BUS COMPONENTS 8284A CLOCK GENERATOR ClK I---I-------l,~>--I ClK ~-: .....--~r----t INT •• I I • r "iG-i-' I• .1 I I '- - ~ClK 8088 lOP M-" .... ..... Figure 4. NDP System Configuration AFN-01820D 3-179 iAPX 86/20, 88/20 instructions in synchrohization with the CPU and cycle being run: without any CPU overhead. Once started the 8087 'can process in parallel with and independent of the S2 S1 so host CPU. For resynchronization, the NPX's BUSY o X X Unused signal informs the CPU that the NPX is executing an 1 o o Unused instruction and the CPU WAIT instruction tests this 1 o 1 Memory Data Read signal to insure that the NPX is ready to execute 1 1 o Memory Data Write subsequent instructions. The NPX .can interrupt the 1 1 1 Passive (no bus CPU when it detects an error or exception. The cycle) 8087's interrupt request line is typically routed to the CPU through an 8259A Programmable Inter- rupt Controller. (See Figure 2 for 8087 pinout information.) Programming Interface The 8087 uses one of the request/grant lines of the The NDP includes the standard iAPX 86/10, 88/10 iAPX 86, 88 architecture (typically RQ/GT1) to obtain instruction set for general data manipulation and control of the local bus for data transfers. The other program control. It also includes 68 numeric request/grant line is available for general system use instructions for extended precision integer, floating (for instance by an I/O processor in LOCAL mode). A point, trigonometric, logarithmic, and exponential bus master can also be connected to the 8087's functions. Sample execution times for several NDP RQ/GT1 line. In this configuration the 8087 will pass functions are shown in Figure 4. Overall iAPX 86/20 the request/grant handshake signals between the system performance is 100 times that of an iAPX CPU and the attached master when the 8087 is not in 86/10 class processor for numeric instructions. control of the bus and will relinquish the bus to the master directly when the 8087 is in control. In this Any instruction executed by the NDP is the way two additional masters can be configured in an combined result of the CPU and NPX activity. The iAPX 86/20, 88/20 system; one will share the 8086 CPU and the NPXhave specialized functions and bus with the 8087 on a first come first served basis, registers providing fast concurrent operation. The and the second will be guaranteed to be higher in CPU controls overall program execution while the priority than the 8087. NPX uses the coprocessor interface to recognize and perform numeric operationS. As Figure' 4 shows, all processors utilize the same clock generator and system bus interface compo- Table 2 lists the eight data types the IAPX 86/20, nents (bus controller, latches, transceivers and bus 88/20 supports and presents the format for each arbiter). type. Internally, the NPX holds all numbers in the temporary real format. Load and store instructions automatically convert operands represented in Bus Operation memory as 16-, 32-, or 64-bit integers, 32- or 64-bit floating. point numbers or 18-digit packed BCD The 8087 bus structure, operation and timing are numbers into temporary real format and vice versa. identical to all othet processors in the iAPX 86, 88 The NDP also provides the capability to control series (maximum mode configuration). The address round off, underflow, and overflow errors iii each is time multiplexed with the data on the first 16/8 calculation. lines of the address/data bus. A16 through A19 are time multiplexed with four status lines S3-S6. S3, S4 Computations in the NPX use the processor's regis- and S6 are always one (high) for 8087 driven bus ter stack. These eight 80-bit registers provide the cycles while S5 is always zero (low). When the 8087 equivalent capacity of 20 32-bit registers. The NPX is monitoring CPU bus cycles (passive mode) S6 is register set can be accessed as a stack, with instruc- also monitored by the 8087 to differentiate tions operating on the top one or two stack ele- 8086/8088 activity from that of a local I/O processor ments,' or as a fixed register set, with instructions or any other local bus master. (The 808618088 must operating on explicitly designated registers. be the only processor on the local bus to drive S6 low.) S7 is multiplexed with and has the same value Table 5 lists the 8087's instructions 'by class. All ap- as BHE for all 8087 bus cycles. . pear as ESCAPE instructions to the host. ASSembly language programs are written in ASM-86, the iAPX The first three status lines, So-S2, are used with an 86, 88 assembly language. Table 3 gives the execu- 8288 bus controller to determine the type of bus tion times of some typical numeric instructions. 3-180 AFN-01820D inter iAPX 86/20, 88/20 Table 3. Execution Tlm"es for Selected IAPX 86/20 NUMERIC PROCESSOR Numeric Instructions and Corresponding EXTENSION ARCHITECTURE IAPX 86/10 Emulation As shown in Figure 5, the 8087 is internally divided Approximate Execution into two processing elements, the control unit (CU) Time (,£s) and the numeric execution unit (NEU). The NEU floating Point executes all numeric instructions, while the CU Instruction IAPX 86/20 IAPX 86/10 receives and decodes instructions, reads and writes (5 MHz memory operands and executes NPX control in- Clock) Emulation structions. The two elements are able to operate independently of one another, allowing the CU to Add/Subtract 17 1,600 maintain synchronization with the CPU while the Multiply (single NEU is busy processing a numeric instruction. precision) 19 1,600 Multiply (extended precision) 27 2,100 Control Unit Divide 39 3,200 Compare 9 1,300 The CU keeps the 8087 operating in synchronization Load (double precision) 10 1,700 with its host CPU. 8087 instructions are intermixed Store (double precision) 21 1,200 with CPU instructions in a single instruction stream. Square Root 36 19,600 The CPU fe,tches all instructions from memory; by Tangent 90 13,000 Exponentiation 100 17,100 monitoring the status signals (SO-52, 56) emitted by the CPU, the NPX control unit determines when an \ " OATA+--tI I (6) I T A (5) , I G W REGISTER STACK (4) (3) 0 STATUS I R 0 (2) (1) AobRESS EXCEPTION POINTERS I (0) -. L - - - - '- 8081T5 - - - - - - .J Figure 5. 8087 Block Diagram 3-181 AFN.ol8200 intJ lAP" 86/20, 88/20 8086 instruction is being tetchlild. The CU monitors NUmeric Execution Unit the Data bus in parallel with the CPU to obtail'1 in- structions that pertain to the 8087. The NEU executes all instructions that involve the register stack; these include arithmetic, logical, The CU maintains an instruction queue that is identi- transcendental, constant and data transfer instruc- cal to the queue in the host CPU. The CU automatic- tions. The data path in the NEU is 84 bits wide (68 ally determines if the CPU' is an 8086 or an 8088 fraction bits, 15 exponent bits and a sign bit) which immediately after reset (by monitoring the ImEJ S7 allows internal operand transfers to be performed at line) and matches its queue length accordingly. 8y very high speeds. monitoring the CPU's queue status lines (OSO, OS1), the CU obtains and decodes instructions from the When the NEU begins executing an instruction, it queue in synchrQnization with the CPU. activates the 8087 aUSY signal. This signal can be used in conjunction with the CPU WAIT instruction A numeric instruction appears as an ESCAPE in~ to resynchronize both processors when the NEU has struction to the 8086 or 8088 CPU. 80th the CPU and completed its current instruction. NPX decode and execute the ESCAPE instruction together. The 8087 only recognizes the numeric in- structions shown in Table 5. The start of a numeric operation is accomplished when the CPU executes Register Set the ESCAPE instruction. The instriJction mayor may not identify a memory operand. The iAPX 86/20 register set is shown in Figure 3. Each of the eight data registers in the 8087's register stack is 80 bits wide and is divided into "fields" The CPU does, however, distinguish between ESC instructions that reference memory and those that corresponding to the NDP's temporary real data do not. If the instruction refers to a memory operand, type. the CPU ca.lculates the operand's address using any one of its available addressing modes, and then per- At a given point in time the TOP field in the control word identifies the current top-of-stack register. A forms a "dummy read" of the word at that location. (Any location within the 1M b~e address space is "push" operation decrements TOP by 1 and loads a allowed.) This is a normal read cycle except that the value into the new top register. A-"pop" operation stores the value from the current top legister and CPU ignores the data it receives. If the ESC instruc- then increments TOP by 1. Like iAPX 86/10, 88/10 tion does not contain a memory reference (e.g. an stacks in memory, the 8087 register stack grows 8087 stack operation), the CPU simply proceeds to the next instruction. "down" toward lower-addressed registers. Instructions may address the data registers either An 8087 Instruction can have one of three memory implicitly or explicitly. Many instructions operate on reference options; (1) not reference memory; (2) the register at the top of the stack. These instruc- load an operand word from memory into the 8087; or tionsimplicltly address the register pointed to by the (3) store an operand word from the 8087 into TOP. Other instructions allow the programmer to memory. If no memory reference is required, the explicitly specify the 'register which is to be used. 8087 simply executes its instruction. If a memory Explicit register addressing is "top-relative." reference is required, the CU uses a "dummy read" cycle initiated by the CPU to capture and save the address that the CPU places on the bus. If the in- struction is a load, the CU additionally captures the Status Word data word when it becomes available on the local data bus. If data required is longer than one ·word, The status word shown in Figure 6 reflects the over- the CU immediately obtains the bus from the CPU all state of the 8087; it may be stored in memory and using the request/grant protocol and reads the rest then inspected by CPU code. The status word is a of the information in consecutive bus cycles. In a 16-bit register divided into fields as shown in Figure store operation, the CU captures and saves the store 6. The busy bit (bit 15) indicates whether the NEU is address as in a load, and ignores the data word that either executing an instruction or has an interrupt follows in the "dummy read" cycle. When the 8087 is request pending (8 = 1), or is idle (8 = 0). Several ready to perform the store, the CU obtains the bus instructions which store and manipulate the status from the CPU and writes the operand starting at the word are executed exclusively by the CU, and these specified address. do not set the busy bit themselves. 3-182 AFN-Ol820D iAPX 86/20, 88/20 15 I BI~I TOP 1~1~1~1~IXI~I~I~IUI~I~1 EXCEPTION FLAGS (1 = EXCEPTION HAS OCCURRED) I INVALID OPERATION DENORMALIZED OPERAND ZERO DIVIDE OVERFLOW UNDERFLOW PRECISION (RESERVED) INTERRUPT REQUESTt1) CONDITION cooe(2) TOP OF STACK POINTER(3) NEU BUSY I'HR is set if any unmasked exception bit Is set, cleared otherwise. (2)8ee Table 3 tor condition code Interpretation. (3)TOp Values 000 = Register a IS Top of Stack 001 = Register! IS Top of Stack 111 = Register 7 IS Top of Stack Figure 6. 8087 Status Word The four numeric condition code bits (CO-C3) are Tag Word similar to the flags in a CPU: various instructions update these bits to reflect the outcome of NDP The tag word marks the content of each register as operations. The effect of these instructions on the shown in Figure 7. The principal function of the tag condition code bits is summarized in Table 4. word is to optimize the NDP's performance. The tag word can be used, however, to interpret the contents Bits 14-12 of the status word pointto the 8087 regis- of 8087 registers. ter that is the current top-of-stack (TOP) as described above. Instruction and Data Pointers Bit 7 is the interrupt request bit. This bit is set if any unmasked exception bit is set and cleared other- The instruction and data pointers (see Figure 8) are wise. provided for user-written error handlers. Whenever the 8087 executes an NEU instruction, the CU saves Bits 5-0 are set to indicate that the NEU has the instruction address, the operand address (if detected an exception while executing an instruc- present) and the instruction opcode. 8087 instruc- tion. tions can store this data into memory. 3-183 AFN.Q182DO jAPX 86/20, 88/20 Table 4. Condition Code Interpretation Instruction C3 C2 C1 Co Interpretation Compare, Test 0 0 X 0 A>8 0 0 X 1 A<8 1 0 X 0 A=8 1 1 X 1 A? 8 (not comparable) Remainder Q1 0 Qo Q2 Complete reduction Q1 1 Qo Q2 I ncomplete reduction Examine 0 0 0 0 Valid, positive: un normalized 0 0 0 1 Invalid, pqsitive, exponent"" 0 0 0 1 0 Valid, negative, un normalized 0 0 1 1 Invalid, negative, exponent"" 0 0 1 0 0 Valid, posi~ive, normalized 0 1 0 1 Infinity, positive 0 1 1 0 Valid, negative, normalized 0 1 1 1 Infinity. negative 1 0 0 0 Zero, positive 1' 0 0 1 Empty 1 0 1 0 Zero, negative 1 0 1 1 Empty 1 1 0 0 Invalid, positive, exponent = 0 1 1 0 1 Empty 1 1 1 0 Invalid, negative, exponent 0 = 1 1 1 1 Empty X = value is not affected by instruction. Q = Co' C:J, C1 hold 3 LSBs of the quotient generated during a remainder operation. 15 15 I TAG (7) I TAG (6) I TAG (5) I TAG (4) I TAG (3) I TAG (2) I TAG (1) I TAG (0) I INSTRUCTION POINTER (15-0) TAG VALUES: 00 " VALID INSTRUCTION POINTER (1~16) II 0 INSTRUCTION OPCODE (10-0) 01 " ZERO 10 " SPECIAL DATA POINTER (15-0) 11 " EMPTY DATA POINTER (1g..115) I 0 Figure 7. 8087 Tag Word Figure 8. 8087 Instruction and Data Pointers 3-184 AFN-Ol820D inter IAPX 86/20, 88/20 Control Word Exception Handling The 8087 provides several processing options which The 8087 detects six aifferent exception conditions are selected by loading a word from memory into the that can occur during instruction execution. Any or control word. Figure 9 shows the format and encod- all exceptions will cause an interrupt if unmasked ing of the fields in the control word. and interrupts are enabled. The low order byte of this control word configures If interrupts are disabled the 8087 will Simply con- 8087 interrupts and exception masking. Bits 5-0 of tinue execution regardless of whether the host the control word contain individual masks for each clears the exception. If a specific exception class is of the six exceptions that the 8087 recognizes and masked and that exception occurs, however, the bit 7 contains a general mask bit for all 8087 in- 8087 will post the exception in the status register terrupts. The high order byte of the control word and perform an on-chip default exception handling configures the 8087 operating mode including procedure, thereby allowing processing to continue. precision, rounding, and infinity controls. The preci- The exceptions that the 8087 detects are the sion control bits (bits 9-8) can be used to set the following: 8087 internal operating precision at less than the default of temporary real precision. This can be use- 1. INVALID OPERATION: Stack overflow, stack un- ful in providing compatibility with earlier generation derflow, indeterminate form (0/0, 00- 00, etc.) or arithmetic processors of smaller precision than the the use of a Non-Number (NAN) as an operand. 8087. The rounding control bits (bits 11-10) provide An exponent value is reserved and any bit pattern for directed rounding and true chop as well as the with this value in the exponent field is termed a unbiased roun~ to nearest mode specified in the Non-Number and causes this exception. If this proposed IEEE standard. Control over closure of the exception is masked, the 8087's defau"lt response . number space at infinity is also provided (either is to generate a specific NAN called INDEFINITE, affine closure, ±oo, or projective closure, 00, is treated or to propagate already existing NANs as the cal- as unsigned, may be specified). culation result. 15 I xxx Ilcl RC I PC I M I X IPMIUMIOMlzMloMllM I EXCEPTION MASKS (1 =EXCEPTION IS MASKED) I INVALID OPERATION OENORMALIZED OPERAND ZERO DIVIDE OVERFLOW UNDERFLOW PRECISION (RESERVED) INTERRUPT MASK (1 : INTERRUPTS ARE MASKED) PRECISION CONTROL"' ROUNDING CONTROL'~ INFINITY CONTROL (0 : PROJECTIVE. 1 : AFFINE) (RESERVED) (1)PrecISlon Control (2)Roundlng Control ao=24brts 00 = Round to Nearest or Even 01 = Reserved 01 = Round Down (toward - OIl) 10= 53 bits 10 = Round Up (toward + 00) 11 =64brts = 11 Chop (truncate toward zero) Figure 9. 8087 Control Word 3-185 AFN-01820D iAPX 86/20, 88/20 2. OVERFLOW: The result is too large in magnitude 5. DENORMALIZED OPERAND: At least one of the to fit the specified format. The 8087 will generate operands or the result is denormalized; it has the an encoding for infinity if this exception is smallest exponent but a. non-zero significand. masked. Normal processing continues if this exception is masked off. 3. ZERO DIVISOR: The divisor is zero while the divi- dend is a non-infinite, non-zero number. Again, 6. INEXACT RESULT: If the true result is not exactly the 8087 will generate an encoding for infinity if representable in the specified format, the result this exception is masked. is rounded according to the rounding mode, and this flag is set. If this exception is masked, pro- 4. UNDERFLOW: The result is non-zero but too cessing will simply continue. small in magnitude to fit in the specified format. If this exception is masked the 8087 will denormalize (shift right) the fraction until the ex- ponent is in range. This process is called gradual underflow. 3-186 AFN-01820D inter iAPX 86/20, 88/20 ABSOLUTE MAXIMUM RATINGS* -NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ........... O"C to 70°C tion of the device at these or any other conditions above Storage Temperature ............... , .-65°C to +150o b those indicated in the operational sections of this Voltage on Any Pin with specification is not implied. Exposure to absolute maxi- Respect to Ground .................... -1.0V to +7V mum rating conditions for extended periods may affect Power Dissipation ............................3.0 Watt device reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C, Vee =+5V ±5%) Symbol Parameter Min. Max. Units Test Conditions VIL Input Low Voltage -0.5 +0.8 V VIH Input High VOltage 2.0 Vee +0.5 .V VOL Output Low Voltage 0.60 V IOl = 2.0 rnA VOH Output High Voltage 2.4 V IOH = -400 !LA lee Power Supply Current 475 mA TA = 25°C III Input Leakage Current ±10 !LA OV'" VIN '" Vee IlO Output Leakage Current ±10 !LA 0.45V", VOUT '" Vee Vel Clock Input Low Voltage -0.5 +0.6 V VeH Clock Input High Voltage 3.9 Vee + 1.0 V CIN Capacitance of Inputs 10 pF fc = 1 MHz CIO Capacitance of I/O Buffer (ADO-15, A16-A19, BHE, S2-S0, 15 pF fc = 1 MHz RO/GT) arid CLK COUT Capacitance of Outputs BUSY,INT 10 pF fc = 1 MHz A.C. CHARACTERISTICS (TA = O°C to 70°C, Vee = +5V ±5%) TIMING REQUIREMENTS Symbol Parameter Min. Max. Units Test Conditions TCLCL CLK Cycle Period 200 500 ns TCLCH CLK Low Time (% TCLCL) - 15 ns TCHCL CLK High Time (113 TCLCL) + 2 ns TCH1CH2 CLK Rise Time 10 ns From 1.0V to 3.5V TCL2CL1 CLK Fall Time 10 ns From 3.5V to 1.0V TDVCL Data In Setup Time 30 ns TCLDX Data In Hold Time 10 ns TRYHCH READY Setup Time (%TCLCL) -15 ns TCHRYX READY Hold Time 30 ns TRYLCL READY Inactive to CLK (See Note 3) -8 ns TGVCH RO/GT Setup Time 30 ns TCHGX RO/GT Hold Time 40 ns TOVCL OS0-1 Setup Time 30 ns TCLOX OSO-1 Hold Time 1Q ns TSACH Status Active Setup Time 30 ns TSNCL Status Inactive Setup Time 30 ns TILIH Input Rise Time (Except CLK) 20 ns From 0.8V to 2.0V TIHIL Input Fall Time (Except CLK) 12 ns From 2.0V to 0.8V 3-187 AFN-01820D intJ iAPX 86/20, 88/20 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES Symbol Parameter Min. Max. Units Test Conditions TCLML Command Active Delay (See Note 1) 10 35 ns TCLMH Command Inactive Delay (See Note 1) 10 35 ns TRYHSH Ready Active to Status Passive (See Note 2) 110 ns TCHSV Status Active Delay 10 110 ns TCLSH Status Inactive Delay 10 130 ns TCLAV Address Valid Delay 10 114 ns TCLAX Address Hold Time 10 ns TSVLH Status Valid to ALE High (See Note 1) 15 ns TCLLH CLK Low to ALE Valid (See Note 1) 15 ns TCHLL ALE Inactive Delay (See Note 1) 15 ns CL = 20-100 pF for all TCLDV Data Valid Delay 10 110 ns 8087 Outputs (in addition TCHDX Data Hold Time 10 ns to 8087 self-load) TCVNV Control Active Delay (See Note 1) 5 45 ns TCVNX Control Inactive Delay (See Note 1) 10 45 ns TCHBV BUSY and INT Valid Delay 10 150 ns TCHDTL Direction Control Active Delay (See Note 1) 50 ns TCHDTH Direction Control Inactive Delay (See Note 1) 30 ns TCLGL RQ/GT Active Delay 0 85 ns CL = 40 pF (in TCLGH RQ/GT Inactive Delay 0 85 ns addition to 8087 self-load) TOLOH Output Rise Time 20 ns From 0.8V to 2.0V TOHOL Output Fall Time 12 ns From 2.0V to 0.8V NOTES: 1. Signal at 8284A or 8288 shown for reference only. 2. Applies only to Ta and wait states. 3. Applies only to T2 state (8 ns into Tal. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE UNDER TEST iCL~100PF A C TESTING INPUTS'ARE DRIVEN AT 2 4V FDA A LOGIC 1" AND 0 45V FOR -= A LOGIC "0" C L INCLUDES JIG CAPACITANCE 3-188 AFN.()1820D iAPX 86/20, 88/20 WAVEFORMS MASTER MODE T, T, T, I _ TCLCL ~H1CH2--" 1++1 I--TCL2CLl Tw ':C bf~~~ v CLK ir-", ~ VCL ~ "----....l TCHSV I+---- TCHCL 0/;). Ij/ (SEE NOTE 5) \ TCLAV ~ X TCLAX-+ ~DV BHE, Al l-A,a X. $7-$3 - .I~ ----- TCHDX /' FLOAT TSVLH-o c::- 1::1 TCHLL (SEE NOTE 3) ,,,.-- TCLLH_ I '\ ---- .... - f\ TRYLCL I<- TCHRYX 1 1--- READY (8087 INPUT) { (SEE NOTE 2) TRrSH .... READ CYCLE TCLAV __ t:. A,s-Ao - ~TLAZ 'I FL/ TRYHCH !.-- ~TDVCL DATA IN TCLDX FLOAT TCHDTL_ .r- TCHDTH .... b~: TCLML __ .r-- TCLMH- F -;\ 82B80UTPUTS (SEE NOTES 6. 7) { M::: f ~ TCVNV_ DEN TCVNX_ WRITE CYCLE =I k TCLAV::I TCLDV -+ HDX X A,,-A, X DATA OUT p=r: LOAT 3) TCVNV_ TCVNX 1 TCLML- TCLMH 82B8 OUTPUTS (SEE NOTES 6. 7) { AM:: \ 1::1 1 TCLML TCLMH MWTC \. NOTES: 1 ALL SIGNALS SWITCH BETWEEN VOL AND VOH UNLESS OTHERWISE SPECIFIED 2 READY IS SAMPLED NEAR THE END OFT2' T3 ANDTwTO DETERMINE IFTw MACHINE STATES ARE TO BE INSERTED 3 THE LOCAL BUS FLOATS ONLY, IF THE 8087 IS RETURNING CONTROL TO THE 1lO86I8088 4 ALE RISES AT LATER OF (TSVLH, TCLLH) , 5. STATUS INACTIVE IN STATE JUST PRIOR TO T 4 6 SIGNALS AT 8264A OR 8288 ARE SHOWN FOR REFERENCE ONLY. 7 THE ISSUANCE OF 8288 COMMAND AND CONTROL SIGNALS (MRDc, MWTC, AMWf; AND DEN) LAGS THE ACTIVE HIGH 8288 CEN ALL TIMING MEASUREMENTS ARE MADE AT 1 5V UNLESS OTHERWISE-NOTED 3·189 AFN-01820D IAPX 86/20, 88/20 WAVEFORMS (Continued) PASSIVE MODE CLK as"as o 8,.i,.ii, IN~ READY [ RESET TIIIIING VCC _ - - - dO CLKCYCLES----i CLK RESET 8087 TRACKS 8OS7 READY TD ".. CLKCYCLES CPU ACTIVITY EXECUTE INSTRUCTIDNS REQUES,,{/GRANTo TIMING CLK -0 _ ~c~gt:~~~OCLK CYCLe TCLOL . ~ e:: ADlI-ADo A,r",-A,.l8a CPU 1,.1,.1, IiR!IS7 NOTE: THE CPU PROVIDES ACTIVE PULLUP OF iiO/Giii. SEE TCLGH SPEC. 3·190 AFN-01820D iAPX 86/20, 88/20 WAVEFORMS (Continued) REQUEST/GRANT1 TIMING AD 15 -AD o CLK 5-TCL~L " "TGVCH TCHGX RQ TCLGL " A"/S 6 -A16/S a 8 2 ,81 ,So _________________8_~_7____~: T:----------- ALTERNATE MASTER 8087 BHE/57 (SEE NOTE) NOTE ALTERNATE MASTER MAY NOT DRIVE THE BUSES OUTSIDE OF THE REGION SHOWN WITHOUT RISKING BUS CONTENTION BUSY AND INTERRUPT TIMING eLK BUSY, INT ' --------tf TCHBY ------------- ------------- 3-191 AFN-01820D inter iAPX 86/20, 88/20 Table 5. 8087 Extensions to the 8086/8088 Instruction Set 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Data Transfer FLO" LOAD Integer/Real Memory to ST(O) ESCAPE MF 1 MOD RIM (DISP-LO) (DISP-HI) Long Integer Memory to ST(O) ESCAPE 1 11 MOD 1 0 1 RIM (DISP-LO) (OISP-HI) Temporary Real Memory to ST(O) ESCAPE 0 1 11 MOD 1 0 1 RIM (DISP-LO) (DISP-HI) BCD Memory to ST(O) ESCAPE 1 11 MOD 1 RIM (DISP-LO) (DISP-HI) ST(I) to ST(O) ESCAPE 1 1 ST(i) FST" STORE ST(O) to Integer/Real Memory ESCAPE MF 11 MOD 0 1 0 RIM (DISP-LO) (DISP-HI) ST(O) to ST{I) ESCAPE 1 0 1 0 ST(i) 1 FSTP " STORE AN D POP ST(O) to Integer/Real Memory ESCAPE MF 11 MOD RIM (DISP-LO) (DISP-HI) ] ST(O) to long Integer Memory ESCAPE 1 1 MOD 1 RIM (DISP-LO) (DISP-HI) 1 ST(O) to Temporary Real Memory ESCAPE 11 MOD 1 1 1 RIM (DISP-LO) (DISP-HI) ST(O) to BCD Memory ESCAPE 1 1 1 MOD 1 1 0 RIM (DISP-LO) (DISP-HI) 1 ST(O) to ST(I) ESCAPE 1 0 1 1 0 1 ST(I) 1 FXCH :: Exchange ST(I) and Sl(O) ESCAPE 0 1 0 0 1 ST(I) Comparison FCOM " Compare Integer/Real Memory to ST(O) ESCAPE MF o1 MOD 0 1 0 RIM (DISP-LO) (DISP-HI) ST(I) to ST(O) ESCAPE 0 0 0 1 ST(I) FCOMp:: Compare and Pop Integer/Real Memory to Sl(O) ESCAPE MF MOD 0 1 RIM (DISP-LO) (DISP-HI) ST(I) to ST(O) ESCAPE 0 0 1 1 0 1 1 ST(I) FCOMPP:: Compare ST(l) to ST(O) ESCAPE 1 1 0 11 1 0 1 1 0 0 1 1 and Pop TWice FTST " Test ST(O) ESCAPE 0 0 1 11 1 0 o1 1 FXAM :: Examine ST(O) ESCAPE 0 0 1 11 1 0 o1 1 1 Mnemonics © Inlel1980 3-192 AFN-0182OD iAPX 86/20, 88/20 Table 5. 8087 Extensions to the ·8086/8088 Instruction Set (Continued) Arithmetic 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 ,0 FADD = Addition Integer/Real Memory with $T(O) ESCAPE MF IMOD RIM (DISP-lO) (DISP-HI) ST(I) and ST(O) ESCAPE d P 11 1 0 () ST(I) FSUB " Subtraction Integer/Real Memory with Sl(O) ESCAPE MF IMOD 1 R RIM (DISP-lO) (DISP-HI) ST(I) and ST(O) ESCAPE d P 11 1 R RIM FMUL " Multiplication Integer/Real Memory with ST(O) ESCAPE MF o IMOD 0 1 RIM (DISP-lO) (DISP-HI) ST(I} and ST(O) ESCAPE d P 11 1 0 0 1 RIM FDIV -: DIVISion Inteqer/Real Memory with ST(O) ESCAPE MF o IMOD 1 R RIM (DISP-lO) (DISP-HI) ST(I) and ST(O) ESCAPE d P o 11 R RIM FSQAT = Square Root of ST(O) ESCAPE 1 11 0 1 1 FSCALE - Scale Sl(O) by 8T(1) ESCAPE 0 0 111 1 1 1 1 1 0 1 1 FPAEM '" Partial Remainder of 8T(0) - 8T(1) 1 ESCAPE 0 0 1 11 1 1 1 0 0 0 FRNDINT = Round ST(O) to Integer ESCAPE 0 0 1 11 1 1 1 1 1 0 0 FXTRACT " Extract Components of ST(O) ESCAPE 1 11 1 0 1 0 0 FABS = Absolute Value of ST(O) ESCAPE 111 1 0 0'1 FCHS = Change Sign of ST(O) ESCAPE 0 0 111 1 1 0 0 0 Transcendental FP,.TAN = Partial Tangent of ST(O) ESCAPE ",1 1 0 1 FPATAN = Partial Arctangent of ST(O) - ST(1) ESCAPE '111 1 1 0 0 1 1 1 F2XM1 '" 2 5T(0)_1 ESCARE 111 1 () 0 FYL2X = ST(1) • L092 [ST(O)] ESCAPE 111 1 0 1 FYL2XP1 =ST(l) . L092 [ST(Ol oj. 1] ESCAPE 111 1 1 1 1 0 '0 1 1 Constants FLOZ =LOAD + 0 0 Into ST(Ol ESCAPE 0 1 1 0 FL01 =LOAD + 1 0 Into ST(Ol ESCAPE 0 0 1 1 1 1 0 1 0 0 FLOP' =LOAD 7T Into ST(O) ESCAPE 0 1 1 1 1 0 1 1 FLOL2T =LOAD 1092 10 Into STeOl ESCAPE 0 1 FLDL2E =LOAD 1092 e Into ST(Ol ESCAPE 0 1 1 1 1 0 0 1 FLOLG2 =LOAD log 102 Into ST(O) ESCAPE 0 1 1 1 FLDLN2 = LOAD loge 2 Into ST(Ol ESCAPE 1 1 1 0 1 0 1 Mnemonics © Intel 1980 3-193 AFN-01820D iAPX 86/20, 88/20 Table 5. 8087 Extensions to the 8086/8088 Instruction Set (Continued) 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Processor Control 'INIT = InItialize NOP I ESCAPE 0 1 1 1 1 1 0 0 0 1 1 I FENI :: Enable Interrupts I ESCAPE 0 1 1 1 1 1 0 0 0 0 oI FOISI :: Disable Interrupts I ESCAPE 0 1 1 1 1 1 0 O' 0 0 1 I FLDCW '" Load Control Word I ESCAPE 0 0 1 MOO 1 0 1 RIM I (OISP-LO) I (OISP-HI) I FSTeW '" Store Control Word I ESCAPE 0 0 1 MOO 1 1 1 RIM tl5ISP-LO) I (OISP-HI) I FSTSW = Store Status Word I ESCAPE 1 0 1 Moo i 1 1 RIM (OISP-LO) I (OISP-HI) I FCLEX '" Clear Exceptions I ESCAPE 0 1 1 1 1 1 0 0 0 1 0 FSTENV:: Store EnVironment I ESCAPE. 0 0 1 I MOO 1 1 0 RIM (OISP-LO) I (OISP-HI) I FLDENV'" Load EnVironment I ESCAPE 0 0 1 I MOO 1 0 0 RIM (OISP-LO) I (OISP-HI) I FSAVE = Save State I ESCAPE 1 0 1 I MOO 1 1 0 RIM (OISP-LO) I (DISP-HI) I FRSTOR ::; Restore State I ESCAPE .1 0I MOD 1 1 0 0 RIM (DISP-LO) I (DISP-HI) I FINCSTP::; Increment Stack Pomter : ESCAPE 0 0 1 l' 1 1 1 0 1 1 1 FDECSTP'" Decrement Stack Pomter I ESCAPE 0 0 l' 1 1 1 1 0 1 1 0 FFREE '" Free ST(I) I ESCAPE 1 0 l' 1 1 0 0 0 ST(I) I FNOP '" No OperatIon I ESCAPE 0 0 1 l' 1 0 1 0 0 0 0 I FWAIT :: CPU Walt for NOP l' 0 0 1 1 0 1 1 I FOOTNOTES: Ii mod = 00 then DISP '" 0" dlsp-Iow and dlsp-hlgh are absent ST(O): Current stack top If mod = (jl then DISP= dlSp-low sign-extended to 16-bits, STeil: Ith register below stack top dlsp-high is absent' if mod = 10 then OISP= disp-hlgh; disp-Iow d: Ollstlnation if mod = 11 then rim Is treated as an ST(i) field o - Destination IS ST(O) 1 - Destination is ST(i) p: Pop if rim ': 000 then EA: (BX) + (SI) + OISP O-Nopop If rim: 001 then EA = (BX) + (01) + OISP 1 - Pop ST(O) if rim: 010 then EA: (BP) + (SI) + OISP if rim: 011 then EA: (BP) + (01) + DISP R: Reverse: When d ~ 1 reverse 1he sense of R if rim: 100 then EA: (SI) + DISP b - Destination (op) Source if rim: 101 then EA: (01) + DISP 1 - Source (op) Destination if rim: 110 then EA: (BP) + DISP' if rim: 1i 1 then EA: (BX) + DISP For FSQRT: -0 ::; ST(O) ::; +'" For FSCALE: _2 15 :s ST(l) < +2'5 and ST(l) integer 'except if mod: 000 and rim: 110 then EA: disp-high: disp-Iow. For F2XM1: 0::; ST(O) ::; 2- 1 For FVL2X: 0< ST(O) < '" MF: Memory Format -'" < ST(l) < + '" 00 - 32-bit Real For FVL2XP1: Os iST(O)l < (2 - ,,[2)/2 01 - 32-bit Integer -co < ST(l) < co 10 - 64-bit Real For FPTAN: Os ST(O) < ,,/4 11 - 16-bit Integer For FPATAN: Os ST(O) < ST(l) < +co Mnemonics © Intel 1980 3-194 AFN.o1820D IAPX 86/30 iAPX 88/30 OPERATING SYSTEM PROCESSORS 80130-2 • High-Performance 2-Chip Data Types: Jobs, Tasks, Segments, Processors Containing Operating Mailboxes, Regions System Primitives • 35 Operating System Primitives • Standard iAPX 86/10, 88/10 Instruction • Built-In Operating System Timers and Set Plus Task Management, Interrupt Interrupt Control Logic Expandable Management, Message Passing, From 8 to 57 Interrupts Synchronization and Memory Allocation Primitives • 80861808718088180186180188 Compatible At Up To 8 MHz WIthout • Fully Extendable To and Compatible Walt States With iRMX86 • MULTIBUS System Compatible ' • Supports Five Operating System Data Interface The Intel iAPX 86/30 and iAPX 88/30 are two-chip microprocessors offering general-purpose CPU (8086) instructions combined with real-time operating system support. They provide a foundation for multiprogram- ming and multitasking applications. ,The iAPX 86/30 consists of an iAPX 86/10 (16-bit 8086 CPU) and an Operating System Firmware (OSF) component (80130). The 88/30 consists of the OSF and an·iAPX 88/10 (8-bit 8088 CPU). (80186 or 80188 CPUs may be used in place of the 8086 or 8088.) Both components of the 86/30 and 88/30 are implemented in N-channel, depletion-load, silicon-gate technol- ogy (HMOS), and are housed in 40-pin packages. The 86/30 and 88/30 provide all the functions of the iAPX 86/10, 88/10 processors plus 35 operating system primitives, hardware support fo'r eight interrupts, a system timer, a delay timer and a baud rate generator. 1-------, I I I 8088 I I OR 8088 I PROGJlAM MEMORY DATA MEMORY I INTERRUPT STATUS I 8284A CLOCK t I DRIVER ROY I I~~--~--~~~ INTERRUPT STATUS I CS,LlR . -_ _ _..J I 80130 INTERRUPT I REQU~STS _J~ BAUD RATE DELAY SYSTEM iAP)( 86/30, 88/30 TIMER TlIIIER TIMER' Figure 1. IAPX 86/30, 88/30 Block Diagram 3-195 iAPX 86/30, iAPX 88/30 80130-2 I I MAX MODE 8088 Vss Vee Vss Vee A014 AD1S (Al') A014 AD15 (Al5) ,AD13 SHE (Al3) AD13 A1B/S3 AD12 IR7 (Al2) AD12 A17/S4 AD11 IRB (All) A011 Ma/SS AD10 IRS (A10) AD10 A19/S6 AD9 IR4 (AS) AD9 SHE/57 (HIGH) ADa IR3 (AS) AD8 MN/MX AD7 IR2 AD7 AD ADs IRl AD6 ROtGTO ADS IRO ADS RO/GT1 AD4 INT AD4 lOCK AD3 S2 AD3 so AD2 51 AD2 51 ADl so ADl so ADO ACK ADO OSO MEMCS llR NMI OSl laCs SYSTICK INTR TEST ClK DELAY ClK READY Vss BAUD Vss REseT Figure 2. iAPX 86/30, 88/30 Pin Configuration Table 1. 80130 Pin Description Symbol Type Name and Function AD 15 -AD o I/O Address Data: These pins constitute the time multiplexed memory address (T1) and data (T2, T3, Tw, T4 ) bus. These lines are active HIGH. The address presented duringT1 of a bus cycle will be latched internally and interpreted as an 80130 internal address if MEMCS or 10CS is active for the invoked primitives. The 80130 pins float whenever it is not chip selected, and drive these pins onlyduringT2-T4 of a read cycle andT1 of an INTA cycle. BHE/S7 Bus High Enable: The 80130 uses the SHE signal from the processor to determine whether to respond with data on the upper or lower data pins, or both. The signal is active LOW. SHE is latched by the 80130 on the trailing edge of ALE. It controls the 80130 output data as shown. SHE Ao 0 0 Word on AP15-ADO 0 1 Upper byte on AD15-ADa 1 0 Lower byte on AD7-ADo 1 1 Upper byte on ADrADo S2, S1, So I Status: For the 80130, the status pins are used as inputs only. 80130 encoding follows: S2 S1 So 0 0 0 INTA 0 0 1 lORD 0 1 0 10WR '. 0 1 1 Passive 1 0 0 Instruction fetch 1 0 1 MEMRD 1 1 X Passive 3-196 AFN·02059B intJ IAPX 86/30, IAPX 88/30 80130-2 Table 1_ 80130 Pin Description (Continued) Symbol Type Name and Function ClK I Clock: The system clock provides the basic timing for the processor and bus controller. It is asymmetric with a 33% duty cycle to provide optimized internal timing. The 80130 uses the system clock as an input to the SYSTICK and BAUD timers and to synchronize operation with the host CPU. INT 0 Interrupt: INT Is HIGH whenever a valid interrupt request is asserted. It is normally used to interrupt the CPU by connecting it to INTR. IR7-IRo I Interrupt Requests: An interrupt request can be generated by raising an IR input (lOW to HIGH) and holding it HIGH until it is acknowledged (Edge-Triggered Mode), or just by a HIGH level on an IR input (level-Triggered Mode). ACK 0 Acknowledge: This line is lOW whenever an 80130 resource is being accessed. It is also lOW during the first INTA cycle and second INTA cycle if the 80130 is supplying the . interrupt vector information. This Signal can be used as a bus ready acknowledgement and/or bus transceiver control. MEMCS I Memory Chip Select: This input must be driven lOW when a kernel primitive is being fetched by the CPU. AD,3-ADo are used to select the instruction. IOCS I Input/Output Chip Select: When this input is low, during an lORD or IOWR cycle, the 80130's kernel primitives are accessing the appropriate peripheral function as specified by the following table: BHE A3 A2 A, Ao 0 X X X X Passive X X X X 1 Passive X 0 1 oX X Passive 1 0 0 X 0 Interrupt Controller 1 1 0 0 0 Systick Timer 1 1 0 1 0 Delay Counter 1 1 1 0 0 Baud Rate Timer ,1 1 1 1 0 Timer Control LlR 0 Local Bus Interrupt Request: This signal is lOW when the interrupt request is for a non-slave input or slave input programmed as being a local slave. Vee Power: Vee is the +5V supply pin. Vss Ground: Vss is the ground pin. SYSTICK 0 System Clock Tick: Timer 0 Output. Operating System Clock Reference. SYSTICK is normally wired to IR2 to implement operating system timing interrupt. DELAY 0 DELAY Timer: Output of timer 1. Reserved by Intel Corporation for future use. BAUD 0 Baud Rate Gener"tor: 8254 Mode 3 compatible output. Output of 80130 Timer 2. FUN,CTIONAL DESCRIPTION ment which constantly controls the telephone traffic in a multi phone office, file servers/disk subsystems The increased performance and memory space of controlling and coordinating multiple disks and mul- iAPX,86/10 and 88/10 microprocessors have proven tiple disk users, and transaction processing systems sufficient to handle most of today's single-task or such as electronics funds transfer. . single-device control applications with performance to spare, and have led to the increased use of these microprocessors to control multiple tasks or devices in real-time. This trend has created a new challenge The iAPX 86/30, 88/30 Operating System to designers-development of real-time, mUltitask- Processors ing application systems and software. Examples of such systems include control systems that monitor and react to external events in real-time, ml,lltifunc- The Inteli!!> iAPX 86/30, 88/30 Operating System Pro- tion desktop and personal computers, pAax equip- cessors (OSPs) were developed to help solve this 3-197 AFN·02059B iAPX 86/30; iAPX 88/30 80130-2 r----------------------------------, I OPERATING SYSTEM UNIT 1 I I I I 00-7 I r 1 1 I 8 1 I PROGRAMMABLE L INTERRUPT 1 I LOGIC I INTERRUPT INPUTS 1 i I 1 INTERRUPT OUT :I CONTROL STORE 1 1 I I I H----+- I I I I 2 SYSTEM TIMER I I I SYSTEM 11 I I I I 08·15 ,---- DELAY -r--• I DELAY I - TIMER I /I I: ~ I I I I BAUD RATE I: I+---- BAUD R ATE I GENERATOR I I I I I f------------- ------ - -------------1 I I I I k- r- I CLOCK ,. I I I DATA BUFFER f=- BUS INTERFACE I ~ 3 STATUS ::z & AND I 4 I ADDRESS LATCH CONTROL ~BUSCO NTROL ADDRESSI I I DATA BUS ~ LOCAL I I INTERR UPT I iliR) L __________________________________ I CONTROL UNIT ~ Figure 3, OSF Internal Block Diagram problem. Their goal IS to simplify the design of multi- easy-to-use architectural extension to iAPX 86, 88 tasking application systems by providing a well- system designs. defined, fully debugged set of operating system primitives implemented directly in the hardware, thereby removing the burden of designing multitask- The OSP Approach ing operating system primitives from the application programmer. The OSP system data types (SDTs) and primitive in- structions allocate, manage and share low-level pro- Both the 86/30 and the 88/30 OSPs are fwo-chip sets cessor resources in an efficient manner. For consisting of a main processor, an 8086 or 8088 CPU, example, the OSP implements task context manage- and the Intel 80130, Operating System Firmware ment (managing .a task state image consisting of component (OSF) (see Figure 1). The 80130 provides both hardware register set and software control in- a set of multitasking kernel primitives, kernel control formation) for either the basic 86/10 context or the storage, and the additional support hardware, in- extended 86/20 (8086+8087) numerics context. The cluding system timers and interrupt control, re- OSP manages the entire task state image both while quired by these primitives. From the application the task is actively executing and while it is inactive. programmer's viewpoint, the OSF extends the base Tasks can be created, put to sleep for sl'lecified peri- iAPX 86, 88 architecture by providing 35 operating ods, suspended, executed ito perform their func- system primitive instructions, and supporting five tions, and dynamicaJly deleted when their ·functions new. system data types, making the OSF a logical and are complete. 3-198 AFN·0205SB iAPX 86/30, iAPX 88/30 80130-2 The Operating System Processors support event- (Table 4). A representative ASM86 sequence for call- oriented systems designs. Each event may be pro- ing a primitive is shown in Figure 4. In PL/M the OSP cessed by an individual responding task or along ,programmer uses a call to invoke the primitive. with other closely related events in a common task. External events and interrupts are processed by the OSP interrupt handler primitives using its built-in SAMPLE ASSEMBLY LANGUAGE PRIMITIVE CALL interrupt controller subsystem as they occur in real- ;PUSH PARAMETER 1 ;PUSH PARAMETER 2 time. The multiple tasks and the multiple events are coordinated by the OSP integral scheduler whose preemptive, priority-based scheduling algorithm PUSH PN ;PU8H PARAMETER N PUSH BP :STACK CALLING CONVENTION and system timers organize and monitor the process- MOYBP,SP LEA SI,SS:NUM_BVTES_PARAM + 2[BP] ing of every task to guarantee that events are pro- :88;SI POINTS TO FIRST cessed as they occur in order of relative importance. :PARAMETER ON STACK MOV AX, ENTRY CODE :AX SETS PRIMITIVE ENTRY CODE The 86/30 also provides primitives for intertask com- INT 184 ;OSF INTERRUPT munication (by mailboxes) and for mutual exclusion asp PRIMITIVE INVOKED (by regions), essential functions for multitasking POPBP RET NUM_BVTESJARAM_ ;POP PARAMETERS appl ications. ;CX CONTAINS EXCEPTION CODES ;OL CONTAINS PARAMETER NUMBER ; THAT CAUSED EXCEPTION (IF ; ex IS NON ZERO) Programming Language Support ;AX CONTAINS WORD RETURN VALUE ;ES;BX CONTAINS POINTER ; RETURN VALUE Programs for the OSP can be written in ASM 86/88 or PLIM 86/88, Intel's standard system languages for iAPX 86,88 systems. Figure 4. ASM/86 OSP Calling Convention The Operating System Processor Support Package (iOSP 86) provides an interface library for applica- OSP Functional Description tion programs written in any model of PL/M-86. This library also provides 80130 configuration and in- Each major function of the OSP is described below. itialization support as well as complete user These are: documentation. Job and Task Management Interrupt Management Free Memory Management OSF PROGRAMMING INTERFACE Intertask Communication The OSF provides 35 operating system kernel Intertask Synchronization primitives which implement multitasking, interrupt Environmental Control management, free memory management, intertask communication and synchronization. Table 4 shows The system data types (or SOTs) supported by the each primitive, and Table 5 gives the execution per- OSP are capitalized in the description. A short formance of typical primitives. description of eacl:l SOT appears in Table 2. OSPprimitives are executed by a combination of JOB and TASK Management CPU and OSF (80130) activity. When an OSP primi- tive is called by an application program task, the Each OSP JOB is a controlled environment in which iAPX CPU registers and stacks are used to perform the applications program executes and the OSF sys- the appropriate functions and relay the results to the tem data types reside. Each individual application application programs. program is normally a separate OSP JOB, whether it has one initial task (the minimum) or multiple tasks. OSP Primitive Calling Sequences JOBs partition the system memory into pools. Each memory pool provides the storage areas in which the, A standard, stack-based, calling sequence is used to OSP will allocate TASK state images and other sys- invoke the OSF primitives. Before a primitive is tem data types created by the executing TASKs, and called, its operand parameters must be pushed on free memory for TASK working space. The OSP sup- , the task stack. The SI register is loaded with the ports multiple executing TASKs within a JOB by offset of the' last parameter on the stack. The entry managing the resources used by each, including the code for the primitive is loaded into AX. The primitive CPU registers, NPX registers, stacks, the system data invocation ,call is mad~ with a CPU software interrupt types, and the available free memory space pool. 3-199 AFN·02059B inter iAPX 86/30, iAPX 88/30 80130-2 When a TASK is created, the OSP allocates memory the OSP switches the control of the processor to the (from the free memory of its JOB environment) for higher priority TASK. First, the OSP saves the outgo- the TASK's stack and data area and initializes the ing (lower priority) TASK's state'including CPU regis- additional TASK attributes such as the TASK priority ter values in its TASK state image. Then, it restores level and its error handler location. (As an option, the the CPU registers from the TASK state image of the caller of CREATE TASK may assign previously incoming (higher priority) TASK. Finally, it causes the defined stack and data areas to the TASK.) Task CPU to start or resume executing the higher priority priorities are integers between 0 and 255 (the lower TASK. the priority number the higher the scheduling priority of the TASK). Generally, priorities up to 128 TASK scheduling is performed by the OSp. The OSP's will be assigned to TASKs which are to process inter- priority-oriented preemptive scheduler determines rupts. Priorities above 128 do 'not cause interrupts to which TASK executes by comparing their relative be disabled, these priorities (129 to 255) are appro- priorities. The scheduler insures that the highest priate for non-interrupt TASKs. If an 8087 Numerics priority TASK with a status of READY will execute. A Processor Extension is used, the error recovery inter- TASK will continue to execute until an interrupt with a rupt level assigned to it will have a higher priority higher priority occurs, or until it requests unavailable than a TASK executing on it, so that error handling is resources, for which it is willing to wait, or until it performed correctly. makes specific resources available to a higher priority TASK waiting for those resources. EXECUTION STATUS TASKs can become READY by receiving a message, A TASK has an execution status or execution state. receiving control, receiving an interrupt, or by timing The OSP provides five execution states: RUNNING, out. The OSP always monitors the status of all the READY, ASLEEP, SUSPENDED, and ASLEEP- TASKs (and interrupts) in the system. Preemptive SUSPENDED. scheduling allows the system to be responsive to the - A TASK is RUNNING if it has control of the external environment while only devoting CPU re- processor. sources to TASKs with work to be performed. - A TASK is READY if it is not asleep, suspended, or asleep-suspended. For a TASK to become the run- TIMED WAIT ning (executing) TASK, it must be the highest The OSP timer hardware facilities support timed priority TASK in the ready state. waits and timeouts. Thus, in many primitives, a TASK - A TASK is ASLEEP if it is waiting for a request to can specify the length of time it is prepared to wait be granted or a timer event to occur. A TASK may for an event to occur, for the desired resources to put itself into the ASLEEP st!lte. become available or for a message to be received at a - A TASK is SUSPENDED if it is placed there by MAILBOX. The timing interval (or System Tick) can another TASK or if it suspends itself. A TASK may be adjusted, with a lower limit of 1 millisecond. have multiple suspensions, the count of suspen- sions is managed by the OSP as the TASK suspen- APPLICATION CONTROL OF TASK EXECUTION sion depth. Programs may alter TASK execution status and - A TASK is ASLEE"P-SUSPENDED if it is both priority dynamically. One TASK may suspend its own waiting and suspended. execution or the execution of another TASK for a period of time, then resume its execution later. Multi- TASK attributes, the ,CPU register values, and the ple suspensions are provided. A suspended TASK 8087 register values (if the 8087 is configured into may be suspended again. the application) are maintained by the OSP in the TASK state image. Each TASK will have a unique The eight OSP Job and TASK rnanagement primitives TASK state image. are: CREATE JOB Partitions system resources and SCHEDULING creates a TASK execution The 'OSP schedules the processor time among the environment. various TASKs on the basis of priority. A TASK has an CREATE TASK Creates a TASK state image. execution priority relative to all other TASKs in the Specifies the location of the system, which the asp maintains for each TASK in its TASK code instruction stream, TASK state image. When a TASK of higher priority its execution priority, and the than the executing TASK becomes ready to execute, other TASK attributes. 3-200 AFN·02059B inter iAPX 86/30, iAPX 88/30 80130-2 DELETE TASK Deletes the TASK state image, INTERRUPT HANDLER can queue for the INTER- removes the instruction stream RUPT TASK can be limited to the value specified in from exec'Jtion and deallocates the SET INTERRUPT primitive. When the INTER- stack resources. Does not delete RUPT TASK is finished processing, it issues a WAIT INTERRUPT TASKS. INTERRUPT primitive, and is immediately ready to process the queue of interrupts that the INTERRUPT SUSPEND TASK Suspends the specified TASK or, HANDLER has built with repeated SIGNAL INTER- if already suspended, in- RUPT primitives while the INTERRUPT TASK was crements its suspension depth processing. If there were no interrupts at the level, by one. Execute state is the queue is empty and the INTERRUPT TASK is SUSPEND. SUSPENDED. See the Example (Figure 5) and Fig- RESUME TASK Decrements the TASK suspen- ures 6 and 7. " sion'depth by one. If the sus- OSP external INTERRUPT LEVELs are directly pension depth is then zero, related to internal TASK scheduling priorities. The the primitive changes the task OSP maintains a single list of priorities including execution status to READY, both tasks and INTERRUPT LEVELs. The priority of or ASLEEP (if ASLEEP/ the executing TASK automatically determines which SUSPENDED). interrupts are masked. Interrupts are managed by SLEEP Places the "requesting TASK in INTERRUPT LEVEL number. The OSP supports eight the ASLEEP state for a specified levels directly and may be extended by means of number of System Ticks. (The slave 8259As to a total of 57. TICK interval can be configured The nine Interrupt Management OSP primitives are: down to 1 millisecond.) DISABLE Disables an external INTER- SET PRIORITY Alters the priority of a TASK. RUPT LEVEL. ENABLE Enables an external INTER- RUPT LEVEL. Interrupt Management . ENTER INTERRUPT Gives an Interrupt Handler The OSP supports up to 256 interrupt levels or- its own data segment, sepa- ganized in an interrupt vector, and up to 57 external rate from the data segment interrupt sources of which one is the NMI (Non- of the interrupted task. Maskable Interrupt). The OSP manages each inter- EXIT INTERRUPT Performs an "END of INTER- rupt level independently. The OSF INTERRUPT RUPT" operation. Used by SUBSYSTEM provides two mechanisms for interrupt an INTERRUPT HANDLER management: INTERRUPT HANDLERs and INTER- which does not invoke an IN- RUPT TASKs. INTERRUPT HANDLERs disable all TERRUPT TASK. Reenables maskable interrupts and should be used only for interrupts, when the INTER- servicing interrupts that require little processing RUPT HANDLER gives up time. Within an INTERRUPT HANDLER only certain control. OSF Interrupt Management primitives (DISABLE, GET LEVEL Returns the interrupt level ENTER INTERRUPT, EXIT INTERRUPT, GET LEVEL, number of the executing IN- SIGNAL INTERRUPT) and basic CPU instructions TERRUPT HANDLER. can be used, other OSP primitives cannot be. The INTERRUPT TASK approach permits all OSP RESET INTERRUPT Cancels the previous as- primitives to be issued and masks only lower priority signment made to an interrupts. interrupt level by SET IN- TERRUPT primitive request. Work flow between an INTERRUPT HANDLER and an If an INTERRUPT TASK has INTERRUPT TASK assigned to the same level is been assigned, it is also regulated with the SIGNAL INTERRUPT and WAIT deleted. The interrupt level INTERRUPT primitives. The flow is asynchronous. is disabled. . When an INTERRUPT HANDLER signals an INTER- SET INTERRUPT Assigns an INTERRUPT RUPT TASK, the INTERRUPT HANDLER becomes HANDLER to an interrupt immediately available to process another interrupt. level and, optionally, an IN- The number of interrupts (specified for the level) the TERRUPT TASK. 3-201 AFN·02059B inter iAPX 86/30, iAPX 88/30 80130-2 r CODE EXAMPLE A INTERRUPT TASK TO KEEP TRACK Of TIME-Of·DAY DECLARE SECONDSCOUNT BYTE, MINUTE.COUNT BYTE. HOURS$COUNT BYTE; TIME$TASK: PROCEDURE; DECLARE TIME$EXCEPT$CODE WORD; AC$CYCLE$COUNT~O; CALL RQSSET$INTERRUPT(ACSINTERRUPT$LEVEL, 01 H). @ACSHANDLER.O.@TIMESEXCEPT$CODE); CALL RDSRESUME$TASK(INIT$TASK$TOKEN.@TIME$IXCEPTSCODE); DO HOUR$COUNT~O TO 23; DO MINUTESCOUNT~O TO 59; DO SECONDSCOUNT~O TO 59; CALL RQSWAIT$INTERRUPT(AC$INTERRUPTSLEVEL, @T1ME$EXCEPT$CODE); If SECONDSCOUNT MOD 5~0 THEN CALL PROTECTEDSCRTSOUT(BEL); END; I' SECOND LOOP ./ END; I' MINUTE LOOP '/ END; I' HOUR LOOP '/ CALL RQ$RESET$INTERRUPT(AC$INTERRUPTSLEVEL. @TIMESEXCEPT$CODE); END TIMESTASK; I' CODE EXAMPLE B INTERRUPT HANDLER TO SUBDIVIDE A.C. SIGNAL BY 60. '/ DECLARE AC$CYCLE$COUNT BYTE; AC$HANDLER: PROCEDURE INTERRUPT 59; DECLARE ACSEXCEPT$CODE WORD; AC$CYCLE$COUNT~AC$CYCLE$COUNT +1; IfAC$CYCLE$COUNT>~60 THEN DO; AC$CYCLE$COUNT~O; CALL RQSSIGNAL$INTERRUPT(AC$INTERRUPTSLEVEL,@AC$EXCEPT$CODE); END; END ACSHANDLER;' Figure 5, OSP Examples NO INTERRUPT INTERRUPT HANDLER CALLS HANDLER CALLS EXIT$INTERRUPT SIGNAL$INTERRUPT INTERRUPT TASK COMPLETES INTERRUPT SERVICING INTERRUPT TASK CALLS WAIT$INTERRUPT CONTROL RETURNS TOAN APPLICATION TASK Figure 6, Interrupt Handling Flowchart 3-202 AfN·020598 inter iAPX 86/30, iAPX 88/30 80130-2 w~ ~ .. ~:~::" 0- ! J/'NTERRUPT"~ I / / ./"'"\ " TASK ~-.... / , ....... ......... " \ G) STARTS FILLING EMPTY BUFFER / \ I Ql WHEN FULL, CALLS SIGNAL$INTERRUPT TO START TASK ON ,/' _-1 " FULL BUFFER I \ INTERRUPT © CALLS I INTERRUPT I @ PROCESSES WAITSINTERRUPT \ TASK J FULL BUFFER TO WAIT FOR NEXT , I FULL BUFFER > .... ,'/ ---,..-/ Figure 7. Multiple Buffer Example SIGNAL INTERRUPT Used by an INTERRUPT CREATE SEGMENT primitive explicitly allocates a HANDLER to activate an In- memory area when one is needed by the TASK. For terrupt Task, example, a TASK may explicitly allocate a SEGMENT for use as a memory buffer. The SEGMENT length WAIT INTERRUPT Suspends the calling Inter- can be any multiple of 16 bytes between 16 bytes and rupt Task until the INTER- 64K bytes in length. The programmer may specify RUPT HANDLER performs a any number of bytes from 1 byte to 64 KB, the OSP SIGNAL INTERRUPT to in- will transparently round the value up to the appropri- voke it. If a SIGNAL INTER- ate segment size. RUPT for the task has occurred, it is processed, The two explicit memory allocation/deallocation primitives are: FREE MEMORY MANAGEMENT CREATE SEGMENT Allocates a SEGMENTof spe~ cified length (in 16-byte-long The OSP Free Memory Manager manages the paragraphs) from the JOB memory pool which is allocated to each JOB for its Memory Pool. execution needs, (The CREATE JOB primitive al- DELETE SEGMENT Deallocates the SEGMENT's locates the new JOB's memory pool from the memory area, and returns it memory pool of the parent JOB,) The memory pool is to the JOB memory pool. part of the JOB resOurces but is not yet allocated between the tasks of the JOB. When a TASK, MAIL- Intertask Communication BOX, or REGION system data type structure is created within that JOB, the OSP implicitly allocates The OSP has built-in intertask synchronization and memory for it from the JOB's memory pool, so that a communication, permitting TASKs to pass and share separate call to allocate memory is not required. OSP information with each other. OSP MAILBOXes con- primitives that use free memory management im- tain controlled handshaking facilities which guaran- plicitly include CREATE JOB, CREATE TASK, tee that a complete message will always be sent from DELETE TASK, CREATE MAILBOX, DELETE MAIL- a sending TASK to a receiving TASK. Each MAILBOX BOX, CREATE REGION, and DELETE REGION. The consists of two interlocked queues, one of TASKs 3-203 AFN·02059B iAPX 86/30, iAPX 88/30 80130-2 and the other of Messages. Four OSP primitives for There are five OSP primitives for mutual exclusion: intertask synchronization and communication are CREATE REGION Create a REGION (lock). provided: SEND CONTROL Give up the REGION. CREATE MAILBOX Creates inter.task message exchange. ACCEPT CONTROL Request the REGION, but do not wait if it is not available. DELETE MAILBOX Deletes an intertask mes- sage exchange. RECEIVE CONTROL Request a REGION, wait if not immediately available. RECEIVE MESSAGE Calling TASK rec~ives a mes- sage from the MAILBOX. DELETE REGION Delete a REGION. SEND MESSAGE Calling TASK sends a The OSP also provides dynamic priority adjustment. message to the MAILBOX. for TASKs within priority REGIONs: If a higher- priority TASK issues a RECEIVE CONTROL primitive, The CREATE MAILBOX primitive allocates a MAIL- while a (lower-priority) TASK has the use of the same BOX for use as an information exchange between REGION, the lower-priority TASK will be trans- TASKs. The OSP will post information at the MAIL- parently, and temporarily, elevated to the waiting BOX in a FIFO (First-In First-Out) manner when a TASK's priority until it relinquishes the REGION via SEND MESSAGE instruction is issued. Similarily, a SEND CONTROL. At that point, since it is no longer message is retrieved by the OSP if a TASK issues a using the critical resource, the TASK will have its RECEIVE MESSAGE primitive. The TASK which normal priority restored. creates the MAILBOX may make it available to other TASKs to use. OSP Control Facilities If no message is available, the TASK attempting to receive a message may choose to wait for one or The OSP also includes system primitives that provide continue executing. . both control and customization capabilities to a mul- titasking system. These primitives are used to control The queue management method for the task queue the deletion of SOTs and the recovery of free memory (FIFO or PRIORITY) determines which. TASK in the in a system, to allow interrogation of operating sys- MAILBOX TASK queue will receive a message from tem status, and to provide uniform means of adding the MAILBOX. The method is specified in the user SOTs and type managers. CREATE MAILBOX primitive. DELETION CONTROL Deletion of each OSP system data type is explicitly Intertask Synchronization and Mutual controlled by the applications programmer by set- Exclusion ting a deletion attribute for that structure. For exam- ple, if a SEGMENT is to be kept in memory until DMA Mutual exclusion is essential to multiprogramming activity is «ompleted, its deletion attribute should be and multiprocessing systems. The REGION system disabled. Each TASK, MAILBOX, REGION, and SEG- data type implements mutual exclusion. A REGION is . MENT SOT is created with its deletion attribute en- represented by a queue of TASKS waiting to use a abled (Le., they may be deleted). Two OSP primitives , resource which must be accessed by only one TASK control the deletion attribute: ENABLE DELETION at a time. The OSP provides primitives to use and DISABLE DELETION. REGIONs to manage mutually exclusive data and resources. Both critical code sections and shared ENVIRONMENTAL CONTROL data structures can be protected by these primitives The OSP provides inquiry and control operations from simultaneous use by more than one task. which help the user interrogate the application envi- REGIONs support both FIFO (First-In. First-Out) or ronment and implement flexible exception handling. Priority queueing disciplines for the TASKS seeking These features aid in run-time decision making.and to enter the REGION. The REGION SOT can also be in application error processing and recovery. There used to implement software locks. are five OSP environmental control primitives. Multiple REGIONs are allowed, and are automatically OS EXTENSIONS exited in the reverse order of entry. While in a The OSP architecture is defined to allow"new user- REGION, a TASK cannot be suspended by itself or defined System Data Types and the primitives to ma- any other TASK, and thereby avoids deadlock. nipulate them to be added to OSP capabilities 3-204 AFN·02059B iAPX 86/30, iAPX 88/30 80130-2 provided by the built-in System Data Types. The type allow the OSP primitives to report parameter errors managers created for the user-defined SOTs are in primitive calls, and errors in primitive usage. Ex- called user as extensions and are installed in the ception handling procedures are flexible and can be system by the SET as EXTENSION primitive. Once individually programmed by the application. In gen- installed, the functions of the type manager may be eral, an exception handler if called will perform one invoked with user primitives conforming to the asp or more of the following functions: interface. For well-structured extended architec- -Log the Error. tures, each as extension should support a separate -Delete/Suspend the Task that caused the user-defined system data type, and every as exten- exception. sion should provide the same calling sequence and -Ignore the error, presumably because it is not program interface for the user as is provided for a serious. built-in SOT. The type manager for fhe extension would be written to suit the needs of the application. An EXCEPTION HANDLER is written as a procedure. OSP interrupt vector entries (224-255) are reserved If PLM/86 is used, the "compact," "medium" or for user OS extensions and are not used by the OSP. "large" model of computation should be specified for After assigning an interrupt number to the extension, the compilation of the program. The mode in which the extension user may then call it with the standard the EXCEPTION HANDLER operates may be speci- OSP call sequence (Figure 4), and the unique fied in the SET EXCEPTION HANDLER primitive. The software interrupt number assigned to the return information from a primitive call is shown in extension. Figure 4. CX is used to return standard system error conditions. Table 7 shows a list of these conditions, ENABLE DELETION Allows a specific SEGMENT, using the default EXCEPTION HANDLER of the OSP. TASK, MAILBOX, or REGION SOT to be deleted. DISABLE DELETION Prevents a specific SEG- HARDWARE DESCRIPTION MENT, TASK, MAILBOX, or REGION SOT from being The 80130 operates in a closely coupled mode with deleted. the iAPX 86/10 or 88/10 CPU. The 80130 resides on the CPU local multiplexed bus (Figure 8). The main GET TYPE Given a token for an in- processor is always configured for maximum mode stance of a system data, type, operation. The 80130 automatically selects between returns the type code. its 88/30 and 86/30 operating modes. GET TASK TOKENS Returns to the caller infor- mation about the current The 80130 used in the 86/30 configuration, as shown task environment. in Figure 8 (or a similar 88/30 configuration), GET EXCEPTION Returns information about operates at both 5 and 8 MHz without requiring pro- HANDLER the calling TASK's current in- cessor wait states. Wait state memories are fully sup- formation handler: its ad- ported, however. The 80130 may be configured with dress, and when it is used. both an 8087 NPX and an 8089 lOP, and provides SET EXCEPTION full context control over the 8087. Provides the address and HANDLER usage of an exception The 80130 (shown in Figure 3) is internally divided handler for a TASK. into a control unit (CU) and operating system unit SET OS EXTENSION Modifies one of the interrupt (OSU). The OSU contains facilities for OSP kernel vector entries reserved for support including the sYl?tem timers for scheduling OS extensions (224-255) to and timing waits, and the interrupt controller for point to a user OS extension interrupt management support. _ procedure. SIGNAL EXCEPTION For use in OS extension er- iAPX 86/30, iAPl( 88/30 System ror processing. Configuration ' , The 80130 is both 110 and memory mapped to the EXCEPTION HANDLING local CPU bus. The CPU's status SOI-S21 is decoded along with'lOCSI (with BH E and AD3- The asp supports exception handlers. These are ADo) or MEMCSI (with AD13-ADo). The pins are similar to CPU exception handlers such as OVER- internally latched. See Table 1 fdr'the decoding of FLOW and ILLEGAL OPERATION. Their purpose is to these lines. 3-205 AFN-02059B iAPX 86/30, iAPX 88/30 80130-2 Memory Mappin.g RAM Requirements Address lines A19 -A14 can be used to form MEMCS/ The OSP manages its own interrupt vector, which is since the 80130's memory-mapped portion is aligned assigned to low RAM memory. Working RAM storage along a 16K-byte boundry. The 80130 can reside on is required as stack space and data area. The any 16K-byte boundry excluding the highest memory space must be allocated in user RAM. (FCOOOH-FFFFFH) and lowest (00000H-003FFH). The 80130 control store code is position-independent ex- OSP interrupt vector memory locations OH-3FFH cept as limited above, in order to make it compatible must be RAM based. The OSP requires 2 bytes of with many decoding logic deSigns. AD13-ADo are allocated RAM. The processor working storage is decoded by the 80130's ke!nel control store. dynamically allocated from free memory. Approxi- mately 300 bytes of stack should be allocated for I/O Mapping each OSP task. The I/O-mapped portion of the 80130 must be aligned along a 16-byte boundry. Address lines A15-~ TYPICAL SYSTEM CONFIGURATION should be used to form IOCS/. Figure 8 shows the processing cluster of a "typical" System Performance iAPX 86/30 or iAPX 88/30 OSP system. Not shown are subsystems likely to vary with the application. The The approximate performance of representitive OSP configuration includes an 8086 (or 8088) operating in primitives is given in Table 5. These times are shown maximum mode, an 8284A clock generator and an for a typical iAPX 86/30 implementation with an 8 8288 system controller. Note that the 80130 is located MHz clock. These execution times are very compara- on the CPU side of any latches or transceivers. See ble to the execution times of similar functions in Intel Application Note 130 for further details on minicomputers (where available) and are an order of configuration. magnitude faster than previous generation microprocessors. OSP Timers Initialization The OSP Timers are connected to the lower half of Both application system initialization and OSP- the data bus and are addressed at even addresses. specific initialization/configuration are required to The timers are read as two successive bytes, always use the OSp. Configuration is based on a "database" LSB followed by MSB. The MSB is always latched on provided by the user to the iOSP 86 support package. a read operation and remains latched until read. The OSP-specific initialization and configuration in- Timers are not gatable. formation area is assigned to a user memory address adjacent to the 80130's memory-mapped location. Baud Rate Generator (See Application Note 130 for further details.) The configuration data defines whether 8087 support is The baud rate generator is 8254 compatible (square configured in the system, specifies if slave 8259A wave mode 3). Its output, BAUD, is initially high and interrupt controllers are used in addition to the remains high until the Count Register is loaded. The 80130, and sets the operating system time base (Tick first falling edge of the clock after the Count Register Interval). Also located in the configuration area are is loaded causes the transfer of the internal counter the exception handler control parameters, the ad- to the Count Register. The output stays high for N/2 dress location of the (separate) application system [(N+1)/2 if N is odd] and then goes low for N/2 configuration area and the OSP extensions in use. [(N-1)/2 if N is odd]. On the falling edge of the clock The OSP application system configuration area may which signifies the final count for the output in low be located anywhere in the user memory and must . state, the output returns to high state and the Count include the starting address of the application in- Register is transferred to the internal counter. The struction code to be executed, plus Hie locations of whole process is then repeated. Baud Rates are the RAM memory blocks to be managed by the OSP shown in Table 6. free memory manager. Complete application system support and the required 80130 configuration sup- The baud rate generator is located at OCH (12), rela- port are provided by the iAPX 86/30 and iAPX 88/30 tive to the 16-byte boundary in the I/O space in which OPERATING SYSTEM PROCESSOR SUPPORT the 80130 component is located ("OSF" in the follow- PACKAGE (iOSP 86). . ing example), the timer control word is located at 3-206 AFN·02059B IAPX 86/30, iAPX 88/30 80130·2 ClK CONTROL , i!2 -"'., 0 f- ClK !lO~ --V 8288 PEN '-- 8096 eHE ~ eHE Al. ~RESS/D~ 8282 ADDRESS . ~ . Al • LOCAL AND INTR ADO r---- SYSTEM RESOURCES AD '--- 1'--- 015 ~ 8286 DATA ~- '---- OE DO INT S. i/L !lO~ Lo. ClK ~ AD15 IOCS MEMes ADO I"r- DECODE LOGIC b ACK " r LlR IRO /I r~o IR7 SYSTICK ~ IR2 \ INTERRUPT REQUESTS Figure 8. Typical OSP Configuration relative address, OEH(14). Timers are addressed with Interrupt Controller ° IOCS=O. Timers and.1 are assigned to the use by the OSp, and should not be altered by the user. The Programmable Interrupt Controller (PIC), is also an integral unit of the 80130. Its eight input pins For most baud-rate generator applications, the com- handle eight vectored priority interrupts. One .of mand byte these pins must be used for the SYSTICK time func- OB6H ReadIWrite Baud-Rate Delay Value tion in timing waits, using an external connection as shown. During the 80130 initialization and configura- will be used. A typical sequence to set a baud rate tion sequence, each 80130 interrupt pin is individu- of 9600 using a count value of 52 follows (see ally programmed as either level or edge sensitive. Table 6): External slave 8259A interrupt controllers can be MOV AX,.OB6H ;Prepare to Write Delay to used to expand the total number of OSP external Timer 3. interrupts to 57. OUT OSF+14,AX ;Control Word. In addition to standard PIC funtions, 80130 PIC unit MOV AX,52 has an LlR output Signal, which when low indicates OUT OSF+12,AL ;LSB written first an interrupt acknowledge cycle. LlR=O is provided to XCHG AL,AH control the 8289 Bus Arbiter SYSB/RESB pin. This OUT OSF+12,AL ;MSB written after. will avoid the need of requesting the system bus to acknowledge local bus non-slave interrupts. The The 80130 timers are subset compatible with 8254 user defines the interrupt system as part of the timers. configuration. 3-207 AFN·02059B intJ iAPX 86/30, iAPX 88/30 80130-2 INTERRUPT SEQUENCE signal which drives one of 80130 edge-triggered in- The asp interrupt sequence is as follows: terrupt request pins once each A.C. cycl&. The Inter- rupt Handler responds to the interrupts, keeping 1. One or more of the interrupts is set by a low-to- track of one second's A.C. cycles. The Interrupt Task high transition on edge-sensitive IR inputs or by a counts the seconds and after a day deletes itself. In high input on level-sensitive IR inputs. typical systems it might perform a data logging oper- ation once each day. The Interrupt Handler and Inter- 2. The 80130 evaluates these requests, and sends an ruptTask are written as separate modular programs. INT to the CPU, if appropriate. 3. The CPU acknowledges the INT and responds The Interrupt Handler will actually service interrupt with an interrupt acknowledge cycle which is en- 59 when it occurs. It simply counts each interrupt, coded in S2-S0. and at a count of 60 performs a SIGNAL INTERRUPT to notify the InterruptTask that a second has elapsed. 4. Upon receiving the first interrupt acknowledge The Interrupt Handler (ACS HANDLER) was assigned from the CPU, the highest-priority interrupt is set to this level by the SET INTERRUPT primitive. After by the 80130 and the corresponding edge detect doing this, the InterruptTask performed the Primitive latch is reset. The 80130 does not drive the ad- RESUME TASK to resume the application task (IN ITS dress/data bus during this bus cycle but does TASKS TOKEN). acknowledge the cycle by making ACK=O and sending the LlR value for the IR input being The main body of the task is the counting loop. The acknowledged. InterruptJask is signaled by the SIGNAL INTERRUPT primitive in the Interrupt Handler (at interrupt level 5. The CPU will then initiate a second interrupt ac- ACS INTERRUPTS LEVEL). When the task is sig- knowledge cycle. During this cycle, the 80130 will .nailed by the Interrupt Handler it will execute the supply the cascade address of the interrupting loop exactly one time, increasing the time count input at T1 on the bus and also release an 8-bit variables. Then it will execute the WAIT INTERRUPT pointer onto the bus if appropriate, where it is primitive, and wait until awakened by the Interrupt read by the CPU. If the 80130 does supply the Handler. Normally, the task will now wait some period pointer, then ACK will be low for the cycle. This of time for the next signal. However, since the inter- cycle also has the value LlR for the IR input being face between the Handler and the Task is asyn- a9knowledged. chronous, the handler may have already queued the 6. This completes the interrupt cycle. The ISR bit interrupt for servicing, the writer of the task does not remains set until an appropriate EXIT INTERRUPT have to worry about this possibility. primitive (EOI command) is called at the end of the Interrupt Handler. At the end of the day, the task will exit the loop and execute RESET INTERRUPT, which disables the in- terrupt level, and deletes the interrupt task. The asp now reclaims the memory used by the Task and OSP APPLICATION EXAMPLE schedules another task: If an exception .occurs, the coded value for the exception is available in TIMES Figure 5 shows an application of the asp primitives EXCEPTS CODE after the execution of the primitive. to keep track of time of day in a simplified example. The system design uses a 60 Hz A.C. signal as a time A typical PL/M-86 calling sequence is illustrated by base. The power supply provides a TTL-compatible the call to RESET INTERRUPT shown in Figure 5. 3-208 AFN·02059B iAPX 86/30, iAPX 88/30 80130·2 Table 2. OSP System Data Type Summary Job Jobs are the means of organizing the program environment and resources. An application consists of one or more jobs. Each iAPX 86/30 system data type is contained in some job. Jobs are independent of each other, but they may share access to resources. Each job has one or more tasks, one of which is an initial task. Jobs are given pools of memory, and they may create subordinate offspring jobs, which . may borrow memory from their parents. Task Tasks are the means by which computations are accomplished. A task is an instruction stream with its own execution stack and private data. Each task is part of a job and is restricted to the resources provided by its job. Tasks may perform general interrupt handling as well as other computational functions. Each task has a set of attributes, which is maintain"d for it by the iAPX 86/30, which characterize its status. These attributes are: its containing job its register context its priority (0-255) its execution state (asleep, suspended, ready, running, asleep/suspended). its suspension depth its user·selected exception handler its optional 8087 extended task state Segment Segments are the units of memory allocation. A segment is a physically contiguous sequence of 16·byte, 8086 paragraph·length, units. Segments' are created dynamically from the free memory space of aJob as one of its Tasks requests memory for its use. Asegment is deleted when it is no longer needed. The iAPX 86/30 maintains and manages free memory in an orderly fashion, it obtains memory space from the pool assigned to the containing job of the requesting task and returns the space to the job memory pool (or the parent job pool) when it is no longer needed. It does not allocate memory to create a segment if sufficient free memory is not available to it, in that case it returns an error exception code. Mailbox Mailboxes are the means of intertask communication. Mailboxes are used by tasks to send and receive me~sage segments. The iAPX 86/30 creates and manages two queues for each mailbox. One of these queues contains message segments sent to the mailbox but not yet received by any task. The other mailbox queue consists of tasks that are waiting to receive messages. The iAPX 86/30 operation assures that waiting tasks receive messages as soon as messages are available. Thus at any moment one or possibly both of two mailbox queues will be empty. Region Regions are the means of serialization and mutual exclusion. Regions are familiar as "critical code regions." The iAPX 86/30 region data type consists of a queue of tasks. Each task waits to execute in mutually exclusive code or to access a shared data. region, for example to update a file record. Tokens The asp interface makes use of a 16·bitTOKEN data type to identify individual OSF data structures. Each of these (each instance) has its own unique TOKEN. When a primitive is called, it is passed the TOKENs of the data structures on which it Will operate. 3·209 AFN·02059B iAPX 86/30, iAPX 88/30 80130-2 Table 3. System Data Type Codes and Attributes S.D.T. Code Attributes Jobs 1 Tasks Memory Pool S.D.T. Directory Tasks 2 Priority Stack Code State Exception Handler Mailboxes 3 Queue of S.D.T.s (generally segments) Queue of Tasks waiting for S.D.T.s Region 5 Queue ofTasks waiting for mutually exclusive code or data Segments 6 Buffer Length Table 4. OSP Primitives OSP Interrupt Entry Code Parameters Class Primitive Number in AX On Caller's Stack J 0 CREATE JOB 184 0100H 'See 80130 User Manual B CREATE TASK 184 0200H Priority, IP Ptr, Data Segment, Stack -5eg, Stack Size Task Information, T ExcptPtr A DELETE TASK 184 0201H TASK, ExcptPtr S SUSPEND TASK 184 0202H TASK, ExcptPtr K RESUME TASK 184 0203H TASK, ExcptPtr SET PRIORITY 184 0209H TASK, Priority, ExcptPtr SLEEP 184 0204H Time Limit,ExcptPtr DISABLE 190 . 0705H Level, ExcptPtr I ENABLE 184 0704H Level #, ExcptPtr N ENTER INTERRUPT 184 0703H Level #, ExcptPtr T EXIT INTERRUPT 186 NONE Level #,ExcptPtr E GET LEVEL 188 0702H Level #, ExcptPtr R RESET INTERRUPT 184 0706H Level #, ExcptPtr R SET INTERRUPT 184 0701H Level, Interrupt Task Flag Interrupt U Handler Ptr, Interrupt Handler DataSeg P ExcptPtr T SIGNAL INTERRUPT 185 NONE Level, ExcptPtr WAIT INTERRUPT 187 NONE Level, ExcptPtr S E . G CREATE SEGMENT 184 0600H Size, ExcptPtr M DELETE SEGMENT 184 0603H SEGMENT, ExceptPtr E N T 3-210 AFN·02059B iAPX 86/30, iAPX 88/30 80130-2 Table 4. OSP Primitives (Continued) OSP Interrupt Entry Code Parameters Class Primitive Number inAX On Caller's Stack M CREATE MAILBOX 184 0300H Mailbox flags, ExcptPtr A DELETE MAILBOX 184 0301H MAILBOX, ExcptPtr I RECEIVE MESSAGE MAILBOX, Time Limit ResponsePtr, 184 0303H L ExcptPtr B 184 0302H MAILBOX,Message Response, ExcptPtr SEND MESSAGE 0 X R ACCEPT CONTROL 184 0504H REGION, ExcptPtr E CREATE REGION 184 0500H Region Flags, ExcptPtr G DELETE REGION 184 0501H REGION, ExcptPtr I RECEIVE CONTROL 184 0503H REGION, ExcptPtr 0 SEND CONTROL 184 0502H ExcptPtr N E DISABLE DELETION 184 000lH TOKEN,ExcptPtr N ENABLE DELETION 184 0OO2H TOKEN,ExcptPtr V I GET EXCEPTION R HANDLER 184 0800H Ptr,ExcptPtr 0 GETTYPE 184 OOOOH TOKEN,ExcptPtr N GET TASK TOKENS 184 0206H Request, ExcptPtr M SET EXCEPTION E HANDLER 184 0801H Ptr, ExcptPtr N SET OS EXTENSION 184 0700H Code,lnstPtr, ExcptPtr T SIGNAL A 'EXCEPTION 184 0802H Exception Code, Parameter Number, L StackPtr,O,O,ExcptPtr NOTES: All parameters are pushed onto the asp stack. Each parameter is one word. See Figure 3 for Call Sequence. Explanation of the Symbols JOB asp JOB SDT Token TASK asp TASK SDTToken REGION asp REGION SDTToken MAILBOX asp MAILBOX SDTToken SEGMENT asp SEGMENT SDTToken TOKEN Any SDT Token Level Interrupt Level Number ExcptPtr Pointer to Exception Code Message Message Token Ptr Pointer to Code,Stack etc. Address Seg Value Loaded into appropriate Segment Register Value Parameter. ::I-?11 AFN·020598 inter iAPX,86/30, iAPX 88/30 80130·2 Table 5. asp Primitive Performance Examples Primitive Execution Speed· Datatype Class , (microseConds) JOB CREATE JOB 2950 TASK CREATE TASK (no preemption) 1360 SEGMENT CREATE SEGMENT 700 MAILBOX SEND MESSAGE (with task switch) 475 SEND MESSAGE (no task switch) 265 RECEIVE MESSAGE (task waiting) 540 RECEIVE MESSAGE (message waiting) 260 REGION SEND CONTROL 170 RECEIVE CONTROL 205 '8 MHz iAPX 86/30 OSP Configuation, Table 6. Baud Rate Count Values (16X) Baud 8 MHz Count 5 MHz Count Rate Value Value 300 1667 1042 600 833 521 1200 417 260 2400 208 130 4800 104 65 9600 52 33 ~.?1? iAPX 86/30, iAPX 88/30 80130·2 Table 7a. Mnemonic Codes for Unavoidable Exceptions E$OK Exception Code Value = 0 the operation was successful E$TIME Exception Code Value = 1 the specified time limit expired before completion of the operations was possible E$MEM Exception Code Value = 2 insufficient nucleus memory is available to satisfy the request E$BUSY Exception Code Value = 3 specified region~s currently busy E$LlMIT Exception Code Value = 4 attempted violation of a job, semaphore, or system limit E$CONTEXT Exception Code Value - 5 the primitive was called in an illegal context (e.g., call to enable for an already enabled interrupt) E$EXIST Exception Code Value - 6 a token argument does not Gurrently refer to any object; note that the object could have been deleted at any time by its owner E$STATE Exception Code Value - 7 attempted illegal state transition by a task E$NOT$CONFIGURED Exception Code Value = 8 the primitive called is not configured in this system E$INTERRUPT$SATURATION Exception Code Value = 9 The interrupt task on the requested level has reached its user specified saturation point for interrupt service requests. No further interrupts will be allowed on the level until the interrupt task executes a WAIT$INTERRUPT. (This error is only returned, in line, to interrupt handlers.) E$INTERRUPT$OVERFLOW Exception Code Value = 10 The interrupt task on the requested level previously reached its saturation point and caused an E$INTERRUPT$SATURATION condition. It subsequently executed an ENABLE allowing further interrupts to come in and has received another SIG- NAL$INTERRUPTcall, bringing it over its specified saturation point for interrupt service requests. (This error is only returned, in line, to interrupt handlers). Table 7b. Mnemonic Codes for Avoidable Exceptions E$ZERO$DIVIDE Exception Code Value = 8000H divide by zero interrupt occurred E$OVERFLOW Exception Code Value = 8001 H overflow interrupt occurred E$TYPE Exception Code Value = 8002H a token argument referred to an object tha was not of required type E$BOUNDS Exception Code Value = 8003H an offset argument is out of segment bounds E$PARAM Exception Code Value = 8004H a (non·token,non·offset) argument has an illegal value E$BAD$CALL Exception Code Value = 8005H an entry code for which there is no corresponding primitive was passed E$ARRAY$BOUNDS - 8006H Hardware or Language has detected an array overflow E$NDP$ERROR Exception Code Value = 8007H an 8087 (Numeric data Processor) error has been detected; (the 8087 status information is contained in a parameter to the exception handler) 3-213 AFN·02059B IAPX 86130, iAPX 88/30 80130-2 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the Ambient Temperature Under Bins ......... o·c to 70·C device. This Is a stress rating only and functional operation Storage Temperature ................. -65·C to 150"C of the device at these or any other conditions above those Voltage on Any Pin With , indicated In the operational sections of this specification Respect to Ground .................. - 1.0V to + 7V is not Implied. Exposure to absolute maximum rating con- Power Dissipation .......................... 1.0 Watts ditions for extended period may affect device reliability. D.C. CHARACTERISTICS (TA = o·c to 70·C, VCC = 4.5 to 5.5V) Symbol Parameter Min. Max. Units Test Conditions V'L 'nput Low Vo'tage -0.5 0.8 V V'H 'nput High Voltage 2.0 VCC +.5 V VOL Output low Voltage 0.45 V 'OL - 2 mA VOH Output High Voltage 2.4 V IOH - 400 p.A IcC Power Supply Current 300 mA TA - 25 C III Input leakage Current 10 p.A o - ns TJLJH IR low Time 100 - ns TACC Read Data from Address 290 ns TCLDV Rl!.ad Data Valid O.elay - 100 ns TCLDH Read Data Hold Time 10 - ns TCLDX Read Data to Floating TClDH 100 ns TCLCA Cascade Address Delay Time - 65 ns T'ACA INTA Status to Cascade - 65 ns 3-214 AFN-02059B inter iAPX 86/30, iAPX 88/30 80130·2 A.C. CHARACTERISTICS (Continued) Symbol Parameter Min. Max. Units Notes TClCF Cascade Address Hold Time 10 - ns TIAVE INTA Status to Acknowledge - 80 ns TCHEH Acknowledge Hold Time 10 - ns TCSAK Chip Select to ACK - 110 ns TSACK Status to ACK - 140 ns TAACK Address to ACK - 90 ns TClOD Timer Output Delay Time - 200 ns ~ = 100 pF TClOD1 Timer1 Output Delay Time - 200+TClCl ns ~ = 100 pF TJHIH INT Output Delay - 200 ns TJlSH IR Setup Time 10 - ns WAVEFORMS A.C. ClK I \ / \ TClOD ~ ·1 SYSTICK, DELAY, BAUD X CK IR TJHIH Ir=--- INT _ _ _ _- - - J y \ 3-215 AFN·02059B iAPX 86/30, iAPX 88/30 intJ 80130·2 WAVEFORMS D.C. T4 11 T2 I T3 TW I T4 TCLCH I , I I j TCHCL ClK ...J ~ TCLS~I ~ A TClCL $2, S1, so \ I I I~Cl~~ BHE,AD ls- AD o B V BHE, A1S-Ao VALID l---- TCSCL ~S , iOcS I I f1 TDSCL WRIT E CYCLE I AD ls- AD o - -- ADDRESS VALID TAACK 'IJ{fJIX -' I iTCSAK WRITE DATA VALID I I CK TSACK \( I I E1 TClDX REA D CYCLE 1--1 TClDV TCLDH_ ~ ADo ~ ADDRESS VALID FLOAT 'tiIi.u REAO DATA VALID FLOAT L TAACK .:J ACK TSACK \ ~ ~ TClCA 2ND IN TACYClE '::r-"' _TlACA TCLDH __ ~ - o FLOAT FLOAT ADo CASCADE ADDRESS POINTER ® ~m I-- TIAVE -~ I K ® -----IJ-TCHEH \ @ -IJ--TCHEH R I. nAVE .1 NOTES 1 CASCADE ADDRESS PRESENTED ON AD8, AD9 and AD10 CORRESPONDING TO CASO, CAS1 and CAS2 RESPECTIVELY AD", AD12, AD13, AD14 AND AD15 ARE ACTIVE AND HAVE UNKNOWN VALUES THE LOWER BYTE AD. IS TRISTATED. 2. POINTER VALUE IS ACTIVE ONLY IF POINTER IS GENERATED FROM THE 80130 AND NOT FROM EXTERNAL SLAVE UNIT. 3. ACTIVE LOW ONLY WHEN POINTER DATA IS BEING SUPPLIED BY THE 80130 4 LOW ONLY FOR LOCAL INTERRUPT 3-216 AFN·02059B ~@w~oo©~ DOOIF@OOIMl~'iiD@OO iAPX 86/SO, 88/SO, 186/50, 188/SO CP/M-86* OPERATING SYSTEM PROCESSORS (80150·2) • Processors Hlgh·Performance Two-Chip Data Containing the Complete • otUserNewIntervention Points Allow Addition System Commands CP/M·86 Operating System • CP/M·86 Memory Disk Makes Possible Diskless Systems • Standard On· Chip BIOS (BasiC Input/Output System) Contains Drivers • No License or Serialization Requ'lred tor 8272A, 8275, 8274, 8255A, 8251 A, 8237A • InterruptOperating Built·ln System Timers and Controller • Peripheral BIOS Extensible with User· Supplied Drivers • 808618087/8088180186180188 Compatible at Up to 8 MHz Without Wait States The Intel iAPX 86/50, 88/50, 186/50, and 188/50 are two-chip microprocessors offering general-purpose CPU instructions combined with the CP/M-86 operating system. Respectively, they consist of the 8- and 16-bit software compatible 8086,8088,80186, and 80188 CPU plus the 80150 CP/M-86 operating system extension. CP/M-86 is a single-user operating system,designed for,computers based on the Intel iAPX 86,88,186, and 188 microprocessors. The system allows full utilization of the one megabyte of memory available for application programs. The 80150 stores CP/M-86 in its 16K bytes of on-Chip memory. The 80150 will run third-party applications software written to run under standard Digital Research CP/M-86. The 80150 is implemented in N-Channel, depletion-load, silicon-gate technology (HMOS), and is housed in a 40-pin package. Included on the 80150 are the CP/M-86 operating system, Version 1.1, plus hardware support for eight interrupts! a system timer, a delay timer, and a baud rate generator. ·CPlM·86 Is a trademark of Digital Research, Inc ,--------, 8088 PROGRAM DATA OR MEMORY MEMORY 8088 INTERRUPT STATUS 8284.0. CLOCK BUS DRIVER INTERFACE RDY INTERRUPT STATUS CS,LIR 1-0------' INTERRUPT REQUESTS _J~ BAUD RATE DELAY SYSTEM If'-PX 86150. 881SO TIMER TIMER TIMER Figure 1. iAPX 86/50, 88/50 Block D!agram 3-217 iAPX 86/50,88150,186150,188/50 inter 80150·2 ~[Q)W~OO©~ OOOIF@IRlIMID.'.'iiO@OO v__ Vee v__ Vee 1:1 AD', AD.5 ADtO AD.5 AD.3 BHE AD13 A'81S3 AD.2 IR7 AD12 AD17/S0 AD11 IRS AD11 A.81S5 AD10 IR5 AD.O A.8iS6 AD9 IR4 ADa BHEiS7 (HIGH) ADa IR3 ADa MN/MX AD7 1R2 AD7 AD ADS IR. ADS RcliGTO AD5 IRO AD5 Rcliiffi ADO INT ADO LOCK AD3 S2 AD3 fi AD2 51 AD2 Sl AD. so AD. Sl! ADO ACK ADO OSO MEMCS LlR, NMI as. IOCS SYSTICK INTR TEST ClK DELAY ClK v__ v __ READY SAUD RESET Figure 2. iAPX 86/50, 88150 Pin Configuration Table 1. 80150 Pin Description Symbol TYpe Name and Function AD1S-ADo 1/0 Address Data: These pins constitute the time multiplexed memory address (Tl) and data (T2, T3, Tw, T4) bus. These lines are active HIGH. The address presented during Tl of a bus cycle will be latched internally and interpreted as an 80150 Internal address if MEMCS or 10CS Is active for the invoked primitives. The 80150 pins float whenever it Is not chip selected, and drive these pins only during T2- T4 of a read cycle and Tl of an INTA cycle. BHE/S7 I Bus High Enable: The 80150 uses the BHE signal from the processor to det~rmin.f:l_ ---- wMfffElI't6 respona v.lith -dara-on-the upper -or fower data ,pins~-orboth.The signal is active LOW. SHE is latched by the 80150 on the trailing edge of ALE. It controls the 80150 output data as shown. SHE Ao 0 0 Word on AD1S-ADo 0 1 Upper byte on ADls-ADa 1 0 ~ower byte on AD7-ADo 1 1 Upper byte on AD7-ADo 5 2. 5 1. 5 0 I Status: For the 80150. the status pins are used as inputs only. 80150encoding follows: 52 Sl 50 0 0 0 INTA 0 0 1 lORD i 0 1 0 ,IOWR 0 1 1 Passive I 1 0 0 Instruction fetch 1 0 1 MEMRD 1 1 X Passive 3-218 AFN-D.467B iAPX 86/50, 88/50, 186/50, 188/50 inter 80150-2 bl,fij)\'§bI,~©~ U~[P@ffil~bI,ii'U@~ Table 1. 80150 Pin Description (Continued) Symbol Type Name and F:unction ClK I Clock: The system clock provides the basic timing for the processor and bus controller. It is asymmetric with a 33% duty cycle to provide optimized internal timing. The 80130 uses the system clock as an input to the SYSTICK and BAUD timers and to synchronize operation with the host CPU. INT a Interrupt: INT is HIGH whenever a valid interrupt request is asserted. It is normally used to interrupt the CPU by connecting it·to INTR. IRrlRo I Interrupt Requests: An interrupt request can be generated by raising an IR input (lOW to HIGH) and holding it HIGH until it is acknowledged (Edge-Triggered Mode), or just by a HIGH level on an IR input (level-Triggered Mode). ACK a Acknowledge: This line is lOW whenever an 80150 resource is being accessed. It is also lOW during the first INTA cycle and second INTA cycle if the 80150 is supplying the interrupt vector information. This signal can be used as a bus ready acknowl- edgement and/or bus transceiver control. MEMCS I Memory Chip Select: This input must be driven lOW when a kernel primitive is being fetched by the CPU. AD13-ADO are used to select the instruction. lacs I Input/Output Chip Select: When this input is low, during an lORD or IOWR cycle, the 80150's kernel primitives are accessing the appropriate peripheral function as speci- fied by the following table: BHE A3 A2 A1 Ao 0 X X X X Passive X X X X 1 Passive X 0 1 X X Passive 1 0 0 X 0 Interrupt Controller 1 1 0 0 0 Systick Timer 1 1 0 1 0 Delay Counter 1 1 1 0 0 Baud Rate Timer 1 1 1 1 0 Timer Control LlR a Local Bus Interrupt Request: ThiS Signal is lOW when the interrupt request is for a non-slave input or slave input programmed as being a local slave. Vee Power: Vee is the +5V supply pin. VSS Ground: Vss is the ground pin. SYSTICK a System Clock Tick: Timer 0 Output. Operating System Clock Reference. SYSTICK is normally wired to IR2 to implement operating system timing interrupt. DELAY a DELAY Timer: Output of timer 1. Reserved by Intel Corporation for future use. BAUD a Baud Rate Generator: 8254 Mode 3 compatible output. Output of 80150 Timer 2. The 80150 breaks new ground in operating system true operating system extension to the host software-on-silicon components. It is unique microprocessor, since it also integrates key because it is the first time that an industry- operating system·related peripheral functions standard personal/small business computer onto the chip. operating system is being put in silicon. The 80150 contains Digital Research's CP/M-86 operating system, which is designed for Intel's MODULAR DESIGN line of software·. and interface·compatible iAPX Based on a proven, modular design, the system in· 86, 88, 186, and 188 microprocessors. Since the cludes the: entire CP/M·86 operating system is contained on • CCP: Console Command Processor the chip, it is now possible to design a diskless computer that runs proven and commonly The CCP is the human interface to the available applications software. The 80150 is a operating system and performs decoding and 3-219 AFN·014678 iAPX 86/50,88/50, 186/50, 188/50 80150-2 L!:i[Q)WL!:iIM©~ OIM[P@OO~L!:i'jj'O@1M execution of user commands. creased significantly. Since CP/M-86 is now always in the system as a standard hardware • BOOS: Basic Disk Operating System operating system, a properly functioning The BOOS is the logical, invariant portion of the system diskette is not required. CP/M-86 in operating system; it supports a named file hardware can no longer be overwritten acciden- system with a maximum of 16 logical drives, tally by a runaway program. System reliability containing up to 8 megabytes each for a poten- is enhanced by the decreased dependence on tial of 128 megabytes of on-line storage. floppy disks and fewer chips and interconnec- tions required by the highly integrated 80150. • BIOS: Basic Input/Output System 4. The microcomputer system boots up CP/M-86 The physical, variant portion of the operating on power-on, rather than requiring the user to system, the BIOS contains the system- dependent input/output device handlers. go through a complicated boot sequence, thus lowering the user expertise required. CP/M· COMPATIBILITY 5. Diskless CP/M-based systems are now easy to CP/M-86 files are completely compatible with design. Since CP/M is already in the microcom- CP/M for 8080- and 8085-based microcomputer puter hardware, there is no need for a disk drive systems. This simplifies the conversion of soft- in the system if it is not desired. Without a disk ware developed under CP/M to take full advantage drive, a system is more portable, simpler to use, of iAPX 86,88, 186, 188-based systems. less costly, and more reliable. The user will notice no significant difference be- 6. The administrative costs associated with tween CP/M and CP/M-86. Commands such as distributing CP/M-86 are eliminated. Since DIR, TYPE, REN, and ERA respond the same way CP/M-86 is now resident on the 80150 in the in both systems. microcomputer system, there is no end-user licensing required nor is there any serialization CP/M·86 uses the iAPX 86, 88, 186, 188 registers requirement for the 80150 (because no CP/M corresponding to 8080 registers for system call diskette is used). and return parameters to further simplify software transport. The 80150 allows application code and 7. End-users will value having their CP/M data segments to overlap, making the mixture of operating system resident in their computer rather than on a diskette. They will no longer code and data that often appears in CP/M applica- have to back up the operating system or have a tions acceptable to the iAPX 86, 88, 186, 188. diskette working properly to bring the system Unique Capabilities of CP/M·86 in Silicon up in CP/M, increasing their confidence in the integrity, reliability, and usability of the system. 1. CP/M-86 on-a-chip reduces software develop- ment required by the system designer. It can change the implementation of the operating 80150 FUNCTIONAL DESCRIPTION system into the simple inclusion of the 80150 The 80150 is a processor extension that is fully on the CPU board. compalibJe with thaB086,-B08B, 8Q186,and 80188 ~ microprocessors. When the 80150 is combined As described later, the designer can either with the microprocessor, the two-chip set is simply incorporate the Intel chip without the called an Operating System Processor and is need for writing even a single line of additional denoted as the iAPX 86/50, 88/50,186/50, or 188/50. code, or he can add additional device drivers by The basic system configuration is shown in writing only the small amount of additional Figure 1. The 80150 connects directly to the multi- code required. plexed address/data bus and runs up to 8 MHz 2. The 80150 is the most cost-effective way to im- without wait states. plement CP/M-86 in a microcomputer. The in- A. Hardware. Figure 3 is a functional diagram of tegration of CP/M-86 with the 16K bytes of the '80150 itself. CP/M-B6 is stored in the system memory it requires, the two boot ROMS 16K-bytes of control store. The timers are com- required in a diskette-based CP/M-86, and the patible with the standard 8254 timer. Th~ inter- on-chip peripherals (interrupt controller and rupt controller, with its eight programmable in- timers) lead to savings in software, parts cost, terrupt inputs and one interrupt output,' is board space, and interconnect wiring. compatible with the 8259A Programmable In- 3. The reliability of the microcomputer is in- terrupt Controller. External slave 8259A inter- ·CP/M IS a registered trademark of Digital Research, Inc 3-220 AFN·014678 iAPX 86150,88150,186150,188150 80150-2 £[Q)\\'7£~©~ D~[F@[Xl~£ii'D@~ ,----------------------------------, I I OPERATING SYSTEM UNIT I I I 00·7 I I r I I I 8 I PROGRAMMABLE / I INTERRUPT I I LOGIC I INTERRUPT INP UTS I I I INTERRUPT OUT I CONTROL I : STORE I I : ~ I 2 SYSTEM TIMER I I I SYSTEM . ~ 1 I 08-15 I DELAY ! DELAY ~ TIMER : ~ : i ! BAUD RATE GENERATOR +-- BAUDR ATE I :f - - - - - - - - - - - - - - - - - - - - - - I I ---------------1 I I I I I I k---- ~ CLOCK '. I I 3 DATA BUS ~ STATUS ,I BUFFER INTERFACE < Z & AND I 4 I ADDRESS LATCH CONTROL ~BUSCON TROL ADDRESS.' I I DATA eus I ~ LOCAL I I INTERRU PT I (OR) L __________________________________ I CONTROL UNIT, ~ Figure 3. 80150 Internal Block Diagram rupt controllers can be cascaded with the vided to format diskettes, transfer files- between 80150 to expand the total number of interrupts devices (based on Digital Research's Peripheral to 57. Interchange Program PIP), and alter and display· I/O device and file status (based on Digital B. Software. Digital Research's version 1.1 of Research's STAT). CP/M-86 forms the basis of the 80150_ CP/M consists of three major parts: the Console Through User Intervention POints, the standard Command Processor (CCP), the Basic Disk CP/M-86 CCP is enhanced to allow the user to add Operating System (BDOS), and the Basic In- new built-in commands to further customize a put/Output System (BIOS). Details on CP/M-86 CP/M-86 system. are provided in Digital Research's CPIM-86 Operating System User's Guide and CPIM-86 BOOS - Basic Disk Operating System Operating System System Guide. Once the CCP has parsed a command, it sends it to the BDOS, which performs system services such as managing disk directories and files. CCP - Console Command Processor Some of the standard BDOS functions provide: The CCP provides all of the capabilities provided Console Status by Digital Research's CCP. Built-in commands Console Input and Output have been expanded to include capabilities nor- List Output mally included as transient utilities on the Digital Select Drive Research CP/M-86 diskette. Commands are pro- Set Track anq Sector 3-221 AFN·01467,B iAPX 86/50, 88/50, 186/50, 188/50 inter 80150-2 &.@W&.OO©~ OOO[?©IRl~&''ii'O©~ Read/Write Sector The predefined configuration offers a choice Load Program among several peripheral chip drivers Included on the 80150. Drivers for the following chips are in- cluded in the 80150 BIOS: The BOOS in the 80150 provides the same func- 8251A Universal Synchronous/ tions as the standard Digital Research CP/M-86 Asynchronous Receiver/Transmit- BDOS_ ter (USART) 8274 Multi-Protocol Serial Controller BIOS - BasIc InputlOutput System (MPSC) The BIOS contains the system-dependent I/O 8255A Programmable Parallel Interface drivers_ The 80150 BIOS offers two fundamental (PPI) configuration options: 8275 CRT Controller 8272A Floppy Disk Controller 1_ A predefined configuration which supports 8237A DMA Controller (for use with 8275, minimum cost CP/M-86 microcomputer 8272) systems and which requires no operating system development by the system designer. The following options are thus available: 2. An OEM-configurable mode, where the CONSOLE OUT: 8251A, 8274, 8275 designer can choose among several drivers of- CONSOLE IN: 8251A, 8274, 8255A fered on the 80150 or substitute or add any ad- LIST: 8251A, 8274, 8255A ditional device drivers of his choice. AUXIN, AUXOUT: 8251A,8274,8255A DISK: 8272 These two options negate the potential software- on-silicon pitfall of inflexibility in system design. The actual configuration is detected by the 80150 The OEM can customize the end system as on power-up. An example configuration is shown' desired. in Figure 4. FLOPPY DISK I 8088J808~~'lJ88J801881--- , 80150 8272A ADDRESS/DATA BUS 8251A 8251A I CONSOLE I PRINTER F,igure 4_ Predefined Configuration 3-222 AFN·014678 inter iAPX 86150, 88150,186/50,188150 '80150-2 ~@W~OO~~ DOOIF@OOIMl~'ii'D@OO Even in the predefined configuration, the system flexibility of adding custom BIOS drivers for other designer (or end user, if the system designer peripheral chips, such as bubble memories or desires) may select parameters such as the baud more complex CRT controllers. These drivers rates for the co~sole and printer, and the floppy would be stored in memory external to the 80150 disk size (standard 8" or 5V4" mini-floppy) and Itself. By providing the configurabillty option, the format (FM single density or MFM double density, 80150 Is· applicable to a far broader range of single-Sided or double-sided). designs that It would be with an inflexible BIOS. Drivers for the 80150 on-ohlp timers and interrupt controller are also included In the BIOS. The 80150 takes advantage of the 80186 and 80188 MEMORY ORGANIZATION on-chip peripherals in an iAPX 186/50 or ,88/50 When using the predefined configuration of the system. For example, the integrated DMA con- 80150 BIOS, the 80150 must be placed in the top troller is used rather than an external 8237A. Also 16K of the address space of the microprocessor fully utilized are the integrated memory chip (starting at location FCOOOH) so that the 80150 , selects and I/O chip selects. gains control when the microprocessor is reset. ·Upon receipt of control, the 80150 writes a con- Since all microcomputer configurations cannot figuration block into the bottom 2K bytes of the be anllcipated, the OEM-conflgurable mode microprocessor's address space, which must be allows the system designer to use any set of in RAM. The 80150 uses the area after the inter- peripheral chips desired. This configuration is rupt vectors for system configuration information shown in Figure 5. and scratch-pad storage. By simply changing the Jump addresses in a con- When using the OEM-conflgurable mode of the figuration table, the designer can also gain the 80150 BIOS, the 80150 is placed on any 16K boun- FLOPPY DISK CRT I I 808818088180186180188 OTHER cPU r-- 80150 8272A 8275 PERIPHERALS ADDRESS/DATA BUS ~ , 8237A DMA CONTROLLER 8251A 8255A 8274 -' i I ASYNCHRONOUS COMMUNICATION$, I KEYBOARD. PARALLEL PRINTER 1 SYNCHRONOUS UNE, SERIAL PRINTER, CONSOLE, CONSOLE SERIAL PRINTER Figure 5_ OEM Configurable System AFN'()1467B iAPX 86/50, 88150,186150,188150, inter 80150-2 &'@W&'OO©jg OOOIF@IRlIMI&' ii'O@OO dary of memory except the highest (FCOOOH) or a number of ways: ' lowest (OOOOOH)_ The user writes Interface code (in a. telephone lines via a modem. the form of a simple boot ROM) to incorporate and b. ROM-based software. link additional features and changes into the c. a network. standard 80150 environment. The, configuration block may be located as desired in the address d. bubble memory based software. space, and its size may vary widely depending on e. low-cost cassettes_ the application. TYPICAL SYSTEM CONFIGURATION Memory Disk Figure 6 shows the processing cluster of a A unique capability offered by the 80150 Is the "typical" IAPX 86/50 or IAPX 88/50 OSP system. Memory Disk. The Memory Disk consists of a Not shown are subsystems likely to vary with the block of RAM whose size can be selected by the application. The configuration includes an 8086 designer. The Memory Disk 1$ treated by the (or 8088) operating in maximum mode, an 8284A BOOS as any standard floppy disk, and is one of clock generator and an 8288 system controller. the 16 disks that CPIM can address. Thus files can Note that the 80150 is located on the CPU side of be opened and, closed, programs stored, ~nd any latches or transceivers. ' statistics gathered on the amount of Memory Di~k space left. Timers The Memory Disk opens the possibility of a por- The Timers are connected to the lower half of.the table low-cost diskless microcomputer or network data bus and are addressed at even addresses. station. Applications'$oftware can be provided In The timers are read as two successive bytes, f- ClK 52 "- + CONTROL "- 0 8288 sot-- r---V L--- 8086 BHE ~ BHE A19 LOCAL A1. ·· "- INT . ADO ~RESS/D~ 8282 ~ ADDRESS AND SYSTEM RESOURCES - AO .--- o1S ~, _. - - -- --" - - - "- -- · -- -- --- - - A-- -- , ) 8286 DATA " ~- DO ~t:2 ~ INT 4 ClK so AD15 ~ l~~ ADO 10CS DECODE MEMes I LOGIC ACK r . LlR IRO A r~' INTERRUPT REQUESTS IR7 SYSTICK ~ IR2" Figure 8. Typical OSP Configuration '3-224 AFN-Q1467B iAPX 86/50, 88/50, 186/50, 188/50 80150-2 &'[Q)I(.7&'~©~ ~~IF@[ffi~&'ii'O@~ always LSB followed by MSB. The MSB is always In addition to standard PIC functions, the 80150 latched on a read operation and remains latched PIC unit has an LlR output signal, which when low until read. Timers are not gatable. An external indicates an interrupt acknowledge cycle. LlR = 0 8254 Programmable Interval Timer may be added is provided to control the 8289 Bus Arbiter to the system. SYSB/RESB pin. This will avoid the need of re- questing the system bus to acknowledge local bus non-slave interrupts. The user defines the in- Baud Rate Generator terrupt system as part of the configuration. The baud rate generator operates I ike an 8254 (square wave mode 3). Its output, BAUD, is initially high and remains high until the Count Register is INTERRUPT SEQUENCE loaded. The first falling edge of the clock after the Count Register is loaded causes the transfer of The interrupt sequence is as follows: the internal counter to the Count Register. The 1. One or more of the interrupts is set by a low- output stays high for N/2 [(N + 1)/2 if N is odd] and to-high transition on edge-sensitive IR inputs then goes low' for N/2 [(N -1)/2 if N is odd]. On the or by a high input on level-sensitive IR inputs. falling edge of the clock which signifies the final count for the output in low state, the output 2. The 80150 evaluates these requests, and returns to high state and the Count Register is sends an INT to the CPU, if appropriate. transferred to the internal counter. The baud rates 3. The CPU acknowledges the INT and responds can vary from 300 to 9600 baud. with an interrupt acknowledge cycle which is The baud rate generator is located at OCH (12), encoded in S2 - SO, relative to the 16-byte boundary in the I/O space in 4. Upon receiving the first interrupt acknowledge which the 80150 component is located. T~e timer from the CPU, the highest-priority interrupt is control word is located at relative address, set by the 80150 and the corresponding edge OEH(14). Timers are addressed with 10CS =O. detect latch is reset. The 80150 does not drive Timers 0 and 1 are assigned to use by the OSP, the address/data bus during this bus cycle but and should not be altered by the user. does acknowledge the ~cle by making The 80150 timers are subset compatible with 8254 ACK =0 and sending the LlR value for the IR timers. input being acknowledged. 5. The CPU will then initiate a second interrupt Interrupt Controller acknowledge cycle. During this cycle, the 80150 will supply the cascade address of the The Programmable Interrupt Controller (PIC), is interrupting input at T 1 on the bus and also also an integral unit of the 80150. Its eight input release an 8-bit pointer onto the bus if ap- pins handle eight vectored priority interrupts. One propriate, where it is read by the CPU. If the of these pins must be used for the SYSTICK lime 80150 does supply the pointer, then ACK will function in timing waits, ·using an external con- be low for the cycle. This cycle also has the nection as shown. During the 80150 initialization value LlR for the IR input being acknowledged. and configuration sequence, each 80150 interrupt pin is individually programmed as either level or 6. This completes the interrupt cycle. The ISR bit edge sensitive. External slave 8259A interrupt remains set until an appropriate EXIT INTER- controllers can be used to expand the total RUPT primitive (EOI command) is called at the number of interrupts to 57. end of the Interrupt Handler. AFN-014678 iAPX 86/50,88/50,186/50, 188/50 80150-2 BI@WBl~©~ O~['s@IKlIMlBl'jj'O@~ ABSOLUTE MAXIMUM RATINGS· -NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the Ambient Temperature Under Bias ........ O·C to 70·C device. This is a stress rating only and funciional operation Storage Temperature ................. -65°C to 150°C of the device at these or any other conditions above those Voltage on Any Pin With indicated In the operatIOnal sectIOns of this specification Respect to Ground .................. -1.0V to + 7V is not implied. Exposure to absolute maximum rating con- Power Dissipation .......................... 1.0 Watts ditIOns for extended penod may affect device reliability. DC CHARACTERISTICS (TA = O°C to 70°C VCC = 45 to 55V) Symbol Parameter Min. Max. Units Test C0'"1ditions -- VIL Input low Voltage 0.5 0.8 V VIH Input High Voltage 2.0 VCC + .5 V VOL Output low Voltage 0.45 V IOL = 2 mA VOH Output High Voltage 24 V IOH - -400 /LA -- ICC Power Supply Current 300 mA TA - 25 C III Input leakage Current 10 /LA 0< VIN < VCC ILR IR Input load Current 10 /LA VIN - VCC -300 /LA VIN = 0 -- ILO Output leakage Current 10 /LA .45 - VIN - VCC VCLI Clock Input low 0.6 V VCHI Clock Input High 3.9 V ..- CIN Input Capacitance 10 pF CIO I/O Capacitance 15 pF A.C. CHARACTERISTICS (TA = 0-70'C, vcc = 4.5-5.5 Volt, vss = Ground) Symbol Parameter Min. Max. Units Notes -- TCLCL ClK Cycle P€lrlod 125 - ns CL = 20-200 pF TCLCH ClK low Time 55 - ns ==J CU< High Time 44 2000 ns r2.TSVCH CHCL Status Active Setup Time 65 - ns TCHSV Status Inactive Hold Time 10 - ns TSHCL Status Inactive Setup Time 55 - ns TCLSH Status Active Hold Time 10 - ns TASCH Address Valid Setup Time 8 - ns TCLAH Address Hold Time 10 - ns TCSCL Chip Select Setup Time 20 - ns TCHCS Chip Select Hold Time 0 - ns TDSCL Write Data Setup Time 60 - ns -- TCHDH Write Data Hold Time 10 - ns TJLJH IR lowTime 100 - ns TACC Read Data from Address - 280 ns TCLDV R~ad Data Valid Delay - 100 ns TCLDH Read Data Hold Time 10 - ns TCLDX Read Data to Floating 10 100 ns TCLCA Cascade Address Delay Time - 65 ns -- TIACA INTA Status to Cascade - 65 ns 3-226 AFN-01467B iAPX 86/50, 88/50, 186/50, 188/50 inter 80150·2 ~[Q)W~~©~ O~[P@IRlf.(vA]~ii'O@~ A.C. CHARACTERISTICS (Continued) Symbol Parameter Min. Max. Units Notes TCLCF Cascade Address Hold Time 10 - ns TIAVE INTA Status 'to Acknowledge - 80 ns TCHEH Acknowledge Hold Time 10 - ns TCSAK Chip Select to ACK - 110 ns TSACK Status to ACK - 140 I ns TAACK Address to ACK - 90 ns TCLOD Timer Output Delay Time - 200 ns CL = 100 pF TCLOD1 Tlmer1 Output Delay Time - TCLCL +200 ns CL = 100 pF TJHIH INT Output Delay - TCLCL +200 ns WAVEFORMS A.C. ~ elK / / \ TelOO "I SYSTlCK, DELAY, BAUD X IR --=1 TJlJH [ INT 4 TJHIH y=--- 3-227 AFN-01467B iAPX 86/50,88/50, 186/50, 188/50 80150-2 WAVEFORMS D.C. TO T1 T2 I T3 I TO I 1 TW , -- I reLCH ClK TCHCl I I 52,51,50 .TCHSV· 1 \ -- TSVCH I releL TClSH I I I ,I- TSHCL I ~ SHE, A15-AO VALID ~}---- SHE,A 0'5-AO O reseL Fi S S,IOCS f A TDseL WRI TE CYCLE 1 I AD 15- AO O ADDRESS VALID YJ{f}IX WRITE DATA VALID I -l r-TCSAK I CK TAACK X ~ I~ I REA o CYCLE TACC ~ TClDV ~H FLOAT FLOAT ADo ADDRESS VALID READ DATA VALID ~ TClVE .1 K TSACK \ ~ 2NOIN TA CYCLE ~~ - .. TlACA ~ ----< OUT 0 - - - 1300PF' I 3OOPF ' r:iOOPF' 3·STATE TO VOL 3·STATE TO VOH SWITCHING '200 pF for plastic 8282/8283. 3-232 AFN·00727E inter 8282/8283 WAVEFORMS INPUTS \V \/ /1\. J\ -TIVSL~ -TSLlX· ST8 \ ---.I TSHSL-I\ / \ - / 1\ -TiVOV- _n~'-VOH-.1V ~.--C OUTPUTS \V ~------ .(1\ VOL +.1V SEE NOTE 1 ~TSHOV- NOTE: 1 OUTPUT MAY BE MOMENTARILY INVALID FOLLOWING THE HIGH GOING STB TRANSITION. 2. ALL TIMING MEASUREMENTS ARE MADE AT 1 5V UNLESS OTHERWISE NOTED. 50 50 8282 8283 40 ~ II) Z S '" Q 10 pF LOAD pF LOAD Output Delay VI. CapacItance 3-233 AFN-00727E 8284A/8284A-1 CLOCK GENERATOR AND DRIVER FOR iAPX 86, 88 PROCESSORS • Generates the System Clock for the • Single +5V Power Supply iAPX 86, 88 Processors: 5 MHz, 8 MHz with 8284A • Generates System Reset Output from 10 MHz with 8284A-1 Schmitt Trigger Input • Uses a Crystal or a TTL Signal for • -Capable of Clock Synchronization with Frequency Source Other 8284As • Provides Local READY and Multlbus™ READY Synchronization • Available in EXPRESS - .standard Temperature Range • 18·Pln Package - Extended Temperature Range RES 0 D RESET Xl XTAl OSCillATOR X2 OSC CSYNC 1 Fie +3 PClK AENl 3 EFI RDYl CSYNC READY RDYl ClK ClK AENl GND RDY2 CKt AEN2 D Q READY FFl ASYNC 8284A/8284A·1 Pin 8284A/8284A-1 Block Diagram Conflgurati9n 3-234 inter 8284A/8284A-1 Table 1. Pin Description Symbol Type Name and Function Symbol Type Name and Function AEN1, I Address Enable: AEN is an active lOW ClK 0 Processor Clock: ClK is the clock output AEN2 signal. AEN serves to qualify its respective used by the processor and all devices which Bus Ready Signal (RDYI or RDY2). AENI directly connect to the processor's local bus validates RDYI while AEN2 validates RDY2. (i.e., the bipolar support chips and other MOS Two AEN signal inputs are useful in system devices). ClK has an output frequency which configurations which permit the processor to is V3 olthe crystal or EFI inputfrequency and a access two Multi-Master System Busses. In V3 duty cycle. An output HIGH of 4.S volts non Multi-Master configurations the AEN (Vcc= SV) is provided on this pin to drive MOS signal inputs are tied true (lOW). devices. RDY1, I Bus Ready: (Transfer Complete). ROY is an PClK 0 Peripheral Clock: PClK is a TIL level pe- RDY2 active HIGH signal which is an indication from ripheral clock signal whose output frequency a device located on the system data bus that is V2 that of ClK and has a 50% duty cycle. data has been received, or is available. RDYI OSC 0 Oscillator Output: OSC is the TTL level out- is qualified by AENI while RDY2 is qualified put of the internal oscillator circuitry. Its fre- by AEN2. quency is equal to that of the crystal. ASYNC I Ready Synchronization Select: ASYNC is an RES I Reset In: RES is an active lOW signal which input which defines the synchronization is used to generate RESET. The B2B4A mode of the READY logic. When ASYNC is provides a Schmitt trigger input so that an RC low, two stages of READY synchronization connection can be used to establish the are provided. When ASYNC .s left op'en power-up reset of proper duration. (internal pull-up resistor is provided) or HIGH a single stage of READY sync~ronization is RESET 0 Reset: RESET is an active HIGH signal which provided. is used to reset the BOB6 family processors. Its timing characteristics are determined by READY 0 Ready: READY is an active HIGH signal RES. which is the synchronized !'lOY signal input. READY is cleared after the guaranteed hold CSYNC I Clock Synchronization: CSYNC is an active time to the processor has been met. HIGH signal which allows multiple B284As to be synchronized to provide clocks that are in XI, X2 I Crystal In: XI and X2 are the pins to which a phase. When CSYNC is HIGH the internal crystal is attached. The crystal frequency is 3 counters are reset. When CSYNC goes lOW times the desired processor clock frequency. the internal counters are allowed to resume F/C I FrequencylCrystal Select: F/C is a strapping counting. CSYNC needs to be externally syn- option. When strapped lOW, FIC permits the chronized to EFI. When using the internal os- processor's clock to be generated by the crys- cillator CSYNC should be hardwired to tal. When Fleis strapped HIGH, ClK is gener- ground. ated from the EFI input. GND Ground. EFI I External Frequency: When F/C is strapped Vee Power: +SV supply. HIGH, ClK is generated from the input fre- quency appearing on this pin. The input signal is a square wave 3 times the frequency of the desired ClK output. FUNCTIONAL DESCRIPTION The crystal frequency should be selected at three times the required CPU clock. XI and X2 are the two crystal General input crystal connections. For the most stable operation The 8284A is a single chip clock generator/driver for the of the oscillator (OSC) output circuit, two series resistors iAPX 86, 88 processors. The chip contains a crystal- (R1 = R2 = 510 Ol as shown in the waveform figures are controlled oscillator, a divide-by-three counter, com- recommended. The output of the oscillator is buffered and plete MULTIBUSTM "Ready" synchronization and reset brought out on OSC so that other system timing signals logic. Refer to Figure 1 for Block Diagram and Figure 2 can be derived from this stable, crystal-controlled source. for Pin Configuration, For systems which have aVCC ramp t.me '" lVlms andlor have inherent board capacitance between XI or X2, ex- Oscillator ceeding 10 pF (not including 8284A pin capacitance), the two 5100 resistors should be used. This circuit provides The oscillator circuit of the 8284A is designed primarily optimum stability for the oscillator in such extreme condi- for use with an external series resonant, fundamental tions. It is advisable to limit stray capacitances to less than mode, crystal from which the basic operating frequency 10 pF on XI and X2 to minimize deviation from operating is derived. at the fundamental frequency. 3-235 AFN-01472D 8284A/8284A-1 Clock Generator Master system is not being used the ~ pin should be tied lOW. The clock generator consists of a synchronous divide- by-three counter with a special clear input that Inhibits the counting. This clear input (CSYNC) allows the out- Synchronization is required for all asynchronous active- put clock to be synchronized with an external event gOing edges of either ROY input to guarantee that the (such as another 8284A clock). It is necessary to syn- ROY setup and hold times are met. Inactive-going edges chronize the CSYNC input to the EFI clock external to of ROY in normally ready systems do not require syn- the 8284A. This is accomplished with two Schottky flip- chronization but must satisfy ROY setup and hold as a flops. The counter output is a 33% duty cycle clock at matter of.proper system design. one-third the input frequency. The FIG input is a strapping pin that selects either the The ASYNC input defines two modes of READY syn- crystal osc,illator or the EFI input as the clock for the +3 chronization operation. counter. If the EFI input is selected as the clock source, the oscillator section can be used independently for When ASYNC is lOW, two stages of synchronization another clock source. Output is taken from OSC. are provided for active READY input signals. Positive- going asynchronous READY inputs will first be syn- Clock· Outputs chronized to flip-flop one at the rising edge of ClK and then synchronized to flip-flop two at the next falling The ClK output is a 33% duty cycle MaS clock driver edge of ClK, after which time the READY output will go designed to drive the iAPX 86, 88 processors directly. active (HIGH). Negative-going asynchronous READY in- a PClK is TTL level peripheral clock signal whose out- puts will be synchronized directly to flip-flop two at the put frequency is V2 that of ClK. PClK has a 50% duty falling edge of ClK, after which time the READY output cycle. will go inactive.'This mode of operation is intended for use by asynchronous (normally not ready) devices in the sys- Reset Logic tem which cannot be guaranteed by design to meet the required ROY setup timing, TR1VCL, on each bus cycle. The reset logic provides a Schmitt trigger input (RES) and a synGhronizing flip-flop to generate the reset timing. The reset signal is synchronized to the falling When ASYNC is high or left open, the first READY flip- edge of ClK. A simple RC network can be used to flop is bypassed in the READY synchronization logic. provide power-on reset by utilizing this function of the READY inputs are synchronized by flip-flop two on the 8284A. falling edge of ClK before they are presented to the processor. This mode is available for synchronous devices that can be guaranteed to meet the required READY Synchronization ROY setup time. Two READY inputs (RDY1, RDY2) are provided to accom- modate two Multi-Master system busses. Each input ASYNC can be changed on every bus cycle to select the has a qualifier (AEN1 and AEN2, respectively). The AEN appropriate mode of synchronization for each device in signals validate their respective ROY signals. If a Multi- the system. CLOCK SYNCHRONIZE >--+----H D .Q D Q EFI (TO OTHER 8284As) Figure 3. CSYNC Synchronization 3-236 AFN-01472D inter 8284A/8284A-1 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................• O·C to 70'C tion of the device at these or any other conditions above Storage Temperature .............. -65'C to + 150'C those indicated in the operational sections of this specifi- All Outputand Supply Voltages ......... - 0.5V to + 7V cation is not implied. Exposure to absolute maximum All Input Voltages ................... -1.0V to +5.5V rating conditions for extended periods may affect device Power Dls~lpatlon ........................ ,.1 Watt reliability. D.C. CHARACTERISTICS (TA=O'C to 70'C, Vcc=5V± 10%) Symbol Parameter Min. Max. Units Test Conditions IF . Forward Input Current (ASYNC) Other Inputs Reverse Input Current (ASYNC) -1.3 -0.5 50 mA mA ,..A- VF=0.45V VF=0.45V IR VR=Vcc Other Inputs 50 ,..A- VR= 5.25V Vc Input Forward Clamp Voltage -1.0 V Ic=-5mA Icc Power Supply Current 162 mA VIL Input lOW Voltage 0.8 V VIH Input HIGH Voltage 2.0 V VIHR Reset Input HIGH Voltage 2.6 V VOL Output lOW Voltage 0.45 V 5mA VOH Output HIGH Voltage ClK 4 V -1mA Other Outputs 2.4 V -1mA VIHR- VILR RES Input Hysteresis 0.25 V A.C. CHARACTERISTICS (TA=O'C to 70'C, Vcc=5V± 10%) TIMING REQUIREMENTS Symbol Parameter Min. Max. Units Test Conditions tEHEL External Frequency HIGH Time 13 ns 90%-90% VIN tELEH 'External Frequency lOW Time 13 ns 10%-10% VIN tELEL EFI Period 33 ns (Note 1) XTAl Frequency 12 25 MHz tRlVCL RDY1, RDY2 Active Setup to ClK 35 ns ASYNC=HIGH tRlVCH RDY1, RDY2 Active Setup to ClK 35 ns ASYNC=lOW tRlVCL RDY1, RDY2 Inactive Setup to ClK 35 ns tCLR1X RDY1, RDY2 Hold to ClK 0 ns tAYVCL ASYNC Setup to ClK 50 ns tCLAYX ASYNC Hold to ClK 0 ns tAlVRlV AEm" AEN2 Setup to RDY1, RDY2 15 ns tCLA1X AEN1, AEN2 Hold to ClK 0 ns tYHEH CSYNC Setup to EFI 20 ns tEHYL CSYNC Hold to EFI 10 ns tYHYL CSYNC Width 2·tELEL ns tl1HCL RE'S Setup to ClK 65 ns (Note 1) tCLI1H RE'S Hold to ClK 20 ns (Note 1) 3-237 AFN-01472D inter 8284A18284A.1 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES Symbol Parameter Min. 8284A Min. 8284A·1 Max. Units Tesl Condilions tCLCL ClK Cycle Period 125 100 ns tCHCL ClK HIGH Time (Y. tCLCU+ 2 39 ns tCLCH ClK lOW Time (% tCLcd-1S 53 ns tCH1CH2 ClK Rise or Fall Time 10 ns 1.0V to 3.SV tCL2CL1 tpHPL PClK HIGH Time tCLCL -20 IcLtL -20 ns tpLPH PClK lOW Time tCLCL-20 IcLCl-20 ns .tRYlCL Ready Inactive to ClK (See Note 3) -B -8 ns tRYHCH Ready Active to ClK (See Note 2) (% tCLcd-1S 53 ns tCLIL ClK to Reset Delay 40 ns t CLPH ClK to PClK HIGH DELAY 22 ns tCLPL ClK to PClK lOW Delay 22 ns tOLCH OSC to ClK HIGH Delay -5 -S 22 ns tOLCL OSC to ClK lOW Delay 2 2 3S ns tOLOH Output Rise Time (except ClK) 20 ns From O.BV to 2.0V t OHOL Output Fall Time (except ClK) 12 ns From 2.0V to O.BV NOTES: 1. Setup and hold necessary only to guarantee recognition at next clock. 2. Applies only to T3 and TW states. 3. Applies only to T2 states. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT .,... VL = •. oav R,.L "" 3250 DEVICE UNDER TEST r-- I-= CL A.C. TESTING. INPUTS ARE DRIVEN AT 2.4V FOR A LOGIC "1" AND 0.45V FOR A LOGIC "0" TIMING MEASUREMENTS ARE MADE AT 1.5V FOR BOTH A LOGIC "1" AND "0." INPUT RISE AND FALL TIMES (MEASURED CL = 100pF FOR ClK BETWEEN 0.8V AND 2.0V) ARE 5± 2 NS CL = 30pF FOR READY 3·238 AFN-014720 8284A/8284A-1 WAVEFORMS CLOCKS AND RESET SIGNALS NAME EFI OSC ClK 0 PClK 0 CSYNC I RESET 0 _______________~/~----------------------------------------~~t= NOTE: ALL TIMING MEASUREMENTS ARE MADE AT 1.5 VOLTS, UNLESS OTHERWISE NOTED• .READY SIGNALS (FOR ASYNCHRONOUS DEVICES) ClK RDY1,2 READY tRYHCH 3-239 AFN-01472D inter 8284A1828.4A-~ WAVEFORMS (Continued) READY SIGNALS (FOR SYNCHRONOUS DEVICES) elK tR1VCL RDY1,2 READY tRYLCL X1 ClK I lOAD I (SEE NOTE 1) I 24MHZ~ )(2 Fie R, R2 1. CSYNC - - .J,. Clock High and Low Time (Using X1, X2) l PULSE GENERATOR I I EFI ClK I lOAD I (SEE NOTE 1) I VL Fie CSYNC ~ Clock High and Low Time (Using EFI) 3-240 AFN-Q1472D inter 8284A/8284A-1 Vee AEm ClK X1 24MHz CJ READY X2 RDY2 OSC R, A2 Fie AEN2 CSYNC -: -: R, = R2 = 51011 Rea,dy to Clock (Using X1, X2) t-1~--i EFI ClK I - - - - - i Fie AEN1 I - - - - - i RDY2 AElif2 CSYNC READYt-----I NOTES: Ready to Clock (Using EFI) 1 CL=100pF 2 CL=30pF 3-241 AFN-014720 8286/8287 OCTAL BUS TRANSCEIVER • Data Bus Buffer Driver for iAPX • 20-Pin Package with 0_3" Center 86,88,186,188, MCS-80™, MCS-8S™, and MCS-48™ Families • No Output Low Noise when Entering • High Output Drive Capability for or Leaving High Impedance State Driving System Data Bus • Fully Parallel 8-Bit Transceivers • Available in EXPRESS - Standard Temperature Range • 3-State Outputs - Extended Temperature Range The 8286 and 8287 are 8-bit bipolar transceivers with 3-state outputs. The 8287 inverts the input data at its outputs while the 8286 does not. Thus, a wide variety of applications for buffering in microcomputer systems can be met. AO Vee Ao Vce Al BO Al 130 Bl B1 B2 B2 B3 l!3 B4 B4 B5 Bs B6 as B7 DE ill GND T GND T Figure 1. Logic Diagrams Figure 2. Pin Configurations 3-242 intJ 8286/8287 "Table 1. Pin Description Symbol Type Name and FunctIon T I TransmIt: T is an input control signal used to control the direction of the transceivers. When HIGH, it configures the transceiver's Bo-B7 as outputs with Ao-A7 as inputs. T LOW configures Ao-A7 as the outputs with Bo-B7 serving as the inputs. OE I Output Enable: OE is an input control Signal used to enable the appropriate output driver (as selected by T) onto its respective bus. This signal is active LOW. Ao-A7 I/O Local Bus Data PIns: These pins serve to either present data to or accept data from the processor's local bus depending upon the state of the T pin. ~-~(8286) I/O System Bus Data PIns: These pins serve to either present data to or accept data from the system Bo-B7(8287) bus depending upon the state of the T pin. FUNCTIONAL"DESCRIPTION The 8286 and 8287 transceivers are 8-bit transceivers with Bo-B7 pins is driven onto the Ao-A7 pins. No output low high impedance outputs. With T active HIGH and OE ac- glltching will occur whenever the transceivers are enter- tive LOW, data at the Ao-A7 pins is driven onto the Bo-B7 ing or leaving the high impedance state. pins. With T inactive LOW and OE active L0W, data at the 3-243 AFN·01506D inter 8286/8287. TEST LOAD CIRCUITS 1.5V 1.5V 2.14V OUT ~= OUT 66Q OUT ~~'~ I 3OOPF • 1300 PF. 3·STATE TO VOL 3-STATE TO VOL SWITCHING B OUTPUT A OUTPUT B OUTPUT 1.SV 1.5V 2.2BV OUT 180Q OUT 90bQ OUT ~'" 1100 pF 3·STATE TO VOH 3·STATE TO VOH SWITCHING B OUTPUT A OUTPUT A OUTPUT ·200 pF for plastic 8286/8287 3-244 AFN·01S06D . inter 8286/8287 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................. O·C to lO·C tion of the device at these or any other conditions above Storage Temperature ............. - 65·C to + 150·C those indicated in the operational sections of this specifi- All Output and Supply Voltages ........ - 0.5V to + 7V cation is not implied. Exposure to absolute maximum All Input Voltages .................. - 1.0V to + 5.5V rating conditions for extended periods may affect device Power Dissipation .................... ; ..... 1 Watt reliability. D.C. CHARACTERISTICS (Vcc = +5V ±10%, TA= O°C to 70°C) Symbol Parameter Min Max Units Test Conditions Vc Input Clamp Voltage -1 V Ic= -5 mA Icc Power Supply Current-828l 130 mA -8286 160 mA IF Forward Input Current -0.2 mA V F =0.45V IR Reverse Input Current 50 ~ VR=5.25V VOL Output Low Voltage -BOutputs .45 V IOL =32 mA -A Outputs .45 V IOL = 16 mA V OH Outplrt High Voltage -BOutputs 2.4 V IOH=-5 mA -A Outputs 2.4 V IOH=-1 mA IOFF Output Off Current IF V OFF =0.45V IOFF Output Off Current IR VOFF=5.25V VIL Input Low Voltage -A Side 0.8 V Vee= 5.0V, See Note 1 -B Side 0.9 V Vee = 5.0V, See Note 1 V IH Input High Voltage 2.0 V Vee= 5.0V, See Note 1 F= 1 MHZ CIN Input Capacitance 12 pF V SIAS =2.5V, Vec=5V T A =25·C NOTE: 1. B Outputs-loL = 32 rnA, IOH = -5 rnA, CL = 300 pF": AOutputs-IOL = 16 rnA, IOH = :"1 rnA, CL = 100 pF. A.C. CHARACTERISTICS (Vcc = +5V ±10%, TA = O°C to lO°C) (See Note 2) Loading: B OutputS-IOL = 32 mA, IOH = -5 mA, CL = 300 pF" A Outputs-l oL = 16 mA, 10H = -1 mA, CL = 100 pF Svmbol Parameter Min Mex Units Test Conditions TIVOV Input to Output Delay Inverting 5 22 ns (See Note 1) Non-Inverting 5 30 ns TEHTV Transmit/Receive Hold Time 5 ns TTVEL Transmit/Receive Setup 10 ns TEHOZ Output Disable Time 5 18 ns TELOV Outout Enable Time 10 30 ns TOLOH Input, Output Rise Time 20 ns From 0.8 V to 2.0V TOHOL Input, Output Fall Time 12 ns From 2.0V to 8.0V "CL - 200 pF for plastiC 8286/8287 NOTE: 1. See waveforms and test load circuit on following page. 2. For Extended Temperature EXPRESS the Preliminary Maximum Values are TIVOV = 25 YS 22, 35 YS 30; TEHOZ = 25; TELOV = 50. 3-245 AFN·015060 8286/8287 WAVEFORMS INPUTS ______ \V ________________________________________ -JJ~~ C= / \ / 1\ -Tivov_ - TEHOZ - TELOV- r------------------------r--~I VOH- 1V OUTPUTS \/ _ _ _ _ _ _ _-J/i\\-__________+_.Jl VOL + .1V >-- - - - -- -----,~~ )I(~ ~ . _____ .T_T_VE_L__________ !oIOTE: 1. All timing measurements are made at 1.5V unless otherwise noted. so so 8287 8288 40 ~ 30 z ... u z >- >- ~ Q .. :!l Q 20 10 pF LOAD pF LOAD Output Delay versus Capacitance 3-246 AFN·01506D 8288 BUS CONTROLLER ,FOR iAPX 86, 88 PROCESSORS • Bipolar Drive Capability • Conflgurable for Use with an 1/0 Bus • Provides Advanced Commands • Multl·Master Facilitates Interface to One or Two Busses • Configurations Provides Wide Flexibility In System • - Standard Temperature Range Available In EXPRESS • 3·State Command Output Drivers - Extended Temperature Range The Intell> 8288 Bus Controller,is a 20-pin bipolar component for use with medium-to-Iarge iAPX 86, 88 processing systems. The bus controller provides command and control timing generation as well as bipolar bus drive capability while optimizing system performance. A strapping option on the bus controller configures it for use with a multi-master system bus and separate I/O bus. STA~:I !Milif STATUS lOB VCC DECODER -. iiii.iTC ;- S2- COM· MAND AMWC MulTIBUS'· ClK so SIGNAL 10RC COMMAND SIGNALS 51 52 GENER· iOWc ATOR AiOWc DT/R ¥C EliiDEN ALE DEN iNfA AEN CEN MiiDC INTA DTIR } ADDRESS LATCH. DATA AMWC IORC CONTROL CONTROL eLK AEN CONTRDL SIGNAL DEN TRANSCEIVER. AND MWTC AIOWC INPUT C E N - LOGIC GENER· MCEliiiiEiii INTERRUPT CONTROL ATOR ALE SIGNALS GND IOWC 10B- +5V GND Figure 2. Figure 1. Block Diagram Pin Configuration 3-247 8288 Table 1. Pin Description Symbol Type Name and Function Symbol Type Name and Function Vee Power: +5V supply. J AIOWC 0 Advanced I/O Write Command: The AIOWC issues an I/O Write Command GND Ground. earlier in the machine cycle to give 110 So, S" S2 I Status Input Pins: These pins are the devices an early indication of a write in- status input pins from the 8086, 8088 or struction'. Its timing is the same as a read 8089 processors. The 8288 decodes these command signal. AIOWe is active LOW. inputs to generate command and control 10WC 0 I/O Write Command: This command line signals at the appropriate time. When inatructs an I/O device to read the data on these pins are not in use (passive) they are the data bus. This signal Is active LOW. all HIGH. (Sea chart under Command and Control Logic.) 10RC 0 I/O Reed Command: This command line I instructs an I/O device to drive Its data CLK Clock: This is a clock signal from the onto the data bus. This signal is active 8284 clock geoerator and serves to estab- LOW. lish when command and control signals are generated. AMWC 0 Advanced Memory Write Com- mand: The AMWC issues a memory write ALE 0 Addre •• Latch Enable: This signal command earlier in the machine cycle to serves to strobe an address into the give memory devices an early indication address latches. This signal is active HIGH of a write instruction. Its timing is the and latching occurs on the falling (HIGH , same as a read command signal. AMWC is to LOW) transition. ALE is intended for active LOW. use with transparent 0 type latches. DEN MWTC 0 Memory Write Command: This com- 0 Data Enable: This signal serves to en- mand line instructs the memory to record able data transceivers onto either the the data present on the data bus. This local or system data bus. This signal is signal Is active LOW. active HIGH. MRDC 0 Memory Read Command: This com- DT/R 0 Data Transmlt/Racelve: ThiS signal es- mand line instructs the memory to drive tablishes the direction of data flow its data onto the data bus. This signal is through the transceivers. A HIGH on this active LOW. line indicates Transmit (write to I/O or memory) and a LOW indicates Receive INTA 0 Interrupt Acknowledge: This command (Read). line tells an interrupting device that its interrupt has been acknowledged and AEN I Address Enable: AEN enables command that it should drive vectoring information outputs of the 8288 Bus Controller at least onto the data bus. This Signal is active 115 ns after it becomes active (LOW). AEN LOW. going inactive immediately 3-stetes the command output drivers. AEN does not t.1CElPDEN 0 This is a dual function pin. affect the I/O command lines if the 8288 is MCE (lOB Is tied LOW):' Master Cascade in the I/O Bus mode (lOB tied HIGH). Enable occurs during an interrupt se- quence and serves to read a Cascade CEN I Command Enable: When this signal is Address from a master PIC (Priority Inter- LOW all 8288 command outputs and the rupt Controller) onto ,the data bus. The DEN and PDEN control outputs are forced MCE signal is active HIGH. to their inactive state. When this Signal is PDEN (lOB Is tied HIGH): Peripheral HIGH, these same outputs are enabled. Data Enable enables the data bus trans- lOB I Input/Output Bus Mode: When the lOB is ceiver for the I/O bus that DEN performs strapped HIGH the 8288 functions in the for the.§YSIem bus. PDEN is active LOW. I/O Bus mode. When it is strapped LOW, the 8288 functions in the System Bus mode. (See sections on I/O Bus and Sys- tem Bus modes). 3·248 AFN.()1504C intJ 8288 FUNCTIONAL DESCRIPTION iN'i'A (Interrupt Acknowledge) acts as an I/O read during an interrupt cycle. Its purpose Is to inform an Inter- Command and Control Logic rupting device that its interrupt Is being acknowledged and that it should place vectoring information onto the The command logic decodes the three 8086, 8088 or 8089 data bus. CPU status lines Single Bus 10B= High Whenever the processor's status lines go active HLT + TI. CBRO+ HPBROt Mulli-Master Mode RESB= Low 10B= High SYSB/RESB = High. (SYSB/RESB = Low + TI) • RESB Mode Only RESB= High ACTIVE STATUS CBRQ+ HLT + HPBRQ 10B=Low (1/0 Status + TI) • CBRQ + lOB Mode Only Memory Commands RESB= Low HLT+ HPBRQ «1/0 Status Commands) + 10B= Low (Memory Command) • lOB Mode RESB Mode SYSB/RESB = LOW)) • CBRQ RESB= High (SYSB/RESB = High) + HPBRQt + HLT . NOTES: * LOCK prevents surrender of Bus to any other arbiter, CRQLCK prevents surrender of Bus to any lower priority arbiter. "Except for HALT and Passive or IDLE SIalus. t HPBRO, Higher priority Bus request or BPRN = 1. t lOB Active Low. 2. RESB Acllve High. 3. + IS read as "OR" and· as "AND." 4. TI = Processor Idle SIalus 52, Si, SO = 111 5. HLT = Processor Halt Stalus 52, 51, SO = 011 3-259 AFN·00839D 8289 rD~ ..... CLOCK RDY2~ -=- AEN2 READY RDV1 ( XACK MULTI MASTER SYSTEM BUS j eLK AEN1 8289 BUS ARBITER MULTI MASTER CONTROL BUS HF"'-~h READY eLK ·cc .... CPU 1""A'o"'s,'1 ~L A~:~~: : STATUS (SO,SlS21 BUS AEN 8288 MULTI MASTER SYSTEM I I CONTROLLER COMMAND 1 .--- ALE IOBh CLK DEN DTIR _ BUS MUL TI·MASTER SYSTEM BUS PRO CESSOR CS ADDRESS STB I I - MULTI MASTER SYSTEM LATCH Loe AL BOS 82831 ADDRESS ~ BUS 8282 t20R3) I XCVR DISABLE I f e3 DTIR MULTI MASTER TRANSCEIVER SYSTEM 828618287 DATA (2) BUS Figure 7. Typical Medium Complexity CPU System -= 8284A )(ACK (1'0 BUS) ) - -____________ RDY1CLOC~DY2 ~ -- -------< XACK MULTI MASTER SYSTEM BUS ,OS AEN2 ARBITER __ . =---> MULTI MASTER CONTROL -------- BUS READY elK '0 COMMAND BUS ¢=: -- - MULTI MASTER ---~-~ _-_:~-~~=--->~~~~~NO '"' MULTI MASTER 110 BUS SYSTEM BUS ~ODDRESS '"' '0 DATA '"' Figure 8. _Typical Medium Complexity lOB System 3-260 AFN-00839D 8289 o AEN2 AEH1\>---------, 12IMA CLOCK ~~~~ENT B U S - - - - C - - - - - - l RDY2 R O Y 1 i - - - - - - - - t - - - - - - - - XACK MULTI MASTER SYSTEM SUS Vee SYSBJRESB RESIDENT COMMAND ; t - - - - - ' - - - - - - - - l MULTI MASTER SYSTEM BUS COMMAND BUS MULTI MASTER RESIOENT 8US SYSTEM BUS PROM OR DECOOER RESIDENT ADDRESS BUS t:===:::::'~====l \ MULTI MASTER SYSTEM ADDRESS BUS BUS t:=======~ RESIDENT DATA \ K~=='--~===~ 828618287 TRANSCEIVER (2) MULTI MASTER SYSTEM DATA BUS "BY ADDING ANOTHER 8289 ARBITER AND CONNECTING ITS AEN TO THE 8286 WHOSE AEN IS PRESENTLY GROUNDED, THE PROCESSOR COULD HAVE ACCESS TO TWO MULnMASTER BUSES Figure 9. 8289 Bus Arbiter Shown in System-Resident Bus Configuration 3-261 AFN-008390 8289 ABSOLUTE MAXIMUM RATINGS· "NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Temperature Under Bias ................ O·C to 70·C tion of the device at these or any other conditions above Storage Temperature, ............ -65·C to + 150·C those indicated in the operational sections of this specifi- All Output and Supply Voltages ........ - 0.5V to + 7V cation is not implied. Exposure to absolute maximum All Input Voltages .................. - 1.0V to + 5.5V rating conditions for extended periods may affect device Power Dissipation •........................ 1.5 Watt reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C, Vcc = +5V ±10%) Symbol Parameter Min. Max. Units Test Condition Vc Input Clamp Voltage -1.0 V Vcc=4.50V, Ic= -5 rnA I~ Input Forward Current -0.5 mA Vcc=5.50V, VF=0.45V IA Reverse Input Leakage Current 60 I'-A Vcc = 5.50, VA = 5.50 VOL Output Low Voltage BUSY,CBRQ 0.45 V IOl= 20 mA AEN 0.45 V IOl= 16 rnA BPRO,BREQ 0.45 V IOl= 10 mA VOH Output High Voltage BUSY,CBRQ Open Collector All Other Outputs 2.4 V IOH = 400 I'-A Icc Power Supply Current 165 mA V1l Input Low Voltage .8 V V1H Input High Voltage 2.0 V Cin Status Input Capacitance 25 pF Cin (Others) Input Capacitance 12 pF A.C. CHARACTERISTICS (Vcc = +5V ±10%, TA = O°C to 70°C) TIMING REQUIREMENTS Symbol Parameter Min. Max. Unit Test Condition TCLCl CLK Cycle Period . 125 ns TCLCH ClKLowTime 65 ns TCHCL CLK High Time 35 ns TSVCH Status Active Setu p 65 TClCl-l0 ns TSHCl Status Inactive Setup 50 TCLCL-l0 ns THVCH Status Active Hold 10 ns THVCl Status Inactive Hold 10 ns TBYSBl BUSYt tSetup to BClKt 20 ns TCBSBl CBROt tSetup to BClKi 20 ns TBlBl BClK Cycle Time 100 ns TBHCl BClK High Time 30 .65[TBlBlJ ns TClLL1 lOCK Inactive Hold 10 ns TClll2 lOCK Active Setup 40 ns TPNBL BPRNHto BClK Setup Time 15 ns TClSRl SYSB/RESB Setup 0 ns TClSR2 SYSB/RESB Hold 20 ns TIVIH Initialization Pulse Width 3TBLBL+ ns 3 TClCL 3-262 AFN·00839D 8289 A.C. CHARACTERISTICS (Continued) TIMING RESPONSES Symbol Parameter Min. Max. Unit Te.t Condition TBLBRL BCLK to BREQ DelayH 35 ns TBLPOH BCLK to BPROH (See Note 1) 40 ns TPNPO BPRNi tto BPROi tOe lay 25 ns (See Note 1) TBLBYL BCLK to BUSY Low 60 ns TBLBYH BCLK to BUSY Float (See Note 2) 35 ns TCLAEH CLK to AEN High 65 ns TBLAEL BCLK to AEN Low 40 ns TBLCBL BCLK to CBRQ Low 60 ns TRLCRH BCLK to CBRQ Float (See Note 2) 35 ns TOLOH Output Rise Time 20 ns From O.BV to 2.0V TOHOL Output Fall Time 12 ns From 2.0V to O.BV it Denotes that spec applies to both transitions of the signal. NOTES: \ 1. BCLK generates the first BPRO wherein subsequent BPRO changes lower in the chain are generated through BPRON. 2. Measured at .5V above GND. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 2.4 J S - - T E S T POINTS 0.45 -'x= DEVICE UNDER TEST ---r ':" CL = , •• pF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "'" AND 0 45V FOR A LOGIC "0" THE CLOCK IS DRIVEN AT 4.3V and 0.25V TIMING MEASUREMENTS ARE MADE AT' 5V FOR BOTH A LOGIC "'" AND "0" C L ", 100 pF INPUT RISE AND FALL TIMES (MEASURED BETWEEN O.BV AND 2 OV) ARE CL INCLUDES JIG CAPACITANCE DRIVEN AT 5±2 NS. 3-263 AFN·00839D intJ 8289 WAVEFORMS t1llm (SEE NOTE 1) AEli (SEE NOTE I) PROCESSOR eLK RELATED lUi eLk RELATED ....... (IfJR'O'1) NOTES: 1 LoCK ACTIVE CAN OCCUR' DURING ANY STATE, AS LONG AS THE RELATIONSHIPS SHOWN ABOVE WITH RESPECT TO THE CLK ARE MAINTAINED LciCK INACTIVE HAS NO CRITICAL TIME AND CAN BE ASYNCHRONOUS :cRlil:CK HAS NO CRITICAL TIMING AND IS CONSIDERED AN ASYNCHRONOUS INPUT SIGNAL GLITCHING OF SYSB/ReSe PIN IS PERMITTED DURING THIS TIME AFTER of> 2 OF Tl, AND BEFORE 01>1 OF T4, SYSB/RESB SHOULD BE STABLE 3 AEN LEADING EDGE IS RELATED TO BCLK, TRAIUNG EDGE TO CLK THE TRAIUNG EDGE OF AEN OCCURS AFTER BUS PRIORITY IS LOST ADDITIONAL NOTES: The signals related to ClK are typical processor signals, and do not relate to the depicted sequence of events of the Signals referenced to BCLK. The Signals shown related to the BClK represent a hypothetical sequence of events for Illustration. Assume 3 bus arbiters of priorities 1, 2 and 3 configured In serial priority resolving scheme as shown in Figure 6 Assume arbiter 1 has the bus and IS holding busy low. Arbiter #2 detect~rocessor wants the ~us and pulls low BREQ#2 If BPRN#2 is high (as shown), arbiter #2 Will pull low CBRa line. CBRa signals to the higher priority arbiter #1 that a lower Priority arbiter wants the bus. [A higher Priority arbiter would be granted BPRN when It makes the bus request rather than having to wait for another arbiter to release the bus through~.·· Arbiter #1 will relin· qUish the multl·master system bus when it enters a state not reqUiring it (see Table 1), by lowering Its BPRO#1 (tied to BPRN#2) and releaSing BUSY. Arbiter #2 now sees that it has priority from BPRN#2 being low and releases CBRa, As soon as BUSY signifies the bus is available (high), arbiter #2 pulls BUSY low on next failing edge of BClK. Note that If , arbiter #2 didn't want the bus at the time it received priority, it would pass priority to the next lower priOrity arbiter by lowering Its EiPROii2 [TPN POI ··Note that even a higher Priority arbtler which IS acquiring the bus through '§i5"R'N WIll momentanly drop CBR'Q until It has acqUired the bus 3-264 AFN·00839D iAPX286 Microprocessors 4 iAPX 286/10 HIGH PERFORMANCE MICROPROCESSOR WITH MEMORY MANAGEMENT AND PROTECTION • High Performance 8 and 10 MHz • Optional Processor Extension: Processor (Up to six times iAPX 86) -iAPX 286/20 High Performance 80-bit • Large Address Space: Numeric Data Processor -16 Megabytes Physical • Complete System Development -1 Gigabyte Virtual per Task Support: • Integrated Memory Management, Four- -Development Software: Assembler, Level Memory Protection and Support PLlM, Pascal, FORTRAN, and System for Virtual Memory and Operating Utilities Systems -In-Circuit-Emulator (ICE ™ -286) • Two iAPX 86 Upward Compatible • High Bandwidth Bus Interface Operating Modes: (8 or 10 Megabyte/Sec) -iAPX 86 Real Address Mode • Available in EXPRESS: -Protected Virtual Address Mode -Standard Temperature Range The iAPX 286/10 (80286 part 'number) is an advanced, high-performance microprocessor with specially optimized capabilities for multiple user and multi-tasking systems. The 80286 has built-in memory protection that supports operating system and task isolation as well as program and data privacy within tasks. A 10 MHz iAPX 286/1 0 provides up to six times greater throughput than the standard 5 MHz iAPX 86/10. The 80286 includes memory management capabilities that map up to 230 bytes (one gigabyte) of virtual address space per task into 224 bytes (16 megabytes) of physical memory. The iAPX 286 is upward compatible with iAPX 86 and 88 software. Using iAPX 86 real address mode, the 80286 is object code compatible with existing iAPX 86, 88 software. In protected virtual address mode, the 80286 is source code compatible with iAPX 86, 88 software and may require upgrading to use virtual addresses supported by the 80286's integrated memory management and protection mechanism. Both modes operate at full 80286 performance and execute a superset of the iAPX 86 and 88's instructions. The 80286 provides special operations to support the efficient implementation and execution of operating systems. For example, one instruction can end execution of one task, save its state, switch to a new task, load its state, and start execution of the neW task. The 80286 also supports virtual memory systems by providing a segment-not-present exception and restartable instructions. ....- ... lIRE. MIlO ~ PEREQ 1!iE'mY. HOLD lH.lIlI.CODIIIITA lllCK. HLOA RESET ClK V•• Vee CAP Figure 1. 80286 Internal Block Diagram Thefollowlng are trademarks of Intel Corporation and Its afflhatesand may be used only to Identify Intel products' BXP, CREDIT, ',ICE, leS, 1m, Inslte, Intel. INTEL,lntelsvlSlon, Intelhnk. ~~~~~~~~~:;~~::~~~~P~:~~~~h~S~~~~lr:n~~~~~:':"8~~~;~~~~~~.~~~~~~e:.~~~::u~:~~::~~~;:::~u~:~Y!~~~::~~~7:~~~!.:~~b~:~~:'::-rt~~~~t::e of Any Circuitry Other Than Circuitry Embodied In an Intel Product No Other Patent LlcenSfts are Implied ©INTEL CORPORATION, 1982 ORDER NUMBER 210253-001' , . 4-1 i~ iAPX 286/10 Component Pad View-As viewed from P.C. Board View-As viewed from the underside of component when mounted on component side of the P.C. board. the board. I, Ao A, A, elK Vee RESET A, [ HLDA coolfNTA MIii5 A13 18 A" PIN NO 1 MARKl NOTE: N.C. pads'must not be connected. Figure 2. 80286 Pin Configuration Table 1. Pin Description The following pin function descriptions are for the 80286 microprocessor: Symbol Type Name and Function elK I System Clock provides the fundamental timing for iAPX 286 systems. It is a 16 MHz signal divided by two inside the 80286 to generate the 8 MHz processor clock. The internal divide·by·two circuitry can be synchronized to an external clock generator by a lOW to HIGH transition on the RESET input.' 015.0 0 1/0 Data Bus inputs data during memory, 1/0, and interrupt acknowledge read cycles; outputs data during memory and 1/0 write cycles. The data bus is active HIGH and floats to 3-state OFF during bus hold acknowledge. A23-Ao 0 Address Bus outputs physical memory and 1/0 port addresses, AO is lOW when data is to be transferred on pins 07-0' A23-A16 are lOW during 1/0 transfers. The address bus is active HIGH and floats to 3-state OFF during bus hold acknowledge. BHE 0 Bus High Enable indicates transfer of data on the upper byte of the data bus, 01~Eighf-bit oriented devices assigne~the upper byte of the data bus would normally use SHE to con- dition chip select functions. SHE is active lOW and floats to 3-state OFF during bus h~ld acknowledge. BHE and AO Encodings BHEValue AOValue Function 0 0 Word transfer 0 1 Byte transfer on upper half of data bus (D15-S) 1 0 Byte transfer on lower half of data bus (D7-0) 1 1 'Reserved " 4-2 AFN-02060B iAPX 286/10 Table 1 Pin Description (Cont ) Symbol lYpe Name and Function 81,80 0 Bus Cycle Status indicates initiation of a bus cycle and, along with M/lQ and COD/INTA, defines the type of bus cycle. The bus is in aTs state whenever one or both are LOW. 81 and 80 arll active LOW and float to 3-state OFF during bus hold acknowledge. 80286 Bus Cycle Status Definition COOnNTA MilO 51 ' SO B.us cycle Initiated o(LOW) 0 0 0 Interrupt acknowledge 0 0 0 1 Reserved 0 0 1 0 Reserved 0 0 1 1 None, not a status cycle 0 1 0 0 IF AI = 1 then halt, else shutdown 0 1 0 1 Memory data read 0 1 1 0 Memory dafa wnte 0 1 1 1 None, not a status cycle 1 (HIGH) 0 0 0 Reserved 1 '0 0 1 1/0 read 1 0 1 0 1I0wnte 1 0 1 1 None, not a status cycle 1 1 0 0 Reserved 1 1 0 1 Memory Instruction read 1 1 1 0 Reserved 1 1 1 1 None, not a status cycle MIlO 0 . Memory/lO Select distinguishes memory access from 1/0 access. If HIGH during Ts, a memory cycle or a halt/shutdown cycle is in progress. If LOW, an 1/0 cycle or an interrupt acknowledge cycle is in progress. Miio floats to 3-state OFF during bus hold acknowledge. COD/INTA 0 Codellnterrupt Acknowledge distinguishes instruction fetch cycles from memory data read cycles. Also distinguishes interrupt acknowledge cycles from 1/0 cycles. COD/INTA floats to 3-state OFF during bus hold acknowledge. LOCK 0 Bus Lock indicates that other system bus masters are not to gain control ofthl'l system bus following the current bus cycle. The LOCK signal may be activated explicitly by the "LOCK" instruction prefix or automatically by 80286 hardware during memory XCHG instructions, interrupt acknowledge, or descriptor table access. LOCK is active LOW and floats to 3-state OFF during bus hold acknowledge. READY I Bus Ready terminates a bus cycle. Bus cycles are extended without limit until terminated by READY LOW. READY is an active LOW synchronous input requirinQ setup and hold times relative to the system clock be metforcorrect operation. READY is ignored during bus hold acknowledge. HOLD L Bus Hold Request and Hold Acknowledge control ownership of the 80286 local bus. The HOLD HLDA 0 input allows another local bus master to request control of the local bus. When control is granted, the 80286 will float its bus drivers to 3-state OFF and then activate HLDA, thus entering the bus hold acknowledge condition. The local bus will remain granted to the requesting master until HOLD becomes inactive which results in the 80286 deactivating HLDA and regaining control of the local bus. This terminates the bus hold acknowledge condition. HOLD may be asynchronous to the system clock. These signals are active HIGH. \ INTR I Interrupt Request requests the 80286 to sUiilpend its current program execution and service a pending external request. Interrupt requests are masked whenever the interrupt enable bit in the flag word is cleared. When the 80286 responds to an interrupt request, it performs two interrupt acknowledge bus cycles to read an 8-bit interrupt vector that identifies the source ot the interrupt. To assure program interruption, INTR must remain active until the first interrupt acknowledge cycle is completed. INTR is sampled at the beginning of each processor cycle and must be active HIGH at least two processor cycles before the current instruction ends in order to interrupt before the next instruction. INTR is level sensitive, active HIGH, and may be asynchronous to the system clock. NMI I Non-maskable Interrupt Request interrupts the 80286 with an internally supplied vector value of 2. No interrupt acknowledge cycles are performed. The interrupt enable bit in the 80286 flag word does not affect this input. The NMI input is active HIGH, may be asynchronous to the system clock, and is edge triggered after internal synchronization. For proper recognition, the input must have been previously LOW for at least four system clock cycles and remain HIGH for at least four system clock cycles. 4-3 AFN.()2060B inter iAPX 286/10 Table 1 Pin Description (Cont ) Symbol Type Name and Function PEREa I Processor Extension Operand Request and Acknowledge extend the memory management PEACK 0 and protection capabilities of the 80286 to processor extensions. The PEREa input requests the 80286 to perform a data operand transfer for a processor extension. The PEACK output signals the processor extension when the requested operand is being transferred. PEREa is active HIGH and may be asynchronous to the system clock. PEACK is active lOW. BUSY I Processor Extension Busy and Error indicate the operating condition of a processor extension to ERROR I the 80286. An active BUSY input stops 80286 program execution on WAIT and some ESC instruc- tions until BUSY becomes inactive (HIGH). The 80286 may be interrupted while waiting for BUSY to become inactive. An active ERROR input causes the 80286 to perform a processor extension inter- rupt when executing WAIT or some ESC instructions. These inputs are active lOW and may be asynchronous to the system clock. RESET I System Reset clears the internal logic of the 80286 and is active HIGH. The 80286 may be re- initialized at any time with a lOW to HIGH transition on RESET which remains active for more than 16 system clock cycles. During RESET active, the output pins of the 80286 enter the state shown below: 80286 Pin State During Reset Pin Value Pin Names 1 (HIGH) SO. SI. PEACK, A23-AO, SHE. LOCK o (LOW) MIlO, COD/INTA, HLDA 3-stateOFF 015-0 0 Operation of the 80286 begins after a HIGH to lOW transition on RESET. The HIGH to lOW transi- tion of RESET must be synchronous to the system clock. Approximately 50 system clock cycles are required by the 80286 for internal initializations before the first bus cycle to fetch code from the power-on execution address is performed. A lOW'to HIGH transition of RESET synchronous to the system clock, will begin a new processor cycle at the next HIGH to LOW transition of the system clock. The LOW to HIGH transition of RESET may be asynchronous to the system clock; however, in this case it can not be predetermined which phase of the processor clock will occur during 'the next system clock period. Synchronous lOW to HIGH transitions of RESET are only required for systems where the processor clock must be phase synchronous to another clock. Vss I System Ground: 0 VOLTS. VCC I System Power: + 5 Volt Power Supply. CAP I Substrate Filter Capacitor: a 0.04711f ± 20% 12V capacitor must be connected between this pin and ground. This capacitor filters the output of the internal substrate bias generator. A maximum DC leakage current of 1 l1a is allowed through the ca~acitor. For correct operation of the 80286, the substrate bias generator must charge this capacitor to its operating voltage. The capacitor chargeup time is 5 milliseconds (max.) after Vee and ClK reach their specified A9 and DC parameters. RESET may be applied to prevent spurious activity by the CPU during this time. After this time, the 80286 processor clock can be phase synchronized to another clock by pulsing RESET lOW synchronous to the system clock. 4-4 AFN·02060B iAPX 286/10 FUNCTIONAL DESCRIPTION Register Set Introduction The 80286 base architecture has fifteen registers as shown in Figure 3. These registers are grouped into the The 80286 is an advanced, high-performance micro- following four categories: processor with specially optimized capabilities for mUl- tiple user and multi-tasking systems. Depending on the application, the 80286's performance is up to six times faster than the standard 5 MHz 8086's, while providing General Registers: Eight 16-bit general purpose reg- complete upward software compatibility with Intel's iAPX isters used to contain arithmetic and logical operands. 86, 88, and 186 family of CPU's. Four of these (AX, BX, CX, and DX) can be used either in their entirety as 16-bit words or split into pairs of sep- The 80286 operates in two modes: iAPX 86 real address arate 8-bit registers. mode and protected virtual address mode. Both modes execute a superset of the iAPX 86 and 88 instruction set. In iAPX 86 real address mode programs use real ad- Segment Registers: Four 16-bit special purpose reg- dresses with up to one megabyte of address space. Pro- isters select, at any given time, the segments of memory grams use virtual addresses in protected virtual address that are immediately addressable for code, stack, and mode, also called protected mode. In protected mode, data. (For usage, refer to Memory Organization.) the 80286 CPU automatically maps 1 gigabyte of virtual addresses per task into a 16 megabyte real address space. This mode also provides memory protection to isolate the operating system and ensure privacy of each Base and Index Registers: Four of the general pur- tasks' programs and data. Both modes provide the same pose registers may also be used to determine offset ad- base instruction set, registers, and addressing modes. dresses of operands in memory. These registers may contain base addresses or indexes to particular loca- The following Functional Description describes first, the tions within a segment. The addressing mode deter- base 80286 architecture common to both modes, sec- mines the specific registers used for operand address ond, iAPX 86 real address mode, and third, protected calculations. mode. iAPX 286/10 BASE ARCHITECTURE Status and Control Registers: Three 16-bit special The iAPX 86,88,,186, and 286 CPU family all contain purpose registers record or control certain aspects of the same basic set of registers, instructions, and ad- the 80286 processor state. These include the Instruc- dressing modes. The 80286 processor is upward com- tion Pointer, which contains the offset address of the patible with the 8086, 8088, and 80186 CPU's. next sequential instruction to be executed. !: 16-BIT SPECIAL REGISTER REGISTER NAME FUNCTIONS 07 ,. 0 BYTE ADDRESSABLE AH AL O} 110MULTIPLY/DIVIDE CS ~ CODE SEGMENT SELECTOR INSTRUCTIONS (a·BIT DH DL OS DATA SEGMENT SELECTOR REGISTER NAMES CX CH CL ) LOOP/SHIFT/REPEAT COUNT SS' STACK SEGMENT SELECTOR SHOWN) BX BH' BL ES EXTRA SEGMENT SELECTOR } BASE REGISTERS BP SEGMENT REGISTERS SI } INDEX REGISTERS 01 F a "0 FLAGS SP ) STACK POINTER IP INSTRUCTION POINTER ,. MSW MACHINE STATUS WORD GENERAL REGISTERS STATUS AND CONTROL REGISTERS Figure 3. Register Set 4-5 AFN·02060B iAPX 286/10 STATUS FLAGS: CARRY PARITY AUXILIARY CARRY ZERO SIGN ,. OVERFLOW ~, 14 13 12 11 ,. 9 8 !7 1. 5 4 3 2 1 • FLAGS: 1\\\\\1 NT I IOPL I OF I OF I IF I TF I SF I ZF 1\\\\\1 AF 1\\\\\1 PF 1\\\\\1 CF I 1 CONTROL FLAGS: TRAP FLAG , INTERRUPT ENABLE DIRECTION FLAG SPECIAL FIELDS: 110 PRIVILE~E LEVEL NESTED TASK FLAG ~ INTEL RESERVED TASK SWITCH PROCESSOR EXTENSION EMULATED - - - - - - - ' MONITOR PROCESSOR eXTENSION _ _ _ _ _~ PROTECTION ENABLE - - - - - - - - ' Figure 3a. Status and Control Register Bit Functions Flags Word Description Table 2. Flags Word Bit Functions The Flags word (Flags) records specific characteristics Bit Name Function of the result of logical and arithmetic instructions (bits 0, Position 2, 4, 6, 7, and 11 ) and controls the operation of the 80286 0 CF Carry Flag-Set on high-order bit within a given operating mode (bits 8 and 9). Flags is a carry or borrow; cleared otherwise 16-bit register. The function of the flag bits is given in 2 PF Parity Flag-Set if low-order 8 bits Table 2. 01 result contain an even number of 1-bits; cleared otherwise Instruction Set 4 AF Set on carry from or borrow to the low order four bits of AL; cleared The instruction set is divided into (3even categories: data otherwise transfer, arithmetic, shift/rotate/ldgical, string manipula- 6 ZF Zero Flag-Set il result is zero; tion, control transfer, high level instructions, and pro- cleared otherwise cessor cont'rol. These categories are summarized in 7 SF Sign Flag-Set equal to high-order Figure 4. bit 01 result (0 if positive, 1 if negative) An 80286 instruction can reference zero, one, or two 11 OF Overflow Flag-Set if result is a too- operands; where an operand resides in a register, in the large positive number or a too-small negative number (excluding sign-bit) instruction itself, or in memory. Zero-operand instruc- to fit in destination operand; cleared tions (e.g. NOP and HLT) are usually 9ne byte long. One- otherwise operand instructions (e.g. INC and DEC) are usually two 8 TF Single Step Flag-Once set, a sin- bytes long but some are encoded in only one byte. One- . gle step interrupt occurs after the operand instructions may reference a registerer mem- next instruction executes. TF is ory location. Two-operand instructions permit the follow- cleared by the single step interrupt. ing six types of instruction operations: 9 IF Interrupt-enable Flag-When set, maskable interrupts will cause the -Register to Register CPU to transfer control to an inter- -Memory to Register rupt vector specified location. -Immediate to Register 10 OF Direction Flag-Causes string -Memory to Memory instructions to auto decrement -Register to Memory the appropriate index registers -Immediate to Memory when set. Clearing OF causes auto increment. 4-6 AFN·02060B intJ iAPX 286/10 Two-operand instructions (e.g. MOV and ADD) are usu- ally three to six bytes long. Memory to memory opera- ADDITION tions are provided by a special class of string instructions ADD Add byte or word requiring one to three bytes. For detailed instruction for- ADC Add byte or word with carry mats and encodings refer to the instruction set summary INC Increment byte or word by 1 at the end of this document. AAA ASCII adjust for addition DAA Decimal adjust for addition SUBTRACTION SUB Subtract byte or word GENERAL PURPOSE SBB Subtract byte or word with borrow MOV Move byte or word DEC Decrement byte or word by 1 PUSH Push word onto slack NEG Negate byte or word POP Pop word off stack CMP Compare byte or word PUSHA Push all registers on stack AAS ASCII adjust for subtraction POPA Pop all registers from stack DAS Decimal adjust for subtraction XCHG Exchange byte or word MULTIPLICATION XLAT Translate byte MUL Multiply byte or word unsigned INPI,JT/OUTPUT IMUL Integer multiply byte or word IN Input byte or word AAM ASCII adjust for multiply OUT Output byte or word DIVISION ADDRESS OBJECT DIV Divide byte or word unsigned LEA Load-effective address IDIV Integer diVide byte or word LOS Load pointer using OS AAD ASCII adjust for diviSion LES Load pointer using ES CBW Convert byte to word FLAG TRANSFER CWO Convert word to doubleword LAHF Load AH register from flags Figure 4b. Arithmetic Instructions SAHF Store AH register in flags PUSHF Push flags onto stack POPF Pop flags off stack Figure 4a. Data Transfer Instructions LOGICALS NOT "Not" byte ol'word AND "And" byte or word OR "Inclusive or" byte or word XOR "Exclusive or" byte or word MOVS Move byte or word string TEST "Test" byte or word INS Input bytes or word string SHIFTS OUTS Output bytes or word string SHUSAL Shift logical/arithmetic left byte or word CMPS Compare byte or word string SHR Shift logical right byte or word SCAS Scan byte or word string SAR Shift arithmetic right byte or word LODS Load byte or word string ROTATES STOS Store byte or word string ROL Rotate left bYte or word REP Repeat ROR Rotate right byte or word REPElREPZ Repeat while equal/zero RCL Rotate through carry left byte or word REPNE/REPNZ Repeat while not equal/not zero RCR Rotate through carry right byte or word Figure 4c. String Instructions Figure 4d. Shift/Rotate/Logical Instructions 4-7 AFN-Q2060B I. jnter iAPX 286/10 CONDITIONAL TRANSFERS UNCONDITIONAL TRANSFERS JAlJN6E Jump if above/not below nor equal CALL Call procedure JAE/JNB Jump if above or equal/not below RE:r Return from procedure JB/JNAE Jump if below/not above nor equal JMP Jump JBE/JNA Jump if pelow or equal/not above JC Jump if carry ITERATION CONTROLS JE/JZ Jump if equal/zero JG/JNLE Jump if greater/not less nor equal LOOP Loop JGE/JNL Jump if great!!r or equal/not less LOOPE/LOOPZ Loop if equal/zero JUJNGE Jump if less/not greater nor equal LOOPNE/LOOPNZ Loop if not equal/not zero JLE/JNG Jump if less or equal/not grealer' JCXZ Jump if register CX = 0 JNC Jump if not carry JNE/JNZ JUrl1P if not equal/not zero INTERRUPTS JNO Jump if not oyerflow JNP/JPO Jump if not parity/parity odd INT Interrupt JNS Jump if not sign INTO Interrupt if overflow JO Jump if overflow IRET Interrupt return JP/JPE Jump if parity/parity even JS Jump if sign Figure 4e. Program Transfer Instructions FL~C3 OPERATIONS l!IIemory Organizalion STC Set carry flag Memory is organizlild as sets of variable length seg- CLC Clear carry flag ments. Each s~gment is alinear contiguous sequence of up to 64K (2 16) S:bit bytes. Memory is addressed us- CMC Complement carry flag ing a two-component address (a pOinter) that consists STD Set direction flag of a 16-bit segment selector, and a 16-bit offset. The CLD Clear direction flag segment selector indicates the desired segment in STI Set interrupt enable flag memory. The offset component indicates the desired byte CLI Clear interrupt enable flag address within the sEilgment. EXTERNAL SYNCHRONIZATION HLT Halt until interrupt or reset WAIT Walt for BU$Y not active ~p t" ESC \ Escape to extension processor POINTER LOCK Lock bus during next instruction NO OPERATION I 31 SEGMENT I 1615 OFF,SET I 0 NOP No operation EXECUTION ENVIRONMENT CONTROL I OPERAND SELECTED SELECTED SEGMENT LMSW I Load machine status word SMSW I Store machine status word Figure 4f. Processor Control Instructions ENTER Format stack for procedure entry ... 'V ... 'V , LEAVE Restore stack for procedure exit MEMORY BOUND Detects values outside prescribed range Figure 4g. High Levellnstruct!ons Figure 5. T",o Component Address 4-S AFN-02060B iAPX 286/10 Table 3. Segment Register Selection Rules Memory Segment Register Implicit Segment Reference Needed Used Selection Rule Instructions Code (CS) Automatic with instruction prefetch Stack Stack (SS) All stack pushes and pops. Any memory reference which uses BP as a . base register. Local Data Data (OS) All data references except when relative to stack or string destination External (Global) Data Extra (ES) Alternate data segment and destination of string operation All instructions that address operands in memory must specify the segment and the offset. For speed and com- r---' pact instruction encoding, segment selectors are usu- I I ODE ~ ally stored in the high speed segment registers. An instruction need specify only the desired segment reg- MODULE A ister and an offset in order to address a memory operand. DATA Most instructions need not explicitly specify which seg- ment register is used. The correct segment register is CPU automatically chosen according to the rules of Table.3. CODE These rules follow the way programs are written (see MODULE B I-----=-=f-.., DATA CODE Figure 6) as independent modules that require areas for code and data, a stack, and access to external data areas. DATA Special segment override instruction prefixes allow the STACK implicit segment register selection rules to be overrid- PROCESS EXTRA den for special cases. The stack, data, and extra seg- STACK ments may coincide for simple programs. To access SEGMENT REGISTERS operands that do not reside in one of the four immedi- ately available segments, either a full 32-bit pointer can be used or a new segment selector must be loaded. PROCESS DATA BLOCK 1 Addressing Modes The 80286 provides a total of eight addressing modes for instructions to specify operands. Two addressing modes are provided for instructions that operate on reg- PFiO.CESSD DATA ister or immediate operands: BLOCK 2 Register Operand Mode: The operand is located in I I L ___ J one of the 8 or 16-bit general registers. MEMORY Immediate Operand Mode. The operand is included in the instruction. Figure 6. Segmented Memory Helps Structure Software Six modes are provided to specify the location 01 an op- erand in a memory segment. A memory operand ad- dress consists of two 16-bit components: segment Any carry out from the 16-bit addition is ignored. Eight- selector and offset. The segment selector is supplied by bit displacements are sign extended to 16-bit values. a segment register either implicitly chosen by the ad- Combinations of these three address elements define dressing mode or explicitly chosen by a segment over- the six memory addressing modes, described below. ride prefix. The bffset is calculated by summing any combination of the following three address elements: Direct Mode: The operand's offset is contained in the instruction as an 8 or 16-bit displacement element. the displacement (an 8 or 16-bit immediate value Register Indirect Mode: The operand's offset is in one contained in the instruction) of the registers SI, 01, BX, or BP. the base (contents of either the BX or BP base Based Mode: The operand's offset is the sum of an 8 or registers) 16-bit displacement and the contents of a base register the index (contents of either the SI or 01 index registers) (BXorBP). 4-9 AFN·Q2060B intJ iAPX 286/10 Indexed Mode: The operand's offset is the sum of an 8 or 16-bit di~placement and the contents of an index reg- ister (SI or 01). 7 0 Based Indexed Mode: The operand's offset is the sum SIGNED fTTTTTTT1 BYTE~ of the contents of a base register and an index register. SIGN BIT J L---J Based Indexed Mode with Displacement: The oper- MAGNITUDE and's offset is the sum of a base register's contents, an 7 0 UNSIGNED fT1TITTl'1 index r~ister's contents, and an 8 or 16-bit displacement. BYTE L.!........J ~ Data Types MAGNITUDE 1514+ 1 87 0 0 The 80286 directly sup~orts the following data types: s~~~g II " Ii" Ii" Ii" I Integer: A signed binary numeric value con- SIGN BIT.J IL.L.::;M::;;S:""AG""'N"'IT"'UD"'Eo---l tained in an 8-bit.byte or a 16-bit word. All operations assume a 2's comple- SIGNED 31 +,3 +2 1615 +1 0 ment representation. Signed 32 and 64- o~~~~~ II iii' iii iii Iii i I. iii Iii iii i I Iii i I bit integers are supported using the iAPX SIGN BIT j L.iL.::;M::::SB=-----rrMA"'G"'NI""TU"'O"'"E----....J 286/20 Numeric Data Processor. +7 +6 +5 +4 +3 +2 +1 SIGNED 63 48 47 3231 1615 Ordinal: An unsigned binary numeric value con- tained in an 8-bit byte or 16-bit word. w~~A~1I I I I SIGN BIT JL.,'-..::.M;.::.SB=------;:M"'AO""'N"'IT'-"UD""E,....-----' Pointer: A 32-bit quantity, composed of a seg- ment selector component and an offset 15 +1 0 component. Each component is a 16-bit UNS!;~~g Iii i i i iii iii Iii I I word. ,LMSB MAGNITUDE String: A contiguous sequence of bytes or BINARY 7 +N 0 7 +1 07 0 words. A string may contain from 1 byte CODED (TTT!"TiT1 lililiill"lj'li I to 64K bytes. DECIMAL L.!........J DI~~f N BCD BCD (BCD) DIGIT 1 DIGIT 0 ASCII: A byte representation of alphanumeric 7 +N 0 7 +1 07 0 and control characters using the ASCII ASCII~ lilllil'liI'l'ii I standard of character representation. ASCII ASCII ASCII CHARAcTERN CHARACTER, CHARACTERo BCD: A byte (unpacked) representation of the 7 +N 0 7 +1 07 0 0 PACKED (TTT!"TiT1 decimal digits 0-9. BCD L-L.J liiijilil'"j"') Packed BCD: A byte (packed) representation of two l--J l--J MOST LEAST decimal digits 0-9 storing one digit in SIGNIFICANT DIGIT SIGNIFICANT DIGIT each nibble of the byte. 7115 +N 0 7/15 +1 07115 0 0 Floating Point: A signed 32, 64, or 80-bit real number STRING~ ••• )ii'jilirill'"1 BYTEIWORDN BYTE/WORD 1 BYTE/WORD 0 representation. (Floating pOint operands 31 +3 +2 1EHs +1 0 are supported using the iAPX 286/20 Numeric Processor configuration.) POINTER I' iii' I iii i i i I ')1 i iii iii Iii ii' iii I I I Figure 7 graphically represents the data types sup- SELECTOR OFFSET 79+9 +8 +7 +6 +5 +4 +3 +2 +1 ported by the iAPX 286. FL~~~~ II SIGN BIT ..J~,_L--'L_L-....JL..---J'---'----J'---'----J'--"'" EXPONENT MAGNITUDE I/O Space 'Supported by IAPX 286120 NumeriC Data Processor Conflgurallon The I/O space consists of 64K 8-bit or 32K 16-bit ports. I/O instructions address the I/O space with either an 8- bit port address, specified in the instruction, or a 16-bit port address in the OX register. 8-bit port addresses are Figure 7. iAPX 286 Supported Data Types zero extended such that A1S-AS are Law. I/O port ad- dresses 00F8(H) through OOFF(H) are reserved. 4-10 AFN·02060B intJ iAPX 286/10 Table 4 Interrupt Vector Assignments Interrupt Return Address Function Related Before Instruction Number Instructions Causing Exception? Divide error exception 0 DIV,IDIV Yes Single step interrupt 1 All' NMI interrupt 2 All Breakpoint interrupt 3 INT INTO detected overflow exception 4 INTO No BOUND range exceeded exception 5 BOUND Yes Invalid opcode exception 6 Any undefined opcode Yes Processor extension not available exception 7 ESC or WAIT with Yes Reserved 8-15 Processor extension error interrupt 16 ESC or WAIT Reserved 17-31 User defined 32-255 Interrupts An interrupt transfers execution to a new program loca- the interrupt flag bit (IF) in the flag word. All 224 user- tion. The old program address (CS:IP) and machine state defined interrupt sources can share this input, yet they . (Flags) are saved on the stack to allow resumption can retain separate interrupt handlers. An 8-bit vector of the interrupted program. Interrupts, fall into three read by the CPU during the interrupt acknowledge se- classes: hardware initiated, INT instructions, and instruc- quence (discussed in System Interface section) identi- tion exceptions. Hardware initiated interrupts occur fies the source of the interrupt. ' in response to an external input and are classified Further maskable interrupts are disabled while servic- as non-maskable or maskable. Programs may cause ing an interrupt by resetting the IF but as part of the an interrupt with an INT instruction. Instruction excep- response to an interrupt or exception. The saved flag tions occur when an unusual condition, which pre- word will reflect the enable status of the processor prior vents further instruction processing, is detected while to the interrupt. Until the flag word is restored to the flag attempting to execute an instruction. The return ad- register, the interrupt flag will be zero unless specifically dress from an exception will always point at the in- set. ,The interrupt return instruction includes restoring struction causing the exception and include any leading the flag word, thereby restoring the original status of IF. instruction prefixes. A table containing up to 256 pointers defines the proper NON-MASKABLE INTERRUPT REQUEST (NMI) interrupt service routine for each interrupt. Interrupts 0- A non-maskable interrupt input (NMI) is also provided. 31, some of which are used for instruction exceptions, NMI has higher priority than INTR. A typical use of NMI are reserved. For ~ch interrupt, an 8-bit vector must be would be to activate a powSr failure routine. The activa- supplied to the 80286 which identifies the appropriate tion of this input causes an interrupt with an internally table entry. Exceptions supply the interrupt vector inter- supplied vector value of 2. No external interrupt ac- nally. INT instructions contain or imply the vector and knowledge sequence is performed. allow access to all 256 interrupts. Maskable hardware initiated Interrupts supply the 8-bit vector to the CPU While executing the NMI servicing procedure, the 80286 during an interrupt acknowledge bus sequence. Non- will service neither further NMI requests, INTR re- maskable hardware interrupts use a predefined inter- quests, nor the processor extension segment overrun nally supplied vector. interrupt until an interrupt return (IRET) instruction is ex- ecuted or the CPU is reset. If NMI occurs while currently servicing an NMI, its presence will be saved for servic- MASKABLE INTERRUPT (INTR) ing after executing the first IRET instruction. IF is cleared The 80286 -provides a maskable hardware interrupt re- at the beginning of an NMI interrupt to inhibit INTR quest pin, INTR. Software enables this input by setting interrupts. . 4-11 iAPX 286/10 SINGLE STEP INTERRUPT Table 6. 80286 Initial Register State after RESET The 80286 has an internal interrupt that allows pro- Flag word 0002(H) grams to execute one instruction at a time. It is called the Machine Status Word FFFO(H) single step interrupt and is controlled by the single step Instruction pointer FFFO(H) flag bit (TF) in the flag word. Once this bit is set, an inter- Code segment FOOO(H) nal single step interrupt will occur after the next instruc- Data segment OOOO(H) tion has been executed. The interrupt clears the TF bit Extra segment OOOO(H) and uses an internally supplied vector of 1. The IRET Stack segment OOOO(H) instruction is used to set the TF bit and transfer control to the next instruction to be single stepped. Machine Status Word Description The machine status word (MSW) records when a task Interrupt Priorities switch takes place and controls the operating mode of When simultaneous interrupt requests occur, they are the 80286. It is a 16-bit register of which the lower four processed in a fixed order as shown in Table 5. Interrupt bits are used. One bit places the CPU into protected processing involves saving the flags, return address, and mode, while the other three bits, as shown in Table 7, setting CS:IP to point at the first instruction of the inter- control the processor extension interface. After RESET, rupt handler. If other interrupts remain enabled they are this register contains FFFO(H) which places the 80286 processed before the first instruction of the current in- in iAPX 86 real address mode. terrupt handler is executed. The last interrupt processed is therefore the first one serviced. Table 7. MSW Bit Functions Bit Table 5. Interrupt Processing Order Name Function Position Order Interrupt 0 PE Protected mode enable places the 1 INT instruction or exception 80286 into protecTed mode and can not be cleared except by RESET. 2 Single step 1 MP ,Monitor Qrocessor extension al- 3 NMI iOws WAIT instructions to cause a 4 Processor extension segment overrun processor extension not present exception (number 7), 5 INTR 2 EM. Emulate processor extension causes a processor extension not Initi.alization and Processor Reset present exception (number 7) on ESC instructions to allow emulat- Processor initialization or start up is accomplished by ing a processor extension. driving the RESET input pin HIGH. RESET forces the 3 TS Task switched indicates the next 80286 to terminate all execution and local bus activity. mstruCtion using a processor ex- No instruction or bus activity will occur as long as RE- tension will cause excllPtion 7, al- SET is active. After RESET becomes inactive and an lowing software to test whether the internal processing interval elapses, the 80286 begins current processor extension con- execution in real address mode with the instruction at text belongs to the current task. physical location FFFFFO(H). RESET also sets some The LMSW and SMSW instructions can load and store registers to predefined values as shown as shown in the MSW in real address mode. The recommended use Table 6. of TS, EM, and MP is shown in Table 8. Table 8 Recommended MSW Encodings For Processor Extension Control Instructions TS MP EM Recommended Use Causing Exception 0 0 0 iAPX 86 real address mode only, Initial encoding after RESET, iAPX 286 operation None is identical to iAPX 86, 88. 0 0, 1 No processor extension is available. Software will emulate its function, ESC 1 0 1 No processor extension is available. Software will emulate its function, The current ESC processor extension context may'belong to another task. 0 1 0 A processor extension exists, None 1 1 0 A processor extension eXists. The current processor extension context may belong ESC or to another task, The exception on WAIT allows software to test for an error pending WAIT from a previous processor extension operation, 4-12 AFN·02060B iAPX 286/10 Halt The HLT instruction stops program execution and pre- vents the CPU from using the local bus until restarted. 15 0 Either NMI, INTR with IF = 1, or RESET will force the 80286 out of halt. If interrupted, the saved CS:IP will I OFFSET I 1.._ _ _ _ _ _....1 ADDRESS OFFSET point to the next instruction after the HLT. iAPX 86 REAL ADDRESS MODE The 80286 executes a fully upward-compatible superset SEGMENT ADDRESS of the 808,6 instruction set in real address mode. In real 1--'----' address mode the 80286 is object code compatible with 8086 and 8088 software. The real address mode archi- tecture (registers and addressing modes) is exactly as described in the iAPX 286/10 Base Architecture section of this Functional Oescription. Memory Size Physical memory is a cOntiguous Ij.rray of up to 1,048,576 bytes (one megabyte) addressed by pins Ao through A19 and SHE. A20 through A23 are ignored. 19 20-BIT PHYSICAL Memory Addressing MEMORY ADDRESS In real address mode the processor generates 20-bit physical addresses directly from a 20-bit segment base address and a 16-bit offset. Figure 8. iAPX 86 Real Address Mode Address The selector portion of a pointer is interpreted as the Calculation upper 16 bits of a 20-bit segment address. The lower four bits of the 20-bit segment address are always zero. Segment addresses, therefore, begin on multiples of 16 bytes. See Figure 8 for a graphic representation of ad- dress formation. FFFFFH RESET BOOTSTRAP All segments in real address mode are 64K bytes in size PROGRAM JUMP FFFFOH and may be read, written, or executed. An exception or interrupt can occur if data operands or instructions at- tempt to wrap around the end of a segment (e.g. a word ~~ ··· ~ ... 3FFH with its low order byte at offset FFFF(H) and its high INTERRUPT POINTER order byte at offset OOOO(H)). If, in real address mode, FOR vECTOR 255 3FOH the information contained in a segment does not use the full 64K bytes, the unused end of the segment may be ~~ " ··· ~~ overlayed by another segment to reduce physical mem- 7H ory requirements. INTERRUPT POINTER FOR VECTOR 1 4H Reserved Memory Locations INTERRUPT POINTER 3H FOR VECTOR 0 The 80286 reserves two fixed areas of memory in real OH address mode (see Figure 9); system initialization area and interrupt table area. Locations from addresses FFFFO(H) thorugh FFFFF(H) are reserved for system initialization. Initial execution begins at location FFFFO(H). Figure 9. IAPX 86 Real Address Mode Initially Locations OOOOO(H) through 003FF(H) are reserved for Reserved Memory Locations interrupt vectors. 4-13 AFNO()2060B inter Table 9. Real Address Mode Addressing Interrupts Function Interrupt Related Return Address Number Instructions Before Instruction? Interrupt table lil"(lit too small exception 8 INT vector is not within table limit Yes Processor extension segment overrun 9 ESC with memory operand extend- No interrupt ing beyond offset FFFF(H) Segment overrun exception 13 WOrd memory reference with offset Yes = FFFF(H) or an attempt to exe- cute past the end of a segment Interrupts PROTECTED VIRTUAL ADDRESS MODE Table 9 shows the interrupt vectors reserved for excep- The 80286 executes a fully upward-compatible superset tions and interrupts which indicate an addressing error. of the 8086 instruction set in protected virtual address The exceptions leave the CPU in the state existing be- mode (protected mode). Protected mode also provides fore attempting to execute the failing instruction (except memory management and protection mechanisms and for PUSH, POP, PUSHA, or POPA). Refer to the next associated instructions. -section on protected mode initialization for a discussion The 80286 enters protected virtual address mode from on exception 8. real address mode by setting the PE (Protection En- Protected Mode Initialization able) bit of the machine status word with the Load Ma- chine Status Word (LMSW) instruction. Protected mode To prepare the 80286 for protected mode, the LlOT in- offers extended physical' and virtual memory address struction is used to load the 24-bit interrupt table base space, memory protection mechanisms, and new oper- and 16-bit limit for the protected mode interrupt table. ations to support operating systems and virtual memory. This instruction can also set a base and limit for the in- terrupt vector table in real address mode. After reset, All registers, instructions, and addressing modes de- the interrupt table base is initialized to OOOOOO(H),and scribed in the iAPX 286/1 0 Base Architecture section of its size set to 03FF(H). These values are compatible this Functional Description remain the same. Programs with iAPX 86, 88 software. LlOT should only be exe- for the iAPX 86, 88, 186, and real address mode 80286 cuted in preparation for protected mode. can be run in protected mode; however, embedded con- stants for segment selectors are different. Shutdown Shutdown occurs when a severe error is detected that Memory Size prevents further instruction processing by the CPU. The protected mode 80286 provides a 1 gigabyte virtual Shutdown and halt are externally ~ignalled via a halt bus address space per task mapped into a 16 megabyte, operation. They can be distinguished by Al HIGH for halt physical address space defined by the address pins Aza- and Al LOW for shutdown. In real address mode, shut- Ao and SHE. The virtual address space may be larger down can occur under two conditions: than the physical address space since any use, of an address that does not map to a physical memory loca- '. Exceptions 8 or 13 happen and the lOT limit does not tion will cause a restartable exception. include the interrupt vector. • A CALL, INT, or POP instruction attempts to wrap Memory Addressing around the stack segment when SP is not even. As in real address mode, protected mode uses 32-bit An NMI input can bring the CPU out of shutdown if the pointers, consisting of 16-bit selector and offset com- lOT limit is at least OOOF(H) and 'SP is greater than ponents. The selector,'however, specifies an index into 0005(H), otherwise shutdown can only be exited via the a memory resident table rather than the upper 16-bits of RESET input. a real memory address. The 24-bit base address of the ( 4-14 AFN limit. Segment j 1 Writeable (W) W=O Data segment may not be written into. W-1 Data segment may be written into. 3 Executable (E) E=1 Cod, s.gmootD~rip\o, WP'"' 2 Conforming (C) C=1 Code segment may only be executed when CPL '" DPL. Code 1 Readable (R) R=O Code segment may not be read. Segment L 0 Accessed (A) R=1 A=O Code segment may be read. Segment has not been accessed. A=1 Segment selector has been loaded into segment register or used by selector test instructions. Figure 11. Code and Data Segment Descriptors 4-15 AFN.()2060B iAPX 286/10 Code and data are stored in two types of segments: •0 code segments and data segments. Both types are 07 identified and defined by segment descriptors. Code +7 INTEL RESERVED' +6 segm~nts are identified by the executable (E) bit set to +5 PIDPLlol tiEl I BASE23-16 +4 1 in the descriptor access rights byte. The access rights byte of both code and data segment descriptor types +3 BASE1S_O +2 have three fields in common: present (P) bit, Descriptor +1 LlMIT15_0 Privilege Level (DPL), and accessed (A) bit. If P = 0, any attempted use ofthis segment will cause a not-pres- 15 .7 • Must be sat to 0 for campalablllty with IAPX 386. ent exception. DPL specifies the privilege level of the segment descriptor. DPL effects when the descriptor may' be used by a task (refer to privilege discussion below). System Segment Descriptor Fields The A bit shows whether the segment has been previ- Name Value Description ously accessed for usage profiling, a necessity for vir- TYPE 1 Available Task State Segment tual memory systems. The CPU will always set this bit 2 Local Descriptor Table Descriptor 3 Busy Task State Segment when accessing the descriptor. P 0 Descriptor contents are not valid Data segments (S = 1, E = 0) may be either read-only or 1 Descriptor contents are valid read-write as controlled by the W bit of the access rights DPL 0-3 Descriptor Privilege Level byte. Read,only (W = 0) data segments may not be writ- BASE 24-bit Base Address of special system data ten into. Data segments may grow in two directions, as number segment in real memory determined by the Expansion Direction (ED) bit: up- LIMIT 16-bit Offset of last by1e in segment wards (ED = 0) for data segments, and downwards number (ED = 1) for a segment containing a stack. The limit field for a data segment descriptor is interpreted differently Figure 12. Special System Data Segment depending on the ED bit (see Figure 11). A code segment (S = 1, E = 1) may be execute-only or gates are used to specify interrupt service routines. The execute/read as determined by the Readable (R) bit. interrupt gate disables interrupts (resets IF) while the Code segments may never be written into and execute- trap gate does not. only code segments (R=O) may not be read. A code Figure 12 gives the formats for the special system data segment may also have an attribute called conforming segment descriptors. The descriptors contain a 24-bit (C). A conforming code segment may be shared by pro- base address of the segment and a 16-bit limit. The ac- grams that execute at different privilege levels. The DPL cess byte defines the type of descriptor, its state and of a conforming code segment defines the range of priv- privilege level. The descriptor contents are valid and the ilege levels at which the segment may be executed «efer segment is in physical memory if P = 1. If P = 0, the to privilege discussion below). segment is not valid. The DPL field is only used in Task State Segment descriptors and indicates the privilege SYSTEM CONTROL DESCRIPTORS level at which the descriptor may be used (see Privi- In addition to code and data segment descriptors, the lege). Since the Local Descriptor Table descriptor may protected mode 80286 defines system control descrip- only be used by a special privileged instruction, the DPL tors. These descriptors define special system data seg- field is not used. Bit 4 of the access byte is 0 to indicate ments and control transfer mechanisms in the protected that it is a system control descriptor. The type field spec- environment. The special system data segment de- ifies the descriptor type as indicated in Figure 12. scriptors define segments which contain tables of de- Figure 13 shows the format of the gate descriptors. The scriptors (Local Descriptor Table Descriptor) and descriptor contains a destination pointer that points to segments which contain the execution state of a task the descriptor of the target segment and the entry point (Task State Segment Descriptor). offset. The destination selector in an interrupt gate, trap The control transfer descriptors are call gates, task gates, gate, and call gate must refer to a code segment de- interrupt gates and trap gates. Gates provide a level of scriptor. These gate descriptors contain the entry pOint indirection between the source and destination of the to prevent a program from constructing and using an control transfer. This indirection allows the CPU to au- illegal entry point. Task gates may only refer to a task tomatically perform protection checks and control the state segment. Since task gates invoke a task switch, entry point of the destination. CaH gates are used to the destination offset is not used in the task gate. change privilege levels (see Privilege), task gates are Exception 13 is generated when the gate is used if a used to perform a task switch, and interrupt and trap destination selector does not refer to the correct de- 4-16 AFN-02060B iAPX 286/10 07 ception 11 if referenced. OPL is the descriptor privilege level and specifies when this descriptor may be used by +7 INTEL RESERVED· +6 a task (refer to privilege discussion below). Bit 4 must +5 pi DPL ioI TYPE I X X X(I WORD 4-0 COUNT +4 equal 0 to indicate a system control descriptor. The type field specifies the descriptor type as indicated in Figure +3 DESTINATION SELECTOR,S-, IX X +2 13. +1 DESTINATION OFFSET15-0 SEGMENT DESCRIPTOR CACHE REGISTERS 15 • 7 A segment descriptor cache register is assigned to each *MUBt be ••t to 0 for compatability with lAPX 388. of the four segment registers (CS, SS, OS, ES). Seg- ment descriptors are automatically loaded (cached) into Gate Descriptor Fields a segment descriptor cache register (Figure 14) when- Name Value Description ever the associated segment register is loaded with a . 4 -Call Gate selector. Only segment descriptors may be loaded into 5 -Task Gate segment descriptor cache registers. Once loaded, all TYPE 6 -Interrupt Gate references to that segment of memory use the cached 7 -Trap Gate descriptor information instead of reaccessing memory. P 0 -Descriptor Contents are not The descriptor cache registers are not visible to pro- valid grams. No instructions exist to store their contents. They 1 -Descriptor Contents are valid only change when a segment register is loaded. DPL 0-3 Descriptor Privilege Level SELECTOR FIELDS WORD Number of words to copy A protected mode selector has three fields: descriptor COUNT from callers stack to called entry index, local or global descriptor table indicator (TI), 0-31 procedures stack. Only used with call gate. and selector privilege (RPL) as shown in Figure 15. These fields select one of two memory based tables of descrip- Selector to the target code segment (Call, Interrupt or tors, select the appropriate table entry and allow high- DESTINATION 16-bit speed testing of the selector's privilege attribute (refer Trap Gate) SELECTOR selector Selector to the target task to privilege discussion below). state segment (Task Gate) SELECTOR DESTINATION 16-bit Entry point within the target OFFSET offset code segment Figure 13. Gate Descriptor Format I,15 ! INDEX ! ! • I 7 ! ! , 1 0 BITS NAME FUNCTION scriptor type. The word count field is used in the call gate 1-0 REQUESTED INDICATES SELECTOR PRIVILEGE PRIVILEGE LEVEL DESIRED descriptor to indicate the number of parameters (0-31 LEVEL words) to be automatically copied from the caller's stack (RPL) to the stack of the called routine when a control transfer 2 TABLE TI = 0 USE GLOBAL DESCRIPTOR TABLE INDICATOR (GDT) changes privilege levels: The word count field is not used (TI) TI = 1 USE LOCAL DESCRIPTOR TABLE by any other gate descriptor. (LOT) 15-3 INDEX SELECT DESCRIPTOR ENTRY IN TABLE The access byte format is the same for all gate descrip- tors. P = 1 indicates that the gate contents are valid. P = 0 indicates the contents are not valid and causes ex- Figure 15. Selector Fields PROGRAM VISIBLE r - - -- - - - - - pRotlRAMrnv'7S,;L;- - - - - - - - - --, I ACCESS I SEGMENT SELECTORS I RIGHTS SEGMENT BASE ADDRESS SEGMENT SIZE ~~!II15 SEGMENT REGISTERS (LOADED BY PROGRAM) o 147 I L __________ 4039 I 1615 SEGMENT DESCRIPTOR CACHE REGISTERS ~O~:"~Y~P~ _ _ _ _ _ _ _ _ _ _ J I I Figure 14. Descriptor Cache Registers 4-17 AFN'()2060B iAPX 286/10 LOCAL AND GLOBAL DESCRIPTOR TABLES' o7 Two tables of descriptors, called descriptor tables, con- tain all descriptors accessible by a task at any given time. +5 . INTEL RESERVED· I BASE23-16 +4 BASE15_0 A descriptor table is a linear array of lip to 8192 descrip- +3 +2 tors. The upper 13 bits of the selector value are an index +1 LlMIT15-0 into a descriptor table. Each table has a 24-bit base reg- 15 8 7 ister to locate the descriptor table in physical memory "Must,be set to 0 for compatablllty with IAPX 386. and a 16-bit limit register that confine descriptor access to the defined limits of the table as shown in Figure 16. A Figure 17. Global Descriptor Table and Interrupt restartable exception (13) will occur if an attempt is made Descriptor Data Type to reference a descriptor outside the table limits. One table, called the Global Descriptor Table (GDT), INTERRUPT DESCRIPTOR TABLE contains descriptors available to all tasks. The other ta- The protected mode 80286 has a third descriptor table, ble, called the Local Descriptor Table (LDT). contains called the Interrupt Descriptor Table (IDT) (see Figure descriptors that can be private to a task. Each task may 18), used to define up to 256 interrupts. It may contain have its own private LDT. The GDT may contain all de- only task gates, interrupt gates and trap gates. The IDT scriptor types except interrupt and trap descriptors. The (I nterrupt Descriptor Table) has a 24-bit base and 16-bit LDT may contain only segment, task gate, and call gate limit register in the CPU. The protected LlDT instruction descriptors. A segment cannot be accessed by a task if loads these registers with a six byte value of identical its segment descriptor does not exist in either descriptor form to that of the LGDT instruction (see Figure 17 and table at the time of access. . Protected Mode Initialization). 'V MEMORY 'V CPU ~ '~ r" " MEMORY ,'"V 15 0 .~ GATE FOR 23 INTERRUPT #n GATE FOR I GOT BASE INTERRUPT #n-1 15 0 ··· INTERRUPT DESCRIPTOR s~ LOT LDT1 CPU TABLE SELECTOR (lOT) 1 15 0 GATEFQR r--~----;;l '~I r CURRENT LOT I lOT LIMIT INTERRUPT #1 I I 23 LOT LIMIT iT GATE FOR I INTERRUPT #0 lOT BASE :I I LOT BASE r+- ---1 I LDTn 23 0 ~ ~ I PROGRAM INVISIBLE I L _______ J Figure 18. Interrupt Descriptor Table Definition J References to IDT entries are made via INT instruc- tions, external interrupt vectors, or exceptions. The IDT Figure 16. Local and Global Descriptor must be at least 256 bytes in size to allocate space for Table Definition all reserved interrupts. The LGDT and LLDT instructions load the base and limit of the global and local descriptor tables. LGDT and LLDT Privilege are protected. They may only be executed by trusted The 80286 has a four-level hierarchical privilege system programs operating at level O. The LGDT instruction loads which controls the use of privileged instructions and ac- a six byte field containing the 16-bit table limit and 24-bit cess to descriptors (and their associated segments) within base address of the Global Descriptor Table as shown a task. Four-level privilege, as shown in Figure 19, is an in Figure 17. The LLDT instruction loads a selector which extension of the user/supervisor mode commonly found refers to a Local Descriptor Table descriptor containing in minicomputers. The privilege levels are numbered 0 the base address and limit for an LDT, as shown in Fig- through 3. Level 0 is the most privileged level. Privilege ure 12. 4-18 AFN-02060B iAPX 286/10 which a task may access the descriptor. Descriptors with DPL = 0 are the most protected. Only tasks executing at privilege level 0 (CPL = 0) may access them. De- CPU scriptors with DPL = 3 are the least protected (i.e. have ENFORCED SOFlWARE the least restricted access) since tasks can access them INTERFACES when CPL = 0,1,2, or 3. This rule applies to all descrip- tors, except LDT descriptors. SELEPOR PRIVILEGE HIGH SPEED OPERATING Selectbr privilege is specified by the Requested Privi- SYSTEM INTERFACE lege Level (RPL) field in the least significant two bits of a selector. Selector RPL may establish a less trusted priv- ilege level than the current privilege level for the use of a selector. This level is called the task's effective privilege level (EPL). RPL can only reduce the scope of a task's access to data with this selector. A task's effective privi- lege is the numeric maximum of RPL and CPL. A selec- tor with RPL = 0 imposes no additional restriction on its Figure 19. Hierarchical Privilege Levels use while a selector with RPL = 3 can only refer to seg- ments at privilege Level 3 regardless of the task's CPL. levels provide protection within a task. (Tasks are iso- RPL is generally used to verify that pOinter parameters lated by providing private LDTs for each task.) Operat- pass'ed to a more trusted procedure are not allowed to ing system routines, interrupt handlers, and other system use data at a more privileged level than the caller (refer software can be included and protected within the vir- to pointer testing instructions). tual address space of each task using the four levels of privilege. Tasks may also have a separate stack for e,ach privilege level. Descriptor Access and Privilege Validation I Tasks, descriptors, and selectors have a privilege level Determining the ability of a task to access a segment involves the type of segment to be accessed, the in- attribute that determines whether the descriptor may be used. Task privilege effects the use of instructions and struction used, the type of descriptor used and CPL, descriptors, Descriptor and selector privilege only effect RPL, and DPL. The two basic types of segment ac- cesses are control transfer (selectors loaded into CS) access to the descriptor. and data (selectors loaded into DS, ES or SS). TASK PRIVILEGE A task always executes at one of the four privilege levels. DATA SEGMENT ACCESS The task privilege level at any specific instant is called Instructions that load selectors into DS and ES must the Current Privilege Level (CPL) and is defined by the referto a data segment descriptor or readable code seg- lower two bits of the CS register. CPL cannot change ment descriptor. The CPL of the task and the RPL of the during execution in a single code segment. A task's CPL selector must be the same as or. more privileged (nu- may only be changed by control transfers through gate merically equal to or lower than) than the descriptor DPL. descriptors to a neW code segment (See Control Trans- In general, a task can only access data segments at the fer). Tasks begin executing at the CPL value specified same or less privileged levels than the CPL or RPL by the code segment when the task is initiated via a task (whichever is numerically higher) to prevent a program switch operation. A task executing at Level 0 can access from accessing data it cannot be trusted to use. all data segments defined in the GDT and the task's LDT and is considered the most trusted level. A task execut- An exception to the rule is a readable conforming code ing at Level 3 has the most restricted access to data and segment. This type of code segment can be read from is considered the least trusted level. any privilege level. If the privilege checks fail (e.g. DPL is numerically less DESCRIPTOR PRIVII-EGE than the maximum of CPL and RPL) or an incorrect type I . Descriptor privilege is specified by the Descriptor Privi- of·descriptor is referenced (e.g. gate descriptor or exe- lege Level (DPL) field of the descriptor access byte. DPL cute only code segment) exception 13 occurs. Ifthe seg- specifies the least trusted task privilege level (CPL) at ment is not present, exception 11 is generated. 4-19 AFN-02060B iAPX 286/10 Instructions that load selectors into SS must refer to data State Segment descriptor causes a task switch (see Task segment descriptors for writable data segments. The Switch Operation). Reference to a Task State Segment descriptor privilege (DPL) and RPL must equal CPL. All descriptor at a more privileged level than the task's CPL other descriptor types or a privilege level violation will generates exception 13. cause exception 13. A not present fault causes excep- When an instruction or interrupt references a gate de- tion 12. scriptor, the gate DPL must have the same or less privi- lege than the task CPL. If DPL is at a more privileged . CONTROL TRANSFER level than CPL, exception 13 occurs. If the destination Four types of control transfer can occur when a selector selector contained in the gate references a code seg- is loaded into CS by a control transfer operation (see ment descriptor, the code segment descriptor DPL must Table 10). Each transfer type can only occur ilthe oper- be the same or more privileged than the task CPL. If not, < ation which loaded the selector references the correct Exception 13 is issued. After the control transfer, the descriptor type. Any violation of these descriptor usage code segment descriptors DPL is the task's new CPL. If rules (e.g. JMPthrough a call gate or RET to a Task State the destination selector in the gate references a task Segment) will cause exception 13. state segment, a task switch is automatically performed The ability to reference a descriptor for control transfer (see Task Switch Operation). is also subject to rules of privilege. A CALL or JUMP The privilege rules on control transfer require: instruction may only reference a code segment descrip- -JMP or CALL direct to a code segment (code seg- tor with DPL equal tothe task CPL or a conforming seg- ment descriptor) oan only be to a conforming segment ment with DPL of equal or greater privilege than CPL. with DPL of equal or greater privilege than CPL or a The RPL of t~e selector used to reference the code de- non-conforming segment at the same privilege level. scriptor must have as much privilege as CPL. -interrupts within the task or calls that may change RET and IRET instructions may only reference code privilege levels, can only transfer control through a segment descriptors with descriptor privilege equal to or gate at the same or a less privileged level than CPL to less privileged than the task CPL. The selector loaded a code segment at the same or more privileged level into CS is the return address from the stack. After the than CPL. return, the selector RPL is the task's new CPL. If CPL changes, the old stack pointer is popped after the return -return instructions that don't switch tasks can only re- address. turn control to a code segment at the same or less privileged level. When a JMP or CALL references a Task State Segment descriptor, the descriptor DPL must be the same or less -task switch can be performed by a call, jump or inter- privileged than the task's CPL. Reference to a valid Task rupt which references either a task gate or task state segment at the same or less privileged level. Table 10. Descriptor Access Rules for Control Transfer Descriptor Descriptor Control Transfer Types Operation Types Referenced Table lntersegment within the same privilege level JMP, CALL, RET, IRET' Code Segment GOT/LOT Intersegment to the same or higher privilege level Interrupt CALL Call Gate GOT/LOT within task may change CPl. Interrupt Instruction, Trap or lOT Exception, External Interrupt Interrupt Gate Intersegment to a lower privilege level (changes task CPL) RET,IRET' Code Segment GOT/LOT CALL,JMP Task State GOT Segment CALL,JMP Task Gate GOT/LOT Task Switch IRET" Interrupt Instruction, Task Gate lOT Exception, External Interrupt 'NT (Nested Task bit of flag word) = 0 "NT (Nested Task bit of flag word) = 1 4-20 AFN-02060B iAPX 286/10 PRIVILEGE LEVEL CHANGES Table 11 Any control transfer that changes CPL within the task, Segment Register Load Checks causes a change of stacks as part of the operation. Initial Exception Error Description values of SS:SP for privilege levels 0, 1, and 2 are kept Number in the task state segment (refer to Task Switch Opera- Descriptor table limit exceeded 13 tion). During a JMP or CALL control transfer, the new Segment descriptor not-present 11 or 12 stack pOinter is loaded into the SS and SP registers and Privilege rules violated 13 the previous stack pointer is pushed onto the new stack. Invalid descriptor/segment type seg- When returning to the original privilege level, its stack is ment register load: restored as part of the RET or IRET instruction opera- -Read only data segment load to tion. For subroutine calls that pass ,parameters on the SS stack and cross privilege levels, a fixed number of words, -Special control descriptor load to as specified in the gate, are copied from the previous OS, ES,SS 13 -Execute only segment load to stack to the current stack. The inter-segment RET in- OS, ES,SS struction with a stack adjustment value will correctly re- -Data segment load to CS store the previous stack pointer upon return. -Read/Execute code segment load to SS Protection The 80286 includes mechanisms to protect critical in- Table 12 Operand Reference Checks structions that affectthe CPU execution state (e.g. HLT) Exception and code or data segments from improper usage. These Error Description Number mechanisms are grouped under the term "protection" Write into code segment 13 and have three forms: Read from execute-only code Restricted usage of segments (e.g. no write allowed segment 13 Write to read-only data segment 13 to read-only data segments). The only segments Segment limit exceeded' 120r13 available for use are defined by descriptors in the Lo- Note 1: Carry out in offset calculations is ignored. cal Descriptor Table (LOT) and Global Descriptor Ta- ble (GOT). Table 13. Privileged Instruction Checks Restricted access to segments via the rules of privi- Exception lege and descriptor usage. Error Description Number Privileged instructions or operations that may only be CPL '" 0 when executing the following executed at certain privilege levels as determined by instructions: 13 the CPL and 1/0 Privilege Level (IOPL). The 10PL is LlDT, LLDT, LGDT, LTR, LMSW, CTS,HLT defined by bits 14 and 13 of the flag word. CPL > IOPL when executing the fol- These checks are performed for all instructions and can lowing instructions: 13 be split into three categories: segment load checks (Ta- INS, IN, OUTS, OUT, STI, CLI, ble 11), operand reference checks (Table 12), and privi- LOCK leged instruction checks (Table 13). Any violation of the rules shown will result in an exception. A not-present EXCEPTIONS exception related to the stack segment causes excep- The 80286 detects several types of exceptions and in- tion 12. terrupts, in protected mode (see Table 14). Most are re- The IRET and POPF instructions do not perform some startable after the exceptional condition is removed. of their defined functions if CPL is not of sufficient privi- Interrupt handlers for most exceptions receive an error lege (numerically small enough). No exceptions or other code, pushed on the stack after the return address, that indication are given when these conditions occur. identifies the selector involved (0 if none). The return address normally pOints to the failing instruction, includ- The IF bit is not changed if CPL > 10PL. ing all leading prefixes. For a processor extension seg- The 10PL field of the flag word is not changed if CPL ment overrun exception, the return address will not point >0. at the ESC instruction that caused the exception; how- ever, the processor extension registers-may contain the address of the failing instruction. 4-21 AFN·02060B iAPX 286/10 Table 14. Protected Mode Exceptions Return Interrupt Always Error Address Function Restart- Code Vector At i:ailing able? on Stack? Instruction? 8 Double exception detected Yes No Yes 9 Processor extension segment overrun No No No 10 Invalid task state segment Yes Yes Yes 11 Segment not present Yes Yes Yes 12 Stack segment overrun or segment not present Yes Yes 1 Yes 13 General protection Yes No Yes Note 1: When a PUSHA or POPA instruction attempts to wrap around the stack segment, the machine state after the exception will not be restartable. This condition is identified by the value 01 the saved SP being either OOOO(H), 0001 (H); FFFE(H), or FFFF(H). All these checks are performed for all instructions and When a CALL or INT instruction initiates a task switch, can be split into three categories: segment load checks the old and new TSS will be marked busy and the back (Table 11), operand reference checks (Table 12), and link field of the new TSS set to the old TSS selector. The privileged instruction checks (Table 13). Any violation of NT bit of the new task is set by CALL or INT initiated task the rules shown will result in an exception. A not-present switches. An interrupt that does not cause a task switch exception related to the stack segment causes excep- will clear NT. NT may also be set or cleared by POPF or tion 12. IRET instructions .. The task state segment is marked busy by changing the Special Operations descriptor type field from Type 1 to Type 3. Use of a TASK SWITCH OPERATION selector that references a busy task state segment causes The 80286 provides a built-in task switch operation which Exception 13. saves the entire 80286 execution state (registers, ad- dress space, and a link to the previous task), loads a PROCESSOR EXTENSION CONTEXT SWITCHING new execution state, and commences execution in the The context of a processor extensiof) (such as the 80287 new task. Like gates, the task switch operation is in- numerics processor) is not changed by the task switch voked by executing an inter·segment JMP or CALL in- operation. A processor extension context need only be struction which refers to a Task State Segment (TSS) or changed when a different task attempts to use the pro- task gate descriptor in the GDT or LOT. An INT n instruc- cessor extension (which still contains the context of a tion, exception, or external interrupt may also invoke the previous task). The 80286 detects the first use of a pro- task switch operation by selecting a task gate descriptor cessor extension after a task switch by causing the pro- in the associated IDT descriptor entry. cessor extension not present exception (7). The interrupt The TSS descriptor points at a segment (see Figure 20) handler may then decide whether a context change is containing the entire 80286 execution state while a task necessary. gate descriptor contains a TSS selector. The limit field Whenever the 80286 switches tasks, it sets the Jask must be > 002B(H). Switched (TS) bit of the MSW. TS indicates that a pro- Each task must have a TSS associated with it. The cur- cessor extension context may belong to a different task rent TSS is identified by a special register in the 80286 than the current one. The processor extension not pres- called the Task Register (TR). This register contains a ent exception (7) will occur when attempting to execute selector referring to the task state segment descriptor an ESC or WAIT instruction if TS = 1 and a processor that defines the current TSS. A hidden .base and limit extension is present (MP = 1 in MSW). register associated with TR are loaded whenever TR is loaped with a new selector. POINTER, TESTING INSTRUCTIONS The IRET instruction is used to return control to the task The iAPX 80286 provides several instructions to speed that called the current task or was interrupted. Bit 14 in pointer testing and'consistency checks for maintaining the flag register is called the Nested Task (NT) bit. It system integrity (see Table 15). These instructions use controls the function of the IRET instruction. If NT = 0, the memory management hardware to verify that a se- the IRET instruction performs the regular current task lector value refers to an appropriate segment without return; when Nl' = 1, IRETperforms a task switch op- risking an exception. A condition flag indicates whether eration back to the previous task. use of the selector or segment will cause an exception. 4-22 AFN'()2060B inter iAPX 286/10 ~ ~ CPU INTEL RESERVED TYPE DESCRIPTION plrHTYP~1 TASK REGISTER BASE23-16 1 AN AVAILABLE TASK STATE SYSTEM -.. SEGMENT }i TRC]---- SEGMENT. MAV BE USED AS DESCRIPTOR THE DESTINATION OF A TASK 15 0 BASE15-0 SWITCH OPERATION. r---------., I PROGRAM INVISIBLE I 3 A BUSV TASK STATE SEGMENT. LlM1T15_0 CANNOT BE USED AS THE I 15 0 I ~ DESTINATION OF A TASK H I I SWITCH. I ------ ------------ _...J :I IL _ 23 BASE 0 I ~~ ~ __ --- --' 15 0 I'BVTE OFFSET TASK LOT SELECTOR .2 OS SELECTOR .0 P DESCRIPTION 1 BASE AND LIMIT FIELDS ARE VALID S5 SELECTOR 38 0 SEGMENT IS NOT PRESENT IN CSSELECTOR 36 MEMORY. BASE AND LIMIT ARE NOT DEFINED ES SELECTOR 3. 01 32 SI 30 BP 28 CURRENT TASK SP 26 STATE BX 2. TASK OX 22 STATE SEGMENT CX 20 AX 18 FLAG WORD 16 IP (ENTRV POINT) SS FORCPL2 "12 SP FOR CPL 2 10 Ss FOR CPL 1 8 INITIAL STACKS SP FOR CPL 1 6 FOR CPL 0,1,2 SS FOR CPLO • SP FOR CPLO 2 BACK LINK SELECTOR TO TSS 0 ~ ~ Figure 20. Task State Segment and TSS Registers 4-23 AFN.()2060B iAPX 286/1.0 Table 15. Pointer Test Instructions To force the 80286 CPU registers to match the initial Instruction Operands Function protected mode state assumed by software, execute a ARPL Selector, Adjust Requested Privi- JMP instruction,with a selector referring to the initial TSS Register lege Level: adjusts the RPL used in the system. This will load the task register, local of the selector to the nu- descrimor table register, segment registers and initial meric maximum of current general register state. The TR should point at a valid selector RPL value and the TSS since a task switch operation involves saving the RPL value in the register. Set zero flag if selector RPL current task state. was changed. VERR Selector VERify for Read: sets the SYSTEM INTERFACE zero flag if the segment re- ferred to by the selector can The 80286, system interface appears in two forms: a be read. local bus and a system bus. The local bus consists of VERW Selector VERify for Write; sets the address, data, status, and control signals at the pins of zero flag if the segment re- the CPU. A system bus is any buffered version of the ferred to by the selector can local bus. A system bus may also differ from the local be written. bus in terms of coding of status and control lines andlor LSL Register, Load Segment Limit: reads timing and loading of sigDals. The iAPX 286 family in- Selector the segment limit into the register if privilege rules and cludes several devices to generate standard system descriptor type allow. Set buses such as the IEEE 796 standard Multibus ,•. zero flag if successful. LAR Register, Load Access Rights: reads Bus Interface Signals and Timing , Selector the descriptor access rights The iAPX 286 microsystem local bus interlaces the 80286 byte into the register if priv- to local memory and 1/0 components. The interface has ilege rules allow. Set zero flag if successful. 24 address lines, 16 data lines, and 8 status and control , signals. DOUBLE FAULT AND SHUTDOWN The 80286 CPU, 82284 clock generator, 82288 bus con- troller, 82289 bus arbiter, 8286/7 transceivers, and 82821 If two separate exceptions are detected during a single 3 latches provide a buffered and decoded system bus instruction execution, the 80286 performs the double interface. The 82284 generates the system clock and fault exception (8). If an exception occUrs during pro- synchronizes READY and RESET. The 82288 converts cessing of the double fll-ult exception, the 82086 will en- bus operation status encoded by the 80286 into com- ter shutdown. Ouring shutdown no further instructions mand and bus control signals. The 82289 bus arbiter or exceptions are processed. Either NMI (CPU remains generates multibus bus arbitration signals. These com- in protected mode) or RESET (CPU exits protected mode) can force the 80286 out of shutdown. Shutdown is exter- ponents can provide the timing and electrical power drive levels required for most system bus interfaces including nally signalled via a HALT bus operation with A1 HIGH. the multibus. PROTECTED MODE INITIALIZATION Physical Memory and 1/0 Interface The 80286 initially executes in real address mode after A maximum of 16 megabytes of physical memory can RESET. To allow initialiicrti6n code to be placed at the be addressed in protected mode. One megabyte can be top of physical memory, A23-20 will be HIGH when the addressed in real address mode. Memory is accessible 80286 performs memory references relative to the CS as bytes or words. Words consist of any two consecutive register, until CS is changed. A23- 20 will be zero for ref- bytes addressed with the least significant byte stored in erences to the OS, ES, or SS segments. Changing CS the lowest address. in real address mode will force A23-A20 LOW whenever using CS thereafter. The initial CS:IP value of FOOO:FFFO Byte transfers occur on either half of the 16-bit local data provides 64K bytes of code. space for initialization code bus. Even bytes are accessed over 07-0 while odd bytes without changing CS. are transferred over 0 15-8. Even-addressed words are transferred over 0 15- 0 in one bus cycle, while odd-ad- Before placing the 80286 into protected mode, several dressed words require two bus operations. The first registers must be initialized. The GOT and lOT base reg- transfers data on 0 15-8, and the second transfers data isters must refer to a valid GOT and lOT. After executing on 07':'0. Both byte data transfers occur automatically, the LMSW instruction to set PE, the 80286 must imme- transparent to software. diately execute an intra-segment JMP instruction to clear the instruction queue of instructions decoded in real ad- Two bus signals, Ao and BRE, control transfers over the dress mode. lower and upper halves of the data bus. Even address 4-24 AFN·02060B iAPX 286/10 byte transfers are indicated by Ao lOW and SHE HIGH. Odd address byte transfers are indicated by Ao HIGH RESET and SHE lOW. Both Ao and SHE are lOW for even ad- dress word transfers. The I/O address space contains 64K addresses in both modes. The I/O space is accessible as either bytes or words, as is memory. Byte wide peripheral devices may be attached to either the upper or lower byte of the data bus. Byte-wide I/O d~vices attached to the upper data byte (0 15-8) are accessed with odd I/O addresses. De- vices on the lower data byte are accessed with even 110 addresses. An interrupt controller such as Intel's 8259A must be connected to the lower data byte (07-0) for proper return of the interrupt vector. Bus Operation Figure 22. 80286 Bus States The 80286 uses a double frequency system clock (ClK input) to control bus timing. All signals on the local bus Bus States are measured relative to the system ClK input. The CPU The idle (T I) state indicates that no data transfers are in divides the system clock by 2 to produce the internal progress or requested. The first active state, Ts is sig- processor clock, which determines bus state. Each pro- nalled by either status line Sl or SO going lOW also cessor clock is composed of two system clock cycles identifying phase 1 of the processor clock. During Ts, named phase 1 and phase 2. The 82284 clock generator the command encoding, the address, and data (for a output (PClK) identifies the next phase of the processor write operation) are available on the 80286 output pins. clock. (See Figure 21.) The 82288 bus controller decodes the status signals and generates Multibus compatible readlwrite command and local transceiver control signals. After Ts, the perform command (Tc) state is entered. Memory or I/O devices respond to the bus operation during Tc, either transferring read datq to the CPU or elK accepting write data. T C states may be repeated as often PClK Y Ir ONE SYSTEM------.I elK CYCLE -----, \'-___---'/ as necessary to assure sufficient time for the memory or I/O device to respond. The READY signal determines whether T c is repeated. During hold (T h), the 80286 will float all address, data, Figure 21. System and Processor .and status output pins enabling another bus master to Clock Relationships use the local bus. The 80286 HOLD input signal is used to place the 80286 into the T h state. The 80286 HLDA Six types of bus operations-are supported; memory read, output signal indicates that the CPU has entered T h. memory write, I/O read, I/O write, interrupt acknowl- edge, and halt/shutd9wn. Data can be transferred at a Pipelined Addressing maximum rate of one word per two processor clock cycles. The 80286 uses a local bus interface with pipelined tim- The iAPX 286 bus has three basic states: idle (Ti)' send ing to allow as much time as possible for data access. status (Ts), and perform command (Tel. The 80286 CPU Pipelined timing allows bus operations to be performed also has a fourth local bus state called hold (T h)' Th in- in two processor cycles, while allowing each individual dicates that the 80286 has surrendered control of the bus operation to last for three processor cycles. local bus to another bus master in response to'a HOLD The ti,ming of the address outputs is pipelined such that request. the address of the next bus operation becomes available Each bus state is one processor clock long. Figure 22 during the current bus operation: Or in other words, the shows the four 80286 local bus states and allowed first clock of the next bus operation is overlapped with transitions. the last clock of the current bus operation. Therefore, address decode and routing logic can operate in ad- 4-25 AFN·02060B intJ iAPX 286/10 ~ TS----...J....--TC--..~TS___.I-TC READCYCLEN I READ CYCLE N+1 ----;-1 4>1 I I/Il I 4>1 I 4Q 1/>1 I 1 I r/I2 eLK PROeeLK YAUD AOOR (H) so. lIT -----~~=::::::::......"....-~ 0" -Do - - - - - - '- _ .... - - - - - - - - - - - - - - - - - -c=>- --------------- --<==)- VALlDREAD' VALID READ OATA(N) DATA (N+1) Figure 23. Basic Bus Cycle vance of the next bus operation. External address latches Command Timing Controls may hold the address stable for the entire bus operation, Two system timing customization options, command ex- and provide additional AC and DC buffering: tension and command delay, are provided on the iAPX The 80286 does not maintain the address of the current 286 local bus. bus qperation during all Tc states. Instead, the address Command extension allows additional time for external for the next bus operation may be emitted during phase devices to respond to a command and is analogous to 2 of any Te. The address remains valid during phase 1 inserting wait states on the 8086. External logic can con- of the first Teto gu~rantee hold time, relative to ALE, for trol the duration of any bus operation such that the op- the address latch inputs. eration is only as long as necessary. The READY input signal can extend any bus operation for as long as Bus ControrSignals necessary. The 82288 bus controller provides control signals; ad- dress latch enable (ALE), ReadlWrite commands, data Command delay allows an increase of address or write transmit/receive (DT/R)" and data enable (DEN) that data setup time to system bus command active for any control the address latches, data transceivers, write en- bus operation by delaying when the system bus com- able, and outl;>ut enable for memory and 110 systems. mand becomes active. Command delay is controlled by the 82288 CMDLY input. After Ts, the bus controller The Address Latch Enable (ALE) output determines when samples CMDLY at each failing edge of CLK. If CMDLY the address may be latched. ALE provides at least one is HIGH, the 82288 will not activate the command signal. system CLK period of address hold time from the end of When CMDLY is LOW, the 82288 will activate ~he com- the previous bus operation until the address for the next mand signal. After the command becomes active, the bus operation appears at the latch olitputs. This address CMDLY input is not sampled. hold time is required to support rylultibus® and common memory systems. When a command is delayed, the available response The data bus transceivers are controlled by 82288 out- time from command active to return read data or accept puts Data Enable (DEN) and Data Transmit/Receive (DT/ write data is less. To customize system bus timing, an R). DEN enables the data transceivers; while DT/R con- address decoder can determine which bus operations trols transceiver direction. DEN and DT/R are timed to require delaying the command. The CMDLY inl'ut does prevent bus contention between the bus master, data not affect the timing of ALE, DEN, or DT/R. bus transceivers, and system data bus tranceivers. 4-26 AFN·02060B inter iAPX 286/10 READ CYCLE N-1 READ CYCLE N elK p~oe ----, elK L-+-_.J ALE _ _ _oJ EXt I~DLY AD _ _ _-J Ex.1 AD rMDlY--~ Figure 24. CMDLV Controls and Leading Edge of the Command Figure 24 illustrates four uses of CMDlY. Example 1 current bus operation. The bus master and bus control- shows delaying the read command two system ClKs for ler must see the same sense of the READY signal, thereby cycle N-1 and no delay for cycle N, and example 2 shows requiring REAl:.)? be synchronous to the system clock. delaying the read command one system ClK for cycle N-1 and one system ClK delay for cycle N. Synchronous Ready The 82284 clock generator provides READY synchro- Bus Cycle 'Termination nization from both $ynchronous and asynchronous sources (see Figure 25). The synchronous ready input At maximum transfer rates, the iAPX 286 bus alternates (SfIDY) of the clock generator is sampled with the falling between the status and command states. The bus status edge of ClK at the end of phase 1 of each T e. The state signals become inactive after Ts so that they may cor- of SfIDY is then broadcast to the bus master and bus rectly signal the start of the next bus operation after the controller via the READY output line. completion of the current cycle. No external indication of Te exists on the iAPX 286 local bus. The bus master and Asynchronous Ready bus controller enter Tedirectly after Ts and continue ex- Many systems have devices or subsystems that are ecuting Te cycles l:Jntil terminated by REAI:.)? asynchronous to the system clock. As a result, their ready outputs cannot be guaranteed to meet the 82284 SfIDY setup and hold time requirements. The 82284 asynchro- READY Operation nous ready input (ARDY) is designed to accept such The current bus master and 82288 bus controller termi- signals. The AFIDY' input is sampled at the beginning of nate each bus operation simultaneously to achieve each Tc cycle by 82284 synchronization logic. This pro- maximum bus bandwidth. Both are informed in advance vides a system ClK cycle time to resolve its value before by REAl:.)? active which identifies the last Tecycle of the broadcasting it to the bus master and bus controller. 4-27 AFN'()2060B intJ iAPX 286/10 MEMORY CYCLE N-1 I MEMORY CYCLE N I --Ts______.....!.......---TC-------..~TS-----.!.------Tc------.....!~Tc----. I 4>2 -I 401 I 1 I ¢2 I 4>1 I 1 I W2 CLK PROCClK ~3-AO ________________~~~~~-----~-Ll-D-AD-D-R--------~~~~--~----------- READY (SEE NOTE 1 .) (SEE NOTE 2.) '=~li§\\\\\\\\\\\\ ~ (SEE NOTE 3.) NOTES: 1. SRDYEN is active low 2. If SRDYEN is high, the state of SRDY will not effect READY 3. ARDYEN is active low Figure 25. Synchronous and Asynchronous Ready Each ready input of the 82284 has an enable pin read data drivers, from a previous read cycle, sufficient (SRDYEN and ARDYEN) to select whether the current time to enter 3-state OFF before the 80286 CPU begins bus operation will be terminated by the synchronous or driving the local data bus for write operations. Write data asynchronous ready. Either of the ready inputs may ter· will always remain valid for one system clock past the minate a bus operation. These enable inputs are active last Tc to provide sufficient hold time for Multibus or other low and have the same timing as their respective ready similar memory or I/O systems. During write-read or write- inputs. Address decode logic usually selects whether idle sequences the data bus enters 3-state OFF during the current bus operation should be terminated by ARDY the second phase of the processor cycle after the last orSFfD'? T c. In a write-write sequence the data !:lus does not enter 3-state OFF between Tc and Ts. Data Bus Control Figures 26, 27, and 28 show how the DT/R, DEN, 'data Bus Usage bus, and address signals operate for different combina· The 80286 local bus may be used for several functions: tions of read, write, and idle bus operations. DT/R goes instruction data transfers, data transfers by other bus active (LOW) for a read operaton. DTiR remains HIGH masters, instruction fetching, processor extension data before, during, and betvveen write operations. . transfers, interrupt acknowledge, and halt/shutdown. This The data bus is driven with write data during the second section describes local bus activities which have special phase of Ts. The delay in write data timing allows the signals or requirements. 4-28 AFN-02060B iAPX 286/10 READ CVCL.E I WRITE CYCLE I I - - T I - - - - - ........----TS---..I....-TC----......--TS------.-I....---TC-----..~TI--...J I ~ ~ I ~ ~ I ~ ~ I. ~ I. ~ I • I eLK DEN ------------4-------J DT/A Figure 26. Back to Back Read-Write Cycles WRITE CYCLE READ CYCLE eLK 0 15-00 - - - - - - - - - - VALID WRITE DATA DEN OT/A Figure 27. Back to Back Write-Read Cycles 4-29 AFN-02060B in1:ef iAPX 286/10 ClK MWTC DEN --------' DT/ll - - - - - - - - - - - - - - _ - - - - - - - - - - - - - - - - - ( H I G H ) Figure 28. Back to Back Write-Write Cycles HOLD and HLDA A prefetch bus operation starts when at least two bytes HOLD and HLDA allow another bus master to gain con- of the 6-byte prefetch queue are empty. trol of the local bus by placing the 80286 bus into the T h The prefetcher normally performs word prefetches in- state. The sequence of events required to pass control dependent of the byte alignment of the code segment between the 80286 and another local bus master are base in physical memory. shown in Figure 29. The prefetcher will perform only a byte code fetch op- In this example, the 80286 is initially in the Th state as eration for control transfers to an instruction beginning signaled by HLDA being active. Upon leaving T h, as sig- on a numerically odd physical address. naled by HLDA going inactive, a write operation is started. Prefetching stops whenever a control transfer or HLT During the write operation another local bus master re- instruction is decoded by the IU and placed into the quests the local bus from the 80286 as shown by the instruction queue. HOLD signal. After completing the write ope~ation, the In real address mode, the prefetcher may fetch up to 80286 performs one T, bus cycle, to guarantee write data 5 bytes beyond the last control transfer or HLT instruc- hold time, then enters Th as signaled by HLDA going tion in a code segment. active. In protected mode, the prefetcher will never cause a The CMDLY signal and ARTI? ready are used to start segment overrun exception. The prefetcher stops at and stop the write bus command, respectively. Note that the last physical memory word of the code segment. SFIDY must be inactive or disabled by SRDYEN to guar- Exception 13 will occur if the program attempts to ex- antee ARDY will terminate the cycle. ecute beyond the last full instruction in the code segment. Instruction Fetching If the last byte of a code segment appears on an even The 80286 Bus Unit (BU) will fetch instructions ahead of physical memory address, the prefetcher will read the the current instruction being executed. This activity is next physical byte of memory (perform a word code called prefetching. It occurs when the local bus would fetch). The value of this byte is ignored and any at- otherwise be idle and obeys the following rules: tempt to execute it causes exception 13. 4-30 AFN-02060B, iAPX 286/10 I' ., ells HOLD ACKNOWLEDGE WRITE CYCLE BUS CYCLE TYPE Cl." (SEE NOTE 5,6) HOl.D HLOA S1 • SO (SEE NOTE 1 ) ---------------- r--------------- _(!.E~N~T~!..._ (SEENOTE2) ~~~~t}»--------------- A:l3-Ag ________________ _ MilO, CODlfNTA (SEENOTE3) BRE,L"'OCK - - - - - - - - - - - - - - - - - - - - ~J;:~~==~m~~~~~~t»-------- ---- D" - Do - - - - - - - - - - - - - -:- - - - - - - - - ~'__ _ _ _ _ _..:;VA;;;U:..D_ _...:..._ _--I.»>_'.2 of TC. 3. BHE and LOCK may start floating after the end of any TC depending on when internal 80286 bus arbiter decides to release bus to external HOLD. 4. The minimum HOLD +to HLDA +time IS shown. Maximus is one TH longer. 5. The earhest HOLD t time IS shown which Will always allow a subsequent memory cycle If pending. 6. The minimum HOLD t to HLDA t time is shown. Maximum Is a function of the instruction, type of bus cycle and other machine status (i.e., Interrupts, Waits, Lock, etc.) 7. Asynch'ronous ready allows termination of the cycle. Synchronous ready does not signal ready In this example. Synchronous re\ldy state is Ignored after ready is signaled via the asynchronous input. Figure 29. Multibus Write Terminated by Asynchronous Ready 4-31 AFN·02060B inter iAPX 286/10. . Processor Extension Transfers Local Bus Usage Priorities The processor extension interface uses I/O port ad- The 80286 local bus is shared among several internal' dresses 00F8(H), OOFA(H), and OOFC(H) which are part units and external HOLD requests. In case' of simulta- of the 1/0 port address range reserved by Intel. An ESC neous requests, their relative priorities are: instruction with EM = 0 and TS = 0 will perform 1/0 bus operations to one or more of these 1/0 port addresses independent of the value of 10PL and CPL. ' (Highest) Any transfers which assert rncK either ex- ESC instructions with memory references enable the plicitly (via the LOCK instruction prefix) or CPU to accept PEREa inputs for processor extension implicitly (i.e. segment descriptor access, operand transfers. The CPU will determine the operand interrupt acknowledge sequence, or an starting address and readlwrite status of the instruction: XCHG with memory). For each operand transfer, two or three bus operations The second of the two byte bus operations are performed, one word transfer with 1/0 port address required for an odd aligred word operand. OOFA(H) and one or two bus operations with memory. Local bus request via HOLD input. Three bus operations are required for each word oper- Processor extension data operand transfer and aligned on an odd byte address. via PEREa input. Interrupt Acknowledge Sequence Data transfer performed by EU as part of an instruction. Fjgure 30' illustrates an interrupt acknowledge se- quence performed by the 80286 in response to an INTR input. An interrupt acknowledge sequence consists of (Lowest) An instruction prefetch request from BU. The two INTA bus operations. The first allows a master 8259A EU will inhibit prefetching two processor Programmable Interrupt Controller (PIC) to determine clocks in advance of any data transfers to which if any of its slaves should return the interrupt vec- minimize waiting by EU for a prefetch to finish. tor. An eight bit vector is read by the 80286 during the second INTA bus operation to select an interrupt han- dier routine from the interrupt table .. Halt or Shutdown Cycles The 80286 externally indicates halt or shutdown condi- The Master Cascade Enable (MCE) signal of the 82288 tions as a bus operation. These conditions occur due to is used to enable the cascade address drivers, during a HLT instruction or multiple protection exceptions while INTA bus operations (See Figure 30), onto the local ad- attempting to execute one instruction. A halt or shut- dress bus for distribution to slave interrupt controllers via down bus operation is signalled when ST, SO and COOl the system address bus. The 80286 emits the rncK TfiITA are LOW and M/RJ-is HIGH. A1 HIGH indicates signal (active LOW) during Ts of the first INTA bus oper- halt, al'1d A1 LOW indicates shutdown. The 82288 bus ation. A local bus "hold" request will not be honored until controller does not issue ALE, nor is READY required to the end of the second INTA bus operation. terminate a halt or shutdown bus operation. Three idle processor clocks are provided by the 80286 During halt or shutdown, the 80286 may service PEREa between INTA bus operations to allow for the minimum or HOLD requests. A processor extension segment INTA to INTA time and CAS (cascade address) out delay overrun exception during shutdown will inhibit further of the 8259A. The second INTA bus operation must al- service of PEREa. Either NMI or RESET Will force the ways have at least one extra To state added via logic 80286 out of either halt or shutdown. An INTR, if inter- controlling READY. A23-Ao are in 3-state OFF until after rupts are enabled, or a processor extension segment the first To state of the second INTA bus operation. This overrun exception will also force the 80286 out of halt. prevents bus cOntention between the cascade address . drivers and CPU address drivers. The extra To state al- lows time for the 80286 to resume driving the address lines for subsequent bus operations. 4-32 AFN'()2060B inter iAPX 286/10 BUSCYCLETYPE I ~ TC I ~ 4---INTACYCLE 1 ~ 1 ~ T8 I a I TC ~ TC I ~ I ~ r ~ ~ TI I ~ I ~ T, I a I ~ TI I a 1-4--INTACYCLE TS M I a I ~ TC I a 2--+1 I ~ TC I ~ M I a TS I ClK MIIll, CODIII/TA BIlE »»»)»>------------< DON'T CARE }- - - - - - - - - - --c= (SEE NOTE 1.) 0,,- Do ~~:'l?v'l:k }- - - - - - - 0 -- ------ -- ------ ---- 2 of the second TC in the INTA cycle. Figure 30. Interrupt Acknowledge Sequence 4-33 AFN.()2060B iAPX 286/10 Vee r01 r lIEN MRDC MWTC MEMORY READ MEMORY WRITE ~..... r Il!RC 1/0 READ CMDLV x, x, IOWC I/aWRITE If!TA INTERRUPT ACKNOWLEDGE lIES , SO SO ALE Iff Iff MCE ro----, I- PCLK - Fit lIIXDY CLK : lIIXDY CLK DEN DT/Ff - r- I r - --+I - - -+I DECODE t- ..... ADVANCED MEMORY 1-'" AN o 110 CHIP SELECTS -r EFI 82288 BUS CONTROLLER r- I r ..J -" I r - )- ~ (OPTIONAL) I I r.. , - I MilO .J I L ____ " ":t" r- SYNCRE A D Y - lIRllV RESET I ~ _JI II I r -" E~ A B L E _ ASVNCREADY---+ AIIDY ~ I t ' I I I RE~ET MIlO I I I ENAB L E _ lIIlmN 82284 CI,.OCK I I I I I I -'::lIIXDY elK = COolfNTA ---I ---' I I I I " - STB -=F" O£ 8282 ;=> ADDRESS BUS GENER~TOR I I ' - - Iff A23-Ao or 8283 I I LATCH I I ' - - - SO ~- r---.J I I r--- J NMI HLOA :::.... HOLO IlRE Ao ~ I I I I r - r------- - - - - - EIlI!llR INTR CS r-- CHIP SELECT I I I BUSY INT I I I I r----- I'EACR , INTA , I ' , , r - - - - PEREO CAP~ WI! AD Ii::': ~~:~6 T+ spiEN *t"t, ~ l r-------, D"-DO = Do - 07 IRO - IR7 1 PROCESSOR 1 ~ 8259A INTERRUPT 1 1'1...---- ~-r---- eXTENSION CONTROLLER 1 (OPTIONAL) 1 I ... -------~ f---- O£ 8286 ~ ., ~ DATA 8287 BUS TRANS- CEIVER T Figure 31. Basic iAPX 286 System Configuration SYSTEM CONFIGURATIONS uses this interface. The iAPX 286/20 has all the instruc- tions and data types of an iAPX 86/20 or iAPX 88/20. The versatile bus structure of the iAPX 286 microsys- The 80287 NPX can perform numeric calculations and tem, with a full complement of suppOrt chips, allows flex- a ible configuration of wide range of systems. The basic data transfers concurrently with CPU program execu- tion. Numerics code and data have the same integrity as configuration, shown in Figure 31 , is similar to an iAPX ' all ot~er information protected by the iAPX 286 protec- 86 maximum mode system. It includes the' CPU plus an tion mechanism. 8259A interrupt controller, 82284 clock generator, and the 82288 Bus Controller. The iAPX 86 latches (8282 The 80286 can overlap chip select decoding and ad- and 8283) and transceivers (8286 and 8287) may be dress propagation during the data transfer for the pre- used in an iAPX 286 microsystem. ' ' vious bus operation. This information is latched into the As indicated by the dashed lines in Figure 31 , the ability 8?82/3's by ALE during the middle of a T5 cycle. The to add prqcessor extensions is an integral feature of iAP~ latched Chip select ~nd address information remains 286 microsystems. The processor extension interface stable during the bus operation w~ile the next cycJes allows external hardware to perform special functions address is being decoded and propagated into the sys- and transfer data concurrent with CPU execution of other tem. Decode logic can be implemented with a high speed in!!tructions. Full system integrity is maintained because bipolar PROM. ' the 80?86 supervises all data transfers and instruction The optional decode logic shown in Figure 31 takes ad- execution for the processor extension. ' vantage of the overlap between address and data of the The iAPX 286/20 numeric data processor which in- 80286 bus cycle to generate advanced memory and 10- cll!pes the 80287 numeric processor extension (NPX) select signals. This minimizes system performance 4-34 AFN-02060B inter iAPX 286/10 Vee lIEN MRlIl: MEMORY READ MWTC MEMORY WRITE Il!RC 110 READ CMDLV lOWe "0 WRITE IN'fA INTERRUPT ACKNOWLEDGE SO ALE SI MeE ~ DEN ClK DT/R 82288 BUS r- CONTROLLER Mill! SYNC READY - SIIOV RESET H++-+++--'l t ENABlE_ SADYEN I --'-~ r;;;;-- ASYHC READY - ENABLE - XROY lIRDYEIiI ~~~~ I I I RESET '"' ClK MIIIl [OCt(r-- COOIIIITA r- c., L...-. ~ 8282 ::;> ADDRESS BUS GENERATOR I '-- ~ I---'-.J.....J.-'--'---'---'" I ' - - - SI .... -""I----,--r-r..-,-"',---v' 0<8283 r - - - JI - -_ SO NMI _I-_-+-+++-+I~'(~ an< _~ ~~ . .. - HOLD : ~- - - 4 - HlDA " ' - - CASo-, r------- ERI!l!JI CI . - CHIP SELECT : : I r- - - - - - BOllY INTR I--++-+++----;INT I I I I r----- PEACI( INT~ I I I I I r---- PEREO CAPr-± WR I: II:: • _lll_l_ll_, "g~ I+ -= IIli SPiEIi ¢= l- 0,. - 00 IRo-tR7 I - - , / 00-0, 8259A PROCESSOR k-L---- INTERRUPT CONtROLLER EXTENSION (OPTIONAL) L _ _ _ _ _ _ _ .1 ',.----- I ~ OE ~ ~ 8286 or 8287 DATA BUS ' TRANS- CEIVER T Figure 32. Multibus System Bus Interface degradation caused by address propogation and de- connected to its CMDlY input to delay the start of com- code delays. In addition to selecting memory and I/O, mands one system ClK as required to meet Multibus the advanced selects may be used with configurations address and write data setup times. This arrangement supporting local and system buses to enable the appro- will adcl at least one extra Testate to each bus operation priate bus interface for each bus cycle. The CODIfI'iIT.!: which uses the Multibus. and M!1O signals are applied to the decode logic to dis- A second 82288 bus controller and additional latches tinguish between interrupt, I/O, code and data bus cycles. and transceivers could be added to the local bus of Fig- By adding the 82289 bus arbiter chip the 80286 provides ure 32. This configuration allows the 80286 to support a Multibus system bus interface as shown in Figure 32. an on-b'oard bus for local memory and peripherals, and The ALE output of the 82288 for the Multibus bus is the Multibus for system bus interfacing. 4-35 AFN'()2060B inter IAPX 286/10 8286 8287 DRAM 2164A IAPX 286 CPU 1+\---- MULTI BUS' SELECT MULTIBUS' COMMAND ~.MWTC.~ LEN Figure 33. iAPX 286 System Configuration with Dual·Ported Memory Figure 33 shows the addition of dual ported dynamic functions such as refresh, initialization of RAM, and read! memory between the Multibus system bus and the iAPX modify/write cycles. The 8207 combined with the 8206 286 local bus. The dual port interface is provided by the Error Che,cking and Correction memory controller pro- 8207 Dual Port DRAM Controller. The 8207 runs syn- vide for single -bit. error 'correction. The dual-ported , chronously with the CPU to maximize throughput for lo- memory can be combined with a standard Multibus sys- cal memory references. It also arbitrates between tem bus interface to maximize performance and protec- requests from the local and system buses and performs tion in multiprocessor system configurations. 4-36 AFN-02060B iAPX 286/10 PACKAGE The 80286 is packaged in a 68-pin, lead less JEDEC F type A hermetic chip carrier. Figure 34 illustrates the package, and Figure 2 shows the pinout. ------jI (2.39) .094 ~ .050 II 066 rl:~~n (1.68) .BOO (20.32) ,~, D ~- ~UllwrnDD~~~~ PIN NO.le PIN NO.1 ~PIN NO 1 MARK .130 (3.30) .960 (24.38) Figure 34. 80286 JEDEC Type A Package ABSOLUTE MAXIMUM RATINGS* • NOTICE: Stresses above those listed under "Absolute Max- imum Ratings" may cause permanent damage to the device. Ambient Temperature Under Bias .......... O'C to 70'C This is a stress rating only and functional operation of the de- Storage Temperature . . . . . . ... . . . .. - 65'C to + 150°C vice at these or any other conditions above those indicated in the operational sections of this specification is not implied. Voltage on Any Pin with Exposure to absolute maximum rating conditions for ex- Respect to Ground . . . . . . . . . . . . . .... - 0.3 to + 7V tended PWiods may affect device reliability. Power Dissipation . . . . . . . . . . . . . . . . . . .... 3.6 Watt D.C. CHARACTERISTICS (80286: TA = O'Cto 70'C, Vcc = 5V ± 10%) Symbol Parameter Min. Max. Units Test Conditions Vil Input low Voltage -0.5 +0.8 V VIH Input High Voltage 2.0 Vcc+ 0.5 V VOL Output low Voltage 0.45 V IOl=3.0mA VOH Output High Voltage 2.4 V IOH = - 400 ILA Icc Power Supply Current 600 mA TA=25°C III Input leakage Current ±10 ILA OV,:::VIN':::VCC ILO Output leakage Current ±10 ILA 0.45V",; VOUT'::: Vcc VCl Clock Input low voltage -0.5 +0.6 V VCH Clock Input High Voltage 3.8 VCC+1.0 V Capacitance of Inputs CIN 10 pF fc=1 MHz (All input except ClK) Co Capacitance of 1/0 or outputs 20 pF fc=1 MHz CClK Capacitance of ClK Input 12 pF fc= 1 MHz 4-37 AFN·02060B inter iAPX 286/10 A.C. CHARACTERISTICS (TA = 0°Ct070°C, Vee = 5V ± 10%) 80286 Timing Requirements Symbol Parameter Min. Max. Units Test Conditions 1 System clock period 62.5 250 ns 2 System clock low time 15 230 ns at.6Volts 3 System clock high time 20 235 ns at 3.2 Volts 4 Asynchronous input setup time 20 ns See note 1 5 Asynchronous input hold time 20 ns See note 1 6 RESET setup time 20 ns 7 RESET hold time 0 ns 8 Read data in setup time 10 ns 9 Read data in hold time " 5 ns 10 READY setup time 38.5 ns 11 READY hold time 25 ns 12 STATUS/PEACK valid delay 0 40 ns 13 Address valid delay 0 60 ns 14 Write data valid delay 0 50 ns CL = 100 Pfd max 15 Address/Status/Data float delay 0 60 ns 16 HLDA valid delay 0 60 ns 82284 Timing Requirements Symbol Parameter Min. Max. Units Test Conditions 17 SRDY/SRDYEN setup time 15 ns 18 SRDY/SRDYEN hold time 0 ns 19 ARDY /ARDYEN setup time -5 ns See note 1 20 ARDY/ARDYEN hold time 16 ns See note 1. CL = 75pfd 21 PCLKdeiay 0 40 ns IOL = 5.25ma IOH = -1.05ma NOTE1: These times are given for testing purposes to assure a predetermined action. 82288 Timing RequiFements Symbol Parameter Min. Max. Units Test Conditions 22 CMDLY setup time 20 ns 23 CMDLY hold time 0 ns CL = 300 pfd max 24 Command delay 3 20 ns IOL = 32 ma max IOH = -5mamax 25 ALE active delay 3 15 ns 26 ALE inactive delay 0 20 ns 27 DT/R read active delay 0 20 ns 28 DT/R read inactive delay 10 40 ns CL = 150 pfd max IOL = 16 ma max 29 DEN read active delay 10 50 ns IOH = -1 mamax 30 DEN read inactive delay 3 15 ns 31 DEN write active delay 30 ns 32 DEN write inactive delay 3 30 ns 4-38 AFN·02060B intJ iAPX 286/10 WAVEFORMS MAJOR CYCLE TIMING READ BUS CYCLE TYPE elK $1 • SO A,,-Ao 71TTJ~rn~mmw-+--~f---+----i'nmw-+----i---+----i"\ ""..., r4----+---- MilO, COD/INTA ~,-,-"=UJ..JJ..,UJ.I.J.J.Ij\-+ __f-F-~~+__--i''I£.UJ.Ij\-+__--i'::::';'::'':''':'+_ _--iJ'''UJ.V'-+_''':'~'';''''::'''_ _ BHE,LOCK l.I.J~/JJ..u..UJ..JJ..,~/..l.J.~/JJ..u../I"f---+=...:...;....;..=-----r~i,LLUJ.IJ'-!---+~":""--i=----+'\.----..j:.;";"'::""-- FrEAD" SRDV + $ROyE:N S ARDY+AROYEN PCLK ALE CMDLY MWTc i MJrOC DliR DEN 4-39 AFN-02060B iAPX 286/10 WAVEFORMS (Continued) 80286 ASYII!CH~ONOUS I~PUT SIGNAL TIMIF'lG 80286 RESET INPUT TIMING AND SUB~EpUENT PROCESSOR CYCLE PHASE BUS CYCLE TYPE ClK PClK (SEE NOTE 1) HOlO,PEREQ '1'r.rr1'1'r.rl7.,...,.,Ir;;;;;...t-,ln'1'r.rr17'T77 (SEE NOTE 2) LI.j~LL,j,+,".u..'I'--t-'I"'LL,j~.u....... INTR,NMI ~O~LI.j~\-4-~'~~~'~----J NOTES: 1. PClK indicates which processor cycle phase will occur on the next NOTE 1: When RESET meets /he setup time shown, the next ClK ClK . PClK may not indicate the correct phase until the first bus will start or repeat 1 of a processor cycle. cycle is performed. 2. These inputs arE! asynchronous. The setup and hold times srown assure recognition for testing purposes. ENTER IlliG AND EXITING HOLD BUS CYCLE TYPE ClK HlOA _ _ _ _+"~ (SEE NOTE 4• A23 - Ao _______ _ M~O, .m,.,.,t-t----i'~r " 'j (S~N~jTE1') COO/iNfA :~)~»»1- ----------------(SEE NOTE 2.) @) . 015 - (,'~~~=:_:_:~~.m:'\. Do - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _(, VAllOWRITEDATA m[ PCLK _ _ _J NOTES: 1. These signals may still be driven by the 80286 during the lime shown. The worst c1 of the processor clock may begin one system elK period later. 2. Setup and hold times for RESET ( must be met for proper operation. 3. The data bus is only guaranteed to be in 3-state OFF at the time shown. 4-41 AFN·02060B iAPX 286/10 BYTE 1 BYTE 2 BYTE 3 BYTE 4 BYTES BYTES ,.;-,.;.r:.r-,.:...=-r:.,..::,,.:..,.;:.,.:-r:-,,.:..;:.r-r:, - - - - - - -.,. - - - - - - - .... - - - - - - - "T - - - - - - -.., I I I LOW DISP/DATA I HIGH DISP/DATA I LOW DATA I HIGH DATA ......--r--.....,~'-T-'--r......--r---' - - - -,- - - ... - - - - - - - "" - - - - - - _..&. - - - - - - _ ... REGISTER OPERAND/REGISTERS TO USE IN OFFSET 'CALCULATION ' - - - - - REGISTER OPERAND/EXTENSION OF OPCODE ' - - - - - - - REGISTER MODE/MEMORY MODE WITH DISPLACEMENT LENGTH ' - - - - - - - WORD/BYTE OPERATION ' - - - - - - - - - DIRECTION IS TO REGISTER/DIRECTION IS FROM REGISTER ' - - - - - - - - - - - - OPERATION (INSTRUCTION) CODE A. SHORT OPCODE FORMAT EXAMPLE BYTE 1 BYTE 2 BYTE 3 BYTE 4 BYTES B. LONG OPCODE FORMAT EXAMPLE Figure 35. 80286 Instruction Format Examples 80286 INSTRUCTION SET SUMMARY Instruction Set Summary Notes Instruction Timing Notes Addressing displacements selected by the MOD field are not shown. If necessary they appear after the in- The instruction clock counts listed below establish the struction fields shown. maximum execution rate of the 80286. With no delays in bus cycles, the actual clock count of an 80286 program Above/below refers to unsigned value willaverage 5% more than the calculated clock count, Greater refers to positive signed value due to instruction sequences which execute faster than less refers to less positive (more negative) signed values they can be fetched from memory. if d = 1 then to register; if d = 0 then from register To calculate elapsed times for instrllction sequences, multiply the sum of all instruction clock counts, as listed if w = 1 then word instruction; if w = 0 then byte in the .table below, by the processor clock period. An 8 instruction MHz processor clock has a clock period of 125 nanosec- if s = 0 then 16-bit immediate data form the operand onds and requires an 80286 system clock (ClK input) of if s = 1 then an immediate data byte is sign-extended 16MHz. to form the 16-bit operand x don't care InstructiOn Clock Count Assumptions z used for string primitives for comparison with ZF 1. The instruction has been prefetched, decoded, and F/-AG is ready for execution. Control transfer instruction clock counts include all time required to fetch, decode, and If two clock counts are given, the smaller refers to a reg- prepare the next instruction for execution. ister operand and the larger refers to a memory operand 2. Bus cycles do not require wait states. * = add one clock if offset calculation requires sum- ming 3 elements 3. There are no processor extension data transfer or local bus HOLD 'requests. n = number of times repeated 4. No exceptions occur during instruction execution. m = number of bytes of code in next instruction Level (l)-lexical nesting level of the procedure 4-42 AFN·02060B inter iAPX 286/10 The following comments describe possible exceptions, 10. For segment load operations, the CPL, RPL, and side effects, and allowed usage for instructions in both OPL must agree with privilege rules to avoid an ex- operating modes of the 80286. ception. The segment must be present to avoid a not-present exception (11). If the SS register is the REAL ADDRESS MODE ONLY destination, and a segment not-present violation 1. This is a protected mode instruction. Attempted ex- occurs, a stack exception (12) occurs. ecution in real address mode will result in an unde- 11. All segment descriptor accesses in the GOT or LOT fined opcode exception (6). made by this instruction will automatically assert 2. A segment overrun exception (13) will occur if a word mcK to maintain descriptor integrity in mUltipro- operand reference at offset FFFF(H) is attempted. cessor systems. 3. This instruction may be executed in real address 12. JMP, CALL; INT, RET, IRET instructions referring to mode to initialize the CPU for protected mode. another code segment will cause a general protec- tion exception (13) if any privilege rule is violated. 4. The IOPL and NT fields will remain O. 13. A general protection exception (13) occurs if CPL 5. Processor extension segment overrun interrupt (9) ~ O. will occur if the operand exceeds the segment limit. 14. A general protection exception (13) occurs if EITHER MODE CPL> IOPL. 6. An exception may occur, depending on the value of 15. The IF field of the flag word is not updated if the operand. CPL > IOPL. The IOPL field is updated only if CPL = O. 7. mcK is automatically asserted regardless of the presence or absence of the LOCK instruction prefix. 16. Any violation of privilege rules as applied to the se- lector operand do not cause a protection exception; PROTECTED VIRTUAL ADDRESS MODE ONLY rather, the instruction does not return a result and the zero flag is cleared. 8. The destination of an INT, JMP, CALL, RET or IRET instruction must be in the defined limit of a code 17. If the starting address of the memory operand vio- segment or a general protection exception (13) lates a segment limit, or an invalid access is at- occurs. tempted, a general p"rotection exception (13) will occur before the ESC instruction is executed. A stack 9. A general protection exception (13) will occur if the segment overrun exception (12) will occur if the stack memory operand can not be used due to either a limit is violated by the operand's starting address. If segment limit or access rights violation. If a stack a segment limit is violated during an attempted data segment limit is violated, a stack segment overrun transfer then a processor extension segment over- exception (12) occurs. run exception (9) occurs. 4-43 AFN·02060B iAPX 286/10 80286 INSTRUCTION SET SUMMARY CLOCK COUNT COMMENTS Real Protected Real Protected Address Virtual Address Virtual FUNCTION FORMAT Mode Address Mode Address Mode Mode DATA TRANSFER MOV = Move: Register to RegisterlMemory 11 000100w mod regrim 2,3" 2,3" 2 9 RegISter/memory to register 11 000101w mod regrim 2,5" 2,5" 2 9 Immediate to reglsterlmemory 11 1 0 0 0 1 1 w modOOO rim data I datalfw-l I 2,3" 2,3" 2 9 Immediate to register 11 01 1 w reg data datalfw=l I 2 2 Memory to accumulator 11 010000w addr-Iow addr-high I 5 5 2 9 Accumulator to memory 11 010001w addr-Iow addr-hlgh I 3 3 2 9 Registerlmemory to segment register 11 00 0 1 1 1 0 mod 0 reg rim 2,5" 17,19" 2 9,10,11 Segment register to register/memory 11 0001100 mod 0 reg rim 2,3" 2,3" 2 9 PUSH = Push: Memory 11 1111111 I modl10 rim I 5" 5" 2 9 RegISter 10 1 0 1 0 reg I 3 3 2 9 Segment register 1000regll01 3 3 2 9 [~~\m"~l\~~V\ill\\~~l~~~' ilK••"",,",.· . .' \ PDP = Pop: Memory 11 o 0 0 1 1 1 11 modOOO rim I 5" 5" 2 9 Register 10 1 0 1 1 reg I 5 5 2 9 Segment regISter 1000regl1 11 (reg ,,01) 5 20 2 9,10,11 ,~w,," ., ~ ~A .,.-': • >'. ,.*.> ",u XCHG = Exchange: Reglsterlmemory with register 11 00 0 0 1 1 wi mod reg rim I 3,5" 3,5" 2,7 7,9 Register with accumulator 11 00 1 0 reg I 3 3 IN = Inputlrom: Fixed port 11 1 1 001 0 wi port I 5 5 14 variable port 11 1 1 0 1 1 0 wi 5 5 14 OUT = Output to: Fixed port 11 1 1 001 1 w port I 3 3 14 variable port 11 11 01 1 1 w 3 3 14 XLAT = Translate byte to AL 11 1 0 1 0 1 1 1 5 5 9 LEA = Load EA to regISter 11 00 0 1 1 0 1 mod reg rim I 3" 3" LDS = Load pOinter to OS 11 1 0 0 0 1 0 1 mod reg rim I (mod" 11) r 21" 2 9,10,11 LES =Load pOinter to ES 11 1000100 mod reg rim I (mod" 11) r 21" 2 9,10,11 LAHF = Load AH with flags 11 00 1 1 1 1 1 2 2 SAHF = Store AH into flags 11 00 1 1 1 1 0 2 2 PUSHF = Push flags 11 00 1 1 1 0 0 3 3 2 9 POPF = Pop flags 11 00 1 1 1 0 1 5 5 2,4 9,15 Shaded areas indicate instructions not aval able in iAPX 86,88 microsystems. 4-44 AFN·02060B in1:el" iAPX 286/10 &'@W&'OO©[g OOOIP@ffillNl&' 'U'O@OO 80286 INSTRUCTION SET SUMMARY Real Real Protected Address Address Virtual FUNCTION FORMAT Mode Mode Address Mode ARITHMETIC ADD = Add: Reglmemory with register to either 10 00 0 0 0 d w I mod reg rim 2,7" 2,7" Immediate to register/memory 1100000swi modOOO rim data dataifsw=01 3,7" 3,7" Immediate to accumulator 10000010wl data dataifw=1 3 3 ADC = Add with carry: Reglmemory with regISter to either 10 00 1 0 0 d wi mod reg rllll 2,7" 2,1' Immediate to reglSterlmemory 11 0 Q 0 0 0 s wi mod010 rim data dat.,f s w ~ 01 3,7" 3,1' Immediate to accumulator 10 00 1 0 1 0 wi data dat.,fw= 1 3 INC = Increment: ReglSterlmemory 11 111111 wi modOOO rim 2,1' 2,7" RegISter 10 1 0 Q 0 reg I 2 2 SUB = Subtract: Reglmemory and regISter to either 10 01 0 1 0 d wi mod reg rim 2,7' 2,7" Immediate from registerlmemory 1100000swl mod 1 01 rim data datalfsw=01 3,7' 3,1' Immediate from accumulator 10010110wl data datalfw=1 3 SBB = Subtrect with borrow: Reglmemory and regISter to either 1000110d w i mod reg rim 2,1' 2,7" Immediate from reglSterlmemory 11 00000 s wi mod011 rim data dat.,fsw=01 3,1' 3,7" Immediate from accumulator 10 00 1 1 1 0 wi data dat.,fw= 1 DEC = Decrement: ReglSterlmemory 11 111111 wi mod001 rim 2,7" 2,1' Register reg I 10 1 0 0 1 2 CMP = Compare: Register/memory With register 10 01 1 1 01 wi rim mod reg 2,6' 2,6' Register with registerlmemory IOQ11100wl rim mod reg 2,7" 2,7' Immediate with registerlmemory 1100000swi mod 111 rim data datalfsw=01 3,6' 3,6' Immediate with accumulator 10 01 1 1 1 0 w data dataifw=1 3 NEG = Change sign 11 11 1 011 w mod011 rim 7' AAA= ASCII adlustfor add 10 01 1 Q 1 1 1 3 DAA= Decimal adlustfor add 10 0 1 0 0 1 1 AAS = ASCII adlustfor subtract 10 01 1 1 1 1 DAS = DeCimal adlustfor subtract 10 0 1 0 1 1 1 MUL= Multiply (unsigned): 11 11 1011 w mod 1 00 rim Register-Byte 13 13 Register-Wo,d 21 21 Memory-Byte 16' 16' Memory-Word 24' 24' IMUL= Integer multiply (signed): 11 1 1 1 01 1 wi mod 1 01 rim Register-Byte 13 13 Register-Word 21 21 Memory-Byte 16' 16' Memory-Word 24' 24' DlV = DiVide (unsigned): mod 110 rim RegISter-Byte 14 14 Register-Word 22 22 Memory-Byte 17" 17' 2,6 6,9 Memory-Word 2S' 2S' 2,6 6,9 Shaded areas indicate instructions not available in iAPX 86,88 microsystems, 4-45 AFN.()2060B inter iAPX 286/10 80286 INSTRUCTION SET SUMMARY '[;Onrln,U90 FUN&nON IDlY = Integer divide (signed) Register-Byte Register-WOrd MemolY-Byte MemolY-WOrd AAM =ASCII adjUst for mulbply AAD = ASCII adjUst for divide caw = Convert byte to word CWD = Convert word to double word LOGIC ShiltlRotale Instructions: Register/MemolY by 1 Reglster/MemolY by CL m Inslr.cUon 000 ROL 001 ROR 01 0 RCL 01 1 RCR 1 0 0 SHLISAL 1 01 SHR 111 SAR AND=And: Reg/memory and register to either 10 01 0 0 0 d wi mod reg rim 2,7' 2,7' Immediate to reglster/memolY 11000000wl mod100 rim data datalfw=1 3,7' 3,7' Immediate to accumulator 10 01 0 0 1 0 wi data dataifw=1 TEST= And luncHon 10 flags, no result Register/memolY and register 11000010wl mod reg rim 2,6' 2,6' Immediate data and reglsterlmemory 11 111011 wi modOOO rim data dataifw=1 3,6' 3,6' Immediate data and accumulator 11010100wl data dataifw=1 OR=Or. Reg/memolY and register to either IOOOO10dwi mod reg rim 2,7' 2,7' Immediate to reglsterlmemory 11000000wl 'modOO1 rim data data Ifw= 1 3,7' 3,7' Immediate to accumulator 10 00 0 1 1 0 wi data datalfw=1 XOR = Exclusive or. Reg/memOIY and register to either IOO1100dwi mod reg rim I 2,7' 2,7' Immedlateto register/memOIY 11000000wl I mod110 rim data datalfw=1 3,7' 3,7' Immediate to accumulator 10 01 1 0 1 0 wi data I datalfw= 1 3 3 NOT = Invert reglster/memolY 11 11 1 011 wi mod010 rim I 2,7~ 2,7' STRING MANIPULAnON: MOYS = Move byteIWord 11010010wl 5 9 CMPS = Compare byte/Word 11 01 001 1 wi 8 SCAS = Scan byte!word 11 0101 11 wi 'r LODS = Load bytelwd to ALIAX Shaded areas indicate instructiot,s nQt available in iAPX 86, 88 microsystems. 4-46 AFN'()2080B iAPX 286/10 80286 INSTRUCTION SET SUMMARY Re.1 Prateclad FUNCTION Virtual AddI8ll Virtual FORMAT Add,... Mode AINfIaa Mode Mode Repeated by count In CX MoVS ~ Move string 11 11 1 001 0 11010010 wi 5+4n 5+4n CMPS ~ Compare string 5+9n 5+9n SCAS ~ Scan stnng 5+8n 5+8n LOoS ~ Load string 5+4n 5+4n CONTROL TRANSFER = CALL Call: Direct within segment 11 1 1 0 1 00 0 I disp-Iow disp-high Re~lster/memory indirect within segment 11 111111 1 I modOl0 rim 8,9 Direct Intersegment 11 00 1 1 0 1 o I segment offset 13+m 26+m 8,11,12 I segment selector Protected Mode Only (Direct intersegment): Via call gate to same privilege level 41+m 8,11,12 Via call gate to different privilege level, no parameters 12+m 8,tl,12 Via call gate to different privilege level, x parameters 86+4x+m 8,11,12 ViaTSS 177+m 8,11,12 Via task gate 182+m 8,11,12 Indirect intersegment 11 111111 modOl1 rim (mod" 11) 16+m 29+m' 8,9,tl,I2 Protected Mode Only (Indirect intersegment): Via cali gate to same privilege level 44+m' 8,9,11,12 Via call gate to different privilege level, no parameters 83+m' 8,9,11,12 ViaTSS . Via call gate to different privilege level, x parameters Via task gate 9O+4x+m* 180+m' 185+m' 8,9,11,12 8,~,II,12 8,9,11,12 = JMP Unconditional jump: ShortJlong 11 1 1 01 01 1 dlsp-Iow 7+m 7+m Direct within segment 11 1 1 0 1 00 1 dlsp-Iow dlsp-hlgh 7+m 7+m Reglster/memory indirect within segment 11 111111 11 mod 1 00 rim 7+m,11 7+m,ll+m' 8,9 Direct Intersegment 11 1 1 0 1 0 1 01 segment offset li+m 23+m 8,11,12 I segment selector Protected Mode Only (Direct intersegment): Via call gate to same privilege level 38+m 8,11,12 ViaTSS 175+m 8,11,1~ Via task gate 180+m 8,11,12 Indirect Intersegment 11 1 l I t 1 1 11 modl0l rim (mod" 11) 15+m' 26+m' 8,9,11,12 Protected Mode Only (Indirect intersegment): Via call gate III same privilege level 41+m' 8,9,11,12 VlaTSS 178+m' 8,9,I1,t2 Via task gate 183'+m' 8,!,11,12 = RET Return from CALL: Within segment 11 1 0 0 0 0 1 11 l1+m 11+m 8,9 Within seg adding Immed to SP 11 1 0 0 0 01 01 data-low data-high l1+m 11+m 8,9 Intersegnient 11 1 0 0 1 0 1 11 15+m 25+m 8,9,11,12 Intersegmentaddlng immediate to SP II 1 0 0 1 0 1 01 data-low data-high 15+m 8,9,11,12 Protected Mode Only (RET): To different level 55+m Shaded areas indicate instructions not available in iAPX 86, 88 microsystems. 4-47 4FN.Q206QB iAPX 286/10 80286 INSTRUCTION SET SUMMARY Virtual FUNCTION FORMAT Address Mode CONTROL JE/JZ =Jump on equmlzero 10 1 1 1 0 1 0 0 dlsp 7+mor3 7+mor3 JLlJNGE ~ Jump on leSS/not greater or equal 10 1 1 1 1 1 0 0 disp 7+mor3 7+mor3 JLE/JNG ~ Jump on less or equallnot greater 10 1 1 11 1 1 0 disp 7+mor3 7+mor3 JB/JNAE ~ Jump on belowlnotabove or equal 10 1 1 1 0 0 1 disp 7+mor3 7+mor3 JBElJNA ~ Jump on bolow or equaVnotabove 10 1 1 1 0 1 1 0 disp 7+mor3 7+mor3 JP/JPE ~ Jump on parr~lpan~ even 10 1 1 1 1 0 1 0 dlsp 7+mor3 7+mor3 JO ~Jump on overflow 10 11 1 0 00 0 dlsp 7+mor3 7+mor3 JS~Jumponsrgn 10 1 1 1 1 00 0 dlsp 7+mor3 7+mor3 JNElJNZ ~ Jump on notequallnotzem 10 1 1 1 0 1 0 1 drsp 7+mor3 7+mor3 JNLlJGE ~ Jump on not les~greater "equal 10 1 1 1 1 1 0 1 dlsp 7+mor3 7+mor3 JNLElJG ~ Jump on not less orequallgreater 10 1 1 1 1 1 1 disp 7+mor3 7+mor3 JNB/JAE ~ Jumpon not belowlaboveorequal 10 1 1 1 0 0 1 disp 7+mor3 7+mor3 JNBElJA ~Jump on not b~ow orequallabove 10 1 1 1 0 1 1 dlsp 7+mor3 7+mor3 JNP/JPO ~Jump onnotp~lparodd 10 1 1 1 1 0 1 disp 7+mor3 7+mor3 JNO ~ Jump on notove~o. 10 1 1 1 0 00 1 disp 7+mor3 7+mor3 JNS=JumponnotsilJll 10 1 1 1 1 00 1 disp 7+mor3 7+mor3 LOOP ~ loop ex urnes 11 1 1 0 0 0 1 0 disp 8+mor4 8+mor4 LOOPZ/LOOPE ~ loopwhilezerolequaJ 11 1 1 0 000 1 disp 8+mor4 8+mor4 LOOPNZlLOOPNE ~ loop whUe notzera/equal 11 1100000 disp 8+",or4 8+mor4 JCXZ ~ Jump on CXzero 11 1 1 0 0 0 1 1[ drsp 8+mor4 8+mor4 = INT Interrupt: Type specified 11 1 0 0 1 1 0 11 type 23+m Type 3 fl 1 0 0 1 1 0 0 I 23+m INTO ~ Interrupt on overflow 11 1 0 0 1 1 1 01 24+mor3 24+mor3 131no 13ilno interrupt) interrupt) Protected Mode Only: Via interrupt or trap gate to same priVilege level , 40+m 8,11,12 Via interrupt or trap gate to fit different privilege level 78+m 8,11,12 Via Task Gate 167+m 8,11,12 IRET = tnterrupt return 11 1 001 1 1 11 17+m 31+m 2,4 8,9,11,12,15 Protected Mode Only: To different privllegelevet 55+m 8,9,11,12,15 To different task (NT ~ 1) 169+m 8,9,11,12 Shaded areas indicate instructions not available in iAPX 86,88 microsystems. 4-48 AFN·02060B iAPX 286/10 80286 INSTRUCTION SET SUMMARY IL[]lnIII~IJ"D1 Real Protected Real Ptotecled Address Vll1ual Address Vll1ual FUNCTION FORMAT Mode Address Mode Address Mode Mode PROCESSOR CONTROL CLC =Clear carry 11 1 1 1 1 00 0 I CMC = Complement carry 11 11 1 01 0 1 I STC =Set carry 11 11 1 100 1\ CLO = Clear direction 11 1 1 1 1 1 0 0 I STO =Set direction 11 1 1 1 1 1 0 1 I CLI =Clear interrupt 1 1 1 1 01 0 I 14 STI = Set interrupt 1 1 1 1 01 tI 14 HLT=Halt 13 WAIT = Wait LOCK =Bus lock prefix 14 ESC = Processor Extension Escape It 0 0 1 1 TT T I mod LLL rim I 9-20· 17 (m LLL are opcode to processor extension) Shaded areas indicate instructions not available in iAPX 86, 88 microsystems. 4-49 AFN·02060B inter iAPX286/10 Footnotes The effective Address (EA) of the memory operand is REG is assigned according to the following table: computed according to the mod and rim fields: 16-Bit(w 1)= = S-Bit(w 0) 000 AX 000 AL if mod = 11 then rim is treated as a REG field 001 CX 001 CL if mod = 00 then OISP = 0', disp-Iow and disp-high 010 OX 010 OL are absent 011 BX 011 BL if mod = 01 then DISP = disp-Iow sign-extended to 100 SP 100 AH 16-bits, disp-high is absent 101 BP 101 CH if mod = 10 then OISP = disp-high: disp-Iow 110 SI 110 OH if rim = 000 then EA = (BX) + (SI) + OISP 111 01 111 BH if rim = 001 then EA = (BX) + (01) + OISP if rim = 010 then EA = (BP) + (SI) + OISP The physical addresses of all operands addressed by if rim = 011 then EA = (BP) + (01) + OISP the BP register are computed using the SS segment if rim = 100 then EA = (SI) + OISP register. The physical addresses of the destination op- if rim = 101 then EA = (01) + OISP erands of the string primitive operations (those ad- if rim = 110 then EA = (BP) + OISP' dressed by the 01 register) are computed using the ES segment, which may not be overridden. if rim = 111 then EA = (BX) + OISP OISP follows 2nd byte of instruction (before data if required) 'exceptifmod = 00 and rim = 110 then EA = disp·high: disp·low. SEGMENT OVERRIDE PREFIX 1001reg1101 reg is assigned according to the following: Segment reg Register 00 ES 01 CS 10 SS 11 OS 4-50 AFN.()2060B intJ 82284 CLOCK GENERATOR AND READY INTERFACE FOR iAPX 286 PROCESSORS • Generates System Clock for iAPX 286 • 18-pin Package Processors • Single +5'1, Power Supply • Uses Crystal or TTL Signal for Frequency Source • Generates System Reset Output from Schmitt Trigger Input • Provides L.ocal READY and Multibus* • Available in EXPRESS READY Synchronization - Standard Temperature Range - Extended Temperature Range The 82284 is a clock generator/driver which provides clock signals for iAPX 286 processors and support compo- nents. It also contains logic to supply READY to the CPU from either asynchronous or synchronous sources and synchronous RESET from an asynchronous input with hysteresis. RESET £J SYNCHRONIZER . RESET X1-f---f ARDY Vcc SRDY ARDYEN X2-r-"L:='J CLK SRDYEN S1 EFI-+------' READY SO FIC -+---------' EFI N.C. ARDYEN -+-- INTEL CORPORATION 1982 4-51 ORDER NUMBER 210453·001 82284 Table 1. Pin Description The following pin function descriptions are for the 82284 clock generator. Symbol Type Name and Function ClK a System Clock is the signal used by the processor and support devices which must be synchro- nous with the processor. The frequency of the ClK output has twice the desired internal pro- cessor clock frequency. ClK can drive both TTL and MaS level inputs. F/C I Fr.!.quencyICrystal Select is a strapping option to select the source for th~ ClK output. When F/C is strapped lOW, the internal crystal oscillator drives ClK. When F/C is strapped HIGH, the EFI input drives the ClK output. X1, X2 I Crystal In are the pins to whic!! a parallel resonant fundamental mode crystal is attached for the internal oscillator. When F/C is lOW, the internal oscillator will drive the ClK output at the crystal frequency. The crystal frequency must be twice the desired internal processor clock frequency. EFI I External Frequency In drives ClK when the F/C input is strapped HIGH. The EFI input fre- quency must be twice the desired internal processor clock frequency. PClK a Peripheral Clock is an output which provides a SO%.duty cycle clock with 112 the frequency of ClK. PlCK will be in phase with the internal processor clock following the first bus cycle after the processor has been reset. ARDYEN I Asynchronous Ready Enable is an active lOW input which qualifies the ARDY input. ARDYEN selects ARDY as the source of ready for the current bus cycle. Inputs to ARDYEN may be applied asynchronously to ClK. Setup and hold times are given to assure a guaranteed response to synchronous inputs. ARDY I Asynchronous Ready is an active lOW input used to terminate the current bus cycle. The ARDY input is qualified by ARDYEN. Inputs to ARDY may be applied asynchronously to ClK. Setup and hold times are given to assure aguaranteed4"esponse to synchronous inputs. SRDYEN I Synchronous Ready Enable is an active lOW input which qualifies SRDY. SRDYEN selects SRDY as the source for READY to the CPU for the current bus cycle. Setup and hold times must be satisfied for proper operation. SRDY I Synchronous Ready is an active lOW input used to terminate the current bus cycle. The SRDY input is qualified by the SRDYEN input. Setup and hold times must be satisfied for proper oper- ation. READY a Ready is an active lOW output which2!9nals~current bus cycle is to be completed. The SRDY, SRDYEN, ARDY, ARDYEN, S1, SO and RES inputs contro.! READY as explained later in the READY generator section. READY is an open collector output requiring an external 300 ohm pull up resistor. SO,S1 I Status inputs prepare the 82284 for a sUbsequent bus cycle. SO and S1 synchronize PClK to the internal processor clock and control READY. These inputs have pullup resistors to keep them HIGH if nothing is driving them. Setup and hold times must be satisfied for proper oper- ation. RESET a Reset is an active HIGH output which is derived from the RES input. RESET is used to force the system into an initial state. When RESET is active, READY will be active (lOW). RES I Reset In is an active lOW input which generates the system reset signal RESET. Si~s to RES may be applied asynchronously to ClK. A Schmitt trigger input is provided on RES, so that an RC circuit can be used to provide a time delay. Setup and hold times are given to assure a guaranteed response to synchronous inputs. Vee System Power: +SV power supply GND System Ground: 0 volts FUNCTIONAL DESCRIPTION ready synchronization logic and system reset genera- tion logic. Introduction Clock Generator The 82284 generates the clock, ready, and reset sig- The elK output provides the basic timing control for nals required for iAPX 286 processors and support an iAPX 286 system. elK has output characteristics components. The 82284 is packaged in an 18-pin DIP sufficient to drive MOS devices. elK is generated by and contains a crystal controlled OSCillator, MOS either an internal crystal oscillator or an external clock generator, peripheral clock generator, Multibus source as selected by the Fie strapping option. When 4-52 AFN·007868 82284 Fro is lOW, the crystal oscillator drives the ClK out- Reset Operation put. When FIC is HIGH, the EFI input drives the ClK output. The reset logic provides the RESET output to force the system into a known, initial state. When the RES The 82284 provides a second clock output (PClK) for input is active (lOW), the RESET output becomes ac- peripheral devices. PClK is ClK divided by two. tive (HIGH). RES is synchronized internally at the fail- PClK has a duty cycle of 50% and TTL output drive ing edge of ClK before generating the RESET output characteristics. PClK is normally synchronized to the (see waveforms). Synchronization of the RES internal processor clock. input introduces a one or two ClK delay before affect- After reset, the PClK signal may be out of phase with ing the RESET output. the internal processor clock. The Sf and SO signals of At power up, a system does not have a stable Vcc and the first bus cycle are used to synchronize PClK to ClK. To prevent spurious activity, RES should be as- the internal processor clock. The phase of the PClK serted until Vcc and ClK stabilize at their operating output changes by extending its HIGH time beyond values. iAPX 286 processors and support compo- one system clock (see waveforms). PClK is forced nents also require their RESET inputs be HIGH a mini- HIGH whenever either SO or S1 were active (lOW) for mum number of ClK cycles. An RC network, as the two previous ClK cycles. PClK continues to os- shown in Figure 4, will keep RES lOW long enough to cillate when both SO and S1 are HIGH. satisfy both needs. Since the phase of the internal processor clock will not change except during reset, the phase of PClK will not change except during the first bus cycle after vee reset. Oscillator 1N914 * .-- 10KO RES 82284 ~l The oscillator circuit of the 82284 is a linear Pierce os- 470 cillator which requires an external parallel resonant, fundamental mode, crystal. The output of the oscilla- tor is internally buffered. The crystal frequency cho- sen should be twice the required internal processor l 1 + 1O F • clock frequency. The crystal should have a typical load capacitance of 32 pF. Figure 4. Typical RC RESET Timing Circuit X1 and X2 are the oscillator crystal connections. For stable operation of the oscillator, two loading capaci- A Schmitt trigger input with hysteresis on RES as- tors are recommended, as shown in Figure 3. The sures a single transition of RESET with an RC circuit sum of the board capacitance and loading capaci- on RES. The hysteresis separates the input voltage tance should equal the values shown. It is advisable to level at which the circuit output switches between limit stray board capacitances (not including the effect HIGH to lOW from the input voltage level at which the of the loading capacitors or crystal capacitance) to circuit output switches between lOW to HIGH. The less than 10 pF between the X1 and X2 pins. RES HIGH to lOW input transition voltage is lower than the RES lOW to HIGH input transition voltage. As long as the slope of the RES input voltage remains in the same direction (increasing or decreasing) 7 10 around the RES input transition voltage, the RESET X1 CLK CLK output will make a single transition. 5 Vee iAPX286 t3~0 CPU or -r 8 SUPPORT Ready Operation I 1 X2 82284 __ 4 COMPONENT 38PF 10pF READY READY The 82284 accepts two ready sources for the system ":' ":' fF/C ready signal which terminates the current bus cycle. Either a synchronous (SRDY) or asynchronous ready (AROY) source may be used. Each ready input has an enable (SRDYEN and ARDYEN) for selecting the type of ready source required to terminate the current bus Figure 3. Recommended Crystal and Ready cycle. An address decoder would normally select one Connections of the enable inputs. 4-53 AFN-007868 82284 READY is enabled (lOW), if either SRDY +. SRDYEN. These inputs are sampled on the falling SRDYEN = 0 or ARDY + ARDYEN = 0 when sam- edge of elK when Sf and SO are inactive and PClK is pled by the 82284 READY generation logic. READY HIGH. READY is forced active when both SRDY and will remain active for at least two ClK cycles. SRDYEN are sampled as lOW. The READY output has an open-collector driver al- Figure 6 shows the operation of ARDY and lowing other ready circuits to be wire or'ed with it. The ARDYEN. These inputs are sampled by an internal READY signal of an iAPX 286 system requires an ex- synchronizer at each falling edge of ClK. The output ternal 300 ohm pull-up resistor. To force the READY of the synchronizer is then sampled when PClK is signal inactive (HIGH) at the'start of a bus cycle, the HIGH. If the synchronizer resolved both the ARDY READY output floats when either S1 or SO are sam- and ARDYEN inputs to have been lOW, REAiJY be- pled lOW at the falling edge of elK. Two system comes lOW. When both ARDY and ARDYEN have clock periods are allowed for the pull-up resistor to been resolved as active, the SFIDY and SRDYEN in- pull the READY signal to V1H • When RESET is active, puts are ignored. READY is forced active one elK later (see wave- READY remains active until either S1 or SO are sam- forms). pled lOW, or the ready inputs are sampled as inac- Figure 5 illustrates the operation of SRDY and tive. Ts Tc Tc T, ClK PClK READY - - -_ _ _ _- - ' Figure 5. Synchronous Ready Operation 4-54 AFN-00786B 62284 Ts Tc Tc ClK PClK READY _ _ _ _ _ _ _ _,J.r Figure 6. AsynchronCi)us Ready Operation ABSOLUTE MAXIMUM RATINGS* 'Notice: Stresses above those listed under "Absolute Maxmum Ratings" may cause permanent damage to Temperature Under Bias ............ ooe to 70°C the device. This is a stress rating only and functional Storage Temperature .......... -65°C to + 150°C operation of the device at these or any other condi- tions above those indicated in the operational sec- All Output and Supply Voltages ...... -O.5V to + 7V tions of this specification is not implied. Exposure to AlllnputVoltages ................ -1.0Vto +5.5V absolute maximum rating conditions for extended periods may affect device reliability. Power Dissipation ...................... 1 Watt D.C. CHARACTERISTICS (TA = O°C to 70°C, Vcc = 5V ± 10%) Symbol Parameter Min. Max. Units Test Conditions IF Forward Input Current -0.5 mA VF = 0.45V IR Reverse Input Current 50 uA VR = 5.25V Vc Input Forward Clamp Voltage -1.0 V Ic=-5mA Icc Power Supply Current 145 mA V1l Input lOW Voltage 0.8 V V1H Input HIGH Voltage 2.0 V VOl,V Cl Output lOW Voltage 0.45 V IOl=5mA VCH ClK Output HIGH Voltage 4.0 V IOH = -1 mA VOH Output HIGH Voltage 2.4 V, IOH = -1 mA V1HR RES Input HIGH Voltage 2.6 V VIHR-VllR RES Input Hysteresis 0.25 V C1 Input Capacitance 10 pF AFN·OO786B 82284 A.C. CHARACTERISTICS (TA = O°C to WC, Vcc = 5V ± 10%) Symbol Parameter Min. Max. Units Test Conditions tl Ei=1 to CLK Delay 40 ns t2 EFI LOW Time 32 ns at 1.5V CL = 150 pF t3 EFI HIGH Time 2B ns 10L = 5 ma t4 CLK Period 55 500 ns t5 CLK LOW Time 15 ns at 0.6V See Note 1. t6 CLK HIGH Time 20 ns at 3.BV t7 CLK Rise Time 10 ns From 1.0V to 3.5V See Note 2. Is I CLK Fall Time 10 ns From 3.5V to 1.0V 19 Status Setup Time 22.5 ns 110 Status Hold Time 0 ns 111 SRDY + SRDYEN Setup Time 15 ns 112 SRDY+SRDYEN Hold Time 0 n's al O.BV and 2.0V on input and O.BV on CLK t 13 ARDY+ARDYEN Setup Time 0 ns '14 ARDY+ARDYEN Hold Time 16 ns t15 RE~ Setup Time 16 ns t 16 RES Hold Time 0 ns t17 READY Inactive Delay 5 ns at O.BV C L = t?O pF t 18 R~ADY Active belay 0 24 ns 10L = 20 mA t 19 PCLK Delay 0 40 ns at O.BV on CLK to See Note 3. t 20 RESET Delay 0 40 ns O.BV or 2.0V on output t21 PCLK Low Time t 4-12.5 ns at 0.6V See Note 3. t22 PClK High Time t4-12.5 ns at 3.BV Note 1. CL = 150 pF, 10L = 5 mao With either the internal oscillator with the recommended crystal and load or the EFI input. Note 2. C L = 150 pF 10L = 5mA Note 3. 10L = 5mA CL = 75 pF 4-56 AFN·00786B 82284 Waveforms ClK as a Function of EFI EFI eLK NOTE: T~e EFI input lOW and HIGH times as shown are required to guarentee the elK lOW and HIGH times shown. RESET and READY Timing as a Function of RES wit" Sf and SO HIGH NOTE 1: This is an asynchronous input. The setup and hold times shown are required to guarantee the response shown. READY and PClK Timing with RES HIGH NOTE 1: This is an asynchronous input. The setup and hold times shown are required to guarantee the response shown. 4-57 AFN·OO786B 82288 IUS CONTROLLER FOR IApx 288 'ROCESSORS • Provides Commands and Contrel for • Optional Multibus· Compatible Local and System Sus Timing • Offers Wide Flexibility In System • Control Drivers with 16 ma IOL and Configurations 3-State Command Drivers with 32 ma IOL • Flexible Command Timing • Single + 5V Supply The Intel 82288 Bus Controller is a 20·pin HMOS component for use in iAPX 286 microsystems. The bus controller provides command and control outputs with flexible timing options. Separate command out· puts are used for memory and 1/0 qevices. ThE! data bus Is controlled with separate data enable and direc· tion control signals. ' Two modes of operation are possible via a strapping option: Multibus compatible bus cycles, and high speed bus cycles. READY VCC STATUS SO ClK so [ 51 STATUS COMMAND 51 DECODER MIlO MIlO OUTPUT lOGIC MCE DT/R ALE DEN ClK-+--+I MB CEN/AEN, CONTROL INPUTS CMDlY CENl CEN/AEN CENl MRi5C INTA CIlftDlY MWTC IORC READY GND IOWC M8 Figure 1. 82288 Block Diagram Figure 2. 822813 Pin Diagram *Multibus is a patented bus of intel. Intel CorporatIon Assumes No Responsibility for the Use of Any Circuitry Other Than Circuitry Embodied In an Intel Product. No Other Circuit Patent Licenses are Implied JUNE 1982 © INTEL CORPORATION, 1982 4-58 Order Number· 210471-001 inter 82288 Table 1. Pin Description The following pin function descriptions are for the 82288 bus controller. Symbol Type Name and Function ClK I System Clock provides the basic timing control for the 82288 in an iAPX 286 micro- system. Its frequency is twice the Internal processor clock frequency. The falling edge of this input signal establishes when inputs are sampled and command and control outputs change. SO, S1 I Bus Cycle Status starts a bus cycle and, along with MilO, defines the type of bus cycle. These inputs are active lOW. A bus cycle is started when either 51 or SO is sampled lOW at the falling edge of ClK. These inputs have pullups sufficient to hold them HIGH when nothing drives them. Setup and hold times must be met for proper operation. iAPX 286 Bus Cycle Status Definition MIlO S1 SO Type of Bus Cycle 0 0 0 Interrupt acknowledge 0 0 1 1/0 Read 0 1 0 110 Write 0 1 1 None; idle 1 0 0 Halt or shutdown 1 0 1 Memory read 1 1 0 Memory wrote 1 1 1 None; idle MIlO I Memory or 1/0 Select determines whether the current bus cycle is in the memory space or 1/0 space. When lOW, the current bus cycle is in the 1/0 space. Setup and hold times must be met for proper operation. MB I Multlbus Mode Select determines timing of the command and control outputs. When HIGH, the bus controller operates in Multibus mode. When lOW, the bus controller optimizes the command and control output timing for short bus cycles l The function of the CEN/AEN input pin is selected by this signal. This input is intended to be a strapping option and not dynamically changed. This input may be connected to VCC or GND. CENl I Command Enable Latched is a bus controller select signal which enables the bus con- troller to respond to the current bus cycle being initiated. CENl is an active HIGH input' latched internally at the start of each bus cycle. CEN l is used to select the appropriate bus controller for each bus cycle in a system where the CPU has more than one bus it can use. This input may be connected to VCC to select this 82288 for all transfers. No control inputs affect CENL. Setup and hold times must be met for proper operation. CMDLY I Command Delay allows delaying the start of a command. CMDlY is an active HIGH input. If sampled HIGH, the command output is not activated and CMDlY i.s again samplOd at the next ClK cycle. When sampled lOW the selected command is enabled. If REA Y is detected lOW before the command output is activated, the 82288 will ter- minate the bus cycle, even if no command was issued. Setup and hold times must be satisfied for proper operation. This input may be connected to GND if no delays are re- quired before starting a command. READY I READY indicates the end of the current bus cycle. READY. is an active lOW input. Multibus mode reg~res at least one wait state to allow the command outputs to become active. REA Y must be lOW during reset, to force the 82288 into the Idle state. Setup and hold times must be met for proper operation. 4-59 AFN'()0181A 82288 Table 1. Pin Description (Cont.) Symbol Type Name and Function CEN/AEN I Command Enable/Address Enable controls the command and DEN outputs of the bus controller. CEN/AEN inputs may be asynchronous to CLK. Setup and hold times are given to assure a guaranteed response to synchronous inputs. This input may be con- nected to VCC or GND. When MB is HIGH this pin has the AEN function. AEN is an active LOW input which in- dicates that the CPU has been granted use of a shared bus and the bus controller com- mand outputs may exit 3-state OFF and become inactive (HIGH). AEN HIGH indicates that the CPU does not have control of the shared bus and forces the command outputs into 3-state OFF and DEN inacti~OW}. AEN would normally be controlled by an 82289 bus arbiter which activates AEN when that arbiter owns the bus to which the bus controller is attached. When MB is LOW this pin has the CEN,function. CEN is an unlatched active HIGH input which allows the bus controller activate its command and DEN outputs. With MB LOW, CEN LOW forces the command and DEN outputs inactive but does not tristate them. ALE 0 Address Latch Enable controls the address latches used to hold an address stable dur- ing a bus cycle. This control output is active HIGH. ALE will not be issued for the halt bus cy~le and is not affected by any of the control inputs. MCE 0 Master Cascade Enable signals that a cascade address from a master 8259A interrupt controller may be placed onto the CPU address bus for latching by the address latches under ALE control. The CPU's address bus may then be used to broadcast the cascade address to slave interrupt controllers so only one of them will respond to the interrupt acknowledge cycle. This control output is active HIGH. MCE is only active during inte'r- rupt acknowledge cycles and is not affected by any control input. Using MCE to enable cascade address drivers requires latches which save the cascade address on the falling edge of ALE. DEN 0 Data Enable controls when data transceivers connected to the local data bus should be enabled. DEN is an active HIGH control output. DEN is delayed for write cycles in the Multibus mode. DT/R 0 Data Transmit/Receive establishes the direction of data flow to or from the local data bus. When HIGH, this control output indicates that a write bus cycle i§..being performed A LOW indicates a read bus cycle. DEN is always in2ctive when DT/R changes states. This output is HIGH when no bus cycle is active. DT/R is not affected by any of the con- trol inputs. 10WC 0 I/O Write Command instructs an I/O device to read the data on the data bus. This com- mand output is active LOW. The MB and CMDLY inputs control when this output becomes active. READY controls when it becomes inactive. IORC 0 I/O Read Command instructs an I/O device to place data onto the data bus. This com- mand output is ~LOW. The MB and CMDLY inputs ccmtrol when this output becomes active. READY controls when it becomes inactive. MWTC 0 Memory Write Command instructs a memory devic£l to read the data on the data bus. This command output is active LOW. The MB and CMDLY inputs control when this out- put becomes active. READY controls when it becomes inactive. MRDC 0 Memory Read Command instructs the memory device to place data onto the data bus. This command outp!,!t is active LOW. The MB and CMDLY inputs control when this out- put becomes active. READY controls when it becomes inactive. INTA 0 Interrupt Acknowledge tells an interrupting device that its interrupt request is being acknowledged. This command output is active LOW. The MB and CMDLY inputs con- trol when this output becomes active. READY controls when it becomes inactive. Vec System Power: + 5V power supply GND System Ground: 0 volts 4-60 AFN-00787A inte' 82288 FUNCTIONAL DESCRIPTION signals except when enabled by an external bus arbiter such as the 82289. Introduction Separate DEN and DT/R outputs control the data The 82288 bus controller is used in iAPX 286 transceivers for all buses. Bus contention is systems to provide address latch control, data eliminated by disabling DEN before changing transceiver control, and standard level-type com- DT/R. The DEN timing allows sufficient time for mand outputs. The command outputs are timed tristate bus drivers to enter 3-state OFF before and have sufficient drive capabilities for large TTL enabling other drive,rs onto the same bus. buses and meet all IEEE-796 requirements for Multibus. A special Multibus mode is provided to The term CPU refers to any iAPX 286 processor or statisfy all address/data setup and hold time re- iAPX 286 support component which may become quirements. Command timing may be tailored to an iAPX 286 local bus master and thereby drive the special needs via a CMDLY input to determine the 82288 status inputs. start of a command and READY to determine the end of a command. Processor Cycle Definition Connection to multiple buses are supported with Any CPU which drives the local bus uses an inter- a latched enable input (CENL). An address nal clock which is one half the frequency of the decoder can determine which, if any, bus con- system clock (CLK) (see Figure 3). Knowledge of troller should be enabled for the bus cycle. This the phase of the local bus master internal clock is input is latched to allow an address decoder to required for proper operation of the iAPX 286 local take full advantage of the pipelined timing on the bus. The local bus master informs the bus con- iAPX 286 local bus. troller of its internal clock phase when it asserts the status signals. Status signals are always Buses shared by several bus controllers are sup- asserted in Phase 1 of the local bus master's inter- ported. An AEN input prevents the bus controller nal clock. from driving the shared bus command and data VeH eLK Vel Figure 3. ClK Relationship to the Processor Clock and Bus T-States 4-61 AFN'()0787A 82288 Bus State· Definition Bus Cycle Definition The 82288 bus controller has three bus states (see The S1 and SO inputs signal the start of .a bus cy- Figure 4): Idle (TI) Status (Ts) and Command (Tel. cle. When either input becomes lOW, a bus cycle Each bus state is two ClK cycles long. Bus state is started. The Ts bus state is defIned to be the two phases correspond to the internal CPU processor ClK cycles during which either S1 or SO are active clock phases. (see Figure 5). These inputs are sampled by the 82288 at every falling edge of ClK. When either 51 The TI bus state occurs when no bus cycle is cur- or SO are sampled lOW, the next ClK cycle is con- rently active on the iAPX 286 local bus. This state sidered the second phase of the internal CPU clock maybe repeated indefinitely. When control of the cycle. local bus is being passed between masters, the bus remains in the TI state. The local bus enters the Tc bus state after the Ts state. The shortest bus cycle may have one Ts state and one Tc state. longer bus cycles are formed by repeating Tc states. A repeated Tc bus state is called a wait state. The READY input determines whether the current Tc bus state is to be repeated. The READY input has the same timing and effect for all bus cycles. READY is sampled at the end of each Tc bus state to see if it is active. If sampled HIGH, the Tc bus state is repeated. This is called inserting a wait state. The control and command outputs do not change during wait states. When READY is sampled lOW, the current bus cy- cle is terminated. Note that the bus controller may enter the Ts bus state directly from Tc if the status lines are sampled active at the next falling edge of. ClK. . READY NEW CYCLE Figure 4. 82288 Bus States VCH ClK VCL 51.Sii V,H FROM CPU v" Figure 5. Bus Cycle Definition 4-62 AFN'()0787A 82288 Table 2. Command and Control Outputs for Each Type of Bus Cycle Type of MilO 51 SO Command DT/R ALE,DEN MCE Bus Cycle Activated State Issued? Issued? Interrupt Acknowledge 0 0 0 INTA LOW YES YES 1/0 Read 0 0 1 10RC LOW YES NO 1/0 Write 0 1 0 10WC HIGH YES NO None; idle 0 1 1 None HIGH NO NO Halt/Shutdown 1 0 0 None HIGH NO NO Memory Read 1 0 1 MRDC LOW YES NO Memory Write 1 1 0 MWTC HIGH YES NO None; idle 1 1 1 None HIGH NO NO Operating Modes Bus cycles come in three forms: read, write, and Two types of buses are supported by the 82288: halt. Read bus cycles include memory read, 1/0 Multibus and non-Multi bus. When the MB input is read, and interrupt acknowledge. The timing of the strapped HIGH, Multibus timing is used. In associated read command outputs (MRDC, 10RC, Multibus mode, the 82288 delays command and and INTA), control outputs (ALE, DEN, DT/R) and data activation to meet IEEE-796 requirements on control inputs (CEN/AEN, CENL, CMDLY, MB, and address to command active and write data to com· READY) are identical for all read bus cycles. Read mand active setup timing. Multibus mode requires cycles differ only in which command output is ac- at least one wait state in the bus cycle since the tivated. The MCE control output is only asserted command outputs are delayed. The non·Multibus during interrupt acknowledge cycles. mode does not delay any outputs and does not re- Write bus cycles activate different control and quire wait states. The MB input affects the timing cornmand outputs with different timing than read of the command and DEN outputs. bus cycles. Memory write and 1/0 write are write bus cycles whose timing for command outputs Command and Control Outputs (~ and lOWe), control outputs (ALE, DEN, The type of bus cycle performed by the local bus DT/R) and control inpllts (CEN/AEN, CENL, CMDLY, master is encoded in-the M/i5, 51, and SO inputs. MB, and READY) are identical. They differ only in Different command and control outputs are ac- which command output is activated. tivated depending on the type of bus cycle. Table 2 Halt bus cycles are different because no command indicates the cycle decode done by the 82288 and or control output is activated. All control inputs are the effect on command, DT/R, ALE, DEN, and MCE ignored until the next bus cycle is started via 51 outputs. and 50. 4-63 AFN'()0787A inter 82288 Figures 6·10 show the basic command and control output timing for read and write bus cycles. Halt bus cycles are not shown since they activate no T, Ts T, Te outputs. The basic idle·read·idle and idle·wrlte·idle bus cycles are shown. The signal label CMD elK represents the appropriate command output for the bus cycle. For Figures 6-10, the CMDLY input is 51.SO connected to GND and CENL to Vee. The effects of CENL and CMDLYare described later in the sec· tion on control inputs. ALE Figures 6 and 7 show non·Multibus cycles. MB is connected to GND while CEN is connected to Vee. DEN Figure 6 shows a read cycle with no wait states while Figure 7 shows a write cycle with one wait DT/R state. The READY input is shown to illustrate how wait states are added. CMD iiEAiiY Figure 6. Idle·Read·ldle ~us Cycles with MB =0 T, Ts Tc Tc T, ClK ALE - - - - - - t ' DEN _ _ _ _- - I VOH DT/R -------+------+-----+------- CMD Figure 7. Idle·Write·ldle Bus Cycles with MB = 0 4-64 AFN.Q0787A inter 82288 Bus cycles can occur back to back with no T, bus states between Te and Ts. Back to back cycles do not affect the timing of the command and control outputs. Command and' control outputs always 1ST WRITE CYCLE --I- 2ND WRITE CYCLE reach the states shown for the same clock edge (within Ts, Te, or following bus state) of a bus cycle. ~ I ~ I ~ ClK A special case in control timing occurs for back to back write cycles with MB = O. In this case, DT/R 51 • so ---f-. and DEN remain HIGH between the bus cycles (see Figure 8). The command and ALE output timing does not change. Figures 9 and 10 show a Multibus cycle with MB=1. AEN and CMDLY are connected to GND. The effects of CMDLY and AEN are described later DE~OH - - + - - - - - - - - - + in the section on control inputs. Figure 9 shows a read cycle with one wait state and Figure 10 shows VOH a write cycle with two wait states. The second wait DT/A --+---------+ state of the write cycle is shown only for example purposes and is not required. The READY input is shown to illustrate how wait states are added. CMD _ _ _. J Figure 8. Write·Write Bus Cycles with MB = 0 T, Ts Te Te T, Figure 9. Idle·Read·ldle Bus Cycles with MB = 1 4-65 AFN'()0787A inter 82288 T, T. To To To T, CLK §1.§O--.... ALE _ _ _ _ _.J DEN _ _ _ _ _ _ _ _- ' CMD Figure 10. Idle·Wrlte·ldle Bus Cycles with MB =1 The MB control input affects the timing of the com· Back to back bus cycles with MB= 1 do not malo- - 51-SO CENl ,.. CENl DT/R ALE MB CEN MB AEN Jv i * ADDRESS +!v ---- READY ClK 82289 AEN CON TROl MOO CNTl DECODER Sl,SO SYSJRESB MilO /S1 ADDRESS DATA II / A~ RESS r-l 8283 ,,/ II A,.. . ClK READY MilO 81,iii /Tlm 1.1. 80286 - DATA ~ 0 15-0 ~ 8287 ) V Figure 12. System Use of AEN and CENL 4-68 AFN-00787A 82288 CMDlY is first sampled on the falling edge of the To find the timing specification for a signal transi- ClK ending T6 • If sampled HIGH, the command tion in a particular mode, first look for a special output is not activated, and CMDlY is again case in the waveforms. If no special case applies, sampled on the next falling edge of ClK. Once then use a timing specification for the same or sampled lOW, the proper command output related function in another mode. becomes active immediately if MB=O. If MB=1, the proper oommand goes active no earlier than shown in Figures 9 and 10. ABSOLUTE MAXIMUM RATINGS* READY can terminate a bus cycle before CMDlY allows a command to be issued. In this case no Ambient Temperature Under Bias .... O·C to 70'C commands are issued and the bus controller will Storage Temperature ......... - 65'C to + 150'C deactivate DEN and DT/R in the same manner as if Voltage on Any Pin with a command had been issued. Respect to GND ............... - 0.5V to + 7V Power Dissipation ...................... 1 Watt Waveforms Discussion -NOTICE: Stresses ~bove those listed under "Ab- The waveforms show the timing relationships of in· solute Maximum Ratings" may cause permanent puts and outputs and do not show all possible tran· damage to the device. This is a stress rating only sitions of all Signals in all modes. Instead, all and functional operation of the device at these or signal timing relationships are shown via the any other conditions above those indicated in the general cases. Special cases are shown when operational sections of this specification is not im- needed. The waveforms provide some functional plied. Exposure to absolute maximum rating condi· descriptions of the 82288; however, most func· tions for extended periods may affect device tional descriptions are provided in Figures 5 reliability. through 11. D.C. CHARACTERISTICS (VCC =5V ± 10%, TA = O'C to 70'C) Symbol Parameter Min Max Units Test Conditions ICC Power Supply Current 100 mA IF Forward Input Current ClK Input -1 mA VF=0.45V Other Inputs -.5 mA VF=0.45V IR Reverse Input Current 50 uA VR=VCC VOL Output lOW Voltage Command Outputs .45 V IOl=32 mA Control Outputs .45 V IOl=16mA VOH Output HIGH Voltage Command Outputs 2.4 V IOH= -5 mA Control Outputs 2.4 V IOH= -1 mA Vil Input lOW Voltage -0.5 .8 V VCl ClK Input lOW Voltage -0.5 .6 V VIH Input HIGH Voltage 2.0 VCC+0.5 V VCH ClK Input HIGH Voltage 3.9 VCC+0.5 V IOFF Output Off Current 100 uA CClK ClK Input Capacitance 10 pF CI Input Capacitance 10 pF. 4-69 AFN.Q0787A 82288 A.C. CHARACTERISTICS (VCC = 5V ± 10%, TA = O·C 10 70·C) Symbol Parameter Min Max Units Test Conditions 11 ClK Period 62.5 250 ns al 1.5V 12 ClK HIGH Time 20 235 ns a13.9V t3 ClK lOW Time 15 230 ns a10.6V 14 ClK Fall Time 10 ns 3.5V 10 1.0V 15 ClK Rise Time 10 ns 1.0V 10 3.5V 16 MilO and Sial us Selup Time 22.5 ns 17 MilO and Sialus Hold Time 0 ns 18 CENl Selup Time 20 ns 19 CENl Hold Time 0 ns t10 READY Selup Time 38.5 ns From O.8V or 2.0V on input t11 READY Hold Time 25 ns to 0.8V on ClK. t12 CMDlY Setup Time 20 ns t13 CMDlY Hold Time 0 ns t14 AEN Setup Time 25 ns Note 1 t15 AEN Hold Time 0 ns Note 1 t16 ALE, MCE Active Delay 3 15 ns t17 ALE, MCE Inactive Delay 20 ns t18 DEN (WRITE) Inactive From CENL 35 ns t19 DT/R LOW From CLK 20 ns From O.8V on ClK t20 DEN (READ) Active From DT/R 10 50 ns to O.8V or 2.0V t21 DEN (READ) Inactive Delay 3 15 ns on output t22 DT/R HIGH From DEN Inactive 10 40 ns IOl= 16 ma 123 DEN (WRITE) Active Delay 30 ns IOH=-1 ma t24 DEN (WRITE) Inactive Delay 3 30 ns Cl= 150 pF t25 DEN Inactive From CEN 25 ns t26 DEN Active From CEN 25 . ns t27 DT/R HIGH From CLK And CEN 50 ns Note 2 t28 DEN Active From AEN 30 ns t29 Command Active Delay 3 20 ns IOl=32 ma t30 Command Inactive Delay 3 15 ns 'OH= -5 ma Cl=300 pF t31 COmmand Inactive From CEN 25 ns From 0.8V on CLK t32 Command Active From CEN 25 ns to 0.8V or 2.0V t33 Command Inactive Enable From AEN 40 ns on output t34 Command Float Time 40 ns Note 1: AEN is a asynchronous input. AEN setup and hold time is specified ~o guarantee the response shown in the waveforms. Note 2: T27 only applies to bus cycles where MB= 0, the 82288 was selected, and DEN = 0 when the cycle terminated (because CEN=O). 4-70 AFN'()o787A 82288 WAVEFORMS ClK CHARACTERISTICS ClK STATUS, ALE, MCE, CHARACTERISTICS 1 - - - - - Ts - - - - o . . f - - - - Tc - - ClK M/iO,S1,So - - - t = J ALE _ _ _ _ _ _+:!: MCE _ _ _ _ _ _- - ' CENl, CMDlY, DEN CHARACTERISTICS WITH MB =0 AND CEN = 1 DURING WRITE CYCLE ClK DEN _ _ _ _+_" CENL 4-71 AFN-00787A inter 82288 WAVEFORMS (Continued) READ CYCLE CHARACTERISTICS WITH MB = 0 AND CEN =1 ClK CMDlY DT/R ---to"\. DEN _ _-+",.....-..J CMD CENl WRITE CYCLE CHARACTERISTICS WITH MB =0 AND CEN =1 VOH-------....;,t----t------fl-:---t------ CMDlY 4-72 AFN'()()787A 82288 WAVEFORMS (Continued) CEN CHARACTERISTICS WITH MB = 0 ClK CEN DEN CMD DT/ii _ _ _ _ _ _ _ _ _ _--I,~-_I'r::' AEN CHARACTERISTICS WITH MB =1 ClK AEN DEN _ _ _J NOTE 1: AEiii is an asynchronous input. AEN setup and hold time is specified to guarantee the response shown in the waveforms. 4-73 iAPX 432 Micromainframe™ 5 Additional 432 Literature Additional data sheets on the 432 are available free of charge from the Intel Literature Department. They include: iAPX 43201/43202 VLSI General Data Processor Data Sheet (Order Number 590125) iAPX 43203 VLSI Interface Processor Data Sheet (Order Number 590130) Tentime-Timesharing Services for Developing iAPX 432 Software Data Sheet (Order Number 172464) Intel 432 Cross Development System Data Sheet (Order Number 171868) System 432/600 32-Bit Extensible Computer System Data Sheet (Order Number 590135) Intel iAPX 432 Systems Design Course (Order Number 210785) iMax 432 Multifunction Applications Executive (Order Number 172087) Unix-Compatible Software for Intel 432 Cross Development System (Order Number 172466) iAPX 43201/43202/43203 VLSI MICROMAINFRAMETM SYSTEM • Multiprocessor Computer System • Multiple I/O Subsystems provide provides a range of performance I/O Extensibility • Object Based Architecture Meets • SIlicon O.S. Provides: Operating System and High Level Language Needs , - Transparent Multiprocessor SUPPQrt - Multitasking • 240 Bytes of Virtual Address. Space - Dynamic Storage Allocatlon/Deallocatlon • Protected Addressing Increases reliability and fits High Level Language Needs - Interprocess Communication MEMORY I r-------.,I GENERAL DATA PROCESSOR ••• I G~~~~~~$JA I 43201/43202 I 4:1201/43202 I L __ .., r--.J CENTRAL SYSTEM (DATA PROCESSING) _-----.J I ,. .I L.., I L... _ _ _ , I I PROCESSORIMEMORY \ INTERCONNECT I \ I ,.-____-J'-.., L., r.Jr----------I I I r----' L __ , INTERFACE II INTERFACE I PROCESSOR PROCESSOR 43203 I 43203 I 1... __ ., r - - J I I 1 PERIPHERAL SUBSYSTEMS (1/0 PROCESSING) L.-_ _..,• • • r---i,..J a...,1- _ _ , I I I I I ~fI::~::t;}- j PERIPHERAL SUSSYSTEM I I I I L ________ JI Figure 1. General 432 System Organization The follOWing are trademarks of Intel Corporation and its affihates and may be used only to describe Intel products: Intellee, MULTIBUS, and the combination of iSeC and a numerical suffix Corporation assumes no responsibility tor the use of any Circuitry embodied In an Intel product. No other Circuit patent licenses are Implied © INTEL CORPORATION, 1981 < 5-1 172235-001, REV. A inter iAPX 43201/43202/43203 APPLICATIONS The central system is organized as a set of 432 processors that share access to a common pool of memory and to each other. General data processors The 432 is a VLSI computer system aimed at a (GDPs) perform computational work, while interface distinctive class of applications. Products well- processors (IPs) provide pathways for input/output suited to the 432 exhibit some or all of the following to and from the central memory. The number and attributes (as se~n by the OEM, not the end user).: type of processors configured in a given system is a • a range of performance (potentially extending function of performance requirements, and can be up to the level of a midrange mainframe) is varied independently of software. All 432 processors required to span a family of related products or have built-in facilities for communicating with each to provide headroom for future growth; other, both automatically and under software • maximum dependability (data integrity and control. Additional communication facilities permit uptime) of both hardware and software is programs running on the same or different process- critical; ors to exchange messages through memory. • software dominates development cost and time The central system supports up to 224 bytes (16 to m,arket; megabytes) of real memory, and a virtual memory • concurrent execution of many independent and space of 240 (over a trillion) bytes. Enforced cooperative activities characterizes the run- automatically by the processors, every data structure time environment; in the central memory is individually protected. It is • growth and evolution of services over time important to note here that "data structure" means make software revision as important as initial any organized col/ection of information, including development. such logical entities as operand stacks and sequences of code, as well as what are ordinarily considered Compared to "traditional" microcomputer applica- data structures. tions, these applications are larger (as measured by consumption of computer as well as staff and A multiprocessor design like the 432 permits widely financial resources) and are far more complex. differing systems to be built from a small collection These factors place demanding requirements on of parts. No bus design could possibly satisfy the the computer system selected to support the cOst, size, flexibility and performance requirements application. of all possible system configurations. Therefore, the 432 defines a standard processor/memory The goal of the 432 is to significantly reduce the communications protocol rather than a standard lifecycle costs of complex applications. Toward this bus. Designed to minimize bus occupancy and end, the 432 introduces a, new computer technology, exploit available bus width, the protocol is based on an integrated system of hardware, software and a variable-length (1 to 16 byte) packet of information. methodology. Processors transmit request packets to memory, and receive reply packets in response to read operations. The protocol defines interprocessor communication as well. Each application is free to SYSTEM ORGANIZATION desi,gn an interconnect structure that implements the protocol in conformance with local needs. All 432-based systems share the overall organization Independent decentralized I/O, along the lines of depicted in figure 1. The boundary between the the mainframe channel concept, is inherent in the central system and the peripheral subsystems 432. Input/output operations - including all device essentially divides responsibility for data processing control, interrupt handling and data buffering - are from input/output processing. It also serves as a delegated to peripheral subsystems. These are protective barrier: all information in central system autonomous satellite computers attached to the memory is shielded (by 432 hardware) against central system by means of 432 interface processors. unauthorized access; peripheral subsystems may The number and configuration of peripheral . or may not provide any sort of protection. Finally, subsystems is a function of application needs and processing required to satisfy a critical real-time can evolve over time. Any computer that can constraint (usually related to an I/O device) is communicate over a standard 8- or 16-bit bus, such generally performed in a peripheral subsystem, as Intel's Multibus design (IEEE standard 769), can close to the source of the constraint. serve as a peripheral subsystem .. Intel Corporation, 3585 SW 198th, Aloha, Oregon 97007 5-2 ~ inter INTEL ASYNCHRONOUS COMMUNICATIONS LINK • Communications software for VAX* • Allows development system console host computer and Intel , to function as a host terminal microcomputer development systems • Operates through direct cable • Compatible with VAx/VMS* and UNIXt connection or over telephone lines operating systems • Software selectable transmission rate • Supports Intel's Model 800, IntelleC® from "300 to 9600 baud Series II, and Series III microcomputer • Links host and debug workstation in development systems the 432 Cross Development System Intel's Asynchronous Communication Link (ACL) enables one or more Intel microcomputer development systems to communicate with a Digital Equipment Corporation VAX family computer. The link supports Intel Model 800, Intellec Series II, or Intellec Series III development systems. Programmers can use the editing and file management tools of the host computer and then download to the Intel microcomputer de- velopment ~ystem for debugging and execution. For example, the ACL provides host-to-debug worksta- tion communication for the Intel 432 Cross Development System. Programmers can use their microcom- puter development system as a host terminal and control the host directly without changing terminals. VAX HOST COMPUTER 432 CROSS DEVELOPMENT SYSTEM DEBUG WORKSTATION INTELLEC·SERIES III DEVELOPMENT SYSTEM Typical Uses of Asynchronous Communication Link (ACL) * VAX and VAXNMS are trademarks of Digital EqUipment Corporation t UNIX IS a trademark of Bell laboratOries The following are trademarks of Intel Corporation and may be used only todescnbe Intel products InteltlCE, IRMX, .sec, Isex, ,SXM, MULTIBUS, MULTICHANNEL, MULTIMODULE and ,es Intel Corporation assumes no responsibility for the use of any CirCUitry other than Circuitry embodied In an Intel product No other Circuit patent licenses are Implied © INTEL CORPORATION. 1982 5-3 Order Number: lJ7~:;:~ intJ ACL FUNCTIONAL DESCRIPTION receiving program recognizes a bad block and re- quests the sender to retransmit the correct block. The Asynchronous Communication Link (ACL) The result is highly reliabie data communications. consists of cooperating programs: one that runs on the host computer, and others that run on each microcomputer development system. The devel· SOFTWARE PACKAGE opment system programs execute under the ISIS-II operating system and use its file system. They in- The Asynchronous Communications -Link Pack- voke the companion program on the VAX-111780, age contains either a VAXlVMS or UNIX compat- which runs under either the VAXlVMS or UNIX op- Ible magnetic tape, a single- or double-density erating system. diskette compatible with the llitellec development system, and the Asynchronous Communications The link provides three modes of communication: Link User's Guide containing installation, configu- on-line transmission, single-line transmission, ration, and operation information. and file transfer. In on-line mode, the development system functions as a host terminal, enabling the prqgrammer to de)lelop programs using the host HARDWARE CONNECTION computer's editing, compilation, and file-manage- ment tools directly from the development system's The Link sends <;lata over an RS232C cable. The console. Later, switching to file transfer mode, communication'line from the host computer con- text files and object cqde can be downloaded from nects directly to a development system port. the host to the development system for debugging and execution. Alternatively, files can be sent back to the host for editing or storage. In single- TELECOMMUNICATIONS line mode, the programmer can send single-line USING THE LINK commands to the hOst computer while remaining The ACL is ideal for cross-host program develop- in the ISIS-II environment. , ment using a commercial timesharing service. The user can select transmission rates over 'the This configuration requires RS232C compatible link from 300 to 9600 baud. The link transmits in modems and a telecommunications line. Depend- encapsulated blocks. The receiver program vali- ing on the anticipated level of usage, wide-area dates the transmission by checking record- telephone service (WATS), a leased line, or a data number and checksum information in each block's communications network may be chosen to keep header. In the event of a transmission error, the operating overhead low. SPECIFICATIONS Manual Asynchronous Communications Link User's Software Guide, Order No. 172174-001 Asynchronous Communications Link deVelop- ment system programs Required Host Configuration VAXlVMS or UNIX companion program VAX-11/780 running VAXIVMS (Version 2.4) or fourth Berkeley distribution of UNIX 32V Media Single- or double-density ISIS-II compatible disk- Required Intel Development System ette Configuration 600-ft, 1600 bpi magnetic tape, VAXlVMS or UNIX Model 800, Intellec Series II, or Intellec Series III compatible under ISIS-II intJ ACL Required Connection 1200 baud - 8ell202 modem; VADIC 3451 modem or equivalent RS232C compatible - cable 3M-3349/25 or equiva- lent; 25-pin connector 3M-3482-1000 or equivalent 9600 baud - Bell 209A (full duplex, leased line) or equivalent Recommended Modems for Telecommunications Nole: Since one of the two Model 800 ports uses a current loop interface, Model 800 users -need a terminal or modem 300 baud - Bell* 103 modem; VADICt 3455 that Is current loop compatible, or a current 100p/RS232C modem or equivalent converter. ORDERING INFORMATION Product Name Asynchronous Communications Link Ordering Code* CDS 43250 for VAX/VMS systems CDS 43251 for UNIX systems • Sell is a trademark of American Telephone and Telegraph. t VADIC Is a trademark of Rac{!,I·Vadlc Inc. i See pnce book for proper suffixes for options and media selection. 5-5 Microprocessor Peripherals 6 8041~8641~8741A UNIVERSAL PERIPHERAL INTERFACE 8·BIT MICROCOMPUTER • 8·Bit CPU plus ROM, RAM, I/O, Timer • Fully Compatible with All and Clock in a Single Package Microprocessor Families • Interchange,able ROM and EPROM • One 8·BIt Status and Two Data Regis· Versions ters for Asynchronous Slave·to·Master • 3.6 MHz 8741A·8 Available Interface • Expandable I/O • DMA, Interrupt, or Polled Operation • RAM Power·Down Capability Supported • Over 90 Instructions: 70% Single Byte • 1024 x 8 ROM/EPROM, 64 x 8 RAM, • Available in EXPRESS '8·Bit Timer/Counter, 18 Programmable -Standard Temperature Range I/O Pins -Extended Temperature Range The Intel 8041A/8741A is a general purpose, programmable interface device designed for use with a variety of 8-bit microprocessor systems. It contains a low cost microcomputer with program memory, data memory, 8-bit CPU, I/O ports, timer/counter, and clock in a single 40-pin package. Interface registers are included to enable the UPI device to function as a peripheral controller in MCS-48™, MCS-80™, MCS-85™, MCS-86™, and other 8-bit systems. The UPI-41A™ has 1K words of program memory and 64 words of data memory on-chip. To allow full user flexibility the program memory 15 available as ROM in the 8041A version or as UV-erasable EPROM in the 8741A version. The 8741A and the 8041 A are fully pin compatible for easy transition from prototype to production level designs. The 8641A is a one-time programmable (at the factory) 8741A which can be ordered as the first 25 pieces of a new 8041A order. The substitution of 8641A's for 1l041A's allows for very fast turnaround for initial code verification and evaluation results. The device has two 8-bit, TTL compatible I/O ports and two test inputs. Individual port lines can function as either in: puts or outputs under software control. I/O can be expanded with the 8243 device which is direct·ly compatible and has 16 I/O lines. An 8-bit programmable timer/counter is included in the UPI device for generating timing sequences or counting external inputs. Additional UPI features include: single 5V supply, low power s'tandby mode (in the 8041 A), single-step mode for debug (in the 8741A), and dual working register banks. Because it's a complete microcomputer, the UPI provides more flexibility for the designer than conventional LSI inter- face devices. It is designed to be an effiCient controller as well as an arithmetic processor. Applications include key- board scanning, printer control, display multiplexing and similar functions which involve interfacing peripheral devices to microprocessor systems. PIN CONFIGURATION BLOCK DIAGRAM ~====::>I.:\, ...,OII' :::;::!::-~ ... '"' ~ ....-- OJ- ..- ~==!j P~PI,U INTI!RFACI! '-B '" '---_. ..... ... ....{"'.. - 'nLC,OR {..'u--_ _ TIllING - .... ....... iI'OWIRVcc-_+llUllft.y Intel Corporation Assumes No Reaponslbdty for the Use of Any Circuitry Other Than CirCUitry Embodied In an Intel Product No Other CirCUit Patent Llcenaes are Implied @lINTEL CORPORATION. 1982 6-1 MARCH 1982 8041 A/8641A/8741 A Table 1. Pin Description Signal Description Signal Description Do-D7 Three-state, bidirectional DATA BUS BUF- XTAL1, Inputs for a crystal, LC or an external timing (BUS) FER lines used to interface the UPI-41 A to an XTAL2 signal to determine the internal oscillator 8-bit master system data bus. frequency. P10- P17 8-bit, PORT 1 quasi-bidirectional I/O lines. SYNC Output signal which occurs once per UPI- 41 A instruction cycle. SYNC can be used as a P20-P27 8-bit, PORT 2 quasi-bidirectional I/O lines. strobe for external circuitry; it is also used to The lower 4 bits (P20-P23) interface directly 'synchronize single step operation, to the 8243 I/O expander device and contain address and data information during PORT EA External access input which allows emula- 4-7 access. The upper 4 bits (P24-P27) can tion, testing and PROM/ROM verification, be programmed to provide Interrupt Request and DMA Handshake capability. Software PROG Multifunction pin used as the program pulse control can config~ P24 as OBF (Output input during PROM programming. Buffer Full), P25 as IBF (Input Buffer Fu.!!1f2.p During I/O expander access the PROG pin as DRQ (DMA Request), and P27 as DACK acts as an address/data strobe to the 8243. (DMA ACKnowledge). RESET Input used to reset status flip-flops and to set WR I/O write input which enables the master CPU the program counter to zero. to write data and command words to the UPI- RESET is also used during PROM program- 41 A INPUT DATA BUS BUFFER. ming and verification, RD I/O read input which enables the master CPU RESETshouid be held low for a minimum of8 to read data and status words from the OUT- instruction cycles after power-up. PUT DATA BUS BUFFER or status register. SS Single step input used in the 8741 A in con- CS Chip select input used to select one UPI-41 A junction with the SYNC output to step the out of several connected to a common data program through each instruction. bus. Vee +5V main power supply pin. Ao Address input used by the master processor to indicate whether byte transfer is data or VOO +5V during normal operation. +25V during command. During a write operation flag F1 is programming operation. Low power standby set to the status of the AO input. pin in ROM version. TEST D, Input pins which can be directly tested using VSS Circuit ground potential. TEST 1 conditional branch instructions. T1 also functions as the event timer input (under software control). To is used during PROM programming and verification in the 8741 A. 6-2 AFN-OOl888 inter 8041 AJ8641AJ8741 A UPI·41A™ FEATURES AND ENHANCEMENTS 1. Two Data Bus Buffers, one for input and one for out· If "EN FLAGS" has been executed, P25 becomes the put. This allows a much cleaner Master/Slave pro· IBF (Input Buffer Full) pin. A "1" written to P25 tocol. . enables the IBF pin (the pin outputs the inverse of the IBF Status Bit). A "0" written to P25 disables the IBF INTERNAL pin (the pin remains low).: This pin can be used to dF'---------'¢Jr DATA BUS indi1cate that the UPI·41 A is ready for data. INPUT DATA BUS BUFFER (8) OBF (INTERRUPT REQUESn 00- 7 0 - OUTPUT DATA BUS BUFFER (8) i8F (INTERRUPT REOUEST) DATA BUS BUFFER INTERRUPT CAPABILITY 2. 8 Bits of Status EN FLAGS Op Cod.' OF5H I 517 I 5T6 I 5TS ! 5T4 ! F1 I FO I IBF I OBF I ~ ~ ~ ~ ~ ~ ~ ~ ST 4-8T 7 are user definable status bits. These bits are defined by the "MOV 8T8, A" single byte, Single cycle instruction. Bits 4-7 of the accumulator are moved to bits 4-7 of the status register. Bits 0-3 of the status register are not affected. 5. P26 and P27 are port pins or DMA handshake pins for use with a DMA controller. These pins default to port pins on Reset. MOV 5TS, A Op Code 90H 1,10101,101010101 If the "EN DMA" instruction has been executed, P26 becomes the DRO (DMA ReOuest) pin. A "1" written to P26 causes a DMA request (DRO is activated). DRO is deactivated by DACK· RD, DACK· WR, or execution of the "EN DMA" instruction. 3. RD and WR are edge triggered. IBF, OBF, F, and INT change internally after the trailing edge of RD or WR. If "EN DMA" has been executed, P27 becomes the FLAGS AFFECTED DACK (DMA ACKnowledge) pin. This pin acts as a chip select input for the Data Bus Buffer registers ROorWR during DMA transfers. DRQ~ OROn 8041A1 4. P24 and P25 are port pins or Buffer Flag pins which 8741A 8257 can be used to interrupt a master processor. These DACK~ DACK pins default to port pins on Reset. If the "EN FLAGS" instruction has been executed, OMA HANDSHAKE CAPABILITY P24 becomes the OBF (Output Buffer Full) pin. A "1" written to P24 enables the OBF pin (the pin outputs the OBF Status Bit). A "0" written to P24 disables the EN DMA Op Code" OE5H OBF pin (the pin remains low). This pin can be used to indicate that valid data is available from the UPI· 41A (in Output Data Bus Buffer). 6-3 AFN-00188B 8041 AJ8641 AJ8741 A APPLICATIONS ~ DATAI\r_---"-_=-r",(J iiii iiii 808SA WR 0 8048 WR 8041A1 ADDR I---.-..J\./, cs 8741A PORT CONTROL 2 AO I--To CONTROL 1--_ _ _"..,11 BUS DATA BUS 8 DBB -T1 Figure 1. SOSSA-S041A Interface Figure 2. S04S-S041A Interface 8243 KEYBOARD EXPANDER MATRIX z z . 2 :IE ~.. .... e ~ iii ..a: .. .,. "0 ....Z e w w e.... z :::; 8041A18741A PORT 2 8041A18741A DATA BUS CONTROL BUS CONTROL BUS Figure 3. 8041A-S243 Keyboad Scanner Figure 4. 8041A Matrix Printer Interface 6-4 AFN-00188B 8041 AJ8641AJ8l41 A PROGRAMMING, VERIFYING, AND 6. RESET ~ 5v (latch address) ERASING THE 8741A EPROM 7. Data appl ied to BUS 8. V DD = 25v (programming power) 9. PROG ~ Ov followed bV one 5ams pulse to 23V Programming Verification 10. VDD~5v In brief, the programming process consists of: activating 11. TEST 0 ~ 5v (verifv model the program mode, applying an address, latching the 12. Read and verifv data on BUS address, applying data, and applying a programming pulse. 13. TEST 0 ~ Ov Each word IS programmed completely before moving on to 14. RESET ~ Ov and repeat from step 5 the next and IS followed by a verification step. The follow- ing IS a list of the pins used for programming and a descrip- 15. Programmer should be at conditions of step 1 when 8741 A IS removed from socket. tion of their functions: Pin Function XTAL1 Clock Input (1 to 6MHz) 8741A Erasure Characteristics Reset Initialization and Address Latching The erasure characteristics of the B7 41 A are such that Test 0 Selection of Program or Verify Mode erasure begins to occur when exposed to light with EA Activation of Program/Verify Modes wavelenQths shorter than approximately 4000 Ang- BUS Address and Data Input stroms (A). It should be noted that sunlight and certain types of fluorescent lamps have wavelengths in the Data Output During Verify 3000-4000A range. Data show thai constant exposure to P20-1 Address Input room level fluorescent lighting could erase the typical VDD Programming Power Supply 8741A in approximately 3 years while it would take ap- PROG Program Pulse Input proximately one week to cause erasure when exposed to direct sunlight. If the 8741A is to be exposed to these types of lighting conditions for extended periods of WARNING' time, opaque labels are available from )ntel which An attempt to program a mlssocketed 8741A will result In severe should be placed over the 8741A window to prevent damage to the part. An mdlcatlon of a properly socketed part IS the unintentional erasure. appearance of the SYNC clock output. The lack of this clock may be used to disable the programmer. The recommended erasure procedure for the 8741A is The Program/Verify sequence is: exposure to shortwave ultraviolet light which has a 1. Aa~ av, CS ~ 5V, EA ~ 5V, RESET ~ av, TESTa ~ 5V, wavelength of 2537 A. The integrated dose (i.e., UV inten- Voo = 5V • clock applied or Internal oscillator operatmg, sity x exposure time) for erasure should be a minimum BUS and PROG floating of 15 w-sec/cm 2 . The erasure time with this dosage is 2. Insert 8741 A In programmmg socket approximately 15 to 20 minutes using an ultraviolet 3. TEST 0 = Ov (select program mode) lamp with a 12,000 IlW/cm2 power rating. The 8741A should be placed within one inch of the lamp tubes dur- 4. EA = 23V (activate program mode) ing erasure. Some lamps have a filter on their tubes 5. Address applied to BUS and P2(} 1 which should be removed before erasure. 6-5 AFN'()01888 inter 8041 AJ8641 AJ8741 A ABSOLUTE MAXIMUM RATINGS· ·COMMENT. Stresses above those listed under "Absolute Maximum Ratings" m.y cause permanent damage to the device. This Is a stress rallng only and functional operation of the device at these or any other Ambient Temperature Under Bias ......... O°C to 70°C conditions above those indicated In the operational sections of this Storage Temperature ............. - 65°C to + 150°C specification Is not Implied. Exposure to absolute maximum rating con- Voltage on Any Pin With Respect dillons for extended periods may affect deVice reliability to Ground .......................... 0.5V to + 7V Power Dissipation ......................... 1.5 Watt D.C. AND OPERATING CHARACTERISTICS' TA=O°C to 70'C, Vss=OV, Vcc=Voo=+5V ±10%· Symbol Parameter Min. Max. Unit Test Conditions V il Input Low Voltage (Except XTAL1, XTAL2, RESET) -0.5 0.8 V V IL1 Input Low Voltage (XTAL1, XTAL2, RESET) -0.5 0.6 V V IH Input High Voltage (Except XTAL 1, XTAL2~ RESEn 2.2 Vee V IH , Input High Voltage (XTAL1, XTAL2, RESET) 3.8 Vee V VOL Output Low Voltage (0 0 -0 7) 0.45 V IOl=2.0 mA V OL1 Output Low Voltage (P IO P17 , P20 P27 , Sync) 0.45 V 10l= 1;6 mA V OL2 Output Low Voltage (Prog) 0.45 ·V IOl=1.0mA V OH Output High Voltage (0 0-0 7) 2.4 V 10H= -400p.A VOH' Output High Voltage (All Other Outputs) 2.4 V 10H= -50p.A III Input Leakage Current (To, T" RD, WR, CS, A o, EA) ± 10 p.A Vss :5 VIN :5 Vee loz Output Leakage Current (0 0 -0 7 , High Z State) ± 10 p.A Vss + 0.45 :5 VIN :5 Vee lu Low Input Load Current (P IO P17 , P20 P27 ) 0.5 mA V ll =0.8V lu, Low Input Load Current (RESET, SS) 0.2 mA V ll =0.8V 100 Voo Supply Current 15 mA Typical = 5 mA lee+ 100 Total Supply Current 125 mA Typical = 60 mA A.C. CHARACTERISTICS TA=O°C to 70°C, Vss=OV, Vcc=Voo=+5V ±10%· . 'DBB READ Symbol Parameter Min. Max. Unit Test Conditions tAR CS, Ao Setup to RDI 0 ns tRA CS, Ao Hold After ROt 0 ns tRR RD Pulse Width 250 ns tAD ' CS, Ao to Data Out Delay 225 ns. C l = 150 pF t RO RDI to Data Out Delay 225 ns C l =150pF tOF Frnt to Data Float Delay 100 ns tey Cycle Time (Except 8741A-8) 2.5 15 p'S 6.0 MHz XTAL tey Cycle Time (8741A-8) 4.17 15 p's 3.6 MHz XTAL OBBWRITE Symbol Parameter Min. Max. Unit Test Conditions tAW CS, Ao Setup to WRI 0 ns tWA CS, Ao Hold After WR t 0 ns tww WRPulse Width 250 ns tow Data Setup to WRt 150 ns two Data Hold AfterWRt 0 ns 6-6 AFN-OOl88B inter 8041 AJ8641AJ8741 A A.C. TIMING SPECIFICATION FOR PROGRAMMING TA=O°Cto 70°C, VCC=+5V ±10%' Symbol Parameter Min. Max. Unit Telt Condition. tAW Address Setup Time to RESET t 4tcy tWA Address Hold Time After RESET t 4tcy tow Data 10 Setup Time to PROG t 4tcy two Data 10 Hold Time After PROG i 4tcy tPH RESET Hold Time to Verify 4tcy tvoow Voo Setup Time to PROG t 4tcy tVOOH Voo HOld Time After PROG i 0 tpw Program Pulse Width 50 60 mS tTW Test 0 Setup Time for Program Mode 4tcy tWT Test 0 Hold Time After Program Mode 4tcy too Test 0, to Data Out Delay 4tcy tww RESET Pulse Width to Latch Address 4tcy tr, tr Voo and PROG Rise and Fall Times 05 20 I'S tCY CPU Operation Cycle Time 50 I'S tRE RESET Setup Time Before EA t. 4tcy Nole: If TEST 0 Is high, too can be triggered by RESET t . • For Extended Temperature EXPRESS, use M8741 A electrical parameters. D.C. SPECIFICATION FOR PROGRAMMING TA = 25·C ±5·C, Vcc = 5V ±5%, Voo = 25V ± 1V Symbol Parameter Min. Max. Unit Test Conditions VOOH Voo Program Voltage High Level 24.0 260 V VOOL Voo Voltage Low Level 475 525 V VPH PROG Program Voltage High Level 215 24.5 V VPL PROG Voltage Low Level 02 V VEAH EA Program or Verify Voltage High Level 21.5 24.5 V VEAL EA Voltage Low Level 525 V 100 Voo High Voltage Supply Current 30.0 rnA IPROG PROG High Voltage Supply Current' 160 mA lEA EA High Voltage Supply Current 10 mA A.C. CHARACTERISTICS-PORT 2 TA=O·C to 70·C,: Vcc= +5V ± 10% Symbol Parameter Min. Max. Unit Test Conditions tcp Port Control Setup Before Falling Edge of PROG 110 ns tpc Port Control Hold After Falling Edge of PROG 100 ns tpR PROG to Time P2 Input Must Be Valid 810 ns tPF Input Data Hold Time 0 150 ns top Output Data Setup Time 250 ns tpo Output Data Hold Time 65 ns tpp PROG Pulse Width 1200 ns 6-7 AF~188B inter 8041 A/8641 A/8741 A A.C. CHARACTERISTICS-DMA Symbol Parameter Min. Max. Unit Test Conditions t ACC DACK to WR or-RD 0 ns ICAC RD or WR 10 DACK 0 ns tACD DACK 10 Data Valid 225 ns CL =150 pF tCAQ RD or WR 10 DRO Cleared 200 ns CRYSTAL OSCILLATOR MODE DRIVING FROM EXTERNAL SOURCE .5V < 15 pF r-----F : I .=~ 2 16 mHz XTAl1 470~2 »--:--+-----'-1 XTAL1 (INCLUDES XTAL, SOCKET, STRAY) i-"-- + 5V I ~_____ 3 XTAL2 470Q 15-25pF (INCLUDES SOCKET, STRAY) I-=- L--~---"-IXTAL2 CRYSTAL SERIES RESISTANCE SHOULD BE <75Q AT 6 MHz, <1S0Q AT 3 6 MHz BOTH XTAL 1 AND XTAL2 SHOULD BE DRIVEN RESISTORS TO Vee ARE NEEDED TO ENSURE VIH =3 BV IF TTL CIRCUITRY IS USED J LC OSCILLATOR MODE ~ ~ N~MINAl f 451'H 20pF 52 t.\Hz rIc 120llH 20 pF 32 MHz ,---.---"j XT AL1 c'= C + 3Cpp I' 2 -: - TC Cpp ::: 5 - 10 pF PIN-TO PIN CAPACITANCE EACH C SHOULO BE APPROXIMATELY 20 pF, INCLUDING STRAY CAPACITANCE TYPICAL 804118741A CURRENT A C TESTING LOAD CIRCUIT 80 rnA 60 rnA - 40 rnA DEVICE UNDER TeST n CL~150pF 20 rnA 1-- 20 0 40 0 60 0 80 0 AFN-001888 6-8 intJ 8041 AJ8641 AJ8741 A WAVEFORMS READ OPERATION-DATA BUS BUFFER REGISTER. eJ OR AO =:) K ISVSTEM'S ADDRESS IUSI -IAR- '" -11'1111- '\ -''''0- J --'OF (READ CONTROLI ----.00---- WRITE OPERATION.-DATA BUS BUFFER REGISTER. CSOR Ao _ ===>4'[-------------4. : JX: " - - - - - - - - - - ADDRESS BUS! (SVSTEM·S -~ ~~-n,--·WA---:,----------IWRITE CONTROLI 1 - '- DATA, BUS DATA >__ ONPUTl _ _ _ _ _M_A_V_C_HA_N_G_'_ _ _..J OATAVALlO _ _ V' DATA ~'-_ _ _ _ _M_A_V~C;;..H_A_N.;:.G';;...._ _ _ __ PORT 2 TIMING SYNC EXPANDER PORT OUTPUT POAT 20.3 DATA EXPANDER PORT INPUT peRT 20-3 DATA PROG 6-9 AFN.(IQ'8IS inter 8041 AJ8641AJ8741 A WAVEFORMS FOR PROGRAMMING COMBINA TlON PROGRAMIVERIFY MODE (EPROM'S ONLY) 23V EA sv _ _ _ _ _J / ---- ---tTW-~ PROGRAM - ------ic+--- VE RIFY r------"" -.t-I'~--- PROGRAM - - - - TESTO DBa-DBl J-- DATA TO BE PROGRAMMED VALID - --< NEXT AODR VALID C LAST NEXT ADDRESS (8-9l VAllO ADDRESS ADDRESS tv°:jll~tVOOH VOD + 2 5 - - - - - - - - - - - ' I~I {- tWT- +5 It;;-I - - - - - - - - PROG +23 - - . -. •. _ . ~J.--4IH 1- two :~-------- - - --JJ . L ___ J r - - - - - - ----"'''"________ VERIFY MODE (ROM/EPROM) tww RESET V V t=Y tWA [---tAO =>--~ -- ------- ADDRESS DATA OUT NEXT NEXT DATA DBo-DB7 (o-n VALID VALID ADDRESS OUT VALID P20- P l X ADDRESS (8-9) VALID X NEXT ADDRESS VALID NOTES: 1. PROG MUST FLOAT IF EA IS LOW (I.•., *23V), OR IF TO_SV FOR THE 8741A. FOR THE 8041A PROG MUST ALWAYS FLOAT. 2. XTALI AND XTAL 2 DRIVEN 8Y 3.6 MHz CLOCK WILL GIVE 4.17 ,.ec tCY' THIS IS ACCEPT. ABLE FOR 6741A·6 PARTS AS WELL AS STANDARD PARTS.. 3. AO MUST 8E HELD LOW (I••• , = ov) DURING PROGRAMIVERIFY MODES. The 8741A EPROM can be programmed by either of two Intel products: 1. PROMPT·48 Microcomputer Design Aid, or 2. Universal PROM Programmer (UPP series) peripheral of the Intellec~ Development System with a UPP·848 Personality Card. 6-10 AFN.ool88B intJ 8041 AJ8641AJ8741 A WAVEFORMS- DMA DACK Rii WR L~l t r DATA BUS _I ACC '=----="IJ- ,.-----,. VALID ~ DRQ -IACD- Jl _ICRJ- );. INPUT AND OUTPUT WAVEFORMS FOR A.C. TESTS 2.4----""'\X~:!>TE5T POINTS:::::~:!X- 0.45 _ _ _ _..J . . .____ CL=150 pF Table 2. UPI™ Instruction Set Mnemonic Description Bytes Cycles Mnemonic Description Bytes Cycles Accumulator XRL A,@Rr Exclusive OR data 1 1 ADD A,Rr Add register to A 1 1 memory to A ADD A,@Rr Add data memory to A 1 1 XRL A,#data Exclusive OR imme- 2 2 ADD A,#data Add immediate to A 2 2 diate to A ADDC A,Rr Add register to A with 1 1 INC A Increment A 1 1 carry DEC A Decrement A 1 1 ADDC A,@Rr Add data memory to A 1 1 CLR A Clear A 1 1 with carry CPL A Complement A 1 1 ADDC A, Add immed. to A with 2 2 DAA Decimal Adjust A 1 1 #data carry SWAP A Swap nibbles of A 1 1 ANL A,Rr AND register to A 1 1 RL A Rotate A left 1 1 ANL A,@Rr AND data memory to A 1 1 RCL A Rotate A left through 1 1 ANL A,#data AND immediate to A 2 2 carry ORL A,Rr OR register to A 1 1 RR A Rotate A right 1 1 ORL A,@Rr OR data memory to A 1 1 RRCA Rotate A right through 1 1 ORL A,#data OR immediate to A 2 2 carry XRL A,Rr Exclusive OR register 1 1 to A 6-11 AFN-DD188B 8041 AJ8641 AJ8741 A , Table 2. UPI™ Instruction Set (Cont'd.) Mnemonic Description Bytes Cycles Mnemonic Description Bytes Cycles Input/Output Control In A,Pp I nput port to A 1 2 ENDMA . Enable DMA Hand- 1 1 OUTL Pp,A Output A to port 1 2 shake Lines ANL Pp,#data AND immediate to port 2 2 EN I Enable IBF Interrupt 1 1 ORL Pp,#data OR immediate to port 2 2 DIS I Disable IBF Interrupt 1 1 In A,DBB Input DBB to A,. 1 1 EN FLAGS Enable Master 1 1 clear IBF Interrupts OUT DBB,A Output A to DBB, 1 1 SEL RBO Select register 1 1 set OBF bank 0 MOV STS,A A4-A7 to Bits 4-7 1 1 SEL RB1 Select register 1 1 of Status bank 1 MOVD A,Pp Input Expander port 1 2 NOP No Operation 1 1 to A MOVD Pp,A Output A to Expander '1 2 Registers port INC Rr Increment register 1 1 ANLD Pp,A AND A to Expander 1 2 INC@Rr Increment data 1 1 ORLD Pp,A OR A to Expander 1 2 memory port DEC Rr Decrement register 1 1 Data Moves Subroutine MOVA,Rr Move register to A 1 1 CALL addr Jump to subroutine 2 2 MOV A,@Rr Move data memory 1 1 RET Return 1 2 to A RETR Return and restore 1 2 MOV A,#data Move immediate to A 2 2 status MOV Rr,A Move A to register 1 1 Flags MOV@Rr,A Move A to data 1 1 CLRC Clear Carry 1 1 memory CPU~ Complement Carry 1 1 MOV Rr,#data Move immediate to 2 2 CLR FO Clear Flag 0 1 1 register CPL FO Complement Flag 0 1 1 MOV@Rr, Move immediate to 2 2 CLR F1 Clear Fl Flag 1 1 #data data memory CPL F1 Complement F.1 Flag 1 1 MOVA,PSW Move PSW to A 1 1 MOV PSW,A Move A to PSW 1 1 Branch XCH A,Rr Exchange A and 1 1 JMPaddr Jump unconditional 2 2 register JMPP@A Jump indirect 1 2 XCH A,@Rr Exchange A and data 1 1 DJNZ'Rr,addr Decrement register 2 2 memory and jump XCHD A,@Rr Exchange digit of A 1 1 JC addr Jump on Carry=1 2 2 and register JNC addr Jump on Carry=O 2 2 MOVPA,@A Move to A from 1 2 JZ addr Jump on A Zero 2 2 current page JNZ addr Jump on A not Zero 2 2 MOVP3, A,@A Move to A from 1 2 JTO addr Jump on TO=1 2 2 page 3 JNTO addr Jump on TO=O 2 2 JT1 addr Jump on T1 =1 :1 2 Timer/Counter JNT1 addr Jump on T1=O 2 2 MOVA,T Read Timer/Counter 1 1 JFO addr Jump on FO Flag=1 2 2 MOV T,A Load Timer/Counter 1 1 JF1 addr Jump on F1 Flag=1 2 2 STRT T Start Timer , 1 1 JTF addr Jump on Timer' . 2 2 STRT CNT Start Counter 1 1 Flag=1, Clear Flag STOP TCNT Stop Timer/Counter 1 1 JN1BF addr Jump on IBF Flag=O 2 2 EN TCNTI Enable Timer/Counter 1 1 JOBF addr Jump on OBF Flag=1 2 2 DIS TCNTI Disable Timer/ 1 1 JBb addr Jump on Accumulator 2 2 Counter Interrupt Bit ( 6-12 8042/8742 UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER • 8042/8742: 12 MHz • Fully Compatible with all Intel and • Pin, Software and Architecturally Most Other Microprocessor Compatible with 8041A18741A Families • 8-Bit CPU plus ROM, RAM, 1/0, Timer • Interchangeable ROM and EPROM and Clock in a Single Package Versions • 2048 x 8 ROMlEPROM, 128 x 8 RAM, 8-Bit TimerlCounter, 18 Programmable • Expandable 1/0 1/0 Pins • One 8-Bit Status and Two Data • RAM Power-Down Capability Registers for Asynchronous • Over 90 Instructions: 70% Single Byte Siave-to-Master Interface • DMA, Interrupt, or Polled Operation • Available in EXPRESS Supported -Standard Temperature Range The Intel 8042/8742 is a general-purpose Universal Peripheral Interface that allows the deSigner to grow his own customized solution for peripheral device control. It contains a low-cost microcomputer with 2K of program memory, 128 bytes of data memory, 8-bit CPU, I/O ports, 8-bit timer/counter, and clock generator in a sing'le 40-pin package. Interface registers are included to enable the UPI device to function as a peripheral controller in the MCS-48™, MCSJ51™, MCS-80™, MCS-85™, iAPX-88, iAPX-86 and other 8-, 16-bit systems. The 8042/8742 is software, pin, and architecturally compatible with the 8041 A, 8741 A. The 8042/8742 doubles the on-chip memory space to allow for additional features and performance to be incorporated in upgraded 8041 A/8741 A designs. For new designs, the additional memory and performance of the 8042/8742 extends the UPI concept to more complex motor control tasks, 80-column printers and process control applications as examples. To allow full user flexibility, the program memory is available as ROM in the 8042 version or as UV-erasable EPROM in the 8742 version. The 8742 and the 8042 are fully pin compatible for easy transition from prototype to production level deSigns. The 8642 is a one-time programmable (at the factory) 8742 which can be ordered as the first 25 pieces of a new 8042 order. The substitution of 8642's for 8042'$ allows for very fast turnaround for initial code verification and evalua- tion results. Figure 1. Block Diagram Figure 2. Pin Configuration 6-13 MARCH 1982 ORDER NUMBER: 210393-002 intJ 804218742 Table 1. Pin Description Pin Pin Symbol No. "TYpe Neme end Function Symbol No. Type Neme and Function TEST 0, 1 I Test Inputs: Input pins which can be SYNC 11 0 Output Clock: Output signal which TEST 1 39 directly tested using conditional occurs once per UPI·42 Instruction branch instructions. cycle. SYNC can be used as a strobe for external circuitry; it is also used to Frequency Reference: TEST 1 (T1) synchronize single step operation. also functions as the event timer in· put (under software control). TEST 0 00-07 12-19 1/0 Data Bus:' Three·state, bidirectional (BUS) DATA BUS BUFFER lines used to In· (To) is used during PROM program· terface the UPI-42 microcomputer to ming and verification in the 8742. an B-bit master system data bus. XTAL 1, 2 I Inputs: Inputs for a crystal, LC or an P1;.. P17 27-34 1/0 Port 1: B-M, PORT 1 quasI-bidirec- XTAL2 3 external timing signal to determine tional 1/0 lines. the internal OSCillator frequency. P2O -P27 21-24 I/O Port 2: 8-blt, PORT 2 quasi-bidlrec- RESET 4 I Reset: Input used to reset status fllp- 35-38 tional I/O lines. The lower 4 bits (P20 - flops and to set the program counter P23 ) interface directly to the 8243 1/0 to zero. expander deVice and contam address and data Informalion during PORT 4-7 RESET IS also used dunng PROM pro- access. The upper 4 bits (P24 -P2 i) can gramming and venficatlon. be programmed to prOVide mterrupt SS 5 I Single Step: Single step input used Request and DMA Handshake capa- in conjunction with the' SYNC out· bility, Software control can configure put to step the program through P24 as Output Buffer Full (OBF) mter- each Instruction. (8742 only) rupt, P25 as Input Buffer Full (IBF) CS f) I Chip Select: Chip select input used to interrupt, P26 as DMA Request select one UPI microcomputer out of (ORO), and P27 as DMA ACKnowledge several connected to a common data (DACK). bus. PROG 25 1/0 Program: Multifunclion pm used as EA 7 J External Access: External access the program pulse mput dUring Input which allows emulation, testing PROM programming. . and PROM/ROM verification. This pm should be tied low If unused. During 1/0 expander access the PROG pm acts as an address/da~a strobe to RD 8 I Reed: 1/0 read input which enables the 8243. This pin should be tied high the master CPU to read data 'and if unused. status words from the OUTPUT DATA BUS BUFFER or status register. Vcc 40 Power: +5V main power supply pm. Command/Data Select: Address input Vee 26 Power: + 5V during normal opera· An 9 I tion. + 21V during programming used by the master processor to in· dicate whether byte transfer is data operation. Low power standby pin in (Ao=O, F1 is reset) or command ROM version. (,0.0= 1, F1 is set). Vss 20 Ground: Circuit ground potential. WR 10 I Write: 1/0 write input which enables the master CPU to write data and command words to the UPI INPUT DATA BUS BUFFER. 6-14 AFN'()1632A intel· 8042/8742 UPI·42 FEATURES pin (the pin remains low). This pin can be used to indicate that the UPI-42 is ready for data. 1. Two Data Bus Buffers, one for input and one for out- put. This allows a much cleaner Master/Slave pro- OBF (INTERRUPT REOUEsn tocol. INTERNAL DATA BUS iBF (INTERRUPT REQUEST) INPUT DATA BUS BUFFER (8) DATA BUS BUFFER INTERRUPT CAPABILITY OUTPUT DATA BUS EN FLAGS Op Code OF5H BUFFER (8) 2. 8 Bits of Status 5. P26 and P27 are port pins or DMA handshake pins for use with a DMA controller. These pins default to port I Sf7 I ST6 I STs 5T4 F1 Fe IBF oaF! pins on Reset. ~ ~ ~ ~ ~ ~ ~ ~ ST 4-ST 7 are user definable status bits. These bits are If the "EN DMA" instruction has been executed, P26 defined by the "MOV STS, A" single byte, single becomes the DRQ (DMA ReQuest) pin. A "1" wntten cycle Instruction. Bits 4-7 of the accumulator are to P26 causes a DMA reql,lest (DRQ is activated). DRQ moved to bits 4-7 of the status register. Bits 0-3 of IS deactivated by DACK· RD, DACK· WR, or execution the status register are not affected of the "EN DMA" instruction. MOV STS. A Op Code 90H If "EN DMA" has been executed, P27 becomes the DACK (DMA ACKnowledge) pin This pin acts as a [ililil~lil~ I 0 I 0 I chip select input for the Data Bus Buffer registers ~ ~ during DMA transfers. 3. RD and WR are edge triggered. IBF, OBF, Fl and INT change Internally after the trailing edge of RD or WR. ORO P26 - - OROn 8()41AHI 8257 8741 A OACK P27 \O~----d OACK F'fo or WA DMA HANDSHAKE CAPABIliTY During'the time that the host CPU is reading the EN OMA Op Code OE5H status register, the 8042/8742 is prevented from up- dating this register or is 'locked out.' I I I I I I I l='l 01 1 1 1 0 0 1 0 4. P24 and P25 are port pins or Buffer 'Flag pins which can be used to interrupt a master processor These pins default to port pins on Reset. 6. The RESET input on the 8042/8742 includes a 2·stage If the "EN FLAGS" instruction has been executed, synchronizer to support reliable reset operation for P24 becomes the OBF (Output Buller Full) pin. A "1" 12 MHz operation. written to P24 enables the OBF pin (the pin outputs the OBF Status Bit). A "0" written to P24 disables the 7. When- EA is enabled on the 8042/8742, the program OBF pin (the pin remains low). This pin can be used counter is placed on Port 1 and the lower three bits of to indicate that valid data is available from the UPI· 41 A (in Output Data Bus Buffer) = = Port 2 (MSB P22 , LSB P10). On the 8042/8742 this information is multiplexed with PORT DATA (see port ~EN FLAGS" has been executed, P25 becomes the timing diagrams at end of this data sheet). IBF (Input Buffer Full) pin. A "1" written to P25 enables the IBF pin (the pin outputs the inverse of the I BF Status Bit). A "0" written to P25 disables the iEi'F 6-15 AFN-01832A intel 804218742 APPLICATIONS 8 8 1 ifiil----,----·- ifii 1 I 8088 TO 804SH WilI--------·IWiI 8042 TO PERIPHERAL PERIPHERAL T DEVICES t- , PORT t-:===:Jimiilli.L=::::1>ICS CONTROL AO 8742 TO DEVICES ADDR -0 CONTAOLl===~~ _T, .USK===:JD~A!lTA!J.~U!!S==]8>ID.8 Figure 3. 8088-8042/8742 Interface Figure 4. 8048H·804218742 Intertace " P5~i . KEYBOARD P'~~ 8243 EXPANDER MATRIX P7<:=:r: ~ 8 ROWS tl [ PORT 2 PROG ~l ~l ~111181 PO~ PORT1 8042 8742 DB8 CONTROL ) DATA BUS B J·l \ II 't CONTROL BUS Figure 5. 804218742·8243 Keyboard Scanner Figure 8. 8042/8742 80·Column Matrix Printer Intertace \, PROGRAMMING, VERIFYING, AND WARNING ERASING THE 8742 EPROM An attempt to program a mlssocketed 8742 will res~1t on severs damage to the part. .An Indication of a properly socketed part Is the appearance Programming Verification of the SYNC clock output. The lack of this clock mdY be used to disable In brief, the programmtng process consists of: activating the programmer. the program mode, applying an address, latchtng the address, applying data, and applying a programming pulse. The ProgramlVerify sequence is: Each word is programmed completely before moving on to 1. Ao = OV. CS = 5V, EA = 5V, RESET = OV. TESTO = 5V, the next and is followed by a verification step. The follow- Voo = 5V, clock applied or onternal oscillator operating, BUS ing is a list of the pins used for programming and a descrip- floating, PROG = 5\1. tion of their functions: 2. Insert 8742 on programming socket Pin Function 3. TEST 0 = Ov (select program mode) XTAL 1 ClOck Input 4. EA= 18V (active program mode)' Reset . Initialization and Address Latching. 5. Addrss. applied to BUS and P:W-22 . Test 0 Selection of Program or Verify Mode 6. RESET = 5v (latch addre,,) EA Activation of ProgramlVerify Modes ,. Data applied to BUS" BUS Addre~s and Data Input 8. Voo = 21V (program,mlng power)" Data Output During Verify 9. PROG = Vee followed by one 50 m. pulse to 18V" P20-12 A.ddress Input 10. VOO = 5v VOD Programming Power Supply 11. TEST 0 = 5v (v~rifv mode) PROG Program Pulse Input 6-16 AFN-OI832A infel 8042/8742 12 Read and verify data on BUS proximately one week to cause erasure when exposed 13. TEST 0" Ov to direct sunlight. If the 8742 is to be exposed to these types of lighting conditions for extended periods of 14. RESET" Ov and repeat from step 5 time, opaque labels are available from Intel which 15. Programmer should be at conditions of step 1 when should be placed over the 8742 window to prevent unin- 8742 Is removed from socket tentional erasure. ·When verifying ROM, EA = 12V. "'"Not used in verifYing ROM procedure. The recommended erasure procedure for the 8742 is 8742 Erasure Characteristics exposure to shortwave ultraviolet light which has a The erasure characteristics of the 8742 are such that wavelength of 2537 A. The integrated dose (i.e., UV inten- erasure begins to occur when exposed to light with sity x exposure time) for erasure should be a minimum wavelengtns shorter than approximately 4000 Ang- of 15 w-sec/cm 2. The erasure time with this dosage is stroms (A). It should be noted that sunlight and certain approximately 15 to 20 minutes using an ultraviolet types of fluorescent lamps have wavelengths in the lamp with a 12,000 /JW/cm 2 power rating. The 8742 3000-4000A range. Data show that constant exposure to should be placed within one inch of the lamp tubes dur- room level fluorescent lighting could erase the typical ing erasure. Some lamps have a filter on their tubes 8742 in approximately 3 years while it would take ap- which should be removed before erasure. AFN-01832A 6-17 inter 8042/8742 ABSOLUTE. MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device ThiS IS a stress rating only and functIOnal opera- Ambient Temperature Under Bias ......... O·C to 70·C tion of the device at these or any other conditions above Storage Temperature ............ - 65·C to + 150·C those Indicated in the operational sections of this specifi- Voltage on Any Pin With Respect cation is not Implied Exposure to absolute maximum to Ground -O.SV to + 7V rating condillons for extended penods may affect device Power Dissipation.. . ...... 1.5 Watt reliability. D.C. CHARACTERISTICS (TA=O· to +70·C, Vcc=voo= +5V ±10%) 8042/8742/8642 Symbol Parameter Min. Max. Units Notes VIL Input Low Voltage (Except XTAL 1, XTAL2, RESET) -0.5 0.8 V VILl , Input Low Voltage (XTAL 1, XTAL2, RESET) -0.5 0.6 V VIH Input High Voltage (Except XTAL 1, XTAL2, RESET) 2.0 Vee V VIHl Input High Voltage (XTAL 1, XTAL2, RESET) 3.5 Vee V VOL Output Low Voltage (Do-O]) 0.45 V IOL =2.0 mA VOLl Output Low Voltage (Pl0P17, P20 P27, Sync) 0.45 V IoL =1.6 mA VOL2 Output Low Voltage (PROG) 0.45 V IOL =-1.0 mA VOH Output High V. oltage (Do-O]) 2.4 V IOH= -400 !LA VOHl Output High Voltage (All Other Outputs) 2.4 IOH = -50 !LA IlL Input Leakage Current (TO, Tl, RD, WR, CS, Ao, EA) ± 10 . !LA VSS"; VIN"; Vee Output Leakage Current (Do-O] , High Z State) ± 10 VSS + 0.45 IOFL !LA <> VOUT"; Vee . III Low Input Load Current (P1O P17, iP20P27) 0.3 mA VIL =0.8V III 1 Low Input Load Current (RESET, SS) 0.2 mA VIL =0.8V 100 VOO Supply Current 10 mA Typical=5 mA ICC + 100 Total Supply Current 125 mA Typical=60 mA IIH Input Leakage Current (Pl0-P17.P20-P27) 100 !LA VIN=Vee CIN Input Capacitance 10 pF CIO I/O Capacitance 20 pF D.C. CHARACTERISTICS-PROGRAMMING (TA=25·C ±5·C, Vcc=5V ±5%, Voo=21V ±0.5V Symbol Parameter Min_ Max. Units Test Conditions VOOH Voo Program Voltage High Level 20.5 21.5 V VOOL Voo Voltage Low Level 4.75 5.25 V VPH PROG Program Voltage High Level 17.5 18.5 V VPL PROG Voltage Low Level Vee-0.5 Vee V VEAH EA Program or Verify Voltage High Level 17.5 18.5 V VEAL EA Voltage Low Level 5.25 V 100 VOO High Voltage Supply Current 30.0 mA IpROG PROG High Voltage Supply Current 1.0 mA lEA EA High Voltage Supply Current 1.0 mA 6-18 AFN-Ol832A 804218742 A.C. CHARACTERISTICS (TA=O·Cto +70·C,Vss=OV, Vcc=Voo=+5V± 10%) DBB READ 8042 8642/8742 Symbol Parameter lIIIin. Max. Min. Max. Units tAR CS, Ao Setup to RD! 0 0 ns tRA CS, Ao Hold After Rot 0 0 ns tRR RD Pulse Width 160 160 ns tAD CS, Ao to Data Out Delay 130 130 ns tRO RD! to Data Out Delay 130 130 ns tOF ROt to Data Float Delay 85 85 ns tCY Cycle Time 1.25 15 1.25 15 ILS[1] DBBWRITE Symbol Parameter Min. Max. Min. Max. Units tAW CS, Ao Setup to WR! 0 0 ns tWA CS, Ao Hold After Wflj 0 0 ns tww WR Pulse Width 160 160 ns tow Data Setup to WRt 130 130 ns two Data Hold After WRj 0 0 ns NOTE: 1 TCY = 1S/f(XTAL) A.C. CHARACTERISTICS (TA=25·C±5°C, Vcc=5V±5%, Voo=21V ±0.5V) PROGRAMMING Symbol Parameter Min. Max. Unit Test Conditions tAW Address Setup Time to RES!=Tj 4tCY tWA Address Hold Time After RESETj 4tCY tow Data in Setup Time to PROGj 4tCY two Data," Hold Time After PROG! 4tCY tpH RESET Hold Time to Verify 4tCY tvoow Voo Setup :nme to PROCH 0 1.0 mS tvooH Voo Hold Time After PRQGj 0 1.0 mS tpw Program Pulse Width 50 60 mS tTW Test 0 Setup Time for Program Mode 4tCY tWT Test 0 Hold Time After Program Mode ' 4tCY too Test 0 to Data Out Delay 4tCY tww RESET Pulse Width to Latch Address 4tCY t r , tf Voo and PROG Rise and Fall Times 0.5 2.0 ILS tCY CPU Operation Cycl~ Time 4.0 j.ts tRE flESET Setup Time Before EAt 4tCY NOTE: IfTEST 0 is high. too can be triggered by RE~ETt. 6-19 AFN·01832A 8042/8742 A.C. CHARACTERISTICS DMA 8042 864218742 Symbol Parameter Min. Max. Min. Max.' Units tAcc DACK to WR or RD 0 0 ns tCAC RD or WR to DACK 0 0 ns tACD DACK to Data Valid 130 130 ns tCRO RD or WR to DRO Cleared 100 100 ns[1] NOTE: 1. C L~ 150 pF. A.C. CHARACTERISTICS PORT 2 (TA=O·C to + 70·C, Vcc= +5V ± 10%) 8042/8742/8642[3] Symbol Parameter f(tcy) Min. Max. Units tcp Port Control Setup Before Falling Edge of PROG 1/15 tCy-28 55 ns[1] tpc Port Control Hold After Failing Edge of PROG 1/10 tCY 125 ns[2] tpR PROG to Time P2 Input Must Be Valid 18/15 tCy-16 650 ns[1] tpF Input Data Hold Time 0 150 ns[2] tDP Output Data Setup Time 2/10 TCY 250 ns[1] tpD Output Data Hold Time 1/10 tCy-80 45 ns[2] tpp PROG Pulse Width 6/10 tCY 750 ns NQTES: 1 CL~80pF. 2. CL ~20 pF 3. ICY ~ 1 25/Ls A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE ~C'OlS0PF UNDER TEST -= CRYSTAL OSCILLATOR MODE DRIVING FROM EXTERNAL SOURCE ~ + 5V r -~- XTAL1 <..1SpF: ! 1 1-12 MHz 470Q . IINCWDES XTAL,::;:: SOCKET, STRAy) <:::J , I + SV , 3 L_____ XTAl2 20-30 pF 470Q IINCLUOES SOCKET, STRAy) I -::- L---+-------1 XTAL1 CRYSTAL SERIES RESISTANCE SHOULD BE RISE ANO FALL TIMES'SHOULD NOT EXCEEO <750 AT 12 MHz; <1800 AT 3.6 MHz. 20 NS. RESISTORS TO Vee ARE NEEDED TO ENSURE VIH =3.5V IF TTL CIRCUITRY IS USeD AFN·01832A 6-20 804218742 LC OSCILLATOR MODE J.:.- _~ ~.QMINAL I 45,H 20pF 52 MHz E-IUL -~ 12Q,H 20pF 32 MHz XTALI - C - ~ _---2. MAL2 Cpp z 5 - 10 pF Plf'II TO PIN CAPACITANCE EACH C SHOULD BE APPROXIMATEL Y 20 pF INCLUDING STRAY CAPACITANCE WAVEFORMS READ OPERATION-DATA BUS BUFFER REGISTER ~ ISYSTEMS CS OR An ---f\'I-________________--{ "-____________ ADDRESS BUSI I I~'""-~-,"'-I \ \ IREAD CONTROLl ~-------- ~---- 'OUTPI)T ~ OATABUS _ _- - - , " , , - - - ( ' " " ------- ,r-- WRITE OPERATION-DATA BUS BUFFER REGISTER ==>t X !SYSTEM'S '''"' - 1-"-11 I ~""'".". --'---~-,,-----'W-·-----IJ-'-~~'·~·~-:_'-~~~~~~~~~~~~~~~~~~~~~~~--- {WRITE CON TROll -'''w-rl- 'WD DATA BUS DATA {INPUT! _ _ _ _ _ _MAY ___ _ _ _ _ _- J:X--oATAvALlO-_1V CHANGE V\ ~ MAyDeAHTAANG' ______ _ _ _ _ _ _ _ _ _ __ 6-21 AFN-01832A 804218742 WAVEFORMS (Continued) COMBINATION PROGRAM/VERIFY MODE (EPROM'S ONLY) EA l8V Sy _---J/ PROGRAM --------~+- __ VERIFY ~_--_ PROGRAM - - - - tTW_ TESTO tww_ DBo-DB, J-- DATA TO BE PROGRAMMED VALID ---< NEXT ADDR VALID C LAST NEXT ADDRESS ADDRESS ..:: ~~--- -- -- - - ~ -,~~~-~------------------------------------- VERIFY MODE (ROM/EPROM) l8V EA 5V--f TESTe \'--_ _......J/ \'---- =>--- ADDRESS (0-7) VALID DATA OUT VALID - - -<'-~_AD_N~_~_~_SS_-JX'-_~_~_~T_VD_A~_i_~.J>- - - - - - - • _____ ~)('- _____ A_D_D_RE_S_S_~_-l~_VA_L_IO ____ ~)('_ ______ N_EX_T_A_O_D_R_ES~S~V_A_Ll_D _ _ _ _ _ ___ NOTES 1 PROG MUST FLOAT IF EA IS LOW OR IF TESTO= 5V FOR THE 8742 FOR THE 8042 PROG MUST ALWAYS FLOAT 2 AO MUS, BE HELD LOW (I .•• =OV) DURING PROGRAMNERIFY MODES 3 TEST 0 MUST BE HELD HIGH. The 8742 EPROM can be programmed by the following 2. iUP·200/iUp·201 PROM Programmer with the iUP· Intel products: F87/44. Personality Module. 1. Universal PROM Programmer (UPP 103) peripheral of the Intellec® Development System with a UPP·549 Personality Card. 6-22 AFN·Ol832A inter 804218742 WAVEFORMS (Continued) DMA ~ - lAce - -teAc - OATA BUS ---'ACC~CAC--- ~ VALID ~ ~ -IACO--- ORO Jl --- tCRa--- PORT 2 SYNC EXPANDER PORT OUTPUT PORT 20_3 OAT A EXPANDER PORT INPUT peRT 20_3 DATA PROG PORT TIMING DURING EA SYNC / \ / \ X X P'O.17 P2Q.22 PORT DATA PC X PORT DATA PC ON THE RISING EDGE OF SYNC AND EA IS ENABLED. PORT DATA IS VALID AND CAN BE STROBED ON THE TRAILING EDGE OF SYNC THE PROGRAM COUNTER CONTENTS ARE AVAILABLE 6-23 804218742 Table 2. UPI'M Instruction Set Mnemonic Description "ytes Cycles Mnemonic Description Bytes Cycles ACCUMULATOR DATA MOVES ADD A, Rr Add register to A 1 1 MOVA, Rr Move register to A 1 1 ADD A, @Rr Add data memory 1 1 MOVA,@Rr Move data memory 1 1 toA to A ADD A, #data Add immediate to A 2 2 MOVA, #data Move immediate 2 2 AD DC A, Rr Add reQJster to A 1 1 TOA with carry MOV Rr,A Move A to register 1 1 ADDCA,@Rr Add data memory 1 1 MOV@Rr;A Move A to data 1 1 to A with carry memory ADDC A, #data Add immediate 2 2 MOV Rr, #data Move immediate to 2 2 to A with carry , register ANLA, Rr AND register to A 1 1 MOV@Rr, Move immediate to 2 2 ANLA,@Rr AND data memory 1 1 #data data memory toA MOVA, PSW Move PSWto A 1 1 ANLA, #data AND immediate to A 2 2 MOVPSW,A MoveAto PSW 1 1 ORLA, Rr OR register to A . 1, 1 XCH A, Rr Exchange A and 1 1 ORLA,@Rr OR data memory 1 1 register to A XCHA,@Rr Exchange A and 1 1 ORLA, #data OR immediate to A 2 2 data memory XRLA, Rr Exclusive OR regis- 1 1 XCHDA,@Rr Exchange digit of A 1 1 ter to A and register XRLA,@Rr Exclusive OR data 1 1 MOVPA,@A Move to A from 1 2 memory toA current page XRLA, #data Exclusive OR imme- 2 2 MOVP3,A,@A Move to A from 1 2 diate to A page 3 INCA Increment A 1 1 TIMER/COUNTER DECA Decrement A 1 1 CLRA Clear A 1 1 MOVA, T Read Timer/Counter 1 1 CPLA Complement A 1 1 MOVT,A Load Timer/Counter 1 1 DAA Decimal AdjUst A 1 1 STRTT Start Timer 1 1 SWAP A Swap nibbles of A 1 1' STRTCNT start Counter 1 1 RLA Rotate A left 1 1 STOP TCNT Stop Timer/Counter 1 1 RLCA Rotate A left through 1 1 EN TCNTI Enable Timer/ 1 1 carry Counter Interrupt RRA Rotate A right 1 1 DIS TCNTI Disable Timer/ 1 1 RRCA Rotate A right 1 1 Counter Interrupt through carry CONTROL INPUT/OUTPUT ENDMA Enable DMA Hanp- 1 1 IN A, Pp Input port toA 1 2 shake Lines OUTL Pp, A Output A to port 1 2 EN I Enable IBF Interrupt 1 1 ANL Pp, #data AND Immediate to 2 2 'DIS I Disable IBF Inter- 1 1 port rupt ORL Pp, #data OR immediate to 2 2 EN FLAGS Enable Master 1 1 port • Interrupts IN A, DBB Input DBB to A, 1 1 SEL RBO Select register 1 1 clear IBF bank 0 OUTDBB,A Output A to DBB, 1 1 SEL RB1 Select register 1 1 set OBF bank 1 MOV STS, A ~-A7 to Bits 4-7 of 1 1 NOP No Operation' 1 1 Status REGISTERS ,. MOVDA, Pp Input Expander 1 2 port to A INC Rr Increment register 1 1 MOVD Pp, A Output A to 1 2 INC@Rr Increment data 1 1 Expander port memory ANLD Pp,A AND A to Expander, 1 2 DEC Rr Decreme,nt register 1 1 port 'SUBROUTINE ORLD Pp,A OR A to Expander 1 2 CALLaddr Jump to subroutine 2 2 port RET· Return 1 2 RETR Return and restore 1 2 status 6·24 AFN.()l832A 804218742 Table 2. UPI'M Instruction Set (Continued) Mnemonic Description Bytes Cycles FLAGS CLRC Clear Carry 1 1 CPLC Complement Carry 1 1 CLR FO Clear Flag 0 1 1 CPL FO Complement Flag 0 1 1 CLR F1 Clear F1 Flag 1 1 CPL F1 Complement F1 Flag 1 1 BRANCH JMP addr Jump unconditional 2 2 JMPP@A Jump indirect 1 2 DJNZ Ri, addr Decrement register 2 2 -, and jump JC addr Jump on Carry= 1 2 2 JNC addr Jump on Carry=O 2 2 JZ addr Jump on A Zero 2 2 JNZ addr Jump on A not -Zero 2 2 JTO addr Jump on TO=1 2 2 JNTO addr Jump on TO=O 2 2 JT1 addr Jump on T1=1 2 2- JNT1 addr Jump on T1 =0 2 2 JFO addr Jump on FO Flag= 1 2 2 JF1 addr Jump on F1 Flag=1 2 2 JTF addr Jump on Timer Flag 2 2 = 1, Clear Flag JNIBF addr Jump on IBF Flag 2 2 =0 JOBF addr Jump on OBF Flag 2 2 =1 JBb addr Jump on Accumula· 2 2 tor Bit / 6-25 AFN-OI832A 8202A DYNAMIC RAM CONTROLLER • Provides All Signals Necessary to Con- • Provides Transparent Refresh Capability trol 2117, or 2118 Dynamic Memories • Fully Compatible with Intel@ 8080A, • Directly Addresses and Drives Up to 64K 8OSSA, iAPX 88, and iAPX 86 Family Micro- Bytes Without External Drivers processors • Provides Address Multiplexing and • Decodes CPU Statu$ for Advanced Read Strobes Capability with the 8202A-1 or 8202A-3 • Provides a Refresh Timer and a Refresh • Provides System A~knowledge and Trans- Counter fer Acknowledge Signals • Refresh Cycles May be Internally or Exter- • Internal Clock Capability with the 8202A·1 nally Requested or 8202A-3 The Intel® 8202A is a Dynamic Ram System Controller designed to provide all sighals necessary to use 2117 or 2118 Dynamic RAMs in microcomputer systems. The 8202A provides multiplexed addresses' and address strobes, as well as refresh/access arbitration. The 8202A-1 or 8202A-3 support an internal crystal oscillator. AHo-AHe COLUMN ADDRESS NUX ALO-ALs NUX ROW AOORESS 80--, iiA!o RAi, REFRESH COUNT. . lliifl -RAi2 iiii/Sl-----! iYR------I ........... m3 PCli------I m T1MING WE ARB1TER GENERATOR SACK REFRQ/ALE -------'~--I - - iieK REFRESH TIMER (X1)CLK Figure 1. 8202A Block DiagralYl Figure 2. Pin Configuration 6-26 8202A Table 1. Pin Descriptions Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function ALa 6 I Address Low: CPU address in- RASa 21 0 Row Address Strobe: Used to ALI 8 I puts used to generate memory R.ASI 22 0 latch the Row Address into the AL2 10 I row address. RAS2 23 0 bank of dynamiC RAMs, select- AL3 12 I RAS3 26 0 ed by the 8202A Bank Select AL4 14 I pins (80, 81 IOP1)· AL5 16 I XACK 29 0 Transfer Acknowledge: This AL61 18 I output is a strobe indicating val- id data during a read cycle or AHa 5 I Address High: CPU address In- data written dUring a write cycle. AHI 4 I puts used to generate memory XACK can be used to latch valid AH2 3 I column address. data from the RAM array. AH3 2 I SACK 30 0 System Acknowledge: This AH4 1 I output indicates the beginning of AH5 39 I a memory access cycle It can AH6 38 I be used as an advanced trans- BO 24 I Bank Select Inputs: Used to fer acknowledge to eliminate Bl /OP I 25 I gate the appropriate RASO- wait states. (Note: If a memory RAS3 output for a memory cy- access request is made during a cle. 81 lOP 1 option used to se- refresh cycle, SACK is delayed lect the Advanced Read Mode. until XACK in the memory ac- cess cycle). PCS 33 I Protected Chip Select: Used to enable the memory read and (Xo) OP2 36 1/0 Oscillator Inputs: These inputs write inputs. Once a cycle IS (XI) CLK 37 1/0 are designed for a quartz crystal started, It will not abort even If to control the frequency of the PCS goes inactive before cycle oscillator. If XO/OP2 is connect- completion. ed to a 1KQ resistor pulled to + 12V then X 1 I CLK becomes a WR 31 I Memory Write Request. TTL input for an external clock. RDISI 32 I Memory Read Request: SI N.C. 35 Reserved for future use. function used in Advanced Read mode selected by OPI (pin 25). VCC 40 Power Supply:+5V. REFRQI 34 I External Refresh Request: ALE GND 20 Ground. ALE function used in Advanced Read NOTE: Crystal' mode for the 8202A-l or 8202A-3 only. mode, selected by OP 1 (Pin 25). OUTo 7 0 Output of the Multiplexer: OUTI 9 0 These outputs are designed to OUT2 11 0 drive the addresses of the Dy- x. WE i-- OUT3 13 0 namic RAM array. For 4K RAM OUT4 OUT5 15 17 0 0 operation, OUT6 IS designed to drive the 21 04A CS input. (Note cs* I I I 1KIl ±5% x, CAS RASa OUT6 19 0 that the OUTO_6 pins do not re- I 8202A-1 RAS1 qUire inverters or drivers for 68011 or ±S% 8202""3 RAS2 proper operation. RAS3 WE 28 0 Write Enable: Drives the Write Enable Inputs of the DynamiC Cs < 10pF XACK RAM array. FUNDAMENTAL Xl AL SACK CAS 27 0 Column Address Strobe: This output is used to latch the Col- umn Address into the DynamiC RAM array. Figure 3. Crystal Operation for the 8202A-1 and the 8202A·3 6-27 AFN 01838A 8202A Functional Description the memory's rows. The 8-bit counter is incremented after The 8202A provides a complete dynamic RAM controller every refresh cycle. . for microprocessor systems as well as expansion memory boards. All of the necessary control signals are pro- Address Multiplexer vided for 2117 and 2118 dynamic RAMs. The address multiplexer takes the address inputs and the refresh counter outputs, and gates them onto the address All 8202A timing is generated from a single reference outputs at the appropriate time. The address outputs, in clock. This clock is provided via an external oscillator or conjunction with the RAS and CAS outputs, determine the an on chip crystal oscillator. All output signal transitions address used by the dynamic RAMs for read, write, and are synchronous with respect to this clock reference, ex- refresh cycles. During the first part of a read or write cy- cept for the CPU handshake signals SACK and XACK cle, ALa-AL6 are gated to OUTO-OUT6, then AHa-AH6 (trailing edge). are gated to the address outputs. CPU memory requests normally use the RD arid WR in- puts. The advanced READ mode allows ALE and S 1 to be During a refresh cycle, the refresh counter is gated onto used in place of the RD input. the address outputs. All refresh cycles are RAS-only re- fresh (CAS inactive, RAS active). Failsafe refresh is provided via an internal refresh timer which generates internal refresh requests. Refresh re- To minimize buffer delay, the information on the address quests can also be generated via the REFRQ input. outputs is inverted from that on the address inputs. An on-chip synchronizer I arbiter prevents memory and re- OUTo-OUT 6 do not need inverters or buffers unless addi- fresh requests from affecting a cycle in progress. The tional drive is required. READ, WRITE, and external REFRESH requests may be asynchronous to the 8202A clock; on-Chip logic will syn- Synchronizer / Arbiter .. chronize the requests, and the arbiter will decid~ if the re- The 8202A has three inputs, REFRQI ALE (pin 34), RD quests should be delayed, pending completion of a cycle in (pin 32) and WR (pin 31). The RD and WR inputs allow an progress. external CPU to request a memory read or write cycle, respectively. ThEl REFRQI ALE allows refresh requests to Option Selection be requested external to the 8202A. The 8202A has three strapping options. When .OP 1 is se- lected (16K mode only), pin 32 changes from a RD input to All three of these inputs may be asynchronous with re- an S 1 input, and pin 34 changes from a REFREQ input to spect to the 8202A's clock. The arbiter will resolve con- an ALE input. See "Refresh Cycles" and "Read Cycles" flicts between refresh and memory requests, for both for more detaiL OP1 is selected by tying pin 25 to pending CYCles and cycles in progress. Read and write re- + 12V through a 5.1 K ohm resistor on the 8202A-1 or quests will be given priority over refresh requests. 8202A-3 only. When OP2 is selected, by connecting pin 36 to + 12V System Operation a through a 1K ohm resistor, pin 37 changes from crystal The 8202A is always in one of the following states: input (X 1) to the CLK input for an external TTL clock. a) IDLE Refresh Timer b) TEST Cycle The refresh timer is used to monitor the time since the last c) REFRESH Cycle refresh cycle occurred. When the appropriate amount of d) READ Cycle time has elapsed, the refresh timer will request a e) WRITE Cycle refresh cycle. External refresh requests will reset the The 8202A is normally in the IDLE state. Whenever one of refresh timer. the other cycles is requested, the 8202A will leave the Refresh Counter IDLE state to perform the desired cycle. If no other cycles The refresh counter is used to sequentially refresh all of are pending, the 8202A will return to the IDLE state. Description Pin # Normal Function Option Function B1!OP1 25 Bank (RAS) Select Advanced-Read Mode (see text) XO lOP2 36 Crystal Oscillator (8202A-1 or 8202A-3) External Oscillator Figure 4. 8202A Option Selection AFN 01838A inter 8202A Test Cycle The TEST Cycle is used to check operation of several So ~_ _ _ _ REFRQ 8202A internal functions. TEST cycles are requested by activating the RD and WR inputs, independent of 8085A PCS. The TEST Cycle will reset the refresh address S1 counter. It will perform a WRITE Cycle if PCS is low. 8202A The TEST Cycle should not be used in normal system SACK or operation, since it would affect the dynamic RAM CAS refresh. Refresh Cycles Figure 5. Hidden Refresh The 8202A has two ways of providing dynamic RAM re- fresh: Read Cycles The 8202A can accept two different types of memory 1) Internal (failsafe) refresh Read requests: 2) External (hidden) refresh 1) Normal Read, via the RD input Both types of 8202A refresh cycles activate all of the RAS 2) Advanced Read, using the S1 and ALE inputs outputs, while CAS, WE, SACK, and XACK remain inac- tive. The user can select the desired Read request configura- tion via the B1 /OP1 hardware strapping option on pin 25. Internal refresh is generated by the on-chip refresh timer. The timer uses the 8202A clock to ensure that refresh of Normal Read Advanced Read all rows of the dynamic RAM occurs every 2 milliseconds. Pin 25 B 1 input +12 Volt Option If REFRQ is inactive, the refresh timer will request a re- Pin 32 RD input S1 input fresh cycle every 10-16 microseconds. Pin 34 REFRQ input ALE input # RAM banks 4 (RAS 0-3) 2 (RAS 2-3) External refresh is requested via the REFRQ input (pin 34). Ext. Refresh Req. Yes No External refresh control. is not available when the Ad- vanced-Read mode is selected. External refresh requests Figure 6. 8202A Read Options are latched, then synchronized to the 8202A clock. The arbiter will allow the refresh request to start a refresh Normal Reads are requested by activating the RD input, cycle only if the 8202A is not in the middle of a cycle. and keeping it active until the 8202A responds with an ! XACK pulse. The RD input can go inactive as soon as the Simultaneous memory request and external refresh re- command hold time (tCHS) is met. quest will result in the memory request being honored first. This 8202A characteristic can be used to "hide" refresh Advanced Read cycles are requested by pulsing ALE cycles during system operation. A circuit similar to while S1 is active; if S1 is inactive (low) ALE is ignored. Figure 5 can be used to decode the CPU's instruction Advanced Read timing is similiar to Normal Read timing, fetch status to generate an external refresh request. The except the falling edge of ALE is used as the cycle start refresh request is latched while the 8202A performs the reference. instruction fetch; the refresh cycle will start immediately after the memory cycle is completed, even if the RD input If a Read cycle is requested while a refresh cycle is in has not gone inactive. If the CPU's instruction decode time progress, then the 8202A will set the internal delayed- is long enough, the 8202A can complete the refresh cycle SACK latch. When the Read cycle is eventually started, before the next memory request is generated. the 8202A will delay the active SACK transition until XACK goes active, as shown in the AC timing diagrams. This de- Certain system configurations require complete external lay was designed to compensate for the CPU's READY refresh requests. If external refresh is requested faster setup and hold times. The delayed-SACK latch is cleared than the minimum internal refresh timer (tREF), then, in ef- after every READ cycle. fect, all refresh cycles will be caused by the external re- fresh request, and the internal refresh timer will never Based on system requirements, either SACK or XACK can generate a refresh request. be used to generate the CPU READY signal. XACK will 6-29 AFN 01838A 8202A normally be used; if the CPU can tolerate an advanced A microprocessor system is concerned with the time data READY, then SACK can be used, but only if the CPU can is valid after RD goes low. See Figure 7. In order to calcu- tolerate the amount of advance provided by SACK. If late memory read access times, the dynamic RAM's A.C. SACK arrives too early to provide the appropriate number specifications must be examined, especially the RAS-ac- of WAIT states, then either XACK or a delayed form of cess time (tRAC) and the CAS-access time (tCAC). Most SACK should be used. configurations will be CAS-access limited; i.e., the data from the RAM will be stable tcc,max (8202A) + tCAC Write Cycles (RAM) after a memory read cycle is started. Be sure to 'Write cycles are simi liar to Normal Read cycles, except add any delays (due to buffers, data latches, etc.) to cal- for the WE output. WE is held inactive for Read cycles, but culate the overall read access time. goes active for Write cycles. All 8202A Write cycles are "early-write" cycles; WE goes active before CAS goes ac- Since the 8202A normally performs "early-write" cycles, tive by an amount of time sufficient to keep the dynamic the data must be stable at the RAM data inputs by the time RAM output buffers turned off. CAS goes active, including the RAM's data setup time. If the system does not normally guarantee sufficient write General System Considerations data setup, you must either delay the WR input signal or All memory requests (Normal Reads, Advanced Reads, delay the 8202A WE output. Writes) are qu!'\lified by the PCS input. PCS should be sta- ble, either active or inactive, prior to the leading edge of Delaying the WR input will delay all 8202A timing, including RD, WR, or ALE. Systems which use battery backup the READY handshake signals, SACK and XACK, which should pullup PCS to prevent erroneous memory requests, may increase the number of WAIT states generated by the and should also pullup WR to keep the 8202A out of its CPU. test mode. If the WE output is externally delayed beyond the CAS ac- In order to minimize propagation delay, the 8202A uses an tive transition, then the RAM will use the falling edge of WE inverting address multiplexer without latches. The system to strobe the write data into the RAM. This WE transition must provide adequate address setup and hold times to should not occur too late during the CAS active transition, guarantee RAS and CAS setup and hold times for the or else the WE to CAS requirements of the RAM will not be RAM. The 8202A tAD AC parameter should be used for met. this system calculation. The BO-B 1 inputs are similiar to the address inputs in that they are not latched. BO and B1 should not be changed during a memory cycle, since they directly control which RO~ I ~ ______________ ~ I ______- J/ x::r- ~I. - - - t R l D V .. I RAS output is activated. I I The 8202A uses a two-stage synchronizer for the memory DATA -----------« request inputs (RD, WR, ALE), and a separate two stage I : t-tRAC---.J synchronizer for the external refresh input (REFRQ). As I I with any synchronizer, there is always a finite probability RAS------~\( : ~ of metastable states inducing system errors. The 8202A I synchronizer was designed to have a system error rate I tCAC I ~ less than 1 memory cycle every three years based on the full operating range of the 8202A. CAS --------------""''\ i~ Figure 7. Read Access Time 6-30 AFN 01838A 8202A 2118 DYNAMIC RAM ARRAY ~ AS-1S AlO-6 OU TO-6 r--- - , I AO-6 ~ ~ AHO_6 "['" ALE BO-1 D'N 8202A Dour 8088 ~16KMODE) WE =: W-E ADO_7 RD WR f=~ WR RD/5, CAS RASa - CA-S RAS DIN Dour 1 LL RAS, g=- --< SACK RAS2 RA53 ;=) AO-6 XACK D'N - DOUl ~ WE r--- CAS RAS DIN DOUT ""I' 1 T ~r::-- JK2 L ----tl D'N ~~s - r- ~~SDOUT TT. ~ ----.I AO-6 BAL D'N e-===: WE CAS D'N D'N D'N DOUl D'N DOUT DOUT ~T ~S~,1 D'N DOUl RAS DOUl DIN DOUT Dour II 1" T j j 11 j DATA BUS DATA LATCH 'N 1\ - Figure 8. Typical 8088 System 6-31 AFN 01838A inter 8202A ABSOLUTE MAXIMUM RATINGS' 'NOTE: Stresses above those listed under "Absolute Maxi- mum Ratings" may cause permanent damage to the deVice. Ambient Temperature Under Bias "'" ,O°C to 70°C This is a stress rating only and functional operation of the de- Storage Temperature ,-65°C to +,150°C vice at these or any other conditions above those indicated in Voltage On any Pin the operational sections of this specification is not implied. With Respect to Ground ,-0,5V to +7V4 Exposure to absolute maximum rating conditions for ex- Power Dissipation ,1,5 Watts tended periods may affect device reliability, D.C. CHARACTERISTICS TA = O°C to 70°C; VCC = 50V -+ 10% VCC = 50\1 -+ 5% for 8202A-3 GND -- OV Symbol, Parameter Min Max Units Test Conditions - Vc Input Clamp Voltage -1.0 V IC = -5 mA ICC Power Supply Current 270 rnA IF Forward Input Current CLK -2,0 mA VF = 0.45V All Other Inputs 3 -320 /JA VF = 0.45V IR Reverse Input Current 3 40 /JA VR = Vee (Note 1) VOL Output Low Voltage SACK,XACK 0.45 V 10L = 5 rnA All Other Outputs 0,45 V 10L = 3 mA VOH Output I;ligh Voltage VIL = 0.65V SACK,XACK 2.4 V 10H = -1 mA All Other Outputs 2.6 V 10H = -1 mA VIL Input Low Voltage 0.8 V VCC = 5,OV (Note 2) , VIHl Input High Voltage 2,0 V VCC = 5.0V VIH2 Option Voltage V (Note 4) F = 1 MHz CIN Input Capacitance 30 pF VBIAS = 2.5V, VCC = 5V TA=25°C NOTES: 1. IR: 200 mA for pin 37 (eLK) for external' clock mode 2, For test mode RD & WR must be held at GND, 3 Except for pin 36, 4, +12 Volt ,. 36 OP2 ±10% 8202A 51' 25 OP, ReSIstor Tolerance: ::!:5% 6-32 AFN 01838A 8202A A.C. CHARACTERISTICS TA = O°C to 70°C, VCC = 5V ± 10%, VCC = 5V ± 5% for 8202A-3 Measurements made with respect to RASO-RAS3, CAS, WE,QUTO-QUT6 are at 2 4V and 0 8V. All other pins are measured at 1 5V All times are in nsec Symbol Parameter Min Max Notes tp Clock Period 40 54 tpH External Clock High Time 20 tPL External Clock Low Time-above (» 20 mHz 17 tpL External Clock Low Time-below «) 20 mHz 20 tRC Memory Cycle Time lOtp - 30 12tp 4, 5 tREF Refresh Time (128 cycles-16K mode) 264tp 288tp tRP RAS Precharge Time 4tp - 30 tRSH RAS Hold After CAS 5tp - 30 3 tASR Address Setup to RAS tp - 30 3 tRAH Address Hold From RAS tp - 10 3 tASC Address Setup to CAS tp - 30 3 tCAH Address Hold from CAS 5tp - 20 3 tCAS CAS Pulse Width 5tp - 10 twcs WE Setup'to CAS tp - 40 tWCH WE Hold After CAS 5tp - 35 8 tRS RD, WR, ALE, REFRQ delay from RAS 5tp tMRP RD, WR setup to RAS 0 5 tRMS REFRQ setup to RD, WR 2tp tRMP REFRQ setup to RAS 2tp 5 , tpcs PCS Setup to RD, WR, ALE 20 tAL S 1 Setup to ALE 15 tLA S1 Hold from ALE 30 tCR RD, WR, ALE to RAS Delay tp + 30 2tp + 70 2 tcc RD, WR, ALE to CAS Delay 3tp + 25 4tp + 85 2 tsc CMD Setup to Clock 15 1 tMRS RD, WR setup to REFRQ 5 tCA RD, WR, ALE to SACK Delay 2tp + 47 2, 9 tcx CAS to XACK Delay , 5tp - 25 5tp + 20 tcs CAS to SACK Delay 5tp - 25 5tp + 40 2,10 tACK XACK to CAS Setup 10 txw XACK Pulse Width tp - 25 7 tCK SACK, XACK turn-off Delay 35 tKCH' CMD Inactive Hold after SACK, XACK 10 tLL REFRQ Pulse Width 20 tCHS CMD Hold Time 30 11 tRFR REFRQ to RAS Delay 4tp + 100 6 tww WR to WE Delay 0 50 8 tAD CPU Address Delay 0 40 3 6-33 AFN 01838A 8202A WAVEFORMS Normal Read or Write Cycle Advanced Read Mode ALE tRS- 4-:.r.~~ ~~~~---..~ _ _ _ _ _ _ _.J .-.tCA---+- 6-34 AFN01838A 8202A WAVEFORMS (cont'd) Memory Compatibility Timing ~:~i ~________________ VA_L_'D_A_DD_R_ES_S__________________ ~~ _____________________________ -~~~- --~~- f\ tASH I tCAS f\ V !--'ASR_ _'RAH_ i-'ASC --;"' !---'CAH_ DUTO-OUT6 ~ ROW D( COLUMN K Write Cycle Timing \ / \ j ,I --MIN IC~--\ ICR '--MAX- .1 - IwW - \ ( _twcs .... .......---tWCH . . ICC MIN \ . ICC MAX 6-35 AFN 01838A inter 8~02A WAVEFORMS (corit'd) Read or Write Followed By External Refresh RD, WA \ \ _tMRS-+ ........-tlL _ _ _ REFRQ V \ J \ I..-,Rs- "-MAX~ 'CR . tRMP _IRP- .\ \ -- 'RC . 'ce •1 \. . MIN tcc MAX External Refresh Followed By Read or Write REFRQ J V l--- . . - - tRMS - - . ..... \ K tMRP . I-'RS- . -'ll- tRFR . ~tRP_ ->~ \ . 'RC . \1...--- 6-36 AFN 01838A 8202A WAVEFORMS (cont'd) Clock And System Timing ClK - t p c s - - - - t s c ....... RD, iNA, ALE Table 2 8202A Output Test A.C. TESTING LOAD CIRCUIT Loading. Test Load Pin SACK,XACK CL = 30 pF ICL DEVICE QUTO-QUTS CL = lS0 pF UNDER TEST RASa-RASa CL = so pF WE CL = 224 pF CAS CL = 320 pF NOTES; tsc is a reference POIOt only. ALE, RD, WR, and REFRQ lOputs do CL INCLUDES JIG CAPACITANCE not have to be externally synchronized to 8202A clock 2 If tRS min and tMRS min are met then, tCA, tCR, and tcc are valid, otherwIse tcs is valid. . 3 tASR, tRAH, tASC, tCAH, and tRSH depend upon 80-81 and CPU address remaining stable throughout the memory ~ycle. The ad· dress Inputs are not latched by the 8202A. 9. teA applies only when In normal SACK mode. 4. For back·to:back refresh cycles, tRC max = 13tp 10. tcs applies only when In delayed SACK mode. 5 tRC max IS valid only If tRMP min is met (READ, WRITE followed 11 tCHS must be met only to ensure a SACK active pulse when in by REFRESH) or tMRP min is met (REFRESH followed by READ, delayed SACK mode XACK will always be actIvated for at WRITE) least txw (tp- 25 nS). Violating tCHS min does not otherwIse 6 tRFR IS valid only If tRS min and tRMS min are met affect device operatIon. txw mIO applies when RD, WR has already gone high Otherwise XACK follows RD, WR. 8 WE goes high accordIOg to tWCH or tww, whichever occurs first. 6-37 AFN 01838A inter 8202A The typical rising and falling characteristic curves for the Timing Parameters. Using this design tool in conjunction OUT, RAS, CAS and WE output buffers can be used to with the timing waveforms, the designer can determine determine the effects of capacitive loading on the A.C. typical timing shifts based on system capacitive load. A.C. CHARACTERISTICS FOR DIFFERENT CAPACITIVE LOADS 5.0r_-----,,------t------~------_r------,_------r_------r_----_,----~C~ATAA=C~IT~AN~C=E~'P~F D•• ~--_l__J,~~3'O!i;;:2~--_1__--_+_--__+---+__--_+_--_+--__I D.O~ +-______ _____ L_ _ _ _ _ _ L_~---L------~----~-------L------L-----~------~ TIME f-5n.~ 5:0 ,.-_ _ _ _, -_ _ --t_____-.___-r_____, -_____, -______r_-----,,-----C-A,PA-C-'T-A-NC-E--'-,PF NOTE: MEASUREMENT CONDITIONS: Use the Test Load as the base capacItance for estImating timing TA ~ 25°C Pons not measured are loaded with the shIfts for system crotlcal tIming parameters. Vec ~ +5V Test Load capacItance. tp ~ 50 ns 6-38 intJ 8202A Example: Find the effect on tCR and tcc using 64 2. From the waveform diagrams, we determine that 2118 Dynamic RAMs configured in 4 banks. the fallin9. edge fiming is needed for tCR and tcc. 1. Determine the typical RAS and CAS capacitance: Next find the curve that best approximates the From the data sheet RAS = 4 pF and CAS = 4 pF. test load; Le., 68 pF for RAS and 330 pF for CAS. :. RAS load = 64 pF + board capacitance. 3. If we use 72 pF for RAS loading, then the tCR CAS load = 256 pF + board capacitance. (max.) spec should be increased by about 1 ns. Assume 2 pF/in (trace length) for board Similarly if we use 288 pF for CAS, then tcc (min.) capacitance. and (max.) should decrease .about 1 ns. 6-39 8203 64K DYNAMIC RAM CONTROLLER • Provides All Signals Necessary to • Fully Compatible with Intel@ 8080A, Conttol64K (2164) and 16K (2117, 2118) , 808SA, iAPX 88, and iAPX 86 Family Micro- Dynamic M~mories , proc~ssors • Directly Addresses and Drives Up to 64 • Provides System Acknowledge and Trans- Devices Without External Drivers fer Acknowledge Signals • Provides Address Multiplexing and Strobes • Refresh Cycles May be Internally or Exter- nally Requested (For Transparent Refresh) • Provides a Refresh Timer and a Refresh Counter • Internal Series Damping Resistors on RAS, CAS and WE Outputs • Provides Refresh/ Aocess Arbitration • Internal Clock Capability with the 8203-1 • Available in EXPRESS and the 8203-3 -Standard Temperature Range The Intel® 8203 is a Dynamic Ram System Controller designed to provide all signals necessary to use 2164, 2118 or 2117 Dynamic RAMs in microcomputer systems. The '8203 provides multiplexed addresses and address strobes, refresh logic, refresh/access arbitration. Refresh cycles can be started internally or externally. The 8203-1 and the. 8203-3 support Advanced-Read mode and an internal crystal oscillator. The 8203-3 is a ±5% Vee part. ....... COI.UIIN AH, AH, AH, AH" ....... ROW . .... Mi, Oilf• AL, OUT, m, ... .... AL, "".'====~ OUT, ACO "" ..;::::'''''' 1 - - - - ... eD OUTS """'. AL4 .... .... iiUf, ALe OUT. ONO Figure 1. 8203 Block Diagram Figure 2. Pin Configuration Intel Corporation Assumes No ResponSibility for the Use of Any CIrcuitry Other Than Circuitry Embodied In an Intel Product No Other Circuit Patent Licenses are Implied ©INTELCORPORATION, 1982 JULY 1982 6-40 ORDER NUMBER: 21044-002 8203 Table 1. Pin Descriptions Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function ALO 6 Address Low: CPU address in- RASO 21 0 Row Address Strobe: Used to AL1 8 puts used to generate memory RAS1 22 0 latch the Row Address into the AL2 10 row address. RAS21 23 0 bank of dynamic RAMs, select- AL3 12 OUT7 ed by the 8203 Bank Select pins AL4 14 RAS3/BO 26 1/0 (BO, B1 IOP1)· In 64K mode, AL5 16 only RASo and RAS 1 are avail- AL6 18 able; pin 23 operates as OUT 7 and pin 26 operates as the Bo AHO 5 Address High: CPU address in- bank select input. AH1 4 puts used to'generate memory AH2 3 corumn address. XACK 29 0 Transfer Acknowledge: This AH3 2 output IS a strobe Indicating val- AH4 1 id data during a read cycle or AH5 39 data written during a write cycle. AH6 38 XACK can be used to latch valid data from the RAM array. BO/AL7 24 Bank Select Inputs: Used to 25 gate the appropriate RAS output SACK 30 0 System Acknowledge: This B1 /OP 11 for a memory cycle. B1 lOP 1 op- output Indicates the beginning of AH7 tion used to selectthe Advanced a memory access cycle. It can Read Mode. (Not available in be used as an advanced trans- 64K mode.) See Figure 5. fer acknowledge to eliminate When in 64K RAM Mode, pins 24 walt states. (Note: If a memory access request is made dUring a and 25 operate as the .AL 7 and refresh cycle, SACK is delayed AH7 address inputs. until XACK in the memory ac- PCS 33 I Protected Chip Select: Used to cess cycle) enable the memory read and XOIOP2 36 1/0 Oscillator Inputs: These Inputs write inputs. Once a cycle IS X1 /CLK 37 1/0 are designed for a quartz crystal started, It will not abort even if to control the frequency of the PCS goesjnactive before cycle OSCillator. If Xo I OP2 is shorted completion. to pin 40 (VCC) or if XOIOP2 is WR 31 I Memory Write Request. connected to + 12V through a 1KQ resistor then X 1 I CLK be- RD/S1 32 I Memory Read Request: S1 comes a TTL input for an exter- function used in Advanced Read nal clock.- (Note: Crystal mode mode selected by OP 1 (pin 25). for the 8203-1 and the 8203-3 REFRQI 34 I External Refresh Request: ALE only). ALE function used in Advanced Read 16K/64K 35 I Mode. Select: This Input selects mode, selected by OP 1 (pin 25). 16K mode (2117, 2118) or 64K .mode (2164). Pins 23-26 OUTO 7 0 Output of the Multiplexer: change function based on the OUT1 9 0 These outputs are designed to mode of operation. OUT2 11 0 drive the addresses of the Dy- OUT3 13 0 namic RAM array. (Note that the VCC .40 Power Supply: +5V. OUT4 15 0 OUTO-7 pins do not require in- GND 20 Ground. OUT5 17 0 verters or drivers for proper op- OUT6 19 0 eration.) WE 28 0 Write Enable: Drives the Write Functional Description !:nable inputs of the Dynamic The 8203 provides a complete dynamic RAM control-' RAM array. ler for microprocessor systems as well as expansion memory boards. All of the necessary control signals CAS 27 0 Column Address Strobe: This output is used to latch the Col- are provided for 2164,2118 and 2117 dynamic RAMs. umn Address into the Dynamic RAM array. The 8203 has two modes, one for 16K dynamic RAMs and one for 64Ks, c~ntrolled by pin 35. 6-41 AFN-021446 8203 Other Option Selections ,-- 1 Xo WE CAS The 8203 has three strapping options. When OP1 is se- lected (16K mode only), pin 32 changes from a RD input to CS* 1 1KU = an S 1 input, and pin 34 changes from a REFRQ input to an ±S% RASa ALE input. See "Refresh Cycles" and "Read Cycles" for 1 X, -- 1 6S0!l C&..i... T 8203·1 or 8203·3 RAS1 more detail. OP1 is selected by tying pin 25 to +12V through a 5.1 K ohm resistor on the 8203-1 or 8203-3 ":" ±5% 1 RAS2 _I only. ":" RAS3 Cs < 10pF XACK When OP2'is selected, the internal oscillator is disabled FUNDAMENTAL XTAL SACK and pin 37 changes from a crystal input (X1) to a ClK input for an external TTL clock. OP2 is selected by short- ing pin 36 (XOIOP2) directly to pin 40 (VCC). No current Figure 3. Crystal Operation for the 8203-1 and limiting resistor should be used. OP2 may also be selected 8203:3 by tying pin 36 to +12V through a 1KQ resistor. All 8203 timing is generated from a single reference clock. This clock is provided via an external oscillator or an on- Refresh Timer chip crystal oscillator. All output signal transitions are syn- The refresh timer is used to monitor the time since the last chronous with respect to this clock reference, except for refresh cycle occurred. When the appropriate amount of the trailing edges of the CPU handshake signals SACK and time has elapsed, the refresh timer will request a refresh XACK. cycle. External refresh requests will reset the refresh timer. CPU memory requests normally use the RD and WR in- puts. The Advanced-Read mode allows ALE and S 1 to be used in place of the RD input. Refresh Counter The refresh counter is used to sequentially refresh all of Failsafe refresh is provided via an internal timer which gen- the memory's rows. The 8·bit counter is incremented after erates refresh requests. Refresh requests can also be every refresh cycle. generated via the REFRQ input. An on-chip synchronizer I arbiter prevents memory and re- Pin # 16K Function 64K Function fresh requests from affecting a cycle in progress. The 23 RAS2 Address Output (OUT7> READ, WRITE, and external REFRESH requests may be 24 Bank Select (BO> Address Input (AL7> asynchronous to the 8203 clock; on-chip logic will syn- 25 Bank Select (B 1> Address Inp'ut (AH7) chronize the requests, and the arbiter will decide if the re- 26 RAS3 Bank Select (BO> quests should be delayed, pending completion of a cycle in Figure 4. 16K/64K Mode Selection progress. 16K/64K Option Selection Outputs Inputs Pin 35 is a strap input that controls the two 8203 modes. Figure 4 shows the four pins that are multiplexed, In 16K B1 BO RASO fiA§1 RAS2 RAS3 mode (pin 35 tied to VCC or left open), the 8203 has two 0 0 0 1 1 1 Bank Select inputs to select one of four RAS outputs. In 16K 0 1 1 0 1 1 this mode, the 8203 is exactly compatible with the Intel Mode 1 0 1 1 0 1 8202A Dynamic RAM Controller. In 64K mode (pin 35 tied 1 1 1 1 1 0 to GND), there is only one Bank Select input (pin 26) to 64K - 0 0 1 - - select the two FiAS outputs. More than two banks of 64K Mode - 1 1 0 - - dynamic RAM's can be used with external logic. Figure 5. Bank Selection Description Pin # Normal Function Option Function Bl!OPl (16K only)! AH7 25 Bank (RAS) Select Advanced-Read Mode (see text) ., XO!OP2 36 Crystal Oscillator (8203·1 and 8203-3) External Oscillator Figure 6. 8203 Option Selection 6-42 AF~I-02'44B inter 8203 Address Multiplexer Refresh Cycles The address multiplexer takes the address inputs and the The 8203 has two ways of providing dynamic RAM refresh counter outputs, and gates them onto the address refresh: outputs at the appropriate time. The address outputs, in conjunction with the RAS and CAS outputs, determine the 1) Internal (failsafe) refresh address used by the dynamic RAMs for read, write, and 2) External (hidden) refresh refresh cycles. During the first part of a read or write cy- cle, ALO-AL7 are gated to OUTO-OUT7, then AHO-AH7 Both types of 8203 refresh cycles activate all of the RAS are gated to the address outputs. outputs, while CAS, WE, SACK, and XACK remain inactive. During a refresh cycle, the refresh counter is gated onto the address outputs. AU refresh cycles are RAS-only re- Internal refresh is generated by the on-chip refresh timer. fresh (CAS inactive, RAS active). The timer uses the 8203 clock to ensure that refresh of all rows of the dynamic RAM occurs every 2 milliseconds To minimize buffer delay, the information on the address (128 cycles) or every 4 milliseconds (256 cycles). If outputs is inverted from that on the address inputs. REFRQ is inactive, the refresh timer will request a refresh cycle every 10-16 microseconds. OUTO:"'OUT7 do not need inverters or buffers unless addi- tional drive is required. . External refresh is requested via the REFRQ input (pin 34). External refresh control is not available when the Ad- Synchronizer / Arbiter vanced-Read mode is selected. External refresh requests The 8203 has three inputs, REFRQ/ ALE (pin 34), RD (pin are latched, then synchronized to the 8203 clock. 32) and WR (pin 31). The RD and WR inputs allow an !lX- ternal CPU to request a memory read or write cycle, re- The arbiter will allow the refresh request to start a refresh spectively. The REFRQ / ALE input allows refresh requests cycle only if the 8203 is not in the middle of a cycle. to be requested external to the 8203. When the 8203 is in the idle state a simultaneous memory All three of these inputs may be asynchronous with re- request and external refresh request will result in the mem- spect to the 8203's clock. The arbiter will resolve conflicts ory request being honored first. This 8203 characteristic between refresh and memory requests, for both pending can be used to "hide" refresh cycles during system oper- cycles and cycles in progress. Read and write requests ation. A circuit similar to Figure 7 can be used to decode will be given priority over refresh requests. the CPU's iostruction fetch status to generate an external refresh request. The refresh request is latched while the 8203 performs the instruction fetch; the refresh cycle will System Operation start immediately after the memory cycle is completed, The 8203 is always in one of the foliowing states: even if the RD input has not gone inactive. If the CPU's instruction decode time is long enough, the 8203 can com- a) IDLE plete the refresh cycle before the next memory request is b) TEST Cycle generated. c) REFRESH Cycle d) READ Cycle If the 8203 is not in the idle state then a simultaneous mem- e) WRITE Cycle ory request and an external refresh request may result in the refresh request being honored first. The 8203 is normally in the IDLE state. Whenever one of the other cycles is requested, the 8203 will leave the IDLE state to perform the desired cycle. If no other cycles are pending, the 8203 will return to the IDLE state. So ~_ _ _ _ ~EFRO Test Cycle BOO.A " The TEST Cycle is. used to check operation of several S 8203 8203 internal functions. TEST cycles are requested by ac- tivating the PCS, RD and WR inputs. The TEST Cycle will SACK or reset the refresh address counter and perform a WRITE CAS Cycle. The TEST Cycle should not be used in normal sys- tem operation, since it would affect the dynamic RAM re- Figure 7. Hidden Refresh fresh. 6-43 AFN.()2'44B intJ 8203 Certain system configurations require complete external Write Cycles refresh requests. If external refresh is requested faster Write cycles are similiar to Normal Read cycles; except than the minimum internal refresh timer (tREF), then, in ef- for the WE output. WE is held inactive for Read cycles, but fect, all refresh cycles will'be caused by the external re- goes active for Write cycles. All 8203 Write cycles are fresh request, and the internal refresh timer will never "early-write" cycles; WE goes active before CAS goes ac- generate a refresh request. tive by an amount of time sufficient to keep the dynamic RAM output buffers turned off. Read Cycles The 8203 can accept two different types of memory Read General System Considerations requests: ' All memory requests (Normal Reads, Advanced Reads, Writes) are qualified by the PCS input. pes should be sta- 1) Normal Read, via the RD input ble, either active or inactive, prior to the leading edge of 2) Advanced Read, using the S1 and ALE inputs (16K RD, WR, or ALE. Systems which use battery backup mode only) should pullup PCS to prevellt erroneous memory requests. The user can select the desired Read request configura- In order to minimize propagation delay, the 8203 uses an tion via the B 1 / OP 1 hardware strapping opJion on pin 25. inverting address multiplexer without latc~es. The system must provide adequate address setup and hold times to guarantee RAS and CAS setup' and hold times for the Normal Read Advanced Read RAM. The tAD AC parameter shou!d be used for this sys- tem calculation. Pin 25 81 input OPI (+12V) Pin 32 RD input SI input The BO-B 1 inputs are similiar to the address inputs in that Pin 34 REFRQ input ALE input they are not latched. BO and B1 should not be changed # RAM banks 4 (RAS 0-3) 2 (RAS 2-3) during a memory cycle, since they directly control which Ext. Refresh Yes No RAS output is activated. Figure 8_ 8203 Read Options The 8203 uses a two-stage synchronizer for the memory request inputs (RD, WR, ALE), and a separate two stage Normal Reads are requested by activating the RD input, synchronizer for the external refresh input (REFRQ). As and keeping it active until the 8203 responds with an with any synchronizer, there is always a finite probability XACK pulse. The RD input can go inactive as soon as the of metastable states inducing system errors. The 8203 command hold time (tCHS) is met. synchronizer was designed to have a system error rate less than 1 memory cycle every three years based on the Advanced Read cycles are requested by pulsing ALE full operating range of the 8203. while S1 is active; if SJ is inactive (low) ALE is ignored. Advanced Read timing' is similiar to Normal Read timing, except the falling edge of ALE is used as the cycle start A microprocessor system is concerned wl:len the data is reference. valid after AD goes low. See Figure 9. In order to calculate memory read access times, the dynamic RAM's A.C. If a Read cycle is requested while a refresh cycle is in specifications must be examined, especially the RAS-ac- progress, then the 8203 will set the internal delayed- cess time (tRAC> and the CAS-access time (tCAC). Most SACK latch. When the Read cycle is eventually started, configurations will be CAS-access limited; i.e., the data the 8203 will delay the active SACK transition until XACK from the RAM will be stable tcc,max (8203) + tCAC goes active, as shown in the AC timing diagrams. This de- (RAM) after a memory read cycle is started. Be slJre to lay was designed to compensate for the CPU's READY add any delays (due to buffers, data latches, etc.) to cal- setup and hold times. The delayed-SACK latch is cleared culate the overall read access time. after every READ cycle. Since the 8203 normally performs "early-write" cycles, Based on system requirements, either SACK or XACK can the data must be stable at the RAM data inputs by the time be used to generate the CPU READY signal. XACK will CAS goes active, including the RAM's data setup time. If norma,lly be used; if the CPU can tolerate an advanced the system does not normally guarantee sufficient write ~EADY, then SACK can be used, but only if the CPU can data setup, you must either delay the WR input signal or tolerate the amount of advance provided by SACK. If delay the 8203 WE output. ' ' SACK arrives too early to provide tHe appropriate number of WAlT states, then either XACK or a delayed form of Delaying the WR input will delay all 8203 timing, including SACK should be used. the READY handshake signals, SACK and XACK, which 6-44 AFN.02144B 8203 may increase the number of WAIT states generated by the CPU. Ro~ , ' -_ _ _ _ _ _ _-:-, _ _ _- J;- If the WE output is externally delayed beyond the CAS ac- tive transition, then the RAM will use the falling edge of WE .;-----tRlDV .. I B- to strobe the write data into the RAM. This WE transition foo' , I should not occur too late during the CAS active transition, DATA-------« or else the WE to CAS requirements of the RAM will not be I ' met. t...-----tRAC~ I , 'l 11 , I .CAe I The RASO-3, CAS, OUTO-7' and WE outputs contain on- chip series damping resistors (typically 2011) to minimize overshoot. CAS -------""""1\ i I '---t Some dynamic RAMs require more than 2.4V VIH Noise immunity may be improved for these RAMs by adding pull- up resistors to the 8203's outputs. Intel RAMs do not re- qljire pull-up resistors. Figure 9. Read Access Time 2118 DYNAMIC RAM ARRAY ,...-- A8-15 ALO-6 OUTO-6 AO~6 + ~ ~ AHo-6 ALE 80-1 D'N n 8203 DOUT 8086 AOO-7 (16K MODE) WE CAS RASa =: .:...... WE CAS RAS ~p WR RD RD/Sl DIN DOUT WR RAS1 RAS2 ~ ,.-1 ,. ;......I: : : ) AO-6 + -c SACK RAS3 XACK D'N DOUT =: WE -il CAS RAS DINDQUT - 1 ~ AO_6 L-. t--WE t - - CAS r- ~~SDOUT ITT~ _ + ~ - ' :--- D'N DOUT ~Ao-6 BAL D'N D'N °OUT DOUT c..:::=:::: WE CAS DIN DINO{) }'NDOUT DOUT ~~ r1 DIN RAS DOUT DIN DOUT I T j DDr 'f DATA BUS DATA IN! LATCH \ _'l Figure 10. Typical 8088 System 6-45 8203 MULTIBUS'" TYPE SYSTEM BUS I ~- 8284A READ MRDe 8288 WRITE MWTC WRITE I 8286 ~ XCEIYER RDY 8086 HIGH BYTE 8HEN WRITE ADRO I A[t, AD16 A17-A19 I RASX MEMORY OTHER I ADRF AD19 I READY INPUTS BHE B203 I I 2164 256K I I CAS BYTES I I 00-15 I I DATA 00 01 16 16 DATA DATA 00-15 LATCH L -______________-<in outputs the error flag in I!§ingle 8206 system or in the master of a multi-8206 system. It is latched by R/W going low. Not used in slaves. CRCT 52 I Correct: When low this pin causes data correction during a read or read- modify-write cycle. When high, it causes error correction to be disabled, although error checking is still enabled. STB 2 I Strobe: STB is an input control used to strobe data at the 01 inputs and check- bits at the CBI/SYI inputs. The signal is active high to admit the inputs. The signals are latched by the high-to-Iow transition of STB. 6-56 AFN'()20098 Table 1. Pin Description (ConUnued) Symbol Pin No. Type Name and Function , eM o 33 I Byte Marks: When high, the Oata Out pins are enabled for a read cycle. When eM1 32 I low, the Oata Out buffers ar~ tristated for a write cycle. BMo controls 000.7, while m:l1 controls 00a-15' In partial (byte) writes, the byte mark input is loW for the new byte to be written. • R/W 21 I ReacllWrtte: I!Y.!:!m high this pin causes the 8206 to perform detection and correction (If CRCT is law). When low, it causes the 8206 to generate check bits. On the high-to-Iow transition the syndrome is latched internally for read- modify-write cycles. WZ 34 I Wrtte Zero: When low this Input overrides the BMo-1 and R/W inputs to cause the 8206 to output all zeros at 000-15 with the corresponding check bits at CBOO_7. Used for memory initialization. MIS 4 I' Master/Slave: Input tells the 8206 whether it is a master (high) or a slave (low). SEOCU 3 I Single EDC Unit: Input tells the master whether it is operating as a single 8206 (low) or as the master in a multl-8206 system (high). Not used in slaves. Vee 60 I Power $upply: +5V Vss 26 I Logic Ground Vss 43 I Output Driver Ground FUNCTIONAL, DESCRIPTION , DATA WQRD BITS CHECK BITS The 8206 Error Detection and Correction Unit provides greater memory system reliability through 8 5 its ability to detect and correct memory errors. It is a single chip device that can detect and correct all 16 6 single bit errors and detect all double bit and some 24 6 higher multiple bit errors. Some other odd multiple bit errors (e.g., 5 bits in error) are interpreted as 32 7 single bit errors, and the CE flag is raised. While 40 7 some even multiple bit errors (e.g., 4 bits in error) are interpreted as no error, most are detected as double 48 8 bit errors. This error handling is a function of the 56 8 number of check bits used by the 8206 (see Figure 2) and the specific Hamming code used. Errors in 64 8 check bits are nof distingu'ished from errors in a 72 8 word. 80 8 For more information on error correction codes, see Intel Application Notes AP-46 and AP-73. Figure 2. Number of Check Bits Used by 8206 ASingle8206 handles8 or 16 bits of data, and up t05 / 8206's can be cascaded in order to handle data one to accept data from the RAM (01) and the other paths of 80 bits. For a single 8206 8 bit system, the to deliver corrected data to the system bus (001 018-15, 001W018_15 and'BM1 inputs are grounded. WOI). The logic is entirely combinatorial during a See the Multi-Chip systems section for information read cycle. This is in contrast to an architecture with on 24-80 bit systems. only one bus, with bidirectional bus drivers that must first read the data and then be turned around to The 8206 has a '·'flow through" architecture. It sup- output the corrected data. The latter architecture ports two kinds of error correction architecture: 1) typically requires additional hardware (latches Flow-through, or correct-always; and 2) Parallel, or and/or transceivers) and may be slower in a system check-only. There are two separate, 16-pin bU88es, due to timing skews of control signals. 6-57 AFtI-02OO9B .( 8206 READ CYCLE with the syndrome internally latched by Rm going low. Only that part of the word not to be modified is With the Rm pin high, data is received from the RAM output onto the DO pins, as controlled by the Byte Qutputs into the 01 pins where it is optionally latched Mark inputs. That portion of the word to be overwrit- by theSTB signal. Check bits are generated from the ten is supplied by the system bus. The 8206 then data bits and compared to the check bits read from calculates check bits for the new word, using the the RAM into the CBI pins.lfan error is detected the byte from the previous read and the new byte from ERROR flag is activated and the correctable error the system bus, and writes them to the memory. flag (CE) is used to inform the system whether the error was correctable or not. With the BM inputs high, the word appears corrected at the DO pins if the error was correctable, or unmodified jf the error READ·MODlfY·WRITE CYCLES was uncorrectable. Upon detection of an error the 8206 may be used to If more than one 8206 is being used, then the check correct the bit in error in memory. This reduces the bits are read by the master. The slaves generate a probability of getting multiple-bit errors in sub- partial parity output (PPO) and pass it to the master. sequent read cycles. This correction is handled by The master 8206 then generates and returns the executing read-modify-write cycles. syndrome to the slaves (SYO) for c~>rrection of the data. The read-modify-write cycle is controlled by the Rm input. After (during) the read cycle, the system The 8206 may alternatively be used in a "check- dynamic RAM controller or CPU examines the 8206 only" mode with the CRCT pin left high. With the ERROR and CE outputs to determine if a correctable correction facility turned off, the propagation delay error occurred. If it did, the dynamic RAM controller from memory outputs to 8206 outputs is signifi- or CPU forces RNi low, telling the 8206 to latch the cantly shortened. In this mode the 8206 issues an generated syndrome and drive the corrected check ERROR flag to the CPU, which can then perform one bits onto the CBO outputs. The corrected data is of several options: lengthen the current cycle for available on the DO pins. The DRAM controller then correction, restart the instruction, perform a diag- writes the corrected data and corresponding check nostic routine, etc. bits into memory. A syndrome word, five to eight bits in length and containing all necessary information about the exis- The 8206, may be used to perform read-modify- tence and location of an error, is made available to writes in one or two RAM cycles. If it is done in two the system at the SYOo_7 pins. Error logging may be cycles, the 8206 latches lire used to hold the data accomplished by latching the syndrome and the and check bits from the read cycl,e to be used in the memory address of the word in error. following write cycle. The Intel 8207 Advanced Dynamic RAM controller allows read-modify-write , cycles in one memory cycle. See the System WRITE CYCLE Environment section. For a full write, in which an entire word is written to memory, the data is written directly to the RAM, INITIALIZATION bypassing the 8206. The same data enters the 8206 through the WDI pins where check bits aregener- A memory system operating with ECC requires some ated. The Byte Mark inputs must be low to tristate form of initialization at system power-up in order to the DO drivers. The check bits,S to 8 in number, are set valid data and check bit information in memory. then written to the RAM through the CBO pins for The 8206 supports memory initialization by the write storage along with the data word. In a multi-chip zero function. By activating the WZ pin, the 8206 will , system, the master writes the check bits using par- write a data pattern of zeros and the associated tial parity information from the slaves. check bits in the current write cycle. By thus writing to all memory at power-up, a controller can set In a partial write, part of the data word is overwritten, memory to valid data and check bits. Massive mem- and part is retained in memory. This is accomplished ory failure, as signified by both data and check bits by performing a read-modify-write cycle. The com- all ones or zeros, will be detected as an uncorrecta- plete old word is read into the 8206 and corrected, ble error. 6-58 AFN-020098 intJ 8206 MULTI-CHIP SYSTEMS the syndrome. The syndrome is then returned by the master to the slave for error correction. In systems A single 8206 handles 8 or 16 bits of data and 5 or 6 with more than one slave the above description con- check bits, respectively. Up to 5 8206's can be cas- tinues to apply, except that the partial parity outputs caded for 80 bit memories with 8 check bits. of the slaves must be XOR'd externally. Figure 3 shows the necessary external logic for multi-chip When cascaded, one 8206 operates as a master, and systems. Write and read-modify-write cycles are car- all others as slaves. As an example, during a read ried out analogously. See the System Operation sec- cycle in a 32 bit system with one master and one tion for multi-chip wiring diagrams. slave, the slave calculates parity on its portion of the word-"partial parity"-and presents it to the mas- ter through the PPO pins. The master combines the There are several pins used to define whether the partial parity from the slave with the parity it calcu- 8206 will operate as a master or a slave. Tables 2 and lated from its own portion of the word to generate 3 illustrate how these pins are tied. 3a 48 BIT SYSTEM SLAVE 2 PPO 3b 64 BIT SYSTEM SLAVE 3 PPO 0' 3e. 80 BIT SYSTEM SLAVE 3 SLAVE 4 PPO PPO Figure 3. External Logic For Multi-Chip Systems 6-59 AFN-020098 intJ 8206 Table 2; Master/Slave Pin Assignments Pin No. Pin Name Master Slave 1 Slave 2 Slave 3 Slave 4 4 MIS" +5V Gnd Gnd Grid Gnd 3 SeDCU +5V +5V +5V +5V +5V 13 PP1o/POSo PPI Gnd +5V Gnd +5V 14 15 16 PPI1/POS1 PPI2/NSLo PPI3/NSL1 PPI PPI PPI .. Gnd Gnd +6V +5V +tiv +6V +5V +5V +6V +6V ·See Table 3. NOTE: Pins 13,14,15,16 have internal pull·up resistors and may be left as'N,C, where specified as connecting to +5V. Table 3. NSL Pin Assignments for Slave 1 Number of Slaves Pin 1 2 3 4 PPI2/NSLo Gnd +5V Gnd +5V PPlalNSLl Gnd Gnd +5V +5V " I " The timing specifications for multi-chip systems parallel: No 820~ requires more time for propagation must be calculated to take account of the external through logic levels than any other one, and hence XOR gating in 3, 4, and 5-chip systems. Let tXOR be no One pevicE! become~ a bottleneck in the parity the delay for a single external TTL XOR gate. Then o~eration,. However, one or two levels of external the following equations show. ho;W tp calculate the TTL XOR gate,s are required in systems with three to relevant timing parameters for 2-chip (n=O), 3-chip fiVe chips. The code appears in Table 4. The dheck (n=l), 4-chip (n=2), and 5-chip (n=2) systems: bits are,derived from the table by XORing or XNOR- ing together the bits indicated by 'X's in each row Data-in to corre_cted data-out (read cycle) = corresponding to a,check bit. For example, check bit TDVSV + TPVSV + TSVQV + ntXOR o in the MASTER for data word 1000110101,101011 will be "0." It should be rioted that the 8206 will Data-in to error flag (read cycle) = detect the gross-error condition of all lows or all TDVSV + TPVEV + ntXOR highs. Data-in to correctable error flag (read cycle) = ,S Error correction accomplished by identifying the TDVSV + TPVSV + TSVCV + ntXOR bad bit and inverting it. Table 4 can also be used as an, err,or syndrome table by replacing the 'X's with ' Write data to check-bits valid (full write cycle) = 'l's. Each column then represents a different syn-, TQVQV + TPVSV + ntXOR drome Word, and by locating the column corre- sponding to a particular syndrome the bit to be cor- Data-in to check-bits valid (read-mod-write cycle) = rected inay be identified. If the syndrome cannot be TDVSV + TPVSV + TSVQV + TQVQV + TI?VSV + located th~n the error cannot be correbted. For 2ntXOR example, if the syndrome word is 00110111, the bit to \>e corrected is bit 5 in the slave one data word (bit Data-in to check-bits valid (non-correcting read- 21). ,modify-write cycle) = TDVQU +' TQVQV + TPVSV + ntXOR The syndr~me decoding ~ also summarized in Table 5, which can be used for error logging. By finding HAMMING CODE the appropriate syndrome word, (starting with bit zero, the least significant bit), the result is either: 1) The 8206 uses a modified Hamming code which was no error; 2) an identified (correctable) single bit optimized for multi-chip EDCU systems. The code is error; 3) a double bit error; or 4) a multi-bit uncor- such that partial parity is computed by all 8206's in rectable error. 6-60 AFN-02009B Table 4. Modified Hamming Code Check Bit Generation t .Check bits are generated by XOR'ing (except forthe CSO and CS1 data bits, which are XNOR'ed in the Master) the data bits in the rows corresponding to the check bits. Note there are 6 check bits in a 16-bit system, 7 in a 32-bit system, and 8 in 48-or-more-bit systems. BYTE NUMBER 0 1 2 3 OPERATION OPERATION BIT NUMBER o 1 234 567 o 1 2 3 4 567 o 1 234 5 6 7 o 1 2 3 4 5 6 7 CBO ~ CB1 ~ xx-x-xx- x - - x - x - x - x - - x - x - x - x x - x - - XNOR XNOR -xxx-xx- - x x - - x - x x x - - x - x x x - - - - - XOR x XOR CHECK CB2 ~ - x x - x - x x - - x - x - - x XOR - x x x - x x x - x x - XOR CB3 ~ x x x x x - - - x x x - - ,- XOR x' x - - x - x x x - x x - XOR I BITS CB4 ~ - x x x x x - x x x XOR x x - - x x x x - - - x - x - XOR CB5 ~ - - - - - - x x x x x x x x - - - - - - - - XOR -- x xx x x - - x x x XOR Ca6 ~ XOR - - - - - x x x x x x x x XOR CB7 ~ - - - - - - - - - - XOR - - - - - - - - - - XOR DATA,BITS 000 0 0 0 0 0 () 0 1 1 1 1 1 1 1 1 1 12222 2 222 2 2 3 3 o 1 234 5 6 7 8 9 0 1 2 3 4 5 678901 2 3 4 5 6 7 890 1 , ... 011 ~ 16 BIT OR MASTER SLAVE #1 N oQ) BYTE NUMBER 4 5 6 7 8 9 OPERATION: BIT NUMBER o 1 2 3 4 5 6 7 o 1 2 3 456 7 o 1 2 345 6 7 o 1 2 3 4 5 6 7 01234567 o 1 2 3 456 7 CBO~ x x x - x x - x - - x x - - x - x - x x - - x x x - x - - x x x - x x - x x - - x - XOR ! CB1 ~ x - x - - x - x - x - x x - x - x x - - x x x x x - - - x - - x x x - x x x - - x x - - XOR ! CHECK CB2~ - x x - x - x x - x x - - x - x X IX X X - X X X - - x - -x--xx- - x x - x - x XOR CB3 ~ x x x x x - - x x x - - - - x - x - x x - x x - x x - - - x x x x - - x x x - - x - - XOR BITS CB4 ~ - - x x x x x - - - - - x x x - - x x x x x - - - x x x - x x -- x x x x x - - - x - - XOR CB5 ~ x x x x x x x x - - - - - - - - - - - - - - x x x x x x x x x x x x x - x - - - x - - x XOR CB6 ~ x x x x x x x x - - - - x x x x x x x x - - - - - - - x x - - x x x x - - x - x - XOR CB7 ~ - - - - - - xxxxxx-xx - - - - - x x x x x x x x - ~ - x x x x x x x x - XOR DATA BITS 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 445 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 "@J 234 5 6 789 o 1 2 345 6 7 890 1 2 3 4 5 678901 2 3 4 5 6 7 8 901 23456 7 8 9 2EJ !iiiiI SLAVE #2 II SLAVE #3 II SLAVE #4 IF' ~ > ~ ~ I to 2EJ ~ 8206 Table 5. Syndrome Decoding 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Syndrome 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 l Bits 2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 7 6 5 4 3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 N CBO CB1 0 CB2 0 0 18 CB3 0 0 0 0 1 2 0 0 0 0 1 CB4 0 0 5 0 6 7 0 0 3 16 0 4 0 0 17 0 0 1 0 CB5 0 0 11 0 19 12 0 0 8 9 0 10 0 0 67 0 0 1 1 0 13 ,14 0 15 0 0 21 20 0 0 66 0 22 23 0 0 1 '0 0 CB6 0 0 25 0 26 49 0 0 48 24 0 27 0 0 50 0 1 0 1 0 52 55 0 51 0 0 70 28 0 0 65 0 53 54 0 0 1 1 0 0 29 31 0 64 0 0 69 68 0 0 32 0 33 34 0 0 1 1 1 30 0 0 37 0 38 39 0 0 35' 71 0 36 0' 0 U 1 0 0' 0 CB7 0 0 43 0 77 44 0 0 40 41 0 42 0 0 U 1 0 0 1 0 45 46 0 47 D D 74 72 0 0 U 0 73 U 0 1 0 1 0 0 59 75 D 79 0 0 58 60 0 D 56 0 U 57 0 1 0 1 1 63 D 0 62 D U U 0 '0 u u 0 61 0 0 U 1 1 0 0 0 u u 0 u 0 0 U 76 0 0 U 0 U U 0 1 1 0 1 78 0 D U 0 U U 0 0 u u 0 u 0 0 U 1 1 1 0 U 0 0 u 0 u U D 0 U U 0 U 0 0 U 1 1 1 1 0 U U D U 0 0 u u 0 0 u 0 u u 0 N= No Error CBX = Error in Check Bit X X= Error in Data Bit X SYSTEM ENVIRONMENT D= Double Bit Error U= Uncorrectable Multi-Bit Error The 8206 interface to a typical 32 bit memory system is illustrated in Figure 4, For larger systems, the partial parity bits from slaves two to four must be DATA MEMORY CHECK BITS DATAMEMOAY 188fTS 7 BITS '6 BITS OE .-i- DI DO DI DO DI DO { 3281T DATA BUS ~ Y x C R f-- r-- r-- t-- r-- I-- I T T DO/WDI DI F svo/cao CB1o-s PPI O- 6 ~l SVlo_s' DO/WDI DI PPOO-6 ~~ POSo CONTROL { LINES ~ W% STB R/W 8206 MASTER PP'7 CB., Mil SEDCil n r-+ P-O+Y r- R/W r--- Clil:f r--- W% STB 8206 SLAVE POS, NSLo NSl, Mil PP'5-7 .- ---- j-o Ii- 1M, 1Iii, '~ ~l c5Y 8M, 11M, SY'7 EIIIiOii CE MARKS ERROR SIGNALS I I Figure 4. 32-8it 8206 System Interface /' 6-62 AFN-02009B intJ 8206 XOR'ed externally, which calls for one level of XOR and Figure 5 illustrates a highly integrated dual port gating for three 8206's and two levels for four or five RAM implementation using the 8206 and 8207. The 8206's. 8206/8207 combination permits such features as au- tomatic scrubbing (correcting errors in memory dur- ing refresh), extending RAS and CAS timings for The 8206 is designed for direct connection to the Read-Modify-Writes in single memory cycles, and Intel 8207 Advanced Dynamic RAM Controller, due automatic memory initialization upon reset. To- to be sampled in the first quarter of 1982. The 8207 gether these two chips provide a complete dual- has the ability to perform dual port memory control, port, error-corrected dynamic RAM subsystem. ACKB I ACKB ADDR DYNAMIC RAS ~ RAM 32 BITS + CAS ~ CMDIPEA 7 CHECK BITS CMOIPEB CMD/PEB 8207 WE ~ WE DI CSI Do/ceo ADORB MUX ClK)--oo ClK ADRC wz PSEN r--- I- h CE ERROR DBM lL- F LI ADDR L MUX r-- , . " RIW CMDIPEA - ACKA PSEL ERROR SVOI DIICBI CE SVI 01 ADORA R!W ceo RIW ACKA - -5Y- STB .r= 8206 CRCT MASTER PPI wz ~ PPO CRCT wz 8206 SLAVE STB - -5Y BM DO!WDI BM DOfWDI ~ Q Q BYTE MARK DECODER II~ II ~- '--- '--- .11 ~ >tS r- XCVR RD STS LATCH OEI PORT A PORT B Figure 5. Dual Port RAM Subsystem with 8206/8207 (32-bit bus) 6-63 AFN-02009B 8206 MEMORY BOARD TESTING to fill the eata memory with all zeros, which may be done by activating WZ and The 8206 lends itself to straightforward memory incrementing memory addresses with WE board testing with a minimum of hardware over- to the check bits memory held inactive, head. The following is a description of four common and then performing ordinary reads. The test moges and their implementation. check bits will then appear directly at the SYO outputs, with bits CSO and CS1 Mode O-Read and write with error correction. inverted. Implementation: This mode is the normal 8206 operating mode. Mode 3-Write data, without altering or writing check bits, to allow the storage of bit Mode 1-Read and write data with error correction combinations to cause error correction disabled to allow test of data memory. and detection. Implementation: This mode is performed Implementation: This mode is im- with CRCT deactivated. plemented by writing the desired word to memory with WE to the check bits array Mode 2-Read and write check bits with error cor- held inactive. rection disabled to allow test of check bits memory. Implementation: Any pattern may.be writ- ten into the check bits memory by judi- PACKAGE ciously choosing the proper data word to generate the desired check bits, through The 8206 is packaged in a 68-pin, lead less JEDEC the use of the 8206 Hamming code. To type A hermetic chip carrier. Figure 6 illustrates the read out the check bits it is first necessary package, and Figure 7 is the pinout. , I F·094 --l (2.39) .050 ~ II .066 (1.68) H:= ~, 11 .~ 1= L!:il Ii ~ PINNO"8~ PINNO.1 ~PIN NO 1 MARK .130 (3.30) .960 (24.38) Figure 6. 8206 JEDEC Type A Package 6-64 AFN·02009B intJ 8206 TOP ~ ;5 Q ~ 6" '5~ ~, Q 0Q ~ g I:: I - W! r I'iiO l1li1 SY0 71 Syo3 L V•• Vee 01, r SYO,[ SYOo EIIIIOiI RIW 01, .i . i ...i PIN NO.1 MARK BOTTOM ~ Q 6" ~ a g ~ ~ ~ a Q g I ~ I wz I'iiO ""[ J BM, Y0 7 01, SY03 Vee Vss J ~[ SYO , SYOo ERIRili RIW ]PPI7 01, PPls ''5I!!Il'! I I I .. I PIN NO.1 MARK co w::l i irE ... ... t Figure 7. 8206 Pinout Diagram 6-65 AFN-02009B 8206 ABSOLUTE MAXIMUM RATINGS· 'NOTE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O'C to 70'C tion of the device at these or any other conditions above Storage Temperature ............... -65'C to +150'C those indicated in the operational sections of this specifi- Voltage On Any Pin cation is not implied. Exposure to absolute maximum With Respeet to Ground ............ -0.5V to +7V rating conditions for extended periods may affect device Power Dissipation .......................... 2.5 Watts reliability. D.C. CHARACTERISTICS (TA = O'C to 70'C, Vee = 5.0V ± 10%, Vss= GND) Symbol Parameter Min. Max. Unit Test Conditions Icc Power Supply Current -Single 8206 or 270 mA Slave #1 -Master in Multi-Chip 230 mA or Slaves #2, 3, 4 1 VIL Input Low Voltage -0.5 0.8 V 1 VIH Input High Voltage 2.0 Vee+ V 0.5V , Output Low Voltage • VOL -DO 0.4 V 10l = 8mA -All Others 0.4 V 10L = 2.0mA Output High Voltage VOH -DO, CSO 2.6 V 10H = -2mA -All Other Outputs 2.4 V 10H = -O.4mA 1/0 Leakage Current ILO - PPI4/CE ± 20 }LA 0.45V.,; VI 10 .,; Vee -DO/WDI0_15 ± 10 }LA Input Leakage Current ___ 2 III - PPI 0-3, 5-7, CBIS-7, SEDCU ± 20 }LA OV ,,;VIN .,;Vee -All Other Input Only Pins ± 10 }LA NOTES: 1. SEDeU (pin 3) and MIS (pin 4) are device strapping options and should be tied to Vee or GND. V1H min = Vee -O.SV and V1L max = O.SV. 2. PPIo-7 (pins 13-20) and eBIS_7 (PinS 11, 12) have internal pull-up resistors and if feft unconnected will be pulled to Vee. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT \ " 045 ~O.> 20 TEST POINTS <~ 2.0 08 DEVICE UNDER TEST Ie, RL TEST POINT -=- A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A lOGIC 1 AND 0 45V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND a BY FOR A LOGIC 0 C L INCLUDES JIG CAPACITANCE 6-66 AFN'()2009B 8206 A.C. CHARACTERISTICS (TA = O°C to 70°C, Vce = +5V ± 10%, Vss = OV, RL = 220, CL = 50 pF; all times are in nsec.) 8206 8206-8 Symbol Parameter Min. Max. Min. Max. Notes TRHEV ERROR Valid from R/Wt 25 34 TRHCV CE Valid from R/Wt (Single 8206) 44 59 TRHQV Corrected Data Valid from R/Wt 54 66 1 TRVSV SYO/CBO/PPOValid from R/W 42 56 1 TOVEV ERROR Valid from Data/Check Bits In 52 70 TDVCV CE Valid from Data/Check Bits In 70 94 TDVQV Corrected Data Valid from Data/Check Bits In 67 90 . TDVSV SYO/PPOValid from Data/Check Bits In 55 74 TBHQV ~rrected Data Access Time 37 43 TOXQX Hold Time from Data/check Bits In 0 0 1 TBLQZ Corrected Data Float Delay 0 28 0 38 1 TSHIV STB High to Data/Check Bits In Valid 30 40 2 TIVSL Data/Check Bits In to STBt Set-up 5 5 TSLIX Data/Check Bits In from STBt Hold 25 30 TPVEV ERROR Valid from Partial Parity In 30 40 TPVQV Corrected Data (Master) from Partial Parity In 61 76 1 TPVSV Syndrome/Check Bits Out from Partial Parity In 43 51 1 TSVQV Corrected Data (Slave) Valid from Syndrome 51 69 TSVCV CE Valid from Syndrome (Slave number 1) 48 65 TQVQV Check Bits/Partial Parity Out from Write Data In 64 80 1 TRHSX Check Bits!P"artlal Parity Out from R/W, WZ Hold 0 0 1 TRLSX Syndrome Out from R/W Hold 0 0 TQXQX Hold Time from Write Data In 0 0 1 TSVRL ~yndrome Out to R/Wt Set-up 17 22 TDVRL Data/Check Bits In to R/W Set-up 39 46 1 TOVQU Uncorrected Data Out from Data In 32 43 TTVQV Corrected Data Out from CRCTt, 30 40 TWLQL wzt to Zero Out , 30 40 TWHQX Zero Out from WZi Hold 0 0 NOTES: 1. A.C. Test Levels for CSO and DO are 2.4V and 0.8V 2. TSHIV IS required to guarantee output delay timings. TOVEV, Tovcv, TOVQV, Tovsv TSHIV + TIVSL guarantees a min STS pulse Width of 35 ns (45 ns for the 8206·8). 6-67 AFN·020098 8206 WAVEFORMS , . READ-16 BIT ONLY STB7, I, i 1 il~I!SLI~I ~---------- ~ ! i+-I:SH"';'I~I-"- - - - T I V S L - - - _ . R/W_-r~ : 1 I 1 I 1 1 ' I ~ I i~ N"-------- I 1 ' : . - - TBHQV ---l I 1 I I 1 1 I e~: ~~ i ! ""' ~>-'-:- - - , ' I I !---TBLQZ ~ r--- TDXQX ---J DO t-I'_ _ _-L1,TRHQV,' ---!--+--:--W/#/W '" 'I a 'I VALID $i- I k= I. TRVSV I I svo --r----+-.!)(0/~4 i~" '" / TDVSV' " I I I. I TbVQ'J '/ I ERROR ==:!~!·~~n=;~~w~~;:;::~//;:::;:~:;:::;· ?t~1.~-VALID--k= I 1.. 1 TDVEV' ~I 1 :. / TDvev ~I I __~~I~.~~~TR~Hev~~~,~~~I~------~1 eE_~W$////$A VALID x= 6-68 AFN,020098 intJ 8206 WAVEFORMS (Continued) READ-MASTER/SLAVE ( STB :AI i----l I TSHIV ti------- I I : R/VI _ _ ---l'u pot' l 1 1 ~ il I TIVSL '---' TSLIX 1 I I' Iii 8M _ _ -,-I---':-.JA I I '{. : 1 I ~ 1 1'-----+1-- c~: ---<¢'-.L..-!--·-+-l---vA-LlD-+I--~. ,! ~~::VV=7t-1 -7:lz"'~ ! I..o---TDXQX_1 I :;~~:~:::: _----J~/A i VALID X.!-:-- I , I " I_TPVQV--! I 1 DO(MASTERl--.:-Wffffl/f VALID }}-- I 'l-TPVSV-j 1 1 SY::~s~:::)-----,><--------~LI~D:----~:~,--~ I I I I ,I!RHSXI', 'I ,___ TBHOV--'I I "TBL~I , ' , , I I I I -t+:-----.-1 I cg: _VA---+LID:_ _ -+-_~~ : I , I I , I :~_~,_----TR::'-ov==;I~;-~~:~:~I-----_4-----TD-XO-X~-~: I DOIWDI ---,-I I, --eo.J7/ +--: ~: L~:--,--------"'i-'~ Hi I I I TQXQX -i l - I ~1.---TRVSV·---+l·1 M '--TRLSX I SYOICBO II I I ' ---,-l_____>«:"-""-//j"...-r-//:~Z~:{-'---'-: I I I SYN ~~~7'"'t7""-CB I --x= . , I I-I'_ _ _ _ TDVSV'--~-I !-TQvo,,_1 6-71 AFN-020098 inter 8206 WAVEFORMS (Continued) READ MODIFY WRITE-MASTER/SLAVE My 7 '\., ~ _ _.,..../ I ~'-.________/ , I I , I I f---TRHSX ---I II I I I ~~~------~:--~X I I!---TBHQV_I , I I J--TBLQZ~ I I , J-TIVSL -l I I STB 7t=I I" -,- I II TOVSV --+l I " I' *" I ' 41----------1-1- I ' : : I I --t : TSHIV I I I I 01 CBI I 1 :VALIO : : I I i " , , I , I ,j, I " I f--- TRVSV ----l , I-- TSVRL -r-TRVSV.....j I P:~:~~:~:: =*zR,07 I1 t! ! , 1 I 1 , VALID )<7 54 IT I , ! 1 , K I iTP~SV", I , I , I I I , , , OO/WOI (MASTER) !, ~ I,~ I, VALID »-t , I, I 1 TPVSV 1 I j+--TPVQV--! 1;+-'-+1 , I I ,I , SYO/CBO(M~J7//Z{ I I SYN >07A;d? CB K ~.- I I ~ i ~TQVQV~ , I OOIWOI (SLAVE) --+i---<7/j{ VALID 6-72 AFN-02009B inter 8206 WAVEFORMS (Continued) 1'"------'1 NON-CORRECTING READ CRCT - - - - - - -....... I 1 mJ1 I I I ~I·--TDVQU--- .. It I I__TTVQV __I I i I I- TTVQV I t= I_ TBLQZ "I I I I ,_TDXQX"I I 01 CBI :I t=============:1=========:1II ============i==1 I I I I! I i f---TBHQV------a.j I I I DD/WDI - - - - - -...... 1 ~ UNCORRECTED ~ I CORRECTED I : : } UNCORRECTED & I I WRITE ZERO I- TWLQL .. I I I wz 1 I ~ I ;fI I I 1_ TQVQV(1)->-1 I I 1 NOTE: m: ;:A~';E~i~AVE 6-73 AFN-020098 8207 ADVANCED DYNAMIC RAM CONTROLLER • Provides All Signals Necessary to • Supports Intel iAPX 86,88,186, and 286 Control 16K (2118), 64K (2164A) and Microprocessors 256K Dynamic RAMs • Directly Addresses and Drives up to 2 • Data Transfer Acknowledge Signals for Megabytes without External Drivers Each Port • Supports Single and Dual-Port • Provides Signals to Directly Control the Configurations 8206 Error Detection and Correction Unit • Automatic RAM Initialization in All Modes • Supports Synchronous or Asynchronous Operation on Either Port • Five Programmable Refresh Modes • Transparent Memory Scrubbing in • +5 Volt Only HMOSII Technology for ECC Mode High Performance and Low Power The Intel 8207 Advanced Dynamic RAM Controller (ADRC) is a htgh-performance, systems-oriented, Dynamic RAM controller that is designed to easily interface 16K, 64K and 256K Dynamic RAMs to Intel and other microprocessor Systems. A dual-port interface allows two different busses to independently access memory. When configured with an 8206 Error Detection and Correction Unit the 8207 supplies the necessary logic for designing large error-corrected memory arrays. This combination provides automatic memory initialization and transparent memory error scrubbing. Figure 1. 8207 Block Diagram Intel Corporation Assumes No Responslbtlty for the Use of Any CircUitry Other Than Circuitry Embodied In an Intel Product No Other Circuit Patent Licenses aTe Implied, @INTELCORPORATION, 1982 6-74 ORDER NUMBER:~~~~ 8207 NOTICE: The pin descriptions are not final specifications and are sub- ject to change. Table 1. Pin Description Symbol Pin Type Name and Function LEN 1 0 ADDRESS LATCH ENABLE: In two-port configurations, when port A is running with iAPX 286 Status interface mode, this output replaces the ALE signal from the system bus controller and generates an address latch enable signal which provides op- timum setup and hold timing for the 8207. XACKA/ 2 a TRANSFER ACKNOWLEDGE PORT A/ACKNOWLEDGE PORT A: In non-ECC mode, ACKA this pin IS XACKA and Indicates that data on the bus is valid during areX'd CYCle or that data may be removed from the bus during a write cycle for Port A. A KA is a Multibus-compatible signal. In ECC mode, this pin is ACKAwhich can be configured, depending on the programming of the X program bit, as an XACK or AACK strobe. The SA programming bit determines whether AACK will be early or late. XACKB/ 3 a TRANSFER ACKNOWLEDGE PORT B/ACKNOWLEDGE PORT B: In non-ECC mode, ACKB this pin is XACKB and indicates that data on the bus is valid during a reX'd cycle or that data may be removed from the bus during a write cycle for Port B. ACKB is a Multibus-compatible signal. In ECC mode, this pin is ACKB which can be configured, depending on the programming of the X program bit, as an XACK or AACK strobe. The SB programming bit determines whether AACK will be early or late. AACKN 4 a ADVANCED ACKNOWLEDGE PORT NWRITE ZERO: In non-ECC mode, this pin is WZ AACKA and indicates that,the processor may continue processing and that data will be available when required. This signal is optimized for the system by programming the SA program bit for synchronous or asynchronous operation. After a RESET, this signal will cause the 8206 to force the data to all zeros and generate the appropriate check bits. AACKB/ 5 a ADVANCED ACKNOWLEDGE PORT B/READ/WRITE: In non-ECC mode, this pin is R/W AACKB and indicates that the processor may continue processing and that data will be available when required. This signal is optimized for the system by programming the SB program bit for synchronous or asynchronous operation. This signal causes the 8206 EOCU to latch the syndrome and error flags and generate check bits, OBM 6 a DISABLE BYTE MARKS: This is an ECC control output signal indicating that a read or refresh cycle is occurring, This output forces the byte address decoding logic to enable all 8206 data output buffers. In ECC mode, this output is also asserted during memory initialization and the 8-cycle dynamic RAM wake-up exercise. ESTB 7 a ERROR STROBE: In ECC mode, this strobe is activated when an error is detected and allows a negative-edge triggered flip-flop to latch the status of the 8206 EOCU CE for systems with error logging capabilities. LOCK 8 I LOCK: This input instructs the 8207 to lock out the port not being serviced atthe time LOCK was issued. Vee 9 I LOGIC POWER: +5 Volts ± 10%. Supplies Vee for the internal logic circuits. 43 I DRIVER POWER: +5 Volts ± 10%. Supplies Vee for the output drivers. CE 10 I CORRECTABLE ERROR: This is an ECC Input from the 8206 EOCU which instructs the 8207 whether a detected error is correctable or not. A high input indicates a correctable error. A low input inhibits the 8207 from activating WE to write the data' back into RAM. This should be connected to the CE output of the 8206. ERROR 11 I ERROR: This is an ECC input from the 8206 EOCU and Instructs the 8207 that an error was detected. This pin should be connected to the ERROR output of the 8206. MUX/ 12 a MULTIPLEXER CONTROL/PROGRAMMING CLOCK: Immediately after a RESET PCLK this pin is used to clock serial programming data into the POI pin. In normal two-port operation, this pin is used to select memory addresses from the appropriate port. When this signal is high, port A is selected and when it is low, port B is selected. This signal may change state before the completion of a RAM cycle, but the RAM address hold time is satisfied. PSEL 13 a PORT SELEC'r: This signal is used to select the appropriate port for data transfer. PSEN 14 a PORT SELECT ENABLE: This signal used in conjunction with PSEL provides contention-free port exchange. When PSEN is low, PSEL is allowed to change state. WE 15 a WRITE ENABLE: This signal provides the dynamic RAM array the write enable input for a write operation. 6-75 AFN'()2218A 8207 NQTlCE: The pin descriptions are not final specifications and are sub- Table 1. Pin Description (Continued) ject to change. Symbol Pin Type Name and Function FWR 16 I FULLWRITIE: This is an ECC input signal that instructs the 8207, in an ECC configu- ration, whether the present write cycle is normal RAM write (full write) or a RAM partial write (read-modify-writel cycle. RESET 17 I RESET: This signal causes all internal counters and state flip-flops to be reset and upon release of RESET, data appearing at the PDI pin is clocked· in by the PCLK output. The states of the POI, PCTLA, PCTLB and RFRQ pins are sampled by RESET going inactive and are used to program the 8207. CASO 18 0 COLUMN ADDRESS STROBE: These outputs are used by the dynamic RAM array to C}.I.Sl 20 0 latch tf'!e column address, present on the AOO-8 pins. These outputs are selected by CAS2 22 0 the BSO and BS1 as programmed by program bits RBO and RB1. These outputs drive CAS3 24 0 the dynamic RAM array directly and need no external drivers. RASO 19 0 ROW ADDRESS STROBE: These outputs are used by the dynamic RAM array to latch RASl 21 0 the row address, present on the AOO-8 pins. These ouptuts are selected by the BSO RAS2 23 0 and BSl as programmed by program bits RBO and RB1. These outputs drive the RAS3 25 0 dynamic RAM array directly and need no external drivers. . VSS 26 I DRIVER GROUND: Provides a ground for the output drivers. 60 I LOGIC GROUND: Provides a ground for the remainder of the device. AOO 35 0 ADDRESS OUTPUTS: These outputs are designed to provide the row and column AOl 34 0 addresses of the selected port to the dynamic RAM array. These outputs drive the A02 33 0 dynamic RAM array directly and need no external drivers. A03 32 0 A04 31 0 A05 30 0 A06 29 0 - A07 28 0 A08 27 0 BSO 36 BANK SELECT: These inputs are used to select one of four banks of the dynamic BSl 37 RAM array as defined by the program bits RBO and RB1. ALO 38 ADDRESS LOW: These lower-order address inputs are used to generate the row ALl 39 address for the internal address multiplexer. AL2 40 AL3 41 AL4 42 AL5 44 AL6 45 "- AL7 46 AL8 47 AHO 48 ADDRESS HIGH: These higher-order address inputs are used to generate the AHl 49 column address for the internal address multiplexer. AH2 50 AH3 51 AH4 52 AH5 53 AH6 54 AH7 55 AH8 56 PDI 57 PROGRAM DATA INPUT: This input programs the various user-selectable options in the 8207. The PCLK pin shifts programming data into the PDI input from optional external shift registers. This pin may be strapped high or low to a default ECC (PDI = Vee) or non-ECC (PDt = Ground) mode configuration. RFRQ 58 I REFRESH REQUEST: This input is sampled on the falling edge of RESET. If it is high at RESET, then the 8207 is programmed for internal refresh request or external refresh request with failsafe protection. If it is low at RESET, then the 8207 is programmed for external refresh without failsafe protection or burst refresh. Once programmed the RFRQ pin accepts signals to start an external refresh with failsafe protection or external refresh without failsafe protection or a burst refresh. 6-76 AFN'()2218A inter 8207 NOTICE: The pin descriptions are not final specifications and are sub- Table 1. Pin Description (Continued) ject to change. Symbol Pin Type Name and Function ClK 59 I 'CLOCK: This input provides the basic timing for sequencing the internal logic. RDB 61 I READ FOR PORT B: This pin is the re~ memory request command input for port B. This input also directly accepts the S1 status line from Intel processors. WRB 62 I WRITE FOR PORT B: This pin is the write memory request command input for port B. This input also directly accepts the !iii status line from Intel processors. f5EB 63 I PORT ENABLE FOR PORT B: This pin serves to enable a RAM cycle request for port B. It is generally decoded from the port address. PCTlB 64 I PORT CONTROL FOR PORT B: This pin is sampled on the falling edge of RESET. It configures port B to accept command inputs or processor status inputs. If low after RESET, the 8207 is programmed to accept command or iAPX 286 status inputs or Multibus commands. If high after RESET, the 8207 is programmed to accept status inputs from iAPX 86 or iAPX 186 processors. The 52 status line should be connected to this input if programmed to accept iAPX 86 or iAPX 186 status inputs. When programmed to accept commands or iAPX 286 status, it should be tied low or it may be used as a Multibus-compatible inhibit signal. RDA 65 I READ FOR PORT A: This pin is the read memory request command input for port A. This input also directly accepts the S1 status line from Intel processors. WRA 66 I WRITE FOR PORTA: This pin is the write memory request command input for port A. This input also directly accepts the SO status line from Intel processors. PEA 67 I PORT ENABLE FOR PORT A: This pjn serves to enable a RAM cycle request for port A. It is generally decoded from the port address. PCTlA 68 I PORT CONTROL FOR PORT A: Thi~ pin is sampled on the falling edge of RESET. It configures port A to accept command Inputs or processor status inputs. If low after RESET, the 8207 is programmed to accept'cpmmand or iAPX 286 status inputs or Multibus commands. If high after RESET, the 8207 is programmed to accept status inputs from iAPX 86 or iAPX 186 processors. The S2 status line should be connected to this input if programmed to accept iAPX 86 or iAPX 186 status inputs. When programmed to accept commands or iAPX 286 status, it should be tied low or it may be connected to INHIBIT when operating with Multibus. GENERAL DESCRIPTION FUNCTIONAL DESCRIPTION The Intel 8207 Advanced Dynamic RAM Controller Processor Interface (ADRC) is a microcomputer peripheral device wl1ich provides the necessary signals to address, refresh and directly' drive 16K, 64K and 256K dynamic RAMs. The 8207 has control circuitry for two ports each This controller also provides the necessary arbitra- capable of supporting one of several possible bus tion circuitry to support dual-port access of th!'J structures. The ports are independently configur- dynamic ~AM array. able allowing the dynamic RAM to serve as an inter- face between two different bus structures. The ADRC supports several microprocessor inter- face options including synchronous and asynchro- nous connection to iAPX 86, iAPX 88, iAPX 186, iAPX 286 and Multiqus. Each port of the 8207 may be programmed to run synchronous or asynchronous to the processor This device may be used with the 8206 Error Detec- clock. (See Synchronous/Asynchronous Mode) The tion and Correction Unit (EDCU). When used with the 8207 has been optimized to run synchronously with 8206, the 8207 is programmed in the Error C~ecking Intel's iAPX 86, iAPX 88, iAPX 186 and iAPX 286. and Correction (ECC) mode, In this mode, the 8207 When the 82q7 is programmed to run in asynchro- provides all the necessary control signals for the nous mode, the 8207 inserts the necessary synchro- 8206 to perform memory initialization Ilnd transpar- nization circuitry for the RD, WR, PE, and PCTl ent error scrupbing during refrl'lsh. inputs. 6-77 AFN'()221BA inter 8207 The 8207 can also decode the status lines directly internal timing tp allow for the different clock fre- from the iAPX86, iAPX88, iAPX 186 and the iAPX286 quencies of these microprocessors. (See Micropro- or can be programmed to receive read or write Multi- cessor Clock Frequency Option) bus commands or commands from a bus controller. (See Status/Command Mode) , Figure 2 shows the different processor interfaces to The 8207 may be programmed to accept the clock of the 8207 using .the synchronous or asynchronous the iAPX 86, 88, 186, or 286. The 8207 adjusts its mode and status or command interface. _ClK I-----~WR I-----~Rli Slow-Cycle Synchronous-Status Interface Slow-Cycle Asynchronous-Status Interface Slow-Cycle Synchronous-Command Interface Slow-Cycle Asynchronous-Command Interface Figure 2A. Siow-cyc,~ Port Interfaces Supported by~he8207 6-78 AFN.02218A inter 8207 Fast-Cycle Synchronous-Status Interface Fast-Cycle Asynchronous-Status Interface NOTE SYNCHRONOUS 80286 1 LATCH NOT REQUIRED IN SINGLE-PORT MODE Fast-Cycle Synchronous-Command Interface Fast-Cycle Asynchronous-Command Interface Figure 2B. Fast-cycle Port Interfaces Supported by the 8207 Dual-Port Operation Dynamic RAM Interface , The 8207 provides for two-port operation. Two inde- The 8207 is capable of addressing 16K, 64K and 256K pendent processors may access memory controlled dynamic RAMs. Figure 4 shows the connection of the by the 8207. The 8207 arbitrates between each of the processor address bus to the 8207 using the different processor requests and directs data to or from the RAMs. The 8207 directly supports the 2118 RAM appropriate port. Selection is done on a priority con- family or any RAM with similar timing requirements cept that reassigns priorities based upon past his- and responses including the Intel 2164A RAM. tory. Processor requests are internally queued. The 8207 divides memory into four banks, each bank having its own Row (RAS) and Column (CAS) Ad- Figure 3 shows a dual-port configuration with two dress Strobe pair. This organization permits RAM iAPX 86 systems interfacing to dynamic RAM. One of cycle interleaving and permits error scrubbing dur- the processor systems is interfaced synchronously ing ECC refresh cycles. RAM cycle interleaving over- using the status interface and the other is interfaced laps the start of the next RAM cycle with the RAM asynchronously also using the status interface. Precharge period of the previous cycle. Hiding the 6-79 AFN.Q2218A 8284A"'- READY ARDY ~ OTHERACK INPUTS MEMORY ~ MEMORY l IQ-- (UPPERr (lOWER) 8284A' elK t ~ elK WE 01 DO WE 01 DO eLK ALE ~ 8288* DEN DT/R - eLK AACKA A00- 8 WO_ 3 ~, -~rll - f.-----.l 1 I - ~5 ffi~ DEN elK 8288' OT/R - 52 $1 SO WE is ALE READY eLK 82 T T AACKII so 81 52 elK READV PCTlA 51 1 I RDA 8207 perLB I- S2 ~~ ROB Sl so WRA WRB SO MUX ~J AHo_sALo_s PSEl PSEN 80861 80861 80186 eLR CLR 80188 STU OE STS ~ 8283 ~- 8283 ADDRlDATA LATCH -,./ AODR/DATA 0> Q, o I-- r- =IT Jo. I ~ so DE STB EXTENDED MEMORY l ISING STATUS. ,. BYTE PORT A-SVNCHRONC IUS; /' tl~~~ Bl 8283 LATCH f----- f----- PORT B-ASYNCHRO" OUS ~ "--- '--- ~ r--« l§] STS OE OE STB ~ ~ ,. 8283 f----- ?g ,. 8283 ~~ LATCH v '--- © IiliiJ STS OE - ~ c:::> 8283 LATCH ,. 'liiI © '--- ~ NOTE ~ ,. "'THESE COMPONENTS ARE NOT NECESSARY WHEN USING THE 80186 COMPONENTS THESE FUNCTIONS ARE PROVIDED DIRECTLY BY THE 80186 ~ C::(I I,. Figure 3. 8086/80186 Dual Port System © ~ inter 8207 A12-A20 8207 8207 8207 A3-A11 ALO-ALB A1,A2 256K RAM INTERFACE 64K RAM INTERFACE 16K RAM INTERFACE NOTES: [1J UNASSIGNED ADDRESS INPUT PINS SHOULD BE STRAPPED HIGH OR LOW [2J AO ALONG WITH BHE ARE USED TO SELECT A BYTE WITHIN A PROCESSOR WORD. [3J LOW ORDER ADDRESS BITS ARE USED AS BANK SELECT INPUTS SO THAT CONSECUTIVE MEMORY ACCESS REQUESTS ARE TO ALTERNATE BANKS ALLOWING BANK INTERLEAVING OF MEMORY CYCLES. Figure 4. Processor Address Interface to the 8207 Using 16K, 64K, and 256K RAMS precharge period of one RAM cycle behind the data Table 2. access period of the next RAM cycle optimizes Bank Sel.ection Decoding and memory bandwidth and is effective as long as suc- Word Expansion - cessive RAM cycles occur in alternate banks. Program Bank Successive data access to the same bank will cause Bits Input the 8207 to wait for the precharge time of the previ- RB1 RBO B1 BO RAS/CAS Pair Allocation ous RAM cycle. 0 0 0 0 RASo_3, CASO-3 to Bank 0 If not all RAM banks are occupied, the 8207 reassigns 0 0 0 1 Bank 1 unoccupied the RAS and CAS strobes to allow using wider data words without increasing the loading on the RAS 0 0 1 0 Bank 2 unoccupied - and CAS drivers. Table 2 shows the bank selection 0 0 1 1 Bank 3 unoccupied decoding and the word expansion, including RAS and CAS assignments. For example, if only two RAM 0 1 0 0 _ RASO,l, CASO,l to Bank 0 banks are occupied, then two RAS and two CAS 0 1 0 1 RAS2,3, CAS2 3 to Bank 1 strobes are activated per bank. - 0 1 1 0 Bank 2 unoccupied The 8207 can interface to fast (e.g., 2118-10) or slow 0 1 1 1 Bank 3 unoccupied (e.g., 2118-15) RAMs. The 8207 a.djusts and optimizes internal timings for either the fast or slow RAMs as 1 0 0 0 RASo, CASo to Bank 0 programmed. (See RAM Speed Option) 1 0 0 1 RAS1, CASl to Bank 1 1 0 1 0 RAS2, CAS2 to Bank 2 Memory Initialization ,1 0 1 1 Bank 3 unoccupied After programming, the 8207 performs eight RAM "warm-up" cycles to prepare the dynamic RAM for 1 1 0 0 RASo, CASo to Bank 0 proper device operation and, if configured for opera- 1 1 0 1 RAS1, CASl to Bank 1 tion with error correction, the 8207 and 8206 EDCU 1 1 1 0 RAS2, CAS2 to Bank '2 will proceed to initialize all of memory (memory is written with zeros with corresponding check bits). 1 1 1 1 RAS3, CAS3 to Bank 3 6-81 AFN-022·18A inter 8207' Because the time to initialize memory is fairly long, Figure 6 illustrates the interface required to drive the the 8207 may be programmed to skip initialization in CRCT pin of the 8206, in the case that one port (PORT ECC mode. The time required to initialize all of A) receives an advanced acknowledge (not Multibus- memory is dependent on the clock cycle time to the compatible), while the other port (PORT B) receives 8207 and can be calculated by the following XACK (which is Multibus-compatible). equation: eq.1 TINIT = (i!3) Tcy Error Scrubbing if TCY = 125 ns then TINIT = 1 sec. The 8207/8206 performs error correction during 8206 ECC Interface refresh cycles (error scrubbing). Since the 8207 must refresh RAM, performing error scrubbing during For operation with, Error Checking and Correction refresh allows it to be accomplished without addi- (ECC), the 8207 adjusts its internal timing and tional performance penalties. changes some pin functions to optimize perfor- mance and provide a clean dual-port memory inter- Upon detection of a correctable error during refresh, facll between the 8206 EDCU and memory. The 8207 the RAM refresh Cycle is lengthened slightly to per- directly supports a master-only (16-bit word plus 6 mit the 8206 to correct the error and for the corrected check bits) system. Under extended operation and word to be rewritten into memory. Uncorrectable er- reduced clock frequency, the 8207 will support any rors detected during scrubbing are ignored. ECC master-slave configuration up to 80 data bits, which is the maximum set by the 8206 EDCU. (See Extend Option) Refresh Correctable errors detected during memory read The 8207 provides an internal refresh interval coun- cycles are corrected immediately and then written ter and a refresh address counter to allow the 8207 to back into memory. refresh memory. The 8207 will refresh 128 rows every 2 milliseconds or 256 rows every 4 milliseconds, In a synchronous bus environment, ECC system per- which allows all RAM refresh options to be sup- formance has been optimized to enhance processor ported. In addition, there exists the ability to refresh throughput, while in an asynchronous bus environ- 256 row address locations every 2 milliseconds via ment (the Multibus), ECC performance has been op- the Refresh Period programming option. timized to get valid data onto the bus as quickly as possible. Performance optimization, processor The 8207 may be programmed for any of five differ- throughput or quick data access may be selected via ent refresh options: Internal refresh only, External the Transfer Acknowledge Option. refresh with failsafe protection, External refresh without failsafe protection, Burst Refresh mode, or ThE!!' main difference between the two ECC im- no refresh. (See Refresh Options) plementations is that, when optimized for processor throughput, RAM data is always corrected and an It is possible to decrease the refresh time interval by advanced transfer acknowledge is issued at a point 10'%, 20% or 30%. This option allows the 8207 to when, by knowing the processor characteristics, compensate for reduced clock 'frequencies. Note data is guaranteed to be valid by the time the proces- that an additional 5% interval shortening is built-in in sor needs it. all refresh interval options to compensate for clock variations and non-immediate response to the inter- When optimized for quick data access, (valid for Mul- nally generated refresh request. (See Refresh Period tibus) the 8206 is configured in the uncorrecting Options) . mode where the delay associated with error correc- tion circuitry is transparent, and a transfer acknowl- edge is issued as sOOn as valid data is known to exist. External Refresh Requests after RESET If the ERROR flag is activated, then the transfer ac- knowledge is delayed until after the 8207 has instruc- External refresh requests are not recognized by the ted the 8206 to correct the data and the corrected 8207 until after it is finished programming and pre- data becomes available on the bus. Figure 5 il- paring memory for access. Memory preparation in- lustrates a dual-port ECC system. cludes 8 RAM cycles to prepare and ensure proper 6-82 AFN'()221SA ( DT/R B DEN B ACKB t" ~I CMDIPEA CMD/PEB CAS ADDR WE ~ 1WE DYNAMIC - 00,1 II - ACKA FWR PSEL L 7- ~ V _CMD/PEA ~ - II ERROR SY/CB DII SYNC ~ R/W CBI A R/W CE DI ADDRA V ECC PPI PPO ECC MASTER SLAVE ACKA DEN A DT/RA - - 71 • 11 CRCT ~ 8M 8206 WDI/DO WR CRCT 'l5ii=1 PORT A PREFERRED PRIORITY , PD13 TM1 TM1=0 TEST MODE 1 OFF TM1=1 TEST MODE 1 ENABLED PD14 0 RESERVED MUST BE ZERO PD15 0 RESERVED MUST BE ZERO Figure 9. Non·ECC Mode Program Data Word PD15 PDB PD7 PDO TM2IRBlIRBOlppRIFFSlm PLSlcml Cfi 1 XB 1 ilA[RFSlcFSI SB 1 SA 11 PROGRAM DATA BIT NAME POLARITY/FUNCTION PDO ECC ECC=1 ECC MODE PD1 SA SA=O PORT A ASYNCHRONOUS SA=1 PORT A SYNCHRONOUS PD2 SB SB=O PORT B SYNCHRONOUS SB=1 PORT B ASYNCHRONOUS PD3 CFS CFS=O SLOW-CYCLE iAPX 86 MODE CFS=1 FAST-CYCLE IAPX 286 MODE PD4 RFS RFS=O SLOW RAM RFS=1 FAST RAM PD5 XA XA=O MULTIBU5-COMPATIBLE ACKA XA=1 ADVANCED ACKA NOT MULTIBUS-COMPATIBLE PDB XB XB=O ADVANCED ACKB NOT MULTIBUS COMPATIBLE XB=1 MULTIBUS-COMPATIBLE ACKB PD7 CI1 COUNT INTERVAL BIT 1; SEE TABLE 6 PDB .CIO COUNT INTERVAL BIT 0; SEE TABLE 6 POS PLS PLS=O SHORT REFRESH PERIOD PLS=1 LONG REFRESH PERIOD PD10 UT EXT=O MASTER AND SLAVE EDCU m=1 MASTER EDCU ONLY PDll FFS FFS=O SLOW CPU FREQUENCV FFS=1 FAST CPU FREQUENCY PD12 PPR PPR =0 PORT A PREFERRED PRIORITY PPR=1 MOST RECENTLY USED PORT PRIORITY PD13 RBO RAM BANK OCCUPANCY PD14 RB1· SEE TABLE 2 PD15 TM2 Figure 10. ECC Mode Program Data Word 6·87 Af;N-D221BA 8207 If further system flexibility is needed, one or two external shift registers can be used to tailor the 8207 to its operating environment. s~fsif }----------~ 8207 Synchronous/Asynchronous Mode (SA and SB Program Bits) Each port of the 8207 may be independently config- ured to accept synchronous or asynchronous port commands (RO, WR, PCTL) and Port Enable (PE) via the program bits SA and SB. The state of the SA and SB programming bits determine whether their asso- ciated ports are synchronous or asynchronous. Figure 11. External Shift Register Interface While a port may be configured with either the Status or Command interface in the synchronous mode, certain restrictions exist in the asynchronous mode. Table 4A. An asynchronous Command interface using the con- Default Non-ECC Programming, POI Pin (57) trollines of the Multibus is supported, and an asyn- Tied to Ground. chronous 8086 interface using the control lines of the 8086 is supported, with the use of TTL gates as Port A is Synchronous illustrated in Figure 2. In the 8086 case, the TTL gates Port B is Asynchronous are needed to guarantee that status does not appear Fast-cycle Processor Interface at the 8207 inputs too much before address, so that a cycle would start before address was valid. Fast RAM Refresh Interval uses 236 clocks Microprocessor Clock Frequency Option 128 Row refresh in 2 ms; 256 Row refresh in 4 ms (CFS and FFS Program Bits) Fast Processor Clock Frequency (16 MHz) "Most Recently Used" Priority Scheme The 8207 can be programmed to interface with slow- cycle microprocessors like the 8086, 8088, and 80186 4 RAM banks occupied or fast-cycle microprocessors like the 80286. The CFS bit configures the microprocessor interface to accept slow or fast cycle signals from either micro- Table 48. processor group. Default ECC Programming, POI Pin (57) Tied to Vee. This option is used to selecUhe speed of the micro- processor clock. Table 5 shows the various Port A is Synchronous microprocessor clock frequency options that can be programmed. Port B is Asynchronous Fast-cycle Processor Interface Table 5. Fast RAM Microprocessor Clock Frequency Options Port A has Advanced ACKA strobe (non-multibus) Port B has Non-advance ACKB strobe (multibus) Program Bits Processor Clock CFS FFS Frequency Refresh interval uses 236 clocks 128 Row refresh in 2 ms; 256 Row ref(esh in 4 ms 0 0 iAPX 86, 5 MHz 88, 186 Master EDCU only (16-bit system) 0 1. iAPX 86, 8 MHz Fast Processor Clock Frequency (16 MHz) 88, 186 "Most Recently Used" Priority Scheme 1 0 iAPX 286 10 MHz 4 RAM banks occupied 1. 1 iAPX 286 16 MHz 6-88 AFN-D2218A 8207 The external Clock frequency must be programmed at reduced frequencies. The interval between re- so that the failsafe refresh repetition circuitry can freshes is decreased by 0%, 10%, 20%, or 30% as a adjust its internal timing accordingly to produce a function of how the count interval bits are program- refresh request as programmed. med. A 5% guardband is built-in to allow for any clock frequency variations. Table 6 shows the refresh period options available. RAM Speed Option (RFS Program Bit) The RAM Speed programming option determines The numbers tabulated under Count Interval repre- whether RAM timi,ng will be optimized for a fast or sent the number of clock periods between internal slow RAM. Whether a RAM is fast or slow is mea- refresh requests. The percentages in parentheses sured relative to the 2118-10 (Fast) or the 2118-15 represent the decrease in interval between refresh (Slow) RAM specifications. requests. Note that all intervals have a built-in 5% (approximately) safety factor to compensate for minor clock frequency deviations and non- Refresh Period Options immediate response to internal refresh requests. (CIO, C11, and PLS Program Bits) The 8207 refreshes with either 128 rows every 2 mil- Extend Option (EXT Program Bit) liseconds or 256 rows every 4 milliseconds. This translates to one refresh cycle being executed ap- The Extend option lengthens the memory cycle to proximately once every 15.6 microseconds. This rate allow longer access time which may be required by can be changed to 256 rows every 2 milliseconds or a the system. Extend alters the RAM timing to compen- refresh approximately once every 7.8 microseconds sate for incre~sed loading on the Rowand Column via the Period Long/Short, program bit PLS, pro- Address Strobes, and in the multiplexed Address gramming option. The 7.8 microsecond refresh re- Out lines. quest rate is intended for those RAMs, 64K and above, which may require a faster refresh rate. Port Priority Option and Arbitration (PPR Program Bit) In addition to PLS program option, two other pro- gramming bits for refresh exist: Count Interval 0 (CIO) The 8207 has to internally arbitrate among three and Count Interval 1 (CI1). These two programming ports: Port A, Port B and Port C-the refresh port. bits allow the rate at which refresh requests are Port C is an internal port dedicated to servicing generated to be increased in order to permit refresh refresh requests, whether they are generated inter- requests to be generated close to the same 15.6 or nally by the refresh inverval counter, or externally by 7.8 microsecond period when the 8207 is operating the user. Two arbitration approaches are available via Table 6. Refresh Count Interval Table Count Interval CI1, CIO (8207 Clock Periods) Ref. Freq. Period 00 01 10 11 (MHz) (itS) CFS PLS FFS (O"lo) (10"lo) (20"lo) (30"lo) 16 15.6 1 1 1 236 212 188 164 7.8 1 0 1 118 106 94 82 10 15.6 1 1 0 148 132 116 100 7.8 1 0 0 74 66 58 50 8 15.6 0 1 1 118 106 94 82 7.8 0 0 1 59 53 47 41 5 15.6 0 1 0 74 66 58 50 7.8 0 0 0 37 33 29 r 25 6-89 8207 the Port Priority programming option, program bit two ports are idle. Under normal operating condi- PPR. PPR determines whether the most recently tions, this arbitration time is hidden behind the RAM used port will remain selected (PPR = 1) or whether cycle of the selected port so that as soon as the Port A will be favored or preferred over Port 8 present cycle is over a new cycle is started. Table 7 (PPR = 0). lists the arbitration rules for both options. A port is selected if the arbiter has given the selected port direct access to the timing generators. The Port LOCK Function front-end logic, which includes the arbiter, is de- signed to operate in parallel with the selected port. The LOCK function provides each port with the Thus a request on the selected port is serviced imme- ability to obtain uninterrupted access to a critical diately. In contrast, an unselected port only has ac- region of memory and, thereby, to guarantee that the cess to the timing generators through the front-end opposite port cannot "sneak in" and read from or logic. Before a RAM cycle can start for an unselected write to the critical region prematurely. port, that port IT)ust first become selected (i.e., the MUX output now gates that port's address into the Only one LOCK pin is present and is multiplexed 8207 in the case of Port A or 8). Also, in order to allow between the two ports as follows: when MUX is high, its address to stabilize, a newly selected port's first the 8207 treats the LOCK input as originating at RAM cycle is started by the front-end logic. There- PORT A, while when MUX is low, the 8207 treats fore, the selected port has direct access to the timing LOCK as originating at PORT 8. When the 8207 generators. What all this means is that a request on a recognizes a LOCK, the MUX output will remain selected port is started immediately, while a request pointed to the locking port until LOCK is deactivated. on an unselected port is started two to three clOck Refresh is not affected by LOCK and can occur dur- periods after the request, assuming that the other ing a locked memory cycle. Table 7. The Arbitration Rules for the Most Recently Used Port Priority and for Port A Priority Options Are As Follows: ' 1. If only one port requests service, then that port-if not already selected-becomes selected. 2a. When no service requests are pending, the last selected processor port (Port A or B) will remain selected. (Most Recently Used Port Priority Option) 2b. When no service requests are pending, Port A is selected whether it requests service or not. (Port A Priority Option) 3. During reset initialization only Port C, the refresh port, is selected. , 4. If no processor requests are pending after reset initialization, Port A will be selected. 5a. If Ports A and B simultaneously(') request service while Port C is being serviced, then the next port to be selected is the one which was not selected prior to servicing Port C. (Most Recently Used Port Priority Option) 5b. If Ports A and B simultaneously!') request service while Port C is selected, then the next port to be selected is Port A. (Port A Priority Option) 6. If a port simultaneously requests service with the currently selected port, service is granted to the selected port. 7. The MUX output remains in its last state whenever Port C ,is selected. 8. If Port C and either Port A or Port B (or both) simultaneously request service, then service is granted to the requester whose port is already selected. If the selected port is not requesting service, then service is granted to Port C. 9. If during the servicing of one port, the other port requests service before or simultaneously with the refresh port, the refresh port is selected. A new port is not selected before the presently selected port is deactivated. 10 . Activating LOCK wil" mask off service requests from Port B if the MUX output is high, or from Port A if the ..1 MUX output is low. • By "simultaneous" it is meant that two or more requests are valid at the clock edge at which the internal arbiter samples them .. 6-90 AFN·02218A 8207 Dual·Port Considerations conditions cannot be met, then one port must run synchronous and the other asynchronous. For both ports to be operated synchronously, several Figure 3 illustrates an example of dual-port operation conditions must be met. The processors must be the using the processors in the slow cycle group. Note same type (Fast or Slow Cycle) as defined by Table 8 the use of cross-coupled NAND gates at the MUX and they must have synchronized clocks. Also when output for minimizing contention between the two processor types are mixed, even though the clocks latches, and the use of flip flops on the status lines of may be in phase, one frequency may be twice that of the synch,onous processor for delaying the status the ,other. So to run both ports synchronous using and thereby guaranteeing RAS will not be issued, the status interface, the processors must have even in the worst case, until address is valid. Figure related timings (both phase and frequency). If these 12 shows the timing associated with Port switching. 8207 8206 PSEN PSEL WOI/O ~ ~~ V ~OE XCVR XCVR A .> I I _ _ _ _ _ _--1---:..;111-+- I 1,....-_ _ _ _ _- - tl I I f. I -1 ,1-'= 1 I *~~------~---- I I ~r NOTES' t, -PSEN DELAY ~ 'f-------- t,-PSEL DELAY t3 - TRANSCEIVER OUTPUT DISABLE TIME 4-TRANSCEIVER OUTPUT ENABLE TIME Figure 12. 6-91 AFN-02218A intJ 8207 Processor Timing AACK must be used and connected to the SRDY input of the appropriate bus controller. AACK is is- Timing for the 8086,80186, and 80286 processors is sued relative to a point within the RAM cycle and has given in Figure 13.ln order to run without wait states, no fixed relationship to the processor's request. The T1 T2 T3 T4 ClK " \ ~ 1/ \ \ so, 51, 52 (8086) I ~ ADDRESS OUT (8283) Xl VALID X ~(8288) ~f ;f DATA IN (8086) -0----1~ -I- j - .- Si'iiiY (8284A) (A) 8086-80186 TIMING :j~ I I SO,51 \ IL 7 1 1\ \ I I ADDRESS, M/iO ___~( VALID _______ YlJlJJXI _ _ _ _ _ _--J \L..J..../...'-L.l.-_ _ _ _ __ CMD(82288) 4 [ I dl DATA IN :f~: ~ SRDY (82284) =D (8) 80286 TIMING Figure 13. 8086,80186 and 80286 Read Timing 6-92 AFN-----+-< 1 1 VALID 1 1 }>---- I I I I I ~~~~~~~lrn~~:: 1 I I I-pom; REFRESH CYClE,~ OR BANK PRECHARGE r-- WAIT STATES - I CYCLE WItHOUT (A) 80286 TIMING Figure 14. 6-93 AFN.()2218A 8207 8207 ClK I I COMMAND/STATUS 1:- I I I I liE ~: --I I y- (A) PE SET·UP AND HOLD TIME REQUIREMENTS FOR SYNCHRONOUS OPERATION (80286 CMD/STATUS) 8207 ClK COMMAND/STATUS --------+L MIN HOLD FROM CMD liE ------------~~~==~I MAX DELAY FROMCMD (8) liE TIMING REQUIREMENTS FOR ASYNCHRONOUS OPERATION Figure 15. Memory Acknowledge removed asynchronously by the command gOing in- (ACK, AACK, XACK) active. Since in a synchronous operation the 8207 removes read data before late AACK or XACK is recognized by the CPU, the user must provide for In system configurations without error correction, data latching in the system until the CPU reads the two memory acknowledge signals per port are sup- data. In synchronous operation, data latching is un- plied by the 8207. They are the Advanced Acknowl- necessary since the 8207 will not remove data until edge strobe (AACK) and the Transfer Acknowledge the CPU has read it. strobe (XACK). The CFS programming bit deter- mines for which processor AACKA and AACKB are In ECC-based systems there is one memory acknowl- optimized, either 80286 (CFS = 1) or 8086/186 (CFS edge (ACK) per port and a programming bit associ- = 0), while the SA and SB programming bits optimize ated with each acknowledge. If the X programming AACK for synchronous operation ("early" AACK) or bit is high, the strobe is configured as XACK, while if asynchronous operation ("late" AACK). the bit is low, the strobe is configured as AACK. As in. non-ECC, the SA and SB programming bits deter- Both the early and late AACK strobes are three mine whether the AACK strobe is early or late. clocks long for CFS = 1 and two clocks long for CFS = o. The XACK strobe is asserted when data is valid Data will always be valid a fixed time after the occur- (for reads) or when data may be removed (for writes) rence of the advanced acknowledge. Table 9 sum- and meets the Multibus requirements. XACK is marizes the various transfer acknowledge options. 6-94 AFN-{)2218A 8207 8284A ARDY ~IOTHERACRINPUTS READY ClK i ClK 8288 DEN r-- ClK AACK DT/Ji I-- ~.3 READY CLK 5251SOAlE r r1 8207 CASO_3 ... MEMDRY ~ MEMORY 52 51 !iii PCTl RD WR AO..s WE r- (UPPER) P (LOWER) ~ 8088 r {r AH..sAl..s WE DI DD WE DI DO .......... ' I' ADDRI DATA I-- rv' OE 8283 5TB -or- dJ L- p- I-- l I I J lATCH V~ BYTE MARK DECODER T~ I- ~ 5TB OE Y 16/ ~ 8287 / lATCH T 5TB OE L-- 16 , '-- 8263 . lATCH Figure 16. 8086 Hook-up to 8207 Non-ECC Synchronous System-Single Port. 6-95 AFN-!l2218A 8207 82284 imlDY SRDY ("fF}OTHER~INPUTS ClK t CLK ALE 82288 DEN DTIII - ClK AACK ~ M/Il)S1SO ADDR, imIDY ClK STROE!ES ~I PCTl MEMORY MEMORY MJIl) 51 ~ RD 8207 WE f- (UPPER) (lOWER) SO WR 80286 AOORIN WE DI DO WE DI DO ADDR 'r II J)o- -' iif , DATA ~ I ~ ~ STB eo I- BYTE MARK lATCH ....!!L- T\7l STB OE 16 8283 lATCH T r- STB OE '--- 18 '--- 8283 lATCH I NOTE THE BYTE MARK LATCH MAY ALSO BE STROBED WITH LEN Figure n. 80286 Hook-up _08207 Non-ECC Synchronous System-Single Port. 6-96 AfN.02218A 8207 Table 8. Processor Interface/Acknowledge Summary / SYNC/ASYNC CYCLE PROCESSOR REQUEST TYPE INTERFACE ACKNOWLEDGE TYPE 80286 STATUS SYNC EAACK 80286 STATUS ASYNC LAACK FAST 80286 COMMAND SYNC EAACK CYCLE 80286 COMMAND ASYNC LAACK CFS=1 8086/80186 STATUS ASYNC LAACK 8086/80186 COMMAND ASYNC LAACK MULTIBUS COMMAND ASYNC XACK 8086/80186 STATUS SYNC EAACK SLOW 8086/80186 STATUS ASYNC LAACK CYCLE 8086/80186 COMMAND SYNC EAACK CFS=O 8086/80186 COMMAND ASYNC LAACK MULTIBUS COMMAND ASYNC XACK Table 9. Memory Acknowledge Option Summary Synchronous Asynchronous XACK AACK Optimized AACK Optimized for Multibus Compatible Fast Cycle for Local 80286 Remote 80286 , AACK Optimized AACK Optimized for Multibus Compatible Slow Cycle for Local 8086/186 Remote 8086/186 Test Modes Test Mode 1, memory initialization is inhibited, since the 8207, by definition, is in non-ECG mode. Two special test modes exist in the 8207 to facilitate testing. Test Mode 1 (non-EGG mode) splits the Test Mode 2 sets the internal refresh counter to a refresh address counter into two separate counters value slightly less than rollover. During functional and Test Mode 2 (EGG mode) presets the refresh testing other than that covered in Test Mode 1, the address counter to a value slightly less than rollover. 8207 will normally be set in Test Mode 2. Test Mode 2 eliminates memory initialization in EGG mode. This Test Mode 1 splits the address counter into two, and allows quick examination of the circuitry which increments both counters simultaneously with each brings the 8207 out of memory initialization and into refresh address update. By generating external normal operation. Test Mode 2 is also useful for quick refresh requests, the tester is able to check for reset response in EGG systems. proper operation of both counters. Once proper indi- vidual counter operation has been established, the 8207 must be returned to normal mode and a second test performed to check that the carry from the fi rst PACKAGE counter increments the second counter. The outputs of the counters are presented-on the address out bus The 8207 is packaged in a 68-pin, leadless JEDEC with the same timing as the row and column ad- type A hermetic chip carrier. Figure 18 illustrate&the dresses of a normal scrubbing operation. During package, and Figure 19 is the pinout. 6-97 AFN'()2218A 8207 .130 (3.30) Figure 18. 8207 JEDEC Typ~ A Package 6-98 AFN·02218A 8207 TOP 34 A01 33 A02 32 A03 31 A04 30 ADS 29 A06 26 A07 27 A06 PIN NO.1 MARK BOTTOM 52 AH4 53 AH5 54 AH6 55 AH7 56 AH8, 57 POI 58 RFRQ 59 elK 60 Vss 61 lIDII 62 WRB 63 PEB NOTICE: The Pinouts are not final Figure 19. 8207 Pinout Diagram specifications and are subJect to change. 6-99 AFN'()2218A 8231 A AAITHMETIC PROCESSING UNIT , • Fixed Point Single and Double Precision (16/32 Bit) • Comp,atible, with MCS·SO™ and MCS·S5™ Microprocessor Families • Floating Point Single Precision (32 Bit) • Programmed Direct Memory Access, or lid Data Transfers • Binary Data Formats • Add, Subtract, Multiply and Di'iide • End of Execution Signal l1li General Purpose S·Bit Data Bus • Trigonometric and Inverse Trigonometric F!Jnctions Interface • Square Roots, Logarithms, • Standard 24 ~in Package Exponentiation • + 12 Volt and + 5 Volt Power Supplies • Float to Fixed and Fixed to Float Conversions • Advanced N·Channel SiliCon Gate • Stack Oriented Operand Storage HMOS Technology The Intel® 8231A Arithmetic Processing Unit (APU) is a monolithic HMOS LSI device that provides high performance fixed ahd floating point arithmetic and floating point trigonometric operations. It may be used to enhance the mathematical capability of a wide variety of processor-oriented systems. Chebyshev polynomials are used in the implementation of the APU algorithms. All transfers. including operand. result. status and command information. take place over an 8-bit bidirectional data bus. Operands are pushed onto an internal stack and commands are issued to perform operations on the data in the stack. Results are then available to be retrieved from the stack. Transfers to and from the APU may be handled by the associated processor using conventional programmed I/O. or may be handled by a direct memory access controller for improved performance. Upon completion of each command. the APU issues an end of execution signal that may be used as an interrupt by the CPU to help coordinate program execution. In January 1981 Intel will be converting from 8231 to 8231A. The 8231A provides enhancements over the 8231 to allow use in both asynchronous and syncnronous systems. EACt< 3 SVACK II SVREQ 5 OBO-087 OO~TLM~ ( 6 Figure 1. Block Diagram Figure 2. Pin Configuration 6-100 8231A Table 1. Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function Vcc 2 Power: +5 Volt power supply. SVREO 5 a Service Request: This actIve high out· put signal IndIcates that command Voo 16 Power: + 12 Volt power supply. execution is complete and that post Vss 1 Ground. execution servIce was requested in the ClK 23 I Clock: An ext~rnal, TTL compatible, prevIous command byte. It IS cleared by liming source is aPRlied to the ClK pin. SVACK, the next command output to the device, or by RESET. RESET 22 I Reset: The active high reset signal pro- vides Initialization for the chip. REflET READY 17 a Ready: This active high output indi- also terminates any operation in pro- cates that the 8231 A is able to accept gress. RESET clears the status register communication with the data bus. When and places the 8231A into the idle state. an attempt is made to read data, write Stack contents and command registers data or to enter a new command while are not affected (5 clock cycles). the 8231A is executing a command, READY goes low untIl execution of the CS 18 I Chip Select: CS is an active low input current command is complete (See signal which selects the 8?31A and en· F.lEADY Operation, p. 5). abies commu nication !,'lith 'the data bus. DBO· 8- 1/0 Data Blls: These eight bidirectional An 21 I Address: In coni~nction with lhe RD DB? 15 lines provIde for transfer of commands, and WR signals, th!l Ao control line e~- status and data Iletween the 8231 A and tablishes the type' of communication the CPU. The' 8231A can drive the data that is to be performed with the ~231 A as bus only when CS and RD are low. shown below: Ao RD WR Function 0 1 0 Enter data byte irito stack COMMAND STRUCTURE, 0 0 1 Read data by1e from st~ck 1 1 0 Enter pommand Each commal1d entered into the 8231A consists of a single 1 0 1 Read status 8-bit byte having the format illustrated below: RD 20 I Read: ThIS active low input indicates that data or stljfuS is to be read from the 8231A If CS is low. WR 19 I Write: This actIve low input irdicates that data or a command IS to be written into the 8231A if CS is' low. '. Bits 0-4 select the operation to be performed as shown in the table. ~its 5-6 select the data format appropriate EACK 3 I End of ExecutioJ1: This active low input clears the end of execution output sig- to the selected operation. If bit 5 is a 1, a fixed pOint data nal (END). If EACK IS tied low, the END format is specified. If bit 5 is a 0, floating point format is output WIll be a pulse that is one clock specified .. Bit 6 selects the precision of the data to be penod WIde. operated upon by fixed point commands only (if bit SVACK 4 I Service Request: This active low input 5 = 0, bit 6 must be 0). If bit 6 is a 1, single-precision clears the service request output (16-bit) operands are assumed. If bit 6 is a 0, double- (SVREQ). precisio'l (32·bit) operands are indicated. Results are undefined for all illegal combinations of bits in the com- END 24 a End: This active low, open-drain output indicates that execution of the pre· m,and byte. Bit? indicates whether a ,service request is viously entered command is complete. It to be issued atter the command is executed. If bit? is a can be used as an Interrupt request and 1, the s\lrvice request output (SVREQ) will g() high at the is cleared by EACk, RESET or any read conclusion of the command and will remain high until or write access to the 8231. ' reset by a low level on the service acknowledge pin (SVAC!<) or until ~ompletion of execution of the suc- ceeding command where service request (bit 7) is 0. Each command issued to the 8231A requests post execu- tion service based upon the state of bit? in the command byte. Y"hen bit? is a 0, SVREQ remains low. 6-101 AFN-Q1251B inter 8231 A Table 2. 32-Blt Floating Point Instructions Hex(l) Stack Conlents(2) Status Flags(4) Instruction Description After Execution Code AfflICted A B C D ACOS Inverse Cosine of A 0 6 R U U U S, Z, E ASIN Inverse Sine of A 0 5 R U U U S, Z, E ATAN Inverse Tangent of A 0 7 R B U U S,Z CHSF Sign Change of A 1 5 R B C D S,Z COS Cosine of A (radians) 0 3 R B U U S, Z EXP eA Function 0 A R B U U S, Z, E FADD Add A and B 1 0 R C D U S, Z, E FDIV DIvide B by A 1 3 R C D U S, Z, E FLTD 32·Blt Integer to Floating POint Conversion 1 C R B C U S,Z FLTS 16·BIt Integer to Floating Point Conversion 1 D R B C U S,Z FMUL 'Multlply A and B 1 2 R C D U S, Z, E FSUB Subtract A from B 1 1 R C D U S, Z, E LOG Common Logarithm (base 10) of A 0 8 R B U U S, Z, E LN Natural Logarithm of A 0 9 R B U U S, Z, E POPF Stack Pop 1 8 B C D A S, Z PTOF Stack Push '- 1 7. A A B C S, Z PUPI Push n onto Stack 1 A R A B C S, Z PWR BA Power Function 0 B R C U U S, Z, E SIN Sine of A (radians) 0 2 R B U U S, Z SORT Square Root of A 0 1 R B C U S, Z, E TAN Tangent of A (radians) 0 4 R B U U S, Z, E XCHF Exchange A and B 1 9 B A C D S, Z Table 3. 32-Bit Integer Instructions Hex(l) Slack Conlenls(2) Status Flags(4) Instruction Description Altar Execution Coda Affactad A B C D CHSD Sign Change of A 3 4 R B C D S, Z,O DADD Add A and B 2 C R C D A S, Z, C, E DDIV DIvide B by A 2 F R C D U S, Z, E DMUL Multiply A and B (R = lower 32·blts) 2 E R C D U S, Z,O DMUU Multiply A and B (R = upper 32·bits) 3 6 R C D U S, Z,O DSUB Subtract A from B 2 D R C D A S, Z,C,O FIXD Floating POint to Integer Conversion 1 E R B C U S, Z,O POPD Stack Pop 3 8 B C D A S, Z PTOD Stack Push 3 7 A A B C S, Z XCHD Exchange A and B 3 9 B A C D S, Z Table 4. 16-Bit Integer Instructions Hex(l) Slack Contenls(3) Stalus Flags(4) Instruction' Dascrlptlon After Execution Code Affecled Au Al Bu Bl Cu Cl Du Dl CHSS Change Sign of Au 7 4 R AlBU BlCUClDu Dl S, Z, 0 FIXS Floating POint to. Integer Conversion 1 F RBuBlCUClU U U S,Z,O POPS Slack Pop 7 8 Al Bu Bl Cu Cl Du Dl Au S, Z PTOS Stack Push 7 7 Au Au' Al Bu Bi. Cu Cl Du S, Z SADD Add Au and Al 6 C R Bu Bl Cu Cl Du Dl Au S,Z,C,E SDIV DIvide Al by Au 6 F R Bu Bl Cu Cl Du Dl U S, Z, E SMUL Multiply Al by Au (R =lower 16·bits) 6 E R Bu Bl Cu Cl Du Dl U S, Z, E SMUU Multiply AL by Au (R =upper lS·bits) 7 6 R Bu Bl Cu Cl Du Dl U S, Z, E SSUB Subtract Au from Al 6 D R Bu Bl Cu Cl Du Dl Au S, Z, C, E XCHS Exchange Au and Al 7 9 Al Au Bu Bl Cu Cl Du Dl S, Z NOP No Operation. 0 0 Au Al Bu Bl Cu Cl Du Dl Notas: 1 In the hex code column, SVREO IS a 0 2 The stack initially IS composed of four 32·M numbers (A, B, C, D) A IS eqUivalent to Top Of Stack (TOS) and B is Next On Stack (NOS) Upon completion of a command the stack IS composed of. the result (R); undefined (U), or the initial contents (A, B, C, or D) The stack initially IS composed of eight 16·blt numbers (Au, Al , Bu, Bl , Cu, Cl , Du, Dl ) Au IS the TOS and Al IS NOS Upon completion of a comm~nd the stack IS composed of the result (R), undefined (U), or the Initial contents (Au, Al , Bu, Bl , ) Nomenclature Sign (S), Zero (Z), Overflow (0), Carry (C), Error Code Field (E) 6-102 AFN-012518 inter 8231A DATA FORMATS The 8231 A is a binary arithmetic processor and requires that floating point data be represented by a fractional The 8231A arithmetic processing unit handles operands mantissa value between .5 and 1 multiplied by 2 raised in both fixed point and floating pOint formats. Fixed to an appropriate power. This is expressed as follows: point opdrands may be represented in either Single (16-bit operands) or double preCision (32-bit operands), value = mantissa x 2exponent and are always represented as binary, two's comple- ment values. For example, the value 100.5 expressed in this form is 0.110Q 1001 x 27. The decimal equivalent of this value SINGLE PRECISION FIXED POINT FORMAT may be computed by summing the components (powers of two) of the mantissa and then multiplying by the ex- 1:jII-1I-IIVj"Ui-1I-III~ ponent as shown below: 15 0 value= (2- 1+ 2- 2 + 2 - 5+ 2- 8) X 27 = 0.5 + 0.25. + 0.03125 + 0.00290625) x 128 DOUBLE PRECISION FIXED POINT FORMAT = 0.78515625 x 128 = 100.5 lsi I I I I I I I I I I I I I-VjLiE'I--I'-11-111-11-1111-1 31 0 FLOATING POINT FORMAT The format for floating pOint values in the 8231A is given The sign (positive or negative) of the operand is located below. The mantissa is expressed as a 24-bit (fractional) in the most significant bit (MSB). Positive values are value; the exponent is expressed asa two's complement represented by a sign bit of zero (S = 0). Negative values 7-bit value having a range of - 64 to + 63. The most are represented by the two's complement of the corre- significant bit IS the sign of the mantissa (0 = positive, sponding positive value with a sign bit equal to 1 (S = 1). 1 = negative), for a total of 32 bits. The binary point is The range of values that may be accommodated by each assumed to be to the left of the most Sign ificant man- of these formats is - 32,768 to + 32,767 for Single preci- tissa bit (bit 23). All floating point data values must be sion and - 2,147,483,648 to + 2,147,483,647 for double normalized. Bit 23 must be equal to 1, except for the precision. .value zero, which is represented by all zeros. I 111111 Iii I 111Iii 1111111I 11111I Floating point binary values are represented in a format that permits arithmetic to be performed in a fashion EXPONENT I----~---MANTISSA an;:ilogous to operations with decimal values expressed ~I ~ in scientific notation. 3130 2423_ The range of values that can be represented in this for- mat is ±(2.7xl0- 20to 9.2x 10 18 ) and zero. In the decimai system, data may be expressed as values between 0 and 10 times 10 raised to a power that effec- FUNCTIONAL DESCRIPTION tively shifts the implied decimal pOint right or left the number of places necessary to express the result in con- STACK CONTROL ventional form (e.g., 47,572.8). The value-portion of the The user interface to the 8231A includes access to an 8 data is called the mantissa. The exponent may be either level 16-bit wide data stack. Since Single preCision fixed negative or positive. point operands are 16-bits in length, eight such values The concept of floating point notation has both a gain may be maintained in the stack. When using double and a loss associated with it. The gain is the ability to precision fixed point or floating point formats four represent the significant digits of data with values span- values may be stored. The stack in these two configura- ning a large dynamic range limited only by the capacity tions can be visualized as shown below: of the exponent field. For example, in decimal notation if the exponent field is two digits wide, and the mantissa TOS A2 Ai lOS - - A. A3 .2 A1 NOS ~ B2 B1 NOS ~ B. B3 B2 B1 is five digits, a range of values (positive or negative) from 1.0000 x 10 - 99 to 9.9999 x 10 + 99 can be accom- modated. The loss is that only the significant digits of ---32- the value can be represented. Thus there is rio distinc- tion in this representation between the values 123451 and 123452, for example, since each would be ex- pressed as: 1.2345x 105. The sixth digit has been -16- discarded. In most applications where the dynamic range of values to be represented is large, the loss of Data are written onto the stack, eight bits at a time, in significance, and hence accuracy of results, is a minor the order shown (Al, A2, A3, ... ). Data are removed from consideration. For greater precision a fixed point format the stack in reverse byte order (A4, A3, A2 ... ). Data could be chosen, although with a loss of potential should be entered onto the stack in multiples of the dynamic range. number of bytes appropriate to the chosen data format. AFN~01251B 6-103 inter, 8231A DATA ENTRY 4. The 8231 A is not busy, and a data entry has been re- Data entry is accomplished by bringing the chip select quested. READY will be pulled low for the length of (CS), the command/data line (AO>, and WR low, as shown time required to ascertain if the preceding data byte, iI any, has been written to the stack. If so READY will in the timing diagram. The entry of each new data word immediately go high. If not, READY will remain low "pushes down" the previously entered data and places until the interface latch is free and will then go ,high. the new byte on the top of stack (TOS). Data oil the bot· 5. When a status read has been requested, READY will tom of the stack prior to a stack entry are lost. be pulled low for the length of time necessary to DATA REMOVAL transfer the status to the interface latch, and will then be raised to permit completion of the status Data are removed from the stack in the 8231A by bringing read. Status may be read whether or not the 8231 A is chip select (CSj, command/data (AO>, and RD low as' busy. shown in the timing diagram. The removal of each data When READY goes low, the APU expects the bus con- word redefines TOS so that the next successive byte to trol signals present at the time to remain stable until be removed becomes TOS. Data removed from the stack READY goes high. rotates to the bottom ~f the stack. COMMAND ENTRY DEVICE STATUS After the appropriate number of bytes of data have been Device status is provided by means of an internal status entered onto the stack, a command may be issued to register whose format is shown below: perform an operation on that data. Commands which re- quire two operands for execution (e.g., add) operate on the TOS and NOS values. Single operand commands operate only on the TOS. I I BUSY SIGN I ZERO t=l I -I--I I ERROR CODE CARRY Commands are issued to the 8231A by bringing the chip select (CS) line low,' command data (AO> line high, and BUSY: Indicates that 8231A is currently executing a com- WR line low as indicated by the timing diagram. After a mand (1 = Busy) command is Issued, the CPU can continue execution of SIGN: Indicates that the value on the top of stack is its program concurrently with the 8231A command negative (1 =Negatlve) execution. ZERO: Indicates that the value on the top of stack is zero (1 = Value is zero) COMMAND COMPLETION ERROR CODE: This field contains an indication of tj1e The 8231 A signals the completion of each command exe- validity of the result of the last opera- cution by lowering the End Execution line (END). tion. The error codes are: Simultaneously, the busy bit in the status register is 0000 - No error cleared and the Service Request bit of the command 1000 - Divide by zero register is checked. If it is a "1" the service request out- 0100 - Square root or log of negative number put level (SVREQ) is raised. END is cleared on receipt of 1100 - Argument of inverse sine, cosine, or an active low End Acknowledge (EACK) pulse. Similarly, eX too large the service request line is cleared by recognition of an XX10 - Underflow active low Service Acknowledge (SVACK) pulse. XXOl - Overflow CARRY: Previous operation resulted in carry or borrow READY OPERATION from most significant bit. (1 = Carry/Borrow, An active high ready (READY) is provided. This line is 0= No Carry/No Borrow.) high in its quiescent state and is pulled low by the 8231A If the BUSY bit in the status register is a one, the other under the following conditions: ' status bits are not defined; if zero, indicating not busy, 1. A previously initiated operation is in progress (device the operation is complete and the other status bits are busy) and Command Entry has been attempted. In defined as given above. this case, the READY line will be pulled low and re- main low until completion of the current command READ STATUS execution. It will then go high, permitting entry of the new command. The 8231A status register can be read 'by the CPU at any 2. A previously initiated operation is In progress and time (whether an operation is In progress or not) by stack access has been attempted. In this case, the bringing the chip select (CS) low, the command/data line READY line will be pulled low, will remain in that (AO> high, and lowering RD. The status register is then state until execution is complete, and will then be gated onto the data bus and may be input by the CPU. raised to permit completion of the stack access. ' 3. The 8231A is not busy; and data removal has been re- quested. READY will be pulled low for 'the length of EXECUTION TIMES time necessary to tra,nsfer the byte from the top.of Timing for execution of the 8231A command set is con- stack to the interface latch, and will then go high, tained below, All times are given in terms of clock indicating availability of the data. cycles. Where substantial variation of execution times 6-104 AFN-01251B 8231A is possible, the minimum and maximum values are cut ion, these times will be heavily influenced by the quoted; otherwise, typical values are given. Variations nature of the data, the control interface used, the speed are data dependent. of memory, the CPU used, the priority allotted to DMA and Interrupt operations, the size and number of Total execution times may require allowances for operands to be transferred, and the use of chained operand transfer into the APU, command execution, and calculations, etc. result retrieval from the APU. Except for command exe· Table 5. Command Execution Times Command Clock Command Clock Command Clock Command Clock Mnemonic Cycles Mnemonic Cycles Mnemonic Cycles Mnemonic Cycles SADD 17 FADD 54·368 LN 4298·6956 POPF 12 SSUB 30 FSUB 70·370 EXP 3794·4878 XCHS 18 SMUL 84·94 FMUL 146·168 PWR 8290·12032 XCHD 26 SMUU 80·98 SDIV 84·94 FDIV 154·184 NOP 4 XCHF 26 DADD 21 SORT 800 CHSS 23 PUPI 16 DSUB 38 SIN 4464 CHSD 27 DMUL 194·210 COS 4118 CHSF 18 DMUU 182·218 DDIV 208 TAN 5754 PTOS 16 FIXS 92·216 ASIN 7668 PTOD 20 FIXD 100·346 ACOS 7734 PTOF 20 FLTS 98·186 ATAN 6006 POPS 10 FLTD 98·378 LOG 4474·7132 POPD 12 DERIVED FUNCTION DISCUSSION Computer approximations of transcendental functions In gene~al, the next term in the Chebyshev series can be are often based on some form of polynomial equation, recursively derived from the previous term as follows: such as: T n(X) = 2X [T n- 1(X)) - Tn- 2(X); n ~ 2 (1·7) (1-1) The primary shortcoming of an approximation in this Common logarithms are computed by multiplication form is that it typically exhibits Itery large errors when of the natural logarithm by the conversion factor the magnitude of IXI is large, although the errors are 0.43429448 and the error function is therefore the same small when IXI is small. With polynomials in this form, as that for natural logarithm. The power function is the error distribution is markedly uneven over any realized by combination of natural log and exponential arbitrary interval. functions according to the equation: A set of approximating functions exists that not only minimizes the maximum error but also provides an even distribution of errors within the selected data represen· The error for the power function is a combination of that tation interval. These are known as Chebyshev Poly· for the logarithm and exponential functions. nomials and are are based upon cosine functions. Thes~ functions are defined as follows: Each of the derived functions is an approximation of the true function. Thus the result of a derived function will' T n(X) = Cos nil; where n = 0,1,2 ... (1·2) have an error. The absolute error is the difference be· Il= COS-1X tween the function's result and the true result. A more The various terms of the Chebyshev series can be com· useful measure of the function's error is relative error puted as shown below: (absolute error/true result). This gives a measurement of the significant digits of algorithm accuracy. For the To(X) = Cos (0 . Il) = Cos (0) = 1 (1-4) derived functions except LN, LOG, and PWR the relative T, (X)=Cos(Cos-'X)=X (1·5) error is typically 4 x 10 -7. For PWR the relative error, is T 2(X) = Cos 211 = 2COS2 11 - 1 = 2COS2 (Cos -1X) - 1 (1·6) the summation of the EXP and LN errors, 7 x 10- 7. For = 2X2- 1 LN and LOG, the absolute error is 2x 10- 7. 6-105 A,FN-D'251 B 8231A APPLICATION INFORMATION . can be simplified as shown in Figure 3. The 8231A APU is designed with a general purpose 8·bit data bus and in· The diagram in Figure 4 shows the interface connec- terface control so that it can be conveniently used with any general 8·bit processor. tions for the APlJ with operand transfers handled by an 8237 DMA controller, and CPU coordination handled by In many systems it will be' convenient to use the an Interrupt Controller. The APU interrupts the CPU to microcomputer system clock to drive the APU clock indicate that a command has been completed. When the Input. In the case of 8080A systems it would be the performance enhancements provided by the DMA and q,2TTL signal. Its cycle time will usually fall in the range Interrupt operations are not required, the APU interface of 250 ns to 1000 ns, depending on the system speed. ADDRESS BUS ~ CPU iOii RD Ao CS 8231A iOW WR ARITHMmC , CLOCK ClK PROCESSOR READY READY UNrr JI!. ::.. ..:. r-- '7 ~ "'<: 7' SYSTEM DATA BUS """ Figure 3. Minimum Configuration Example . ADDRESS BUS ~y ~ .... DECODER j es Jf J, ..."- J: Ii A8-A15 I AO-A7 AEN Of ADDRESS AO-A15 HLDA r-- P- HLOA 8237 DMA CONTROLLER AD::: A DB1 i'r- STa LATCH 8282 ... ;.. ~ i 1; ~ I~~ ill HOLD HRQ "TESTPOINTS< 08 2.0 x= DEVICE UNDER TEST ~C'~150PF -=- A C TESTING INPUTS ARE DRIVENAT3 7VFOR A LOGIC "1" AND04V FOR A LOGIC"O "TIMING MEASUREMENTS ARE MADE AT2 OV FOR A LOGIC "1" AND 0 8V FOR A LOGIC ,"0 " 6-107 AFN-01251B inter 8231A A.C. CHARACTERISTICS (TA = ooe to 70oe. vss = OV. vcc = +5V ± 10%. VDD = +12V ± 10%) READ OPERATION Symbol Parameter 8231A-8 8231A-3 8231A Units Min. Max. Min. Max. Min. Max. tAR Ao. CS Setup to RD 0 0 0 ns tRA Ao. CS Hold from RD 0 0 0 ns tRY READY I from AD I Delay (Note 2) 150 100 100 ns tYR READY t to RD t 0 0 0 ns Data 3.5 tCY 3.5 tCY 3.5 tCY ns +50 +50 +50 tRRR READY Pulse Width (Note 3) Status 15 tCY 15 tCY 1.5 tCY ns +50 +50 +50 tROE Data Bus Enable from RD I 50 50 50 ns tORY Data Valid to READY t 0 0 0 ns tOF Data Float after RD t 50 200 50 150 50 100 ns WRITE OPERATION 8231A·8 8231A·3 8231A Symbol Parameter Units Min. Max. Min. Max. Min. Max. tAW Ao. CS Setup to WR 0 0 0 ns tWA Ao. CS Hold after WR 60 30 25 ns tWY READY I from WR I Delay (Note 2) 150 100 100 ns tyW READY t to WR t a a 0 ns tRRw READY Pulse Width (Note 4) 50 50 50 ns tWI Write Inactive Time (Note 4) I. Command 4 tCY 4 tCY 4 tCY ns I Data 5 tCY 5 tCY 5 tCY ns tow Data Setup to WR 150 100 100 ns two Data Hold after WR 20 20 20 ns OTHER TIMINGS Symbol Parameter 8231A-8 8231A-3 8231A Units Min· Max. Min. Max. Min. Max. tCY Clock Period 480 5000 320 3300 250 2500 ns tCPH Clock Pulse High Width 200 140 100 ns tCPL Clock Pulse Low Width 240 160 120 ns tEE END Pulse Width (Note 5) 400 300 200 ns tEAE EACK I to EN 0 t Delay 200 175 150 ns 0 tAA EACK Pulse Width 100 75 50 ns tSA SVACK I to SVREQ I Delay 300 200 150 ns tss SVACK PUlse Width 100 75 5~ ns NOTES: 1. Typical values are for TA=25°C. nominal supply voltages and nominal processing parameters. 2. READY is pulled low for both command and data operatl6ns. 3. Minimum values shown assume no previously entered command is being executed for the data access. If a previously entered command is being executed. READY low pulse width is the time to complete execution plus the time shown. Status may be read at any time without exceeding the time shown. 4. READY low pulse width is less than 50 ns when writing into the data port or the control port as long as the duty cycle requirement (twills observed and no previous command is being executed. tWI may be safely violated as long as the extended tRRW that results is observed. If a previously entered command is being executed: READY low pulse width is the time to complete execution plus the time shown. These timings refer specifically to the 8231A. 5. END low pulse width i~ specified for EACK tied to VSS. Otherwise tEAE applies. 6-108 AFN·01251B inter 8231A WAVEFORMS READ OPERATION CLOCK READY DATA BUS --------- ~J:IO.Y ~ OU:PUTVALID to?J- WRITE OPERATION ~" Jt'-1 e--~.. Wi\ ~ 'Wy---.j~~-t ..W-y-tYW-I -tWl- J- e---Lr" READY DATA BUS I ~NPUT STABLE _- , INTERRUPT OPERATION ~::1 } SVREQ / --------' SiiACR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _~~Sy 6-109 AFN-01251B ",- 8232 FLOATING POINT PROCESSING UNIT • Compatible with Proposed IEEE For· • Standard 24·Pln Pa,ckage mat and Existing Intel Floating Point • 12V and 5V Power Supplies Standard • Compatible with MCS·~OTM, MCS·85™ • Single (32·Bit) and Double (64·8it) and MCS·86™ Micfoproc~ssor Families Precision Capability • Error Interrupt • Add, Subtract, Multiply and Divide Functions • Direct Memory Access or Programmed 1/0 Data Transfers • Stack Oriented Operand Storage • End of Exe~u~ion Signal • General Purpose a·Bit Data Bus Inter· • Advanced N·Channel Silicon Gate facEt HMOS Technology The Intel@ ~232 is a high performance floating-point processor unit (FPU). It provides single precision (32-bit) and double precision (54-bit) add, subtract, mui'tiply and divide operations. The 8232's floating point arithmetic Is a subset of the proposed IEEE standard. It can be easily interfaced to enhance the computational capabilities of the host microprocessor. . . The operand, result, status and command information transfers take place over an 8-bit bidirectional data bus. Oper- ands are pushed onto an internal stack by the host processor and a command is Issued 'to perform an operation on the data stack. The results of the operation are available to the host proc~ssor from the stack. Information transfers between the 8232 and the host processor can be handled by using programmed 110 or direct memory access techniques. After completing an operation, the 8232 activates an "end of execution" signal that can be used to interrupt the host processor. cs Rli W1I Ao READY DBO DB7 END SYReQ SVACK ReseT ERROR Figure 1_ Block Diagram Figure 2. Pin Configuration 6-110 8232 Table 1. Pin Description Symbol Pin No. Type Name and Description Symbol Pin No. Type Name and Description Vee 2 POWER SUPPLY: +5V power supply 20 READ: A lOW level on this Input is used to read Information from an internal Voo 16 POWER SUPPLY: ~ 12V power supply locatIOn and gate that information onto Vss 1 GROUND the data bus. The CS input must be lOW to accomplish the read operation. The An ClK 23 I CLOCK: An external timing source con· input determines what IOternal location is nected to the ClK input provides the to be read. See An, CS input descriptions necessary clocking. and read timing diagram for details. If'the RESET 22 I RESET: A HIGH level on this input causes END output was HIGH, performing any initialization. Reset term mates any opera· read operallon Will make the END output tion in progress, and clears the status go lOW after the HIGH to lOW transition register to zero. The internal stack pOinter of the RD input (assuming CS is lOW). If is initialized and the contents of the stack the ERROR output was HIGH, performing may be affected. After a reset the END a status register read operation Will make output, the ERROR output and the SVREO the ERROR output lOW, This will happen output will be lOW. For proper initializa· after the HIGH to lOW transition of the tlon, RESET must be HIGH for at least five m5 input (assuming CS IS lOW) ClK periods following stable power WR 19 WRITE: A lOW level on this Input IS used supply voltages and stable clock. to transfer information from the data bus CS 18 I CHIP SELECT: Input must be lOW to ac· into an IOternal location. The CS must be complish any read or wnte <:?peratlon to LOW to accomplish the wnte operation the 8232. Ao determmes which Internal location IS To perform a write operation, appropriate to be written. See Ao, CS Input descnp· data is presented on DBO through DB7 tions and write timing diagram for details Imes, appropriate logiC level on the Ao in- If the END output was HIGH, performing put and the CS Input IS made lOW. When- any write operat!On Will make the END ever WR and Ri5 Inputs are both HIGH and output go lOW after the lOW to HIGH CS IS lOW, READY goes lOW. However, transition of the WR Input (assuming CS IS actual Writing into the 8232 cannot start lOW) until WR is made lOW. After initiating the write operation by the HIGH to lOW tran· sitlon on the WR input, the READY output EACK 3 END ACKNOWLEDGE: When lOW, will go HIGH, mdicating the write opera- makes the END output go lOW. As men· tion has been acknowledged The WR in- IIoned earlier, HIGH on the END output put can go HIGH after READY goes HIGH. signals completion of a command exe- The data lines, the Ao input and the CS in- cution The EN 0 signal IS derived from an put can change when appropriate hold internal flip-flop which IS clocked at the time requirements are satisfied. See wnte completion of a command ThiS flip-flop is timing diagram for details. clocked to the reset state when EACK IS lOW Consequently. If EACK IS tied lOW, To perform a read operation an appropriate the END output Will be a pulse that IS logic level is established on the Ao input approximately one elK period Wide and CS is made lOW. The READY output SVACK SERVICE ACKNOWLEDGE: A lOW level goes LOW because WR and RD inputs are on thiS Input clears SVREQ. If the SVACK HIGH. The read operation does not start Input IS permanently tied LOW, It Will until the Ri5 Input goes lOW. READY Will conflict With the internal settmg of the go HIGH indicating that read operation IS SVREO output Thus, the SVREO complete and the required information is Indication cannot be r"elted upon If the available on the DBO through DB7 lines. SVACK is tied lOW. This information will remain on the data lines as long as RD is lOW. The Ri5 Input END 24 o END OF EXECUTION: A HIGH on thiS can return HIGH anytime after READY output indicates that execution of the goes HIGH. The CSinput and A(llnput can current command is complete ThiS output change anytime after RD returns HIGH. Will be cleared lOW by activating the See read timing diagram for details. If the EACK input lOW or performing any read CS is tied lOW permanently, READY will or write operation or deVIce Initialization remain lOW until the next 8232 read or using RESET If EACK IS tied lOW, the write access. END output Will be a pulse (see EACK deSCription) An 21 I ~DRESS: The An Input together With the RD and WR inputs determines the type of Reading the status register while a com- transfer to be performed on the data bus mand execution is in progress is allowed as follows: However, any read or write operation clears the fllp·flop that generates the END Ao RD WR Function output. 'ThUS, such continuous reading 0 1 0 Enter data byte into stack could conflict with internal logic setting of 0 0 1 Read data byte from stack the END fllp·flop at the end of command 1 1 0 Enter command execution. 1 0 1 Read status 6-111 AFN-01263C intJ 8232 Table 1. Pin Description (Continued) Symbol Pin No. Type Name and D..crlptlon Symbol Pin No. Type Name and Description SVREQ 5 o SERVICE REQUEST: A HIGH on this out- READY 17 0 READY: Output is a handShake signal used put Indicates completion of a command_ while performing read or write transac- In this sense this output Is the same as the tions with the 8232. If the WA and FlO END output However, the SVREQ output Inputs are both HIGH, the READY output will go HIGH at the completion of a goes LOW with the CS mput In anticipa- command only when the Service Request tion of a transaction. Ifvm goes LOW to Enable bit was set to 1. The SVREQ can be initiate a write transaction with ~roper cleared (I.e., go LOW) by activating the signals established on the DBO-DB7, Ao. SVACK Input LOW or Initializing the Inputs, the READY will return HIGH device using the RESET. Also, the SVREQ Indicating that the write operation has will be automatically cleared after been accomplished. The WI! can be made completion of any command that has the HIGH afterthls event On the other hand, If service request bit as O. a read operation Is deSired, the RI5 input IS made LOW after activating CS LOW and ERROR 6 o ERROR: Output goes HIGH tc Indicate that establishing proper Ao Input (T~READY the current command execution resulted will go LOW in response to CS going In an error condition. 1he error conditions LOW.) The READY will return HIGH, are: att~mpt to divide by zerc, exponent Indicating completion of read. The RI5 can overflow and exponent underflow. The return HIGH after this event It should be ERROR output Is cleared LOW on a stajus noted that a read or write operation can be register read operation or upon RESET. initiated without any regard to whether a The ERROR output Is derived from the command execution is In ,progress or not. error bits in the status register. These Proper device operation Is assured by error bits will be updated Internally at an obeying the READY output indication as appropriate time during a command exe- described. cution. Thus, ERROR output going HIGH DBO- 8-15 1/0 DATA BUS: Bidirectional lines are used to may not coincide With the completion of a DB7 transfer command, status and operand command. Reading of the status register Informatkm between the device and the can be performed while a command exe- host processor. DBO is the least slgnlfl' cution IS In progress. However, It should cant and DB7 Is the most significant bit be noted that reading the status register position HIGH on a data bus line corre· clears the ERROR output Thus, reading sponds to 1 and LOW corresponds to O. the status register while a command execution is in progress may result In an When pushing operands on the stack Internal conflict with the ERROR output. usmg the data bus, the least significant byte must be pushed first and the most significant byte last. When popping the stack to read the result of an operation, the most significant byte will be available on the data bus first and the least sig· nificant byte Will be the last. Moreover, for pushing operands and popping results, the number of transactions must be equal to the proper number of bytes appropriate for the chosen format Otherwise, the Internal byte pOinter will not,be aligned properly. The single precision format requires 4 bytes and double preciSion format requires 8 bytes. , FUNCTIONAL DESCRIPTION Major functional units of the 8232 are shown In the from this Internal 17·bit bus when required. Also con- block diagram. The 8232 employs a microprogram con- nected to this bus are the Constant ROM and Working trolled stack oriented architecture with 17·bit wide data Registers. The ROM provides the required constants to paths. , perform the mathematical operations while the Working Registers provide storage for the intermediate values The Arithmetic Unit receives one of its operands from the Operand Stack. This stack-is an eight word by 17-blt during command executio~. two port memory with last in-first out (LIFO) attributes. Communication between the external world and the The second operand to the Arithmetic Unit is supplied 8232 takes place on eight bidirectional input/output by the internal H·bit bus. In addition to supplying the lines, DBO through DB7 (Data Bus). These signals are second operand, this bidirectional, bus also carries the gated to the internal 8·bit bus through appropriate inter· results from the output of the Arithmetic Unit when face and buffer circuitry. Multiplexing facilities exist for required. Writing Into -the Operand Stack takes place bidirectional communication between the internal eight 6-112 AFN-Ql263C , ,inter 8232 and 1ibit buses. The Status Register and Command Operand Entry Register are also located on the S-bit bus. The 8232 commands operate on the operands located at The 8232 operations are controlled by the microprogram the TOS aAd NOS. Results are returned to the stack at contained in the Control ROM. The Program Counter NOS and then popped to TOS. The operands required for supplies the microprogram addresses and can be par- the 8232 are one of two formats - single preCision tially loaded from the Command Register. Associated floating-point (4 bytes) or double preCision floating- with the Program Counter is the Subroutine Stack where point (8 bytes). The result of an operation has the same return addresses are held during subroutine calls in the format as the operands. In other words, operations microprogram. The Microinstruction Register holds the using single precision quantities always result in a current microinstruction being executed. The register single precision result, while operations involving facilitates pipelined microprogram execution. - The double preCision quantities will result in double Instruction Decode logic generates various internal con- preCision result. trol signals needed for the 8232 operation. Operands are always entered into the stack least signifi- The Interface Control logic receives several external in- cant byte first and most significant byte last. The follow- puts and provides handshake related outputs to facili- ing procedure must be followed to enter operands into tate interfacing the 8232 to microprocessors. the stack: ' 1. The lower significant operand byte is established on Command Format the DBO-DB7 lines. The operation of the 8232 is controlled from the host 2. A LOW is established on the Ao input to specify that processor by issuing instructions called commands. data is to be entered into the stack. The command format is shown below. 3. The CS input is made LOW. Whenever the WR and RD inputs are HIGH, the READY output will follow the CS OP CODE input. Thus, READY output will become LOW. I I 4. After appropriate set up time (see timing diagrams), the WR input is made LOW. The command consists of 8 bits; the least significant 7 5. Sometime after this event, READY will return HIGH to bits specify·the operation to be performed as detailed In indicate that the write operation has been acknowl- Table 1. The most significant bit is the Service Request edged. Enable bit. This bit must be a 1 if SVREQ is to go HIGH 6. Any time after the READY output goes HIGH, the WR at the end of executing a command. input can be made HIGH. The DBO-DB7, Ao and CS The commands fall into three categories: single pre- inputs can change after appropriate hold time re- cision arithmetic, double precision arithmetic and data quirements are satisfied (see timing diagrams). manipulation. There are four arithmetic operations that The above procedure must be repeated until all bytes of can be performed with single precision (32-bit) or double the operand are pushed into the stack. It should be precision (64-bit) floating-point numbers: add, subtract, noted that for single precision operands 4 bytes should multiply and divide. These operations require two oper- be pushed and 8 bytes must be pushed fQr double pre- ands. The 8232 assumes that these operands are cision. Not pushing all the bytes of a quantity will result located in the internal stack as Top of Stack (TOS) and in byte pOinter misalignment. Next on Stack (NOS). Th~ result will always be returned to the previous NOS which becomes the new TOS. The 8232 stack can accommodate four single precision Results from an operation are of the same preciSion and quantities or two double precision quantities. Pushing format as the operands. The results will be rounded to more quantities than the capacity of the stack will result preserve the accuracy. The actual data formats and in loss of data which is usual with any LIFO stack. rounding procedures are described in a later section. In The stack can be visualized as shown below: addition to the arithmetic operations, the 8232 imple- ments eight data manipulating operations. These include changing the sign of a double or single TOS- A4~ A3~ A2 I A1 precision operand located in TOS, exchanging single NOS-- B4~B31B21 B1 precision operands located at TOS and NOS, as well as I I I pushing and popping single or double preCision I I I operands. See also the secti .... i"'l on status register and _32---_ operand formats. The execution times of the commands are all data dependent. Table 3 shows one exampl~ of each com- mand execution time. :~::I: :: : I : I ~ I :: ~.~------~-------- 6-113 AFN'()1263C inter, 8232 Table 2. 8232 Command Set Single Precision Instructions Stack Contents2 Instruction Description Hex 1 Status Flags Code After Execution Affected 4 A B C D SADD Add A and B 01 R C D U S,Z,U,V SSUB Subtract A from B 02 R C D U S,Z,U,V SMUL Multiply A by B 03 R C D U S,Z,U,V SDIV Divide B by A. If A exponent = 0, D 04 R C U S,Z, U, V, D then R= B. CHSS Change sign of AS 05 R B C D S,Z PTOS Push stacks 06 A* A B C S,Z POPS Pop stack 07 B C D A S,Z XCHS Exchange 08 B A C D S,Z Double Precision Instructions Stack Contents3 Instruction Description Hex 1 Status Flags Code After Execution A B Affected 4 DADD Add A and B 29 R U S,Z,U,V DSUB Subtract A from B 2A R U S,Z, U, V DMUL Multiply A by B 2B R U S,Z,U,V DDIV Divide B by A. If A = 0, 2C R S,Z,U,V,D U then R= B. CHSD Change sign of AS 2D R B S,Z PTOD Push stacks 2E A* A S,Z POPD Pop stack 2F B A S,Z CLR CLR status 00 A B Noles: 1. In the hex code column. SVREQ bit is a O. 2 The stack Inilially IS composed of four 32·blt numbers (A, B, C, D). A is equivalent to Top Of Slack (TOS) and B IS Next on Stack (NOS) Upon com· plellon of a command the stack is composed of: the result (R); undefined (U), or the IOlllal conlents (A,B,C, or D) 3 The stack Initially Is composed oi two 64·blt numbers (A, B) A IS equivalent to Top Of Stack (TOS) and B is Next On Stack (NOS) Upon completion of a command the slack IS composed of Ihe result (R); undefined (U), or the initial contents (A, B) 4 Any sta!us bIt(s) not affected are, set to 0 Nomenclature' Sign (S); Zero (2), Exponent Underflow (U), Exponent Overflow (V); Divide Exception (D) S. If the exponent field of A IS zero, R or A' will be zero. 6-114 AFN'()1263C 8232 Table 3. Execution Times Command TOS NOS Result Clock Periods SADD 3F800QOQ 3F800000 40000000 58 SSUB 3F800000 3F800000 00000000 56 SMUL 40400000 3FCOOOOO 40900000 198 SDIV 3F800000 - 40000000 3 FOOOOOO 228 CHSS 3F800000 - BF800000 10 PTOS 3F800000 - - 16 POPS 3F800000 - - 14 XCHS 3F800000 40000000 - 26 CHSD 3Fi=00000 00000000 - BFFOOOOO 00000000 24 PTOD 3FFOOOOO 00000000 - - 40 POPD 3FFOOOOO 00000000 - - 26 CLR 3FFOOOOO 00000000 - - 4 DADO 3FFOOOOO OAOOOOOO 3FFOOOOO 00000000 3FFOOOOO OAOOOOOO 578 DSUB 3FFOOOOO AOOOOOOO 3FFOOOOO 00000000 3FFOOOOO AOOOOOOO 578 DMUL BFF8000000000000 3FF80000 00000000 C0020000 00000000 1748 DDIV BFF8000000000000 3FF80000 00000000 BFFOOOOO 00000000 4560 Note: TOS, NOS and result are in hexadecimal; clock period is In decimal. Command Initiation 4. Sometime after this, READY will return HIGH, indio cating that the data is available on the DBO-DB7 After properly positioning the required operands in the lines. This data will remain on the DBO-DB7 lines as stack, a command may be issued. The procedure for long as the RD input remains LOW. initiating a command execution is the same as that described above for operand entry, except that the Ao 5. Any time after READY goes HIGH, the RD input can input is HIGH. return HIGH to complete the transaction. An attempt to issue a new command while the current 6. The CS and Ao inputs can change after appropriate command execution is in progress is allowed. Under hold time requirements are satisfied (see timing dia- these circumstances, the READY output will not go gram). HIGH until the current command execution is com- 7. Repeat this procedure until all bytes appropriate tor pleted. !he precision of the result are popped out. Reading of the 'stack does not alter its data; it only ad· justs the 'byte pointer. Note data must be removed in Removing the Results even byte mu'ltipies to avoid a byte pointer misalign· Result from an operation will be available at the TOS. ment. If more data is popped than the capacity of the Results can be transferred from the stack to the data stack, the interrial byte pointer will wrap around and bus by reading the stack. older data will be read again, consistent with the LIFO stack. When the stack is read for results, the most significant byte is available first and the least significant byte last. Readjng Status R~gister A result is always of the same precision as the operands The 8232 status register can be read without any regard that produced it. Thus, when the result is taken from the to whether a command is in progress or not. The only stack, the total number of bytes popped out should be implication that has to be considered is the effect this appropriate with the precisi6n - single precision might have on the END and ERROR outputs discussed results are 4 bytes and double precision results are 8 in the signal descriptions. . bytes. The following procedure must be used for read- ing the result from the stack: . The fOllo'wing procedu're must be followed to accom- plish status register reading: . 1. A LOW is established on the Ao input. 1., Estaplish HIGH on the Ao input. 2. The CS input is made LOW. When WR and RD inputs 2. Establish I-0W on the CS input. Whenever WR and are both HIGH, the READY output follows the CS RD inputs are HIGH, READY will follow the CS input. input, thus READY will be LOW. Thus, READY will go LOW. 3. After appropriate set up time (see timing diagrams), 3. After appropriate set up time (see timing diagram), the RD input is made LOW. ' RD is made LOW. 6-115 AFN-01263C inter '8232 4. Sometime after the HIGH to LOW transition of RD, Bit 7 Busy. When 1, this bit indicates the 8232 is in the READY will become HIGH, indicating that status reg· process of ex,",cuting a command. It will become ister contents are available on the DBO-DB7 lines. zero after the command execution is complete. These lines will contain this Informati'on as long as All other status register bits are valid when the Busy bit RD is LOW. is zero. 5. The RD input can be returned HIGH any time after READY goes HIGH. 6. The Ao input and CS input can change after sa,tisfying Data Formats appropriate hold time requirements (see timing The 8232 ha~dles floating·point quantities in two differ· diagram). ent formats - single precision and double precision. These formats are the same as those used by Intel In other products and those proposed by the IEEE Sub- Status Register committee on floating point arithmetic. The 8232 contains an 8-bit status register with the The single precision quantities are 32 bits long, as following format: shown below: DIVIDE EXPONENT EXPONENT rlMPLlEDBIT SIGN ZERO BUSY RESERVED EXCEPTiON UNDERFLOW OVERFLOW RESERVED S Z D U V I M 31 30 23 22 All the bits are initialized to zero upon reset. Also, executing a CLR (Clear Status) command will result in Bit 31: all zero status register bits. A zero in bit 7 indicates that the 8232 Is not busy and a new command may be S = Sign of the mantissa. One represents negative and 0 initiated. As soon as a new command Is issued, bit 7 represents positive. becomes 1 to indicate the device is busy and remains 1 until the command execution is complete, at wl]lch time Bits 23-30: it will become o. As soon as a new command is isslled, E = These 8 bits represent a biased exponent. The bias status register bits 0-6 are cleared to zero. The status is 27 - 1 127. = ' bits will be set as required during the command Elxecu· tion. Hence, as long as bit 7 Is 1, the remainder of the Bits 0-22: status register bit indications shOuld not ~e reli!jd upon unless the ERROR occurs. The following is a detailed M = 23-bit mantissa. Together with the sign bit, the man- status bit description. tissa represents a signed fraction in sign-magni- tude notation. There is an implied ,1 beyond the Bit 0 Reserved. most si9l'1ificant bit (bit 22) of the mantissa. In other Bit 1 Exponent overflow (V). When 1, this bit indicates words, the mantissa is assumed to be a 24-bit nor- that the result exponent is more positive than malized quantity and the most significant bit, which + 127 (+ 1023). The exponent is "wrapped" into the will always be a 1 due to,normalization, is implied. negative exponent range, skipping the end values. The 8232 restores this implied bit intern~lIy before performing arithmetic, normalizes the resu,lt and Bit 2 Exponent Underflow (U). When 1, tris bit indicates strips the implied bit before returning the results to that the result exponent is more negative than the external data bus. The binary point is between -126( -1022). The exponent is "wrapped" Into the the implieq bit and bit 22 of the mantissa. , positive range by the number of underflow bits, skil>ping -127 (-1023) and + 128 (+ 1024). The qu~ntity N represented by the a!:love notation is Bit 3 Divide E~ception (D). When 1, this bit indicates that an attempt to divide by zero is made. Cleared to zero otherwise. Bit 4 Reserved. ____r r BIAS BINARY POINT Bit 5 Zero (Z). When 1, this bit indicates that the result N =(_1)s 2E -(2 -1) (1.M) 7 returned to TOS after a command is zero. Cleared to zero otherwise. Provided E#O (reserved for 0) or all 1's (illegal). The Bit 6 Sign (S). W!1en 1, this bit indicates that the result approximate decimal range for this format is returned to TOS is negative. Cleared to zero other· ±1.17 x 10-38 to ±3.4Q x 1038 • The format supports 7 wise. significant deCimal digitS. 6-116 AFN-OI263C 8232 A double precision quantity consists of the mantissa Rounding sign bit, an 11·bit biased exponent (E), and a 52·bit man· tissa (M). The bias for double precision quantities is One of the main objectives in choosing the 8232's Intel/ 210 -1. The double precision format is illustrated below. IEEE proposed floating pOint arithmetic was to provide maximum accuracy with no anomalies. This means that . - - - IMPLIED BIT a mathematically unsophisticated user will not be "surprised" by some of the results. It is probably possible for a sophisticated user to obtain reliable I M results from almost any floating point arithmetic. However, in that case there will be an additional burden 63 62 52 51 on the software. The best example of what might be called the 8232's Bit 63: "safety factor" is the inclusion of guard bits for S = Sign of the mantissa. One represents negative and 0 rounding. The absence of guard bits leads to the represents positive. problem demonstrated by the following four·bit multi· plication: Bits 52-62: .1111X2° E =These 11 bits represent a biased exponent. The bias .1000x2 1 is 210 -1 = 1023. .01111000x 21 Bits 0-51: Since the last four bits are lost, the normalized result is: M =52·bit mantissa. Together with the sign bit the man· tissa represents a signed fraction in sign·magni· tude notation. There is an Implied 1 beyond the most significant bit (bit 51) of the mantissa. In other and the identify function is not valid. In the past this words, the mantissa is assumed to be a 53·bit nor· prOblem has been avoided (hopefully) by relying on malized quantity and the most significant bit, which excess precision. will always be a 1 due to normalization, is implied. The 8232 restores this implied bit internally before Instead the 8232 uses a form of rounding known as performing arithmetic, normalizes the result and "round to even." There are other types of rounding strips the implied bit before returning the result to provided for In the proposed IEEE standard, but "round the external data bus. The binary point is between to even," an unbiased rounding scheme, is required. the implied bit and bit 51 of the mantissa. "Round to even" comes into play when a result is The quantity N represented by the above notation is exactly halfway betWeen two floating point numbers. In this case the arithmetic produces the "even" number, r the one whose last mantissa bit is zero. The 8232 uses .-1-.. r BIAS BINARY POINT three additional bits- the Guard bit (G), the Rounding bit (R), and the "Sticky" bit (S)-to do the rounding. N = (_ 1)5 2 E_(2 'O -1) (l.M) These are bits which hold data shifted out (right) of the accumulator. Rounding is carried out by the following Provided E * 0 (reserved for 0) or all 1s (i IIegal). The rules, as shown in the following figure, after the result is approximate decimal range IS ±2.22 x 10- 308 to ± 1.80 normalized. x 10308 . The format supports 16 significant decimal digits. The following are some examples of single precision floating point representations: Bit G R S Rule Binary 0 0 0 No Round Floating 0 0 1 Decimal S E M Point 0 1 0 Round Down 0 0 0 0 0000 OOOOH 0 1 1 1 0 127 0 3F80 OOOOH 1 0 0 Round to Even -1 1 127 0 BF80 OOOOH 1 0 1 255 0 134 .9922 437F OOOOH 1 Round Up 1 0 n 0 128 .5708 4049 OFDBH 1 1 1 6-117 AFN·01263C inter 8232 APPLICATIONS INFORMAT!ON The diagram in Figure 3 represents the minimum con- In a high performance configuration (Figure 4), inter- figuration of an 8232 system. The CPU transfers data to rupts are used in place o,f polling. The interrupts, are and from the 82~2 Floating POint Processor using the generated fot an error condition and to Signal the end of READY line. The 8232 status is checked using polling by execution. Operand transfers are handled by the DMA the CPU. controller. ADDRESS BUS lOR RD Ao CS CPU lOW WR 8232 FLOATING POINT CLOCK ClK PROCESSOR READY READY ::... "'" ~, ...&. .... 7- --.: 'T' ~ SYSTEM DATA BUS r Figure 3. Minimum Configuration Example ~ ADDRESS BUS ) v ~ "OS ~ If J_ ...... 1 if AS-A15 I DECODER CS AO-A7 AEN DE ADDRESS p- LATCH AO-A15 HlDA I HLOA « 8237 DMA CONTROLLER ~ AD:::. A DBT 'r- STS L 8282 r ~ ~ ~ ~ ~ « ~ ~ HOLD HRD ~ ~ ~ 2 2 CLOCK MEMR J r I ~ MEMW V lOR CPU lOW READY ! c fl i i ~ ~ /l WR RD CS AO « mTA INTA IRD i); 82S9A END INTERRUPT 8232 CONTROLLER IRI ERROR FLOATING POINT INT INT PROCESSOR DBO-DB7 DBO-OB7 mT< DBO-DB7 L i>- .,); L .... "'" 7- SYSTEM DATA BUS ""' 7- """ 7- V Figura 4. High Performance Configuration Example 6-118 AFN-01263C 8232 ABSOLUTE MAXIMUM RATINGS· *NOTlCE: Stresses above those listed under "Absolute Storage Temperature .............. -65°Cto +150°C Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ....... O°C to + 70°C device. This is a stress rating only and functional opera- Voo with Respect to Vss ............. -0.5V to + 15.0V tion of the device at these or any other conditions above Vee with Respect to Vss .............. -0.5V to + 7.0V those indicated in the operational sections of this specifi- All Signal Voltages with Respect cation is not implied. Exposure to absolute maximum to Vss ........................... -0.5V to + 7.0V rating conditions for extended periods may affect device Power Dissipation ............................ 2.0W reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C. Vss = OV. Vee = +5V ± 10%. VOD = +12V ±10%) Symbol Parameter Min. Typ. Max. Units Test Conditions V OH Output HIGH Voltage 3.7 V IOH= -2001'A VOL Output LOW Voltage 0.4 V IOL=3.2mA V IH Input HIGH Voltage 2.0 Vee V V IL Input LOW Voltage -0.5 0.8 V IlL Input Load Current ±10 I'A Vss'; VIN .; Vee ioFL Data Bus Leakage ±10 I'A Vss +0.45,;; Your ,;; Vee lee Vee Supply Current 50 95 mA 100 VO D Supply Current 50 95 mA Co Output Capacitance 8 pF CI Input Capacitance 5 pF fe= 1.0MHz, Inputs=OV CIO 1/0 Capacitance 10 pF A.C. CHARACTERISTICS (T A = O°C to 70°C, Vss= OV, Vee = +5V ± 10%, V DD = + 12V± 10%) READ OPERATION 8232 8232·3 , 8232·8 Symbol Parameter Units Min. Max. Min. Max. Min. Max. tAR Ao. es Setup to RD 0 0 0 ns tRA Ao. es Hold from RD 0 0 0 ns t AAy READYI from Ao. eSI Delay (Note 2) 100 100 150 ns tYR READYt to ROt 0 0 0 ns Data 35 tCY 3.5 tCY 35 tCY ns +50 +50 +50 tRRR READY Pulse Width (Note 3) Status 15 tCY 1.5 tCY 15 tCY ns + 50 +50 +50 tRDE Data Bus Enable fro~ RD~ 50 50 50 ns tORY Data Valid to READYt 0 0 0 ns tDF Data Float after ROt 20 100 20 150 20 200 ns 6-119 AFN-01263C 8232 A.C. CHARACTERISTICS (Continued) WRITE- OPERATION , 8232 8232-3 8232-8 Symbol P.rameler Unit. Min. Max. Min. Max. Min. Max. tAW Ao. CS Setup to WR 25 25 25 ns tWA Ao. CS Hold after WFi 30 30 60 ns tAW'I READYI from Ao. CSI Delay (Note 2) 100 100 150 ns tvw READY! to WR! 0 0 0 ns READY Pulse Width tAW tAW tAW ns tRRW +50 +50 +50 tow Data Setup to WA! 100 100 150 ns two Data Hold after WA! 20 20 20 ns OTHER TIMINGS 8232 8232·3 8232-8 Symbol Parameter Unit. Min. Max. Min. Max. Min. Max. tCY Clock Penod 250 2500 320 3300 480 5000 ns t CPH Clock Pulse HIGH Width 100 140 200 ns t CPL Clock Pulse LOW Width 120 lE10 240 ns tEE END p,ulse Width (Note 4) 200 300 400 ns tEAE EACKI to ENOl Delay 150 175 200 ns tAA EACK Pulse Width 50 75 100 ns tSA SVACKI to SVREQI Delay 100 200 300 ns tss SVACK Pulse Width 50 75 100 ns NOTES: , TYPical values are for TA =25"C. nominal supply voltages and nominal processing parameters 2. READY IS pulled low for both command and data operations 3. Minimum values shown assume no previously entered command IS being executed for the data access If a previously entered command IS being executed. READY low pulse width IS the time to complete execution plus the time shown Status may be read at any time without exceeding the lime shown. - 4. END high pulse width IS specified for EACK tied to Vss. Otherwise tEAE applies A.C,. TESTING INPUT, OUTPUT WAVEFORM' A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 37 =X20 i"f DEVICE >TESTPOINTS< 2.o)C UNDER TEST CL "'50 PF 08 0.8 04 - 6-120 AFN-01263C inter 8232 WAVEFORMS READ OPERATION CLOCK READY ,1='D"Y DATA BUS -------~F---- . . . .~ OUTPUT VALID WRITE OPERATION INTERRUPT OPERATION END _ _ A=~~~._ _ EACK '\l-Y SVREQ ' +O}'--------- --------.,.......J! SVACK -------.~c'.s:J.---- X j 6-121 AFN-OI283C 8251A I PROGRAMMABLE COMMUNICATION INTERFACE • Operation Synchronous and Asynchronous • Asynchronous 19.2K Baud Baud Rate-DC to • Synchronous 5-8 Bit Characters; Internal or External Character • Transmitter Full-Duplex, Double-Buffered and Receiver Synchronization; Automatic Sync Insertion • Framing Error Detection-PaEity, Overrun and • Asynchronous 5-8 Bit Characters; Clock Rate-:-1, 16 or 64 Times Baud • ofCompatible with an Extended Range Intel Microprocessors Rate; Break Character Generation; 1, 11J2, or 2 Stop Bits; False Start Bit • 28-Pin DIP Package Detection; Automatic Break Detect • Compatibleand Outputs are TTL All Inputs and Handling • Synchronous Baud Rate-DC to • -Standard Available in EXPRESS Temperature Range 64K Baud -Extended Temperature Range The Intelil!l 8251A is the enhanced version of the industry standard, Intel 8251 Universal Synchronous/ Asynchronous ReceiverITransmitter (USART), designed for data communications with Intel's microprocessor families such as MCS-68, 80, 85, and iAPX-86, 88. The 8251A is used as a peripheral device and is programmed by the CPU to operate using virtually any serial data transmission technique presently in use (including IBM "bi-sync"). The USARTaccepts data characters from the CPU in parallel format and then converts them into a continuous serial data stream for transmission. Simultaneously, it can receive serial data streams and convert them into parallel data characters for the CPU. The USARTwili signal the CPU Vl(henever it can accept a new character for transmission or whenever it has received a character for the CPU. The CPU can read the complete status of the USARTat any time. These include data transmission errors and control signals such as SYNDET, TxEMPTY. The chip is fabricated using N-channel silicon gate technology. 0, 0, 0, On R,D VLt TxRDY GND R,e 0, DTR RD_ 0; RTS WR, 0, DSR cs _ _--' 0, RESET T,e eLK We T,D cs TxEMPTY C/O m CfS SYNDET/BD RTS RxRDY TxRDY RxROV INTERNAL RXc DATA BUS _SYNDET Figure 1. Block Diagram Figure 2. Pin Configuration "INTEL CPRPORATION. 1982 AFN.()1573D 6-122 8251A FEATURES AND ENHANCEMENTS FUNCTIONAL DESCRIPTION The 8251A is an advanced design of the industry standard USART, the Intel® 8251. The 8251A General operates with an extended range of Intel microprocessors and maintains compatibility with The 8251A is a Universal Synchronous/Asynchro- the 8251. Familiarization time is minimal because of nous Receiver/Transmitter designed for a wide compatibility and involves only knowing the addi- range of Intel microcomputers such as 8048, 8080, tional features and enhancements, and reviewing 8085, 8086 and 8088. Like other I/O devices in a the AC and DC specifications of the 8251A. microcomputer system, its functional configuration is programmed by the system's software for maxi- mum flexibility. The 8251A can support most serial The 8251A incorporates all the key features of the data techniques in use, including IBM "bi-sync." 8251 and has the following additional features and enhancements: In a communication environment an interface device must convert parallel format system data into • 8251A has double-buffered data paths with sepa- serial format for transmission and convert incoming rate I/O registers for control, status, Data In, and serial format data into parallel system data for recep- Data Out, which considerably simplifies control tion. The interface device must also delete or insert programming and minimizes CPU overhead. bits or characters that are functionally unique to the • In asynchronous operations, the Receiver detects communication technique. In essence, the interface and handles "break" automatically, relieving the should appear "transparent" to the CPU, a simple CPU of this task. input or output of byte-oriented system data. • A refined Rx initialization prevents the Receiver from starting when in "break" state, preventing unwanted interrupts from a disconnected USART. Data Bus Buffer • At the conclusion of a transmission, TxD line will This 3-state, bidirectional, 8-bit buffer is used to in- always return to the marking state unless SBRK is terface the 8251A to the system Data Bus. Data is programmed. transmitted or received by the buffer upon execution • Tx Enable logic enhancement prevents a Tx Dis- of INput or OUTput instructions of the CPU. Control able command from halting transmission until all words, Command words and Status information are data previously written has been transmitted. The also transferred through the Data Bus Buffer. The logic also prevents the transmitter from turning Command Status, Data-In and Data-Out registers off in the middle of a word. are separate, 8-bit registers communicating with the • When External Sync Detect is programmed, Inter- system bus through the Data Bus Buffer. nal Sync Detect is disabled, and an External Sync Detect status is provided via a flip-flop which This functional block accepts inputs from the system clears itself upon a statUs read. Control bus and generates control signals for overall • Possibility of false sync detect is minimized by device operation., It contains the Control Word Reg- ensuring that if double character sync is program- ister and Command Word Register that store the med, the characters be contiguously detected and various control formats for the device functional also by clearing the Rx register to all ones definition. whenever Enter Hunt command is issued in Sync mode. RESET (Reset) • As long as the 8251A is not selected, the RD and WR do not affect the internal operation of the A "high" on this input forces the 8251A into an "Idle" device. mode. The device will remain at "Idle" until a new set • The 8251A Status can be read at any time but the of control words is written into the 8251A to program status update will be inhibited during status read. its functional definition. Minimum RESET pulse • The 8251A is free from extraneous glitches and width is 6 tCY (clock must be running). has enhanced AC and DC characteristics, provid- ing hi.gher speed and better operating margins. A command reset operation also puts the device into • Synchronous Baud rate from DC to 64K. the "Idle" state. 6-123 AFN·01573D intJ 8251A CLK (Clock) C/O (Control/Data) The ClK input is used to generate internal device This input, in conjunction with the WR and RD in- timing and is normally connected to the Phase 2 puts, informs the 8251A that the word on the Data (TTL) output of the Clock Generator. No external Bus is either a data character, control word or status inputs or outputs are referenced to ClK but the information. frequency of ClK must be greater than 30 times the 1 = CONTROUSTATUS; 0 = DATA. Receiver or Transmitter data bit rates. CS (Chip Select) WR (Write) A "low" on this input selects the 8251A. No reading or A "low" on this input informs the 8251A that the CPU writing will occur l!nless the device is selected. is writing data or control words to the 8251A. When CS is high, the Data Bus is in ttie float state and RD and WR have no effect on the chip. RD (Read) Modem Control A "low" on this input informs the 8251A that the CPU The 8251A has a set of control inputs and outputs is reading data or status information from the 8251 A. that can be used to simplify the interface to almost any modem. The modem control signals are general purpose in nature and can be used for functions other than modem control, if necessary. DSR (Data Set Ready) The DSR input signal is a general-purpose, 1-bit in- verting input port. Its condition can be tested by the CPU using a Status Read operation. The DSR input is normally used to test modem conditions such as Data Set Ready. DTR (Data Terminal Ready) The DTR output signal is a general-purpose, 1-bit inverting output port. It can be set "low" by pro- gramming the appropriate bit in the Command In- struction word. The DTR output signal is normally used for modem conltol such as Data Terminal Ready. RTS (Request to Send) The RTS output signal ,is a general-purpose, 1-bit inverting output port. It can be set "low" by pro- Figure 3. 8251A Block Diagram Showing Data gramming the approRriate bit in the Command In- Bus Buffer and ReadlWrite L9gic struction word. The RfS output signal is normally Functions . used for modem control such as Request to Send. CTS (Clear to Send) CIO RD WR cs A "low" on tHi.s input enables the 8251A to transmit 0 0 1 0 8251A DATA = DATA BUS 0 1 serial data if the Tx Enable bit in the Command byte 0 0 DATA BUS = 8251A DATA 0 0 STATUS = DATA BUS is set to a "one." If either 11 Tx Enable off or CTS off 0 0 DATA BUS= CONTROL condition occurs while the Tx is in operation, the Tx X 0 DATA BUS = 3·STATE will transmit all the data in the USART, written prior X X X DATA BUS= 3·STATE to Tx Disable command before shutting down. 6-124 AFN-01573D inter 8251A Transmitter Buffer The Transm itter Buffer accepts parallel data from the Data Bus Buffer, converts it to a serial bit stream, inserts the appropriate characters or bits (based on the communication technique) and outputs a com- posite serial stream of data on the TxD output pin on the falling edge of TxC. The transmitter will begin transmission upon being enabled if CTS = O. The TxD line will be held in the marking state immedi- ately upon a master Reset or when Tx Enable or CTS is off or the transmitter is empty. Transmitter Control The Transmitter Control manages all activities asso- ciated with the transmission of serial data. It accepts and issues signals both externally and internally to accomplish this function. TxRDY (Transmitter Ready) Figure 4. 8251A Block Diagram Showing Modem This output signals the CPU that the transmitter is and Transmitter Buffer and Control ready to accept a data character. The TxRDY output Functions pin can be used as an interrupt to the system, since it is masked byTxEnable; or, for Polled operation, the CPU can check TxRDY using a Status Read opera- tion. TxRDY is automatically reset by the leading TxC (Transmitter Clock) edge of WR when a data character is loaded from The Transmitter Clock controls the rate at which the the CPU. character is to be transmitted. In the Synchronous transmission mode, the Baud Rate (1x) is equal to Note that when using the Polled operation, the the TxC frequency. In Asynchronous transmission TxRDY status bit is not masked byTxEnable, but will mode, the baud rate is a fraction of the actual TxC only indicate the EmptY/F:ull Status of the Tx Data frequency. A portion of the mode instruction selects Input Register. this factor; it can be 1, 1/16 or 1/64 the TxC. For Example: TxE (Transmitter Empty) If Baud Rate equals 110 Baud, TxC equals 110Hz in the.1 x mode. When the 8251 A has no characters to send, the TxC equals 1.72 kHz in the 16x mode. TxEMPTYoutput will go "high." It resets upon receiv- TxC equals 7.04 kHz in the 64x mode. ing a character from CPU if the transmitter is en- abled. TxEMPTY remains high when the transmitter The falling edge of TxC shifts the serial data out of is disabled. TxEMPTY can be used to indicate the the 8251A. . end of a transmission mode, so that the CPU" knows" when to "turn the line around" in the half-duplex operational mode. Receiver Buffer In the Synchronous mode, a "high" on this output The Receiver accepts serial data, converts this serial indicates that a character has not been loaded and input to parallel format, checks for bits or characters the SYNC character or characters are about to be or that are unique to the communication technique are being transmitted automatically as "fillers." and sends an "assembled" character to the CPU. TxEMPTY does not go low when the SYNC charac- Serial data is input to RxD pin, and is clocked in on ters are being shifted out. the rising edge of RxC. 6-125 AFN-01573D 8251A Receiver Control RxC (Receiver Clock) This functional block manages all receiver-related The Receiver Clock controls the rate at which the activities which consists of the 'following features. character is to be received. In Synchronous Mode, the Baud Rate (lx) is equal to the actual frequencyof The RxD initialization circuit prevents the 8251A RxC. In Asynchronous Mode, the Baud Rate is a from mistaking an unused input line for an active fraction of the actual RxC frequency. A portion of low data line in the "break condition." Before the mode instruction selects this factor: 1, 1(16 or starting to receive serial characters on the RxD 1(64 the RxC. line, a valid "1" must first be detected after a chip For example: master Reset. Once this has been determined, a search for a valid low (Start bit) is enabled. This Baud Rate equals 300 Baud, if feature is only active in the asynchronous mode, RxC equals 300 Hz in the 1x mode; and is only done once for each master Reset. RxC equals 4800 Hz in the 16x mode; RxC equals 19.2 kHz in the 64x mode. The False Start bit detection circuit prevents false starts due to a transient noise spike by first detect- Baud Rate equals 2400 Baud, if ing the falling edge and then strobing the nominal RxC equals 2400 Hz in the 1x mode; center. of the Start bit (RxD = low). RxC equals 38.4 kHz in the 16x mode; RxC equals 153.6 kHz in the 64x mode. Parity error detection sets the corresponding Data is sampled into the 8251A on the rising edge of status bit. RxC. NOTE: In most communications systems, the 8251 A The Framing Error status bit is set if the Stop bit is will be handling both the transmission and reception absent at the end of the data byte (asynchronous operations of a single link. Consequently, the mode). Receive and Transmit Baud Rates will be the same. Both TxC and RxC will require identical frequencies for this operation and can be tied together and con- nected to a single frequency source (Baud Rate Generator) to simplify the interface. RxRDY (Receiver Ready) This output indicates that the 8251A contains a char- acter that is ready to be input to the CPU. RxRDY can be connected to the interrupt structure of the CPU or, for polled operation, the CPU can check the con- dition of RxRDY using a Status Read operation. I RxEnable, when off, holds RxRDY in the Reset Con- dition. For Asynchronous mode, to set RxRDY, the Receiver must be enabled to sense a Start Bit and a complete character must be assembled and trans- ferred to the Data Output Register. For Sync;:h ronous mode, to set Rx,RDY, the Receiver must be enabled and a character must finish assembly and be trans- Jerred to the Data Output Register. Failure to read the received character from the Rx Data Output Register prior to the assembly of the next Rx Data character will set overrun condition error and the previous character will be written over and lost. If the Rx Data is being read by the CPU when the internal transfer is occurring, overrun er- Figure 5. 8251A Block Diagram Showing ror will be set and the old character will be lost. Receiver Buffer and Control Functions 6-126 AFN.()1573D 8251A SYNDET (SYNC Detect! DETAILED OPERATION DESCRIPTION BRKDET Break Detect) This pin is used in Synchronous Mode for SYN- General DET and may be used as either input or output, The complete functional definition of the 8251A is programmable through the Control Word. It is reset programmed by the system's software. A set of con- to putput mode low upon RESET. When used as an trol words must be sent out by the CPU to initialize output (internal Sync mode), the SYNDET pin will go th~ 8251A to support the desired communications' "high" to indicate that the 8251A has located the format. These control words will program the: BAUD SYNC character in the Receive mode. If the 8251A is RATE, CHARACTER LENGTH, NUMBER OF STOP programmed to use double Sync characters (bi- BITS, SYNCHRONOUS or ASYNCHRONOUS OPER- sync), then SYNDETwili go "high" in the middle of ATION, EVEN/ODD/OFF PARITY, etc. In the the last bit of the second Sync character. SYNDET is Synchronous Mode, options are also provided to automatically reset upon a Status Read operation. select either internal or external character synchronization. When used as an input (external SYNC detect mode), a positive going signal will cause the 8251A to start Once programmed, the 8251A is ready to perform Its assembling data characters on the rising edge of the communication functions. The TxRDY output is next RxC. Once in SYNC, the "high" input Signal can raised "high" to Signal the CPU that the 8251A is be removed. When External SYNC Detect is pro- ready to receive a data character from the CPU. This grammed, Internal SYNC Detect is disabled. output (TxRDY) is reset automatically when the CPU writes a character into the 8251 A. On the other hand, BREAK (Async Mode Only) the 8251A receives serial data from the MODEM or I/O device. Upon receiving an entire character, the This output will go high whenever the receiver RxRDYoutput is raised "high" to signal the CPU that remains low through two consecutive stop bit se- the 8251 A has a complete character ready for the quences (including the start bits, data bits, and CPU to fetch. RxRDY is reset automatically upon the parity bits). Break Detect may also be read as a CPU data read operation. Status bit. It is reset only upon a master chip Reset or Rx Data returning to a "one" state. The 8251A cannot begin transmission until the Tx Enable (Transmitter Enable) bit is set in the Com- mand Instruction and it has received a ClearTo Send (CTS) input. The TxD output will be held in the mark- ing state upon Reset. \ ADDRESS BUS \ Ao c/o = 1 MODE INSTRUCTION \ \ CONTROL BUS DATA BUS I/O A I/O W! RESET InC "\ cin - 1 c/o ~ 1 SYNC CHARACTER 1 1--------1 SYNC CHARACTER 2 } SYNC MODE ONLY· c/o = , 1 COMMAND INSTRUCTION c/o = 0 DATA CID es RD WR RESET elK cio = 1 COMMAND INSTRUCTION D7-DO 8251A cio - 0 T DATA 1---------1 cio = 1 COMMAND 1f\ISTRUCT10N *THE SECOND SYNC CHARACTER IS SKIPPED IF MOD~ INSTRUCTION HAS PRO- GRAMMED THE 8251A TO SINGLE CHARACTER SYNC MODE BOTH SYNC CHARACTERS ARE SKIPPED IF MODE INSTRUCTION HAS PROGRAMMED THE 8251A TO ASYNC MODE Figure 6. 8251A Interface to 8080 Standard System Bus Figure7. Typical Data Block 6-127 AFN·01573D 8251A Programming the 8251A the same package. The format definition can be changed only after a master chip Reset. Forexplana- Prior to starting data transmission or reception, the tion purposes the two formats will be isolated. 8251A must.be loaded with a set of control words generated by the CPU. These control signals define NOTE: When parity is enabled it is not considered the complete functional definition of the 8251A and as one of the data bits for the purpose of program- must immediately follow a Reset operation (internal ming the word length. The actual parity bit received or external). on the Rx Data line cannot be read on the Data Bus. In the case of a programmed character length of less The control words are split into two formats: than 8 bits, the least significant Data Bus bits will hold the data; unused bits are "don't care" when 1. Mode Instruction writing data to the 8251A, and will be "zeros" when 2. Command Instruction reading the data from the 8251 A. Mode Instruction Asynchronous Mode (Transmission) This instruction defines the general operational Whenever a data character is sent by the CPU the characteristics of the 8251A. It must follow a Reset 8251A automatically adds a Start bit (lOW level) fol- operation (internal or external). Once the Mode In- lowed by the data bits (least significant bit first), and struction has been written into the 8251A by the the programmed number of. Stop bits to each char- CPU, SYNC characters or Command Instructions acter. Also, an even or odd Parity bit is inserted prior may be written. to the Stop bit(s), as defined by the Mode Instruc- tion. The character is then transmitted as a serial data stream on the TxD output. The serial data is Command Instruction shifted out on the falling edge ofTxC at a rate equal to 1,1/16, or 1/64 that of the TxC, as defined by the This instruction defines a word that is used to control Mode Instruction. BREAK characters can be contin- the actual operation of the 8251A. uously sent to the TxD if commanded to do so. Both the Mode and Command Instructions must When no data characters have been loaded into the conform to a specified sequence for proper device 8251A theTxD output reamins "high" (marking) un- operation (see Figure 7). The Mode Instruction must less a Break (continuously low) has been be written immediately following a Reset programmed. operation, prior to using the 8251 A for data communication. All control words written into the 8251A after the Mode Instruction will load the Command Instruc- tion. Command Instructions can be written into the 8251A at any time in the data block during the opera- tion of the 8251A. To return to the Mode Instruction format, the master Reset bit in the Command In- struction word can be set to initiate an internal Reset operation which automatically p.laces the 8251A back into the Mode Instruction format. Command Instructions must follow the Mode Instructions or L-_ _ _ _ _ _ ~AR~~~iL~ABLOE~ DISABLE Sync characters. L-_ _ _ _ _~ EVEN PARITY GENERATION/CHECK 1 = EVEN 0 - ODD Mode Instruction Definition The 8251A can be used for either Asynchronous or Synchronous data communication. To understand (ONLY AFFECTS Tx, Rx NEVER REQUIRES MORE how the Mode Instruction defines the functional THAN ONE STOP BIT) operation of the 8251A, the designer can best view the device. as two separate components, one Figure 8. Mode Instruction Format. Asynchronous and the other Synchronous, sharing Asynchronous Mode 6-128 AFN·01573D inter 8251A Asynchronous Mode (Receive) Synchronous Mode (Transmission) The RxD line is normally high. A falling edge on this The TxD output is continuously high until the CPU line triggers the beginning of a START bit. The sends its first character to the 8251Awhich usually is validity of this START bit is checked by again strob- a SYNC character. When the CTS line goes low, the ing this bit at its nominal center (16X or 64X mode first character is serially transmitted out. All charac- only). If a low is detected again, it is a valid START bit, ters are shifted out on the falling edge ofTxC. Data is and the bit,counter will start counting. The bit coun- shifted out at the same rate as the TxC. ter thus locates the center of the data bits, the parity bit (if it exists) and the stop bits. If parity error oc- Once transmission has started, the data stream at curs, the parity error flag is set. Data and parity bits the TxD output must continue at the TxC rate. If the are sampled on the RxD pin with the rising edge of CPU does not provide the 8251 A with a data charac- RxC. If a low level is detected as the STOP bit, the ter before the 8251A Transmitter Buffers become Framing Error flag will be set. The STOP bit signals empty, the SYNC characters (or character if in single the end of a character. Note that the receiver re- SYNC character mode) will be automatically in- quires only one stop bit, regardless of the number of serted in the TxD data stream. In this case, the stop bits programmed. This character is then loaded TxEMPTY pin is raised high to signal that the 8251A into the parallel I/O buffer of the 8251A. The RxRDY is empty and SYNC characters are being sent out. pin is raised to signal the CPU that a character is TxEMPTY does not go low when the SYNC is being ready to be fetched. If a previous character has not shifted out (see figure below). The TxEMPTY pin is been fetched by the CPU, the present character internally reset by a data character being written replaces it in the I/O buffer, and the OVERRUN Error into the 8251 A. flag is raised (thus the previous character is lost). All AUTOMA TlCALL Y INSERTED BY USAAT of the error Hags can be reset by an Error Reset I \ Instruction. The occurrence of any of these errors will not affect the operation of the 8251A. TxD I DATA I DATA I SYNC 1 I SYNC 21 DATA I - - - -- TxEMPTY _ _ _-(./ "\\\\\\\ \.__ _ _I CHARACTER FALLS UPON CPU WRITING A TO THE USART Do 01---- Ox GENERATED BY 8251A '\ NOMINAL CENTER OF LAST BIT srt;! errs L Synchronous Mode (Receive) DOES NOT APPEAR RECEIVER INPUT DO D1 ----Ox ON THE DATA BUS In this mode, character synchronization can be inter- tt t t nally or externally achieved. If the SYNC mode has IL.._S..:..TBA_,~_T ST6;i Brrs L been programmed, ENTER HUNT command should ----- RxD -lG,--_D_AT-jA B\-'T_S__'__ _--' be included in the first command instruction word PROGRAMMED written. Data on the RxD pin is then sampled on CHARACTER LENGTH the rising edge of RxC. The content of the Rx buffer TRANSMISSION FORMAT is compared at every bit boundary with the first CPU BYTE (58 BITS/CHAR) SYNC character until a match occurs. If the 8251A DATA C~+ACTER has been programmed for two SYNC characters, the subsequent received character is also compared; ASSEMBLED SERIAL DATA OUTPUT (TxO) when both SYNC characters have been detected, OAT A CHARACTER ' - - _ - - ' - -_ _........._ _ _~..:....:..__'__B'""TS sloD . the USARTends the HUNT mode and is in character synchronization. The SYNDET pin is then set high, RECEIVE FORMAT and is reset automatically by a STATUS READ. If parity is programmed, SYNDETwili not be set until SEAIAL DATA INPUT (RxD) the middle of the parity bit instead of the middle of DA_TA_C~H4ARI_AC-TE-R-~---'--~4~$I=J ' - - _ - - ' - -_ _ the last data bit. CPU BYTE (58 BITS/CHAR)' In the -external SYNC mode, synchronization is DATACH;~ACTER achieved by applying a high level on the SYNDET pin, thus forcing the 8251A out of the HUNT mode. ·NOTE ~F CHARACTER LENGTH IS DEFINED AS 5, 6 OR 7 BITS THE UNUSED BITS ARE SET TO 'ZERO" The high level can be removed after one RXc cycle. An ENTER HUNT command has no effect in the Figure 9. Asynchronous Mode asynchronous mo~e of operation. 6-129 AFN'{)1573D 8251A Parity error and overrun error are both checked in the same way as in the Asynchronous Rx mode. Parity is checked when not in Hunt, regardless of whether the Receiver is enabled or not. CPU BYTES (5 8 BITS/CHAR) .-----~I~I------~ DATA CHARACTERS ASSEMBLED~ERIA~ DATA OUTPUT (hD) 06 05 CH~~.-AC_T_ER_S_--, , \>7 0, 0, 0, 0, Do SYNC SYNC I I I I I" I" I ° I I scs ESD EP PEN 0 CHAR 1 CHAR 2 DATA L __ CHARACTER LENGTH RECEIVE fORMAT -~+~ 0 1 I 1--:-- -_ott 0 1 t-~- 1 SERIAL DATA INPUT (RxD) 5 6 7 8 DATA CHARACTERS BITS BITS BITS BITS CPU BYTES (5 8 BITS/CHAR) PARITY ENABLE (1 - ENABLf) .------IIIf-----, DATA CHARACTERS L.-_ _--II ~;- - - - ' . I' (0"- DISABLE) , EvEN PARITY GENERATION/CHECK 1" EVEN o ~ ODD EXTERNAL SYNC DETECT 1 = SYNDET IS AN INPUT 0= SYI\JDET IS AN OUTPUT Figure 11. Data Format, Synchronous Mode I SINGLE CHARACTER SYNC 1 = SINGLE SYNC CHARACTER 0" DOUBU; SYNC CHARACTER COMMAND INSTRUCTION DEFINITION NOTE IN EXTERNAL SYNC MODE, PROGRAMMING DOUBLE CHARACTER SYNC WILL AFFECT ONL Y THE Tx Once the functional definition of the 8251 A has been programmed by the· Mode Instruction and the sync characters are loaded (if in Sync Mode) then the device is ready to be used for data communication. Figure 10. Mode Instruction Format, The Command Instruction controls the actual opera- Synchronous Mode tion of the selected format. Functions such as: Enable Transmit/Receive, Error Reset and Modem Controls are provided by the Command Instruction. The CPU can command the receiver to enter the HUNT mode if synchronization IS lost. This will also Once the Mode Instruction has been written into the set all the used character bits in tht;l buffer to a 8251A and Sync characters inserted, if necessary, "one," thus preventing a possible false SYNDET then all further "control writes" (C/D = 1) will load a caused by data that happens to be in the Rx Buffer at Command Instruction. A Reset Operation (internal ENTER HUNT time. Note that the SYNDET F/F is or external) will return the 8251A to the Mode In- reset at each Status Read, regardless of whether struction format. internal or external SYNC has been programmed. This does not cause the 8251A to return to the HUNT Note: Internal Reset on Power-up mode. When in SYNC mode, but not in HUNT, Sync Detection is still functional, but only occurs at the When power is first applied, the 8251 A may come up "known" word boundaries. Thus, if one Status Read in the Mode, Sync character or Command format. To indicates SYNDET and a second Status Read also guarantee that the device is in the Command In- indicates SYNDET, then the programmed SYNDET struction format before the Reset command is is- characters have been received since the previous sued, it is safest to execute the worst-case Status Read. (If double character sync has been initialization sequence (sync mode with two ,sync programmed, then both sync characters have been charaCters). Loading three OOHs consecutively into contiguously received to gate a SYNDET indication.) the device with C/O = 1 configures sync operatIOn When external SYNDET mode is selected, internal and writes two dummy OOH sync characfers. An In- Sync Detect is disabled, and the SYNDET F/F may be ternal Reset command (40H) may then be issued to set at any bit boundary. return the device to the "Idle" state. 6-130 AFN-01573D inter 8251A 0, 06 0, 0, 03 0, 0, DO II EH I'R I RTS I ER ISBRKI R,E I DTR I"ENI "I I OE PE l"EMPTyl R,RDY I T,RDY Lr lRAN;MIT ENABlF 1 o ;!ndble d,.abl .. DATA TERMINAL I I'---+----+---t--_...+-l~l__ ~No"l SAME DEFINITIONS AS I/O PINS READY I PARITY ERROR high wdl lorc!! OTR ThePE flag IS set when a panty output to If'rQ error IS oetected It ,$ reset by the EA hit of the Command J H!:C[IVE ENABU I nstruct'{ln P E doE'~ nOT Inhibit op"ratlon of the 82S1A l ' 0 "ndhl~ d'Sdbl!' I OVERRUN ERROR I ~~~~~!~:tRK The OE tidy I~ set whl'JI till' CPU I dOf"lrlotreil(ld(hMdrtP'\)E'foIP I: lorees 1 ~D nOfmdloperatlon low L-..-...-_ the f1e~t one becorl1p~ srewt by the ER ill! ot the Commclnd , Instruction FE dOCSJ1otInh,b,t the operation of t~le 8251 A _I INTERNAL RESET l high returm8251Ato ModelnSlru(!OOn FOrl11M I DATA S[ T READY Ind,r,'te~ II ' ENTER HUNT MODE' enable >parch for Sync Ch~ractt"s I That th" DSR IS <'It d le'" lev!'1 Note 1 TxRDY status bit has rllfferent meanmgs from the • (HAS NO EFFH. T IN A$YNC MODE) TxRDY output pin The former IS not conditioner! Note: Error Reset must be performed whenever RxEnable by CTS and TxEN, the latter IS condltlolled by both and Enter Hunt are programmed. CTS and TxEN Ie TxRDY status bit - DB Buffer Empty Figure 12. Command Instruction Format TxRDY pin out 08 Bufff'r Empty -(CTS 0)- iTxEN 11 STATUS READ DEFINITION Figure 13.,~Status Read Format In data communication systems it is often necessary to examine the "status" of the active device to ascer- tain if errors have occurred or other conditions that APPLICATIONS OF THE 8251A require the processor's attention, The 8251A has facilities that allow the programmer to "read" the status of the device at any time during the func- \ ADDRESS BUS ~ I-'---~~~' tional operation. (Status update is inhibited during [ ~ CONTROL BUS - ] status read.) I I A normal "read" command is issued by the CPU with DATA BUS , ---.l ciiS = 1 to accomplish this function. ~J~;~ I I Some of'the bits in the Status Read Format have ,.----, I identical meanings to external output pins so that R,D ------I E'A TO TTL I-+~ the 8251 A can be used in a completely polled or TxD ~ ______ I CO(~~~)RT I--+---- I' I 82S1A L ____ J I ",,' interrupt-driven environment. TxRDY is an exception. Rxe 00- lXC l I I BAUD RATE GENERATOR I CRT TERMINAL Note that status update can have a maximum delay of 28 clock periods from the actual event affecting Figure 14. Asynchronous Serial Interface to CRT -the status. Terminal, DC-9600 Baud 6-131 AFN·01573D inter 8251A SYNCHRONOUS TEF,MINAl 8251A OR PERIPHERAL 8251A PHONE DEVICE LINE INTER SYNDET 1------1 FAC~ SYNC MODEM Figure 15. Synchronous Interface to Terminal or Peripheral Device TELEPHONE LINE Figure 17. Synchronous Interface to Telephone Lines PHONE ASYNC LINE MODEM INTER FACE 8251A TELEPHONE LINE Figure 16. Asynchronous Interface to Telephone Lines 6-132 AFN'()1573Q 8251A ABSOLUTE MAXIMUM RATINGS* 'NOTlCE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ......... O°C to 70°C device. This is a stress rating only and functional operation Storage Temperature ............... -65°C to +150°C of the device at these or any other conditions above those Voltage On Any Pin indicated in the operational sections of this specification With Respect To Ground ............. -0.5V to + 7V is not implied. Exposure to absolute maximum rating con- Power Dissipation .......... . ... 1 Watt ditions for extended periods may affect device reliability. D.C. CHARACTERISTICS (TA = O°C to 70°C, Vee = 5.0V ±10%, GND = OV)' Symbol Parameter Mill. Max. Unit Test Conditions V IL I nput Low Voltage -0.5 0.8 V ~IH Input High Voltage 2.0 Vee V -- ~- Output Low Voltage 0.45 V IOL = 2.2 mA VOH Output High Voltage 24 V IOL = -400 I-'A -- IOFL Output Float Leakage ±10 I-'A VOUT = Vee TO 0.45V IlL Input Leakage ±10 I-'A VIN = Vee TO 0.45V -=----- -- Icc Power Supply Current 100 mA All Outputs = Hig~ CAPACITANCE (TA = 25°C, Vee = GND = OV) Symbol Parameter· Min. Max. Unit Test Conditions -- C IN Input Capacitance 10 pF Ic = 1MHz Clio I/O Capacitance 20 pF Unmeasured pins returned to GND A.C. CHARACTERISTICS (TA = O°C to 70°C, Vee = 5.0V ±10%, GND = OV) • Bus Parameters (Note 1) . READ CYCLE Symbol Parameter Min. Max. Unit Test Conditions tAR Address Stable Before READ (CS, C/D) 0 ns Note 2 tRA Address Hold Time for READ (CS, C/D) a ns Note 2 tRR READ Pulse Width 250 ns ..- tRO Data Delay from READ 200 ns 3, CL = 150 pF tOF READ to Data Floating 1P 100 ns WRITE CYCLe ,- Symbol Parameter ~ Mil"!. Max. Unit Test Condtions tAW Address Stable Before WRITE .0 ns -- tWA Address Hold Time for WRITE 0 ns - -- WRITE Pulse Width 2qO ns ~. -- tow Data Set-Up Time for WRITE 150 , ns two Data Hold Time for WRITE 20 ns tRY Recovery Time Between WRITES 6 tey Note 4 ~- 6-133 AFN-01573D 8251A A.C. CHARACTERISTICS (Continued) OTHER TIMINGS Symbol Parameter Min. Max. Unit Test Conditions tCY Clock Period 320 1350 ns Notes 5, 6 l,o' Clock High Pulse Width 120 tCy-9O ns Iff Clock Low Pulse Width 90 ns tR, tF Clock Rise and Fall Time 20 ns tDTx TxD Delay from Falling Edge ofTxC 1 I'S fTx Transmitter Input Clock Frequency 1x Baud Rate DC 64 kHz 16x Baud Rate DC 310 kHz 64x Baud Rate DC 615 kHz tTPW Transmitter Input Clock Pulse Width 1x Baud Rate 12 tCY 16x and 64x Baud Rate 1 tCY tTPD Transmitter Input Cloc,k Pulse Delay 1x Baud Rate 15 tCY 16x and 64x Baud Rate 3 tCY fRx Receiver Input Clock Frequency 1x Baud Rate DC 64 kHz 16x Baud Rate DC 310 kHz 64x Baud Rate DC 615 kl-!z tRPW Receiver Input Clock Pulse Width 1x Baud Rate 12 tCY 16x and 64x Baud Rate 1 tCY tRPD Receiver Input Clock Pulse Delay 1x Baud Rate 15 tCY 16x and 64x Baud Rate 3 tCY tTxRDY TxRDY Pin Delay from Center of Last Bit 8 tCY Note 7 tTxRDY CLEAR TxRDY t from Leading Edge of WR 400 ns Note 7 -- tRxRDY RxRDY Pin Delay from Center of Last Bit 26 tCY Note 7 tRxRDY CLEAR RxRDY t from Leading Edge of RD 400 ns Note 7 tiS Internal SYNDET Delay from Rising Edge of RxC 26 tCY Note 7 tES External SYNDET Set-Up Time After Rising Edge of RxC 18 tCY Note 7 tTxEMPTY TxEMPTY Delay from Center of Last Bit 20 tCY Note 7 twc Control Delay from Rising Edge of WRITE (TxEn, DTR, RTS) 8 tCY Note 7 tCR Control to READ Set-Up Time (DSR, CTS) 20 tCY Note 7 'NOTE: 1 For Extended Temperature EXPRESS, use M8251 A electrical parameters 6-134 AFN-01573D inter 8251A A,C. CHARACTERISTICS (Continued) NOTES: 1. AC timings measured VOH = 2.0 VOL = 20, VOL = 0.8, and with load circuit of Figure 1. 2. Chip Select (CS) and Command/Data (C/D) are considered as Addresses 3. Assumes that Address is valid before RDt 4. This recovery time IS for Mode Initialization only. Write Data is allowed only when TxRDY = 1. RecoveryTime between Writes for Asynchronous Mode is 8 tCY and for Synchronous Mode IS 16 tCY' 5 The TxC and RxC frequencies have the following limitations with respect to ClK For 1x Baud Rate, fTx or fRx .;; 1/(30 tCY): For 16x and 64x Baud Rate, fTx or fRx .;;1/(4.5 tCY)' 6. Reset Pulse Width = 6 tCY minimum; System Clock must be running during Reset. 7 Status update can have a maximum delay of 28 clock periods from the event affecting the status TYPICAL ~ OUTPUT DELAY VS. ~ CAPACITANCE (pF) +20 +'0 / ,. /" c ~ ...0 ...~ / 'SPEC " 0 '1 -'0 V -20 '00 / ·50 +50 +100 .) CAPACITANCE (pFl A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT A C TESTING INPUTS ARE DRIVEN AI 24\1 FOf:l A LOGIC 1 AND 045V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE A' 20V FOR A lOGIC 1 CL " 150pF AND 0 BV FOR A LOGIC 0 6-135 AFN-01573D 8251A WAVEFORMS SYSTEM CLOCK INPUT CLOCK ~ TRANSMITTER CLOCK AND DATA =("MOOEf~ ~'TPW, \ •_ ~!16xMODE) --I !='DTX 'DTX....j 1=____________ TxDATA ====x ~ x::= RECEIVER CLOCK AND DATA (Rx BAUD COUNTER STARTS HERE) Rx DATA Rxe (h MODEl Rxe (16 MODE) , tNT SAMPLING PULSE WRITE DATA CYCLE (CPU -> USART) T"ROY _ _ _ _-./ _ _ _ _EOO~N!.T~e~A~R~E~._<=~~~~~--EDO~N!.T~e~A~R~E­ OATA IN lOB) e~ ---------~~--~r_~------ READ DATA CYCLE (CPU ~ USART) RxRDY _ _ _ _~I ~ -------------L DATAO~ID81 _____D~A~T~A~FL~O~A~T___~~~~~~~t=~~~~ em _______~~~------~~L--- 6-136 AFN-()1S73D inter 8251A WAVEFORMS (Continued) WRITE CONTROL OR OUTPUT PORT CYCLE (CPU -4 USART) DfA R'fS INOTE ::1) =-x I: ,we=-! I-'ww-I W; ~ \_1 1DW --- =l two DATA IN 10 B) 1-' 'AW 1----1 'WA CIO Ji 1\ cs ~ 1- 'AW ---i'WA READ CONTROL OR INPUT PORT (CPU +- USART) I~~~'E~ ----~X~___----;~---------- Ad -----------,r- 1_- ---+11: -+I I --rrc----- <~x= IC DEVICE UNDER TEST 045 TEST POINTS 08 08 L A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND a av FOR A LOGIC a CL INCLUDES JIG CAPACITANCE 6·148 AF~745C inter 8253/8253·5 WAVEFORMS WRITE TIMING READ TIMING Act-I. CS_ _-'l"-_ _ _ _ _ _ _-+~--'--- AO_l. CS' _ _ _ _ _ _ _-"I ' - - - - ~T-tAR DATA BUS CLOCK AND GATE TIMING "LAST BYTE OF COUNT BEING WRITTEN 6-149 AFN-00745C ,8254 PROGRAMMABLE INTERVAL TIMER • Compatible with Most Micro- • Three Independent 16·bit Counters processors Including 8080A, 8085A, iAPX 88 and iAPX 86 • Binary or BCD Counting • Handles Inputs from DC to 8 MHz (10 MHz for 8254-2) • Single +5V Supply • Six Programmable Counter Modes • Available in EXP~ESS • Status Read·Back Command -Stal1dard Temperature Range The Intel® 8254 is a counter/timer device designed to solve the common timing control problems in microcom- puter system design, It provides three independent 16-bit counters, each capable of handling clock inputs up to 10 MHz, All modes are software programmable, The 8254 is a superset of the 8253, The 8254 uses HMOS technology and comes in a 24-pin plastic or CERDIP package, eLK 0 °rDo aUTO 0, Vee WR iffi elK 1 cs GATE 1 A, OUT 1 A, A, 0, ClK2 ClK 1 GATE 1 GATE 2 OUT 2 Figure 1. 8254 Block Diagram Figure 2. Pin Configuration 6-150 inter 8254 Table 1. Pin Description Symbol Pin No. Ty~ Name and Function Symbol Pln.No. Type Name and Function 01"00 1·8 110 Data: Bi·directional three state data bus Vcc 24 Power: +5V power supply connection. Iin~s, connected to, system data bus. WR 23 I Write Control: This Input is low durin,g CPU ClKO 9 I Clock 0: Clock input of Counter O. write operatiol')s. OUT 0 10 0 Ou'tput 0: Output of Counter 0, RO 22 I Read Control: This inp~t is low dUring CPU Gate 0: Gate Input of Counter O. read operations. GATE 0 11 I CS 21 I Chip Salect: A low on this Input enables the GNO 12 Ground: Power supply connection. 8254 to respond to R5 and WR signals. R5 and WR are ignored otherwise. AI' Ao 20·19 I Address: Used to select one 6f the three Counters or the Control Word Register for read or wnte operations. Normally con- nected to the system address bus. AI Ao Selects 0 0 Counter 0 0 1 Counter 1 1 0 Counter 2 1 1 Control Word Register ClK2 18 I Clock 2: Clock input of Counter 2. OUT2 17 0 Out 2: Output of Counter 2. GATE 2 16 I Gate 2: Gate Input of Counter 2. ClK 1 15 I Clock 1: Clock input of Counter 1 , GATE 1 14 I Gate 1: Gate input of Counter 1. OUT 1 13 0 Out 1: Output of Counter 1. FUNCTIONAL DESCRIPTION Block Diagram DATA BUS BUFFER General This 3·state, bi·directional, 8·bit buffer is used to inter· face the 8254 to the system bus (see Figure 3). The 8254 is a programmable interval timer/counter de- signed for use with Intel microcomputer systems. It is a general purpose, multi-timing element that can be treated eLK 0 as an array of I/O ports in the system software. The 8254 solves one of the most common problems in any microcomputer system, the generation of accurate time delays under software control. Instead of setting up timing loops in software, the programmer configures the 8254 to match his requirements and programs one of elK 1 the counters for the desired delay. After the desired GATE 1 delay, the 8254 will interrupt the CPU. Software over· OUT 1 head is minimal and variable length delays can easily be accommodated. Some of the other counter/timer functions common to microcomputers which can be implemented with the eLK 2 8254 are: OUT2 • Real time clock • Event counter • Digital one·shot • Programmable rate generator • Square wave generator • Binary rate multiplier • Complex waveform generator Figure 3. Block Diagram Showing Data Bus Buffer and • Complex motor controller ReadiWrite Logic Functions 6-151 AFN·OO217D 8254 READ/WRITE LOGIC The ReadlWrite lpgic accepts inputs frem the system bus and generates centrel signals fer the ether func- tienal blecks .of the 8254. Al and Ao select .one .of the three ceunters .or the Centrel Werd Register te ,be read frem/written inte. A "I.ow" en the RD input tells the 8254 that the CPU is reading .one .of the ceunters. A "I.ow" en the WR input tells the 8254 that the CPU is writing either a Centrel Werd .or an initial ceunt. Beth RD and WR are qualified by CS; RD and WR are ignered unless the 8254 has been selected by helding CS lew. CONTROL WORD REGISTER The Centrel Werd Register (see Figure 4) is selected by the Read/Write legic when 'AloAO= 11. If the CPU then dees a write eperatien te the 8254, the data is stered in the Centrel Werd Register and is interpreted as a Cen· ' trel Werd used te define the eperatien .of the Ceunters. The Centrel Werd Register can .only be written te; status ~ infermatien is available with the Read-Back Cemmand. Figure 5. Internal Block Diagram of a Counter The status register, shewn in the Figure, when latched, centains the current contents .of the Centrel Werd Register and status .of the .output and null ceunt flag. (See detailed explanatien .of the Read·Back cemmand.) The actual ceunter is labelled CE (fer "Ceunting Ele- ment"). It is a 16-bit presettable synchreneus dewn ceunter. OlM and Oll are twe 8·bitlatches. Ol stands fer "Out· put latch"; the subscripts M and l stand fer "Mest sig· nificant byte" and "least significant byte" respectively. Beth are nermally referred te as .one unit and called just OL. These latches nermally "fell .ow" the CE, but if a suitable Ceunter latch Cemmand is sent te the 8254, the latches "latch" the present ceunt until read by the CPU and then return te "fellewing" the CE. One latch at a time is enabled by the ceunter's Centrel legic te drive the internal bus. This is hew the 16-bit Ceunter cem· municates ever the 8-bit internal bus. Note that the CE itself can net be read; whenever yeu read the" ceunt, it is the Ol that is being read. Similarly, there are twe 8-bit registers called CRM and CRl (fer "Ceunt Register"). Beth are nermally referred te as .one unit and called just CR. When a new ceunt is writ- Figure 4. Block Diagram Showing Control Word ten te the Ceunter, the ceunt is stered in the CR and Register and Counter Functions later transferred te the CEo The Centrel legic allews .one register at a time te be leaded frem the internal bus. COUNTER 0, COUNTER 1, COUNnR 2 Beth bytes are transferred te the CE simultaneeusly. CR M and CRl are cleared when the Ceunter is pre· These three functienal blecks are identical in eperatien, grammed. In this way, if the Ceunter has been pre· sq .only a single Ceunter will be described. The internal grammed fer .one byte ceunts (either mest significant bleck diagram .of a single ceunter is shewn in Figure 5. byte .only .or least significant byte .only) the ether byte The Ceunters are fully independent. Each Ceunter may will be zere. Nete that the CE cannet be written inte; .operate in a different Mede. whenever a ceunt is written, it is written intb the CR. The Centrel Werd Register is shewn in the figure; it Is The Centrel legic is alse shewn in the diagram. ClK n, net part .of the Ceunter itself, but its centents determine GATE n, and OUT n are all ceimected te the .outside hew the Ceunter .operates. werld threugh the Centrel Legic. 6-152 AFN·OO217D 8254 8254 SYSTEM INTERFACE OPERATIONAL DESCRIPTION The 8254 is a component of the Intel Microcomputer Sys- tems and interfaces in the same manner as all other pe- General ripherals of the family. It is treated by the systems software as an array of peripheral 1/0 ports; th'ree are counters and After power·up, the state of the 8254 is undefined. The the fourth is a control register for MODE programming. Mode, count value, and output of all Counters' are undefined.' Basically, the select inputs Ao, A1 connect to the Ao, A1 address bus signals of the CPU. The CS can be derived How each Counter operates is determined when it is directly from the address bus using a linear select method. programmed. Each Counter must be programmed Or it can be connected to the output of a decoder, such as before it can be used. Unused counters need not be pro· an Intel 8205 for larger systems. grammed. Programming the 8254 Counters are programmed by writing a Control Word and then an initial count. All Control Words are written into the Control Word Register, which is selected when AloAO= 11. The Con· trol Word itself specifies which Counter is being pro· grammed. By contrast, initial cotlnts are written into the Counters, not the Control Word Register. The A1.Aa inputs are used to select the Counter to be written into. The format of the initial count is determined by the Control Word used. Control Word Format Figure 6. 8254 System lriterface A1,Aa=11 cs=o RD=1 WR=O SC1 I sco I RW1 I RWO I M2 M1 MO I BCD I ,sc - Select Counter: M- MODE: SC1 sca M2 M1 MO 0 0 Select Counter 0 0 0 0 Mode 0 0 1 Select Counter 1 0 0 1 Mode 1 1 0 Select Counter 2 X 1 0 Mode 2 1 1 Read·Back Command X 1 1 Mode 3 (See Read Operations) 1 a 0 Mode 4 RW - ReadlWrite: 1 0 1 Mode 5 RW1 RWO 0 0 Counter Latch Command (see Read Operations) BCD: 0 1 ReadlWrite least significant byte only. Binary Counter 16·bits 1 0 Read/Write most Significant byte only. Binary Coded Decimal (BCD) Counter 1 1 ReadlWnte least slgnificant.byte first, (4 Decades) then most significant byte, NOTE: DON'T CARE BITS (X) SHOULD BE 0 TO INSURE COMPATIBIUTY WITH FUTURE INTEL PRODUCTS. Figure 7. Control Word Format 6-153 AFN·002110 8254 Write Operations qui red. Any programming sequence that follows the conventions above is acceptable. The programming procedure for the 8254 is very flexible. Only two conventions need to be remembered: A new initial count may be written to a Counter at any time without affecting the Counter's programmed Mode 1) For each Counter, the Control Word must be written in any way. Counting will be affected as described in the before the initial count is written. Mode definitions. The new count must follow the pro· 2) The initial count must follow the count format grammed count format. specified in the Control Word (least significant byte only, most significant byte only, or least significant 'If a Counter is programmed to read/write two·byte byte and then most significant byte). counts, the following precaution applies: A program Since the Control Word Register and the three Counters must not transfer control between writing the first and have separate addresses (selected by the A1,Ao inputs), second byte to another routine which also writes into and each Control Word specifies the Counter it applies that same Counter. Otherwise, the Counter will be to (SCO,SC1 bits), no special instruction sequence is reo loaded with an incorrect count. A1 Ao A1 Ao Control Word - Counter 0 1 1 Control Word - Counter 2 1 1 LSB of count - Counter 0 0 0 Control Word - Counter 1 1 1 MSB of count - Counter 0 0 0 Control Word - Counter 0 1 1 Control Word - Counter 1 1 1 LSB of count - Counter 2 1 0 LSB of count - Counter 1 0 1 MSB of count - Counter 2 1 0 MSB of count - Counter 1 0 1 LSB of count - Counter 1 0 1 Control Word - Counter 2 . 1 1 MSB of count - Counter 1 0 1 LSB of count - Counter 2 0 LSB of count - Counter 0 0 0 MSB of count - Counter 2 0 MSB of count - Counter 0 0 0 A1 Ao A1 Ao Control Word - Counter 0 Control Word - Counter 1 1 1 Control Word - Counter 1 Control Word - Counter 0 1 1 Control Word - Counter 2 1 LSB of count - Counter 1 0 1 LSB of count - Counter 2 1 0 Control Word - Counter 2 1 1 LSB of count - Counter 1 0 1 LSB of count - Counter 0 0 0 LSB of count - Counter 0 0 0 MSB of count - Counter 1 0 1 MSB of count - Counter 0 0, 0 LSB of count - Counter 2 1 0 MSB of count - Counter 1 0 1 MSB of count - Counter 0 0 0 MSB of count - Counter 2 1 0 MSB of count - Counter 2 1 0 NOTE: IN ALL FOUR EXAMPLES, ALL COUNTERS ARE PROGRAMMED TO READlWRITE TWO·BYTE COUNTS. THESE ARE ONLY FOUR OF MANY POSSIBLE PROGRAMMING SEQUENCES. Figure 8. A Few Possible Programming Sequences Read Operations second is a simple read operation of the Counter, which is selected with the A1,AO inputs. The only requirement is It is often desirable to read the value of a Counter that 1) the CLK input of the selected Counter must be without disturbing the count in prog'ress. This is easily inhibited by using either the GATE input or external logic; done in the 8254. or 2) the count must first be latched. Otherwise, the count There are three possible methods for reading the Coun- may be in process of changing when it is read, giving an ters. The first is through the Read-Back command. The undefined result. 6-154 AFN-CE);' NULL COUNT~O I' system. [1) ONLY THE COUNTER SPECIFIED BY THE CONTROL WORD WILL HAVE ITS NULL COUNT SET TO 1 NULL COUNT BITS OF OTHER COUNTERS ARE UNAFFECTED . [2) IF THE COUNTER IS PROGRAMMED FOR TWO·BYTE COUNTS (LEAST SIGNIFICANT BYTE THEN MOST SIGNIFICANT BYTE) NULL COUNT 0, GOES TO 1 WHEN THE SECOND BYTE IS WRITTEN IOUTPUTI C~~';!-T I RW1 RWO M2 M1 MO BCD Figure 12. Null Count Operation 0,1 ~ OUT PIN IS 1 o ~ OUT PIN ISO 06 1 = NULL COUNT o ~ COUNT AVAILABLE FOR READING Os-Do COUNTER PROGRAMMED MODE (SEE FIGURE 7) If multiple status latch operations of the counter(s) are performed without reading the status, all but the first Figure 11. Status Byte are ignored; I.e., the status that will be read is the status of the counter at the time the first status read-back com- mand was issued. NULL COUNT bit D6 indicates when the last count writ- ten to the counter register (CR) has been loaded into the Both count and status of the selected counter(s) may be counting element (CE). The exact time this happens de- latched simultaneously by setting both COUNT and pends on the Mode of the counter and is described in STATUS bits 05,04=0. This is functionally the same as the Mode Definitions, but until the count is loaded into issuing two separate read-back commands at once, and the counting element (CE), it can't be read from the the above discussions apply here also. Specifically, if mul- counter. If the count is latched or read before this time, tiple count and/or status read-back commands are issued the count value will not reflect the new count just writ- to the same counter(s) without any intervening reads, all ten. The operation of Null Count is shown in Figure 12. but the first are ignored. This is illustrated in Figure 13. Command Description Result D7 D6 D5 D4 D3 D2 D, Do 1 1 0 0 0 0 1 0 Read back count and status of Count and status latched Counter 0 for Cou nter 0 1 1 1 0 0 1 0 0 Read back status 01, Counter 1 Status latched for Counter 1 1 1 1 0 1 1 0 0 Read back status of Counters 2, 1 Status latched for Counter 2, but not Counter 1 1 1 0 1 1 0 0 0 Read back count of Counter 2 Count latched for Counter 2 1 1 0 0 0 1 0 0 Read back count and status of Count latched for Counter 1, Counter 1 but not status 1 1 1 0 0 0 1 0 Read back status of Counter 1 Command ignored, status alrea~latched for Counter 1 Figure 13. Read-Back Command Example 6-156 AFN-002170 intel" 8254 If both count and status of a counter are latched, the 1) Writing the first byte disables counting. OUT is set first read operation of that counter will return latched low immediately (no clock pulse required) status, regardless of which was latched first. The next 2) Writing the second byte allows the new count to be one or two reads (depending on whether the counter is loaded on the next ClK pulse. programmed for one or two type counts) return latched count. Subsequent reads return unlatched count. This allows the counting sequence to be synchronized by software. Again, OUT does not go high until N + 1 ClK pulses after the new count of N is written. CS RD WR A1 Ao If an initial count is written while GATE= 0, it will still be loaded on the next ClK pulse. When GATE goes high, 0 1 0 0 0 Write into Counter 0 OUT will go high N ClK pulses later; no ClK pulse is 0 1 0 0 1 Write into Counter 1 needed to load the Counter as this has already been done. 0 1 0 1 0 Write into Counter 2 0 1 0 1 1 Write Control Word 0 0 1 0 0 Read from Counter 0 cw=,. LS0'4_ _ _ _ _ _ _ _ _ _ __ 0 0 1 0 1 Read from Counter 1 WRLJU 0 0 1 1 0 Read from Counter 2 eLK 0 0 1 1 1 No·Operation (3·State) GATE - - - - - - - - - - - - - - - - - 1 0 X 1 X 1 X X X X No·Operation (3-State) No·Operation (3·State) OUT ==-' -_______--' Figure 14. Read/Write Operations Summary cw=,. LS8=3,-_ _ _ _ _ _ _ _ _ __ Wl!LJU eLK Mode Definitions The following are defined for use in describing the GATE operation of the 8254. ClK pulse: a rising edge, then a falling edge, in that OUT ==-'. . _______---'r- order, of a Counter's ClK input. trigger: a rising edge of a Counter's GATE input. I gI ~~ I Counter loading: the transfer of a count from the CR to the CE (refer to the" Functional Description") eLK MODE 0: INTERRUPT ON TERMINAL COUNT GATE' - - - - - - - - - - - - - - - - - Mode 0 is typically used for event counting. After the Control Word is written, OUT is initially low, and will reo OUT =::J...________. . .r- main low until the Counter reaches zero. OUT then goes high andremains high until a new count or a new Mode ININININI Igl:~1 o Control Word is written into the Counter. GATE = 1 enables counting; GATE= 0 disables count· NOTE: THE FOLLOWING CONVENTIONS APPLY TO All MODE TIMING DIAGRAMS' ing. GATE has no effect on OUT. 1. COUNTERS ARE PROGRAMMED FOR BINARY (NOT BCD) COUNTING AND FOR ReADING/WRITING LEAST SIGNIFICANT BYTE (LSB) ONLY. After the Control Word and initial count are written to a 2. THE COUNTER IS ALWAYS SELECTED (e5i ALWAYS LOW). 3. CW STANDS FOR "CONTROL WORD"; CW=10 MEANS A CONTROL WORD OF 10, Counter, the initial count will be loaded on the next ClK HEX IS WRITTEN TO THE COUNTER 4. LSB STANDS FOR "LEAST SIGNIFICANT BYTE" OF COUNT. pulse. This ClK pulse does not decrement the count, so S. NUMBERS BELOW DIAGRAMS ARE COUNT VALUES. for an initial count of N, OUT does not go high until N + 1 THE LOWER NUMBER IS JHE LEAST SIGNlrlCANT BYTE THE UPPER NUMBER IS THE MOST SIGNIFICANT BYTE SINCE THE COUNTER ClK pulses after the initial count is written. IS PROGRAMMED TO READ/WRITE LSB ONLY, THE MOST SIGNIFICANT BYTE CANNOT BE READ. (' If a new count is written to the Counter, it will be loaded N STANDS FOR AN UNDEFINED COUNT. VERTICAL LINES SHOW TRANSITIONS BETWEEN COUNT VALUES. on the next ClK pulse and counting will continue trom the new count. If a two·byte count is written, the follow· ing happens: Figure 15. Mode 0 6-157 inter 8254 MODE 1: HARDWARE RETRIGGERABlE ONE·SHOT MODE 2: RATE GENERATOR OUT will be initially high. OUT will go low on the ClK This Mode functions like a divide-by-N counter. It is pulse following a tr'igger to begin the one-shot pulse, typiclaly used to generate a Real Time Clock interrupt. and will remain low until the Cbunter reaches zero. OUT OUT will initially be high. When the initial count has will then go high and remain high until the ClK pulse decremented to 1, OUT goes low for one ClK pulse. OUT after the next trigger. then goes high again, the Counter reloads the initial count and the process is repeated, Mode 2 is periodic; After writing the Control Word and initial count, the the same sequence is repeated indefinitely. For an in- Counter is armed. A trigger results in loading the itial count of N, the sequence repeats every N ClK Counter and setting OUT low on the next ClK pulse, cyc'les. thus starting the one-shot pulse. An initial count of N will result in a one-shot pulse N ClK cycles in duration, GATE = 1 enables counting; GATE = a disables count- 'The one-shot is retriggerable, hence OUT will remain ing. If GATE goes low during an output pulse, OUT is set low for N ClK pulses after any trigger. The one-shot high immediately. A trigger reloads the Counter with the pulse can be repeated without rewriting the same count initial count on the next ClK pulse; OUT goes lew N into the counter. GATE has no effect on OUT. ClK pulses after the trigger. Thus the GATE input can If a new count is written to the Counter during a one- be used to syn9hronize the Counter. shot pulse, the current one-shot is not affected unless After writing a Control Word and initial count, the the Counter is retriggered. In that case, the Counter is Counter will be loaded on the next ClK pulse. OUT goes loaded with the new count and the one-shot pulse con- low N ClK Pulses after the initial count is written, This tinues until the new count expires. allows the Counter to be synchronized by software also. CW=12 lSB=3 CW=14 lSB=3 ~~-------------------- ~~----------------- elK elK GATE ------In---------~n----- GATE ------------------------------ OUT OUT CW=14 LSB=3 ~ ~r---------------- CW=12 lSB=3 ~ ~-------------------- elK elK GATE -------1n----ln---------- GATE LJ =-=.J OUT \ =-.J IL..._ _ _ _ _ _ ---1, OUT INININININI~I~I I~I ~lK elK GATE GATE --n---1n --------In------ OUT =:J U ININININI~I:I~I~I~I~I~I OUT NOTE: A GATE transition should not occur one clock prior to terminal I NI I NI NI NI ~ I ~ I ~ I ~~ I ~~ I N count. Figure 16. Mode 1 Figure 17. Mode 2 6-158 AFN-00217D 8254 Writing a new count while counting does not affect the CW=16 LSBIZI4r-_ _ _ _ _ _ _ _ _ _ _ __ current counting sequence. If a trigger is received after writing a new count but before the end of the current .... LFLj period, the Counter will be loaded with the new count on elK the next ClK pulse and counting will continue from the new count. Otherwise, the new count will be loaded at GATE - - - - - - - - - - - - - - - - - - the end of the current counting cycle. In mode 2, a OUT COUNT of 1 is illegal. CW::16 LS8=5r----_ _ _ _ _ _ _ _ _ _ _ __ .... l J U elK GATE - - - - - - - - - - - - - - - - - - OUT MODE 3: SQUARE WAVE MODE Mode 3 is typically used for Baud rate generation. Mode 3 is similar to Mode 2 except for the duty cycle of OUT. CW=16 LSB=4_ _ _ _ _ _ _ _ _ _ _ _ __ OUT will initially be high. When half the initial count has Wl\~ expired, OUT goes low for the remainder of the count. Mode 3 is periodic; the sequence above is repeated in- elK definitely. An initial count of N results in a square wave with a period of N ClK cycles. GATE GATE = 1 enables counting; GATE = 0 disables coun- OUT ting. If GATE goes low while OUT is low, OUT is set high immediately; no ClK pulse is required. A trigger reloads the Counter with the initial count on the next ClK pulse_ Thus the GATE input can be used to synchronize the NOTE: A GATE transition should not occur one clock prior to terminal count. Counter. After writing a Control Word and initial count, the Figure 18_ Mode 3 Counter will be loaded on the next ClK pulse. This . allows the Counter to be synchronized by software also. Writing a new count while counting does not affect the MODE 4: SOFTWARE TRIGGERED STROBE current counting sequence. If a trigger is received after writing a new count but before the end of the current OUT will be initially high. When the initial count expires, half-cycle of the square wave, the Counter will be loaded OUT will go low for one ClK pulse and then go high with the new count on the next ClK pulse and counting again. The counting sequence is "triggered" by writing will continue from the new count. Otherwise, the new the initial count. count will be loaded at the end of the current half-cycle. GATE= 1 enables counting; GATE=O disables count- Mode 3 is implemented as follows: ing. GATE has no effect on OUT. Even counts: OUT is initially hfgh. The initial count is After writing a Control Word and initial count, the loaded on one ClK pulse and then is decremented by Counter will be loaded on the next ClK pulse. This ClK two on succeeding ClK pulses. When the count expires pulse does not decrement the count, so for an initial OUT changes value and the Counter is reloaded with the count of N, OUT does not strobe low until N + 1 elK initial count. The above process is repeated indefinitely. pulses after the initial count is written. Odd counts: OUT is initially high. The initial count If a new count is written during counting, it will be load- minus one (an even number) is loaded on one ClK pulse ed on the next elK pulse and counting will continue and then is decremented by two on succeeding ClK from the new count. If a two-byte count is written, the pulses. One ClK pulse after the count expires, OUT following happens: goes low and the Counter is reloaded with the initial 1) Writing the first byte has no effect on counting. count minus one. Succeeding ClK pulses decrement the count by two. When the count expires, OUT goes .2) Writing the second byte allows the new count to be nigh again and the Counter is reloaded with the initial loaded on the next elK pulse. count minus one. The above process is repeated in- This allows the sequence to be "retriggered" by, soft- definitely. So for odd counts, OUT will be high for ware. OUT strobes low N + 1 elK pulses after the new (N + 1)12 counts and low for (N - 1)12 counts. count of N is written. 6-159 AFN-00217D 8254 CW=1A LSB=3 CW=18 lSB=3 ~~------------------ WJi L.J'L.jr----'------ elK elK GATE OUT =.=J u o 1 I I I I I 0 0 FF FF FF FE FF FO ew.,. lS8=3;.-_ _ _ _ _ _ _ _ _ _ __ CW=1A L S 8 = 3 _ - -_ _ _ _ _ _ _ _ _ __ ~~ Wi< """LJLJ eLK elK GAle GATE - - - - - - - - -l~ --- ----- -- -- OUT =.=J OUT -----1 i NI NI NI NI I"I"INI"INI"I~I CLK~ OUT ~ u I"I"INI"I"I Figure 19. Mode 4 Figure 20. Mode 5 MODE 5: HARDWARE T,RIGGERED STROBE Signal Low (RETRIGGERABlE) Slalus OrGoing Rising High Modes Low OUT will initially be high. Counting is triggered by a ris- ing edge of GATE. When the initial count has expired, 0 Disables counting -- Enables counting OUT will go low for one ClK pulse and then go high ·again. 1 -- 1) Initiates -- counting After writin9 the Control Word and initial count, the 2) Resets output after next clock counter will not be loaded until the ClK pulse after a trig.ger. This ClK pulse does not decrement the count, 2 1) Disables so for an initial count of N, OUT does not strobe low un· counting Initiates Enables 2) Sets output counting counting til N + 1 ClK pulses after a trigger. Immediately A trigger results in the Counter being loaded with the in- high itial count on the next ClK pulse. The counting se- 3 1) Disables quence is retriggerable. OUT will not strobe low for counting Initiates Enables 2) Sets output counting counting N + 1 ClK pulses after any trigger. GATE has no effect Immediately on OUT. high If a new count is written during counting, the curent 4 Disables -- Enables counting sequence will not be affected. If a trigger oc- counting counting curs after the new 'count is written but before the cur· rent count expires, the Counter will be loaded with the 5 -- Imtlates -- counting new count on the next ClK pulse and counting will con· ' tinue from there. Figure 21. Gate Pin Operations Summary 6-160 AFN-<10217D intel" 8254 GATE The GATE input is always sampled on the rising edge of Min Max Mode CLK. In Modes 0, 2, 3, and 4 the GATE input is level Count Count sensitive, and the logic level is sampled on the rising 0 1 0 edge of CLK. In Modes 1, 2, 3, and 5 the GATE input is 1 1 0 rising·edge sensitive. In these Modes, a rising edge of GATE (trigger) sets an edge·sensitive flip·flop in the 2 2 0 Counter. This flip·flop is then sampled on the next rising 3 2 0 edge of CLK; the flip·flop is reset immediately after it is sampled. In this way, a trigger will be detected no.matter 4 1 0 when it occurs-a high logic level does not have to be 5 1 0 maintained until the next rising edge of CLK. Note that in Modes 2 and 3, the GATE input is both edge· and level· sensitive. NOTE: 0 IS EQUIVALENT TO 216 FOR BINARY COUNTING AND 104 FOR BCD COUNTING. COUNTER New counts are loaded and Counters are decremented Figure 22. Minimum and Maximum Initial Counts on the falling edge of CLK. The largest possible initial count is 0; this is equivalent to 216 for binary counting and 104 for BCD counting. Operation Common to All Modes The Counter does not stop when it reaches zero. In Modes 0, 1, 4, and 5 the Counter "wraps around" to the PROGRAMMING highest count, either FFFF hex for binary counting or When a Control Word is written to a Counter, all Control 9999 for BCD counting, and continues counting. Modes Logic is immediately reset and OUT goes to a known 2 and 3 are periodic; the Counter reloads itself with the initial state; no CLK pulses are required for this. initial count and continues counting from there. 6-161 AFN-00217D 8254 ABSOLUTE MAXIMUM RATINGS* 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ......... O°C to 70'C device. This is a stress rating only and functional opera- Storage Temperature .............. -65°C to + 150'C tion of the device at these or any other conditions above those indicated in the operational sections of this specifi- Voltage on Any Pin with cation is not implied. Exposure to Absolute Maximum Respect to Ground ................. -O.5V to + 7V Rating conditions for extended periods may affect device Power Dissipation .......................... 1 Watt reliability. D.C. CHARACTERISTICS (TA=O'C to 70'C, Vee = 5V± 10%) Symbol Parameter Min. Max. Units Test Conditions V,L Input Low Voltage -0.5 0.8 V V,H Input High Voltage 2.0 Vee+ 0.5V V VOL Output Low Voltage 0.45 V IOL=2.0 mA VOH Output High Voltage 2.4 V IOH=,-400",A I,L Input Load Current ±10 ",A V,N=V ee to OV IOFl Output Float Leakage ±10 ",A Vour= Vee to OV Icc Vee Supply Current 140 mA CAPACITANCE (TA=25'C, Vce=GND=OV) Symbol Parameter Min. Max. Units Test Conditions C'N Input Capacitance 10 pF te= 1 MHz Unmeasured pins CliO I/O Capacitance 20 pF returned to Vss A.C. CHARACTERISTICS (TA=O'C to 70'C, Vee=5V± 10%, GND=OV) Bus Parameters (Note 1) READ CYCLE I 8254 8254-2 c----- Symbol Parameter Min. Max. Min. Max. Unit tAR Address Stable Before RDj, 45 30 ns CS Stable Before RDj, 0 0 ns tSR tRA tRR t-- I Add'~' Hol""m. An" RDf RD Pulse Width 150 0 - - ~----+---- I 95 0 ns ns tRO Data Delay from RDj, 120 85 ns tAD I Data Delay from Address 220 185 ns ---~ tOF RDt to Data Floating 5 90 5 65 ns -- tRY Command Recovery Time 200 165 ns -- Note 1: AC timings measured at VOH =:: 2.0V, VOL::: a BV 6-162 AFN-00217D 8254 A.C. CHARACTERISTICS (Continued) WRITE CYCLE 8254 8254·2 Symbol Parameter Min. Max. Min. Max. Unit tAW Address Stable Before WRL 0 0 ns tsw CS Stable Before WRL 0 0 ns tWA Address Hold Time WRf 0 0 ns tww WR Pulse Width 150 95 ns tow Data Setup Time Before WRf 120 95 ns two Data Hold Time After WRf 0 0 ns tRY Command Recovery Time 200 165 ns CLOCK AND GATE (TA= o·C to 70·C, Vee= 5V± 10%, GND= OV) 8254 8254-2 Symbol Parameter Min. Max. Min. Max. Unit tClK Clock Period 125 DC 100 DC ns tpWH High Pulse Width 60[31 30[31 ns tpWL Low Pulse Width 60[31 50[31 ns tR Clock Rise Time 25 25 ns IF Clock Fall Time 25 25 ns IGW Gate Width High 50 50 ns tGl, Gate Width Low 50 50 ns tGS Gate Setup Time to CLKf 50 40 ns tGH Gate Hold Time After CLKf 50[21 50[21 ns too Output Delay from CLKL 150 - 100 ns tOOG Output Delay from GateL 120 100 ns twc ClK Delay for loading 0 55 0 55 ns tWG Gate Delay for Sampling -5 50 -5 40 ns two OUT Delay from Mode Write 260 .240 ns tCl CLK Set Up for Count Latch -40 45 -40 40 ns Note 2: In Modes 1 and 5 triggers are sampled on each rising clock edge A second trigger within 120 ns (70 ns for'the 8254-2) of the rising clock edge may not be detected . Note 3: low-going glitches that violate tpWH. tpWL may cause errors reqUiring counter reprogramming, 6-163 AFN·0Q217D A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE ~C'~i50PF UNDER TEST A C TESTING INPUTS ARE DRIVEN AT 2 4V FOA A LOGIC 1 AND 0 45V FOA -=- A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 20V FDA A LOGIC l' CL ", 150pF AND 0 BV FOR A LOGIC 0 CL INCLUDES JIG CAPACITANCE 6-164 8254 WAVEFORMS WRITE READ CS DATA B U S - - - IR.COYERY CLOCK AND GATE CLK ----...:........;11"1 GATE OUTPUT 0 two ·LAST BYTE Of COUNT BEING WRITTEN 6-165 AFN-00217D 8255A/8255A·5 PROGRAMMABLE PERIPHERAL INTERFACE • MCS·85™ Compatible 8255A·5 • Direct Bit Set/Reset Capability Easing Control Application Interface • 24 Progr:ammable 110 Pins • Reduces System Package Count • Completely TTL Compatible • Improved DC Driving Capability • Fully Compatible with Intel® Micro· • Available in EXPRESS processor Families -Standard Temperature Range • Improved Timing Characteristics -Extended Temperature Range The Intel@ 8255A is a general purpose programmable I/O device designed for use with Intel@ microprocessors. It has 241/0 pins which may be individually programmed in 2 groups of 12 and used in 3 major modes of operation. In the first mode (MODE 0), each group of 12 I/O pins may be programmed in sets of 4 to be input or output. In MODE 1, the second' mode, each group may be programmed to have 8 lines of input or output. Of the remaining 4 pins, 3 are used for hand- shaking and interrupt control signals. The third mode of operation (MODE 2) is a bidirectional bus mode which uses 8 lines for a bidirectional bus, and 5 lines, borrowing one from the other group, for handshaking. POWER { - - ;·511 SUPPLIES --'" Figure 1. 8255A Block Diagram Figure 2. Pin Configuration ®INTEL CORPORATION. 1982 AFN~00744C 6-166 inter 8255A18255A·5 8255A FUNCTIONAL DESCRIPTION (RD) ReadL A "low" on this input pin enables the 8255A to General send the data or status information to the CPU on the The 82~5A is a programmable peripheral interface (PPI) data bus. In essence, it allows the CPU to "read from" device designed for use in Intel@ microcomputer the 8255A. systems. Its function is that of a general purpose 110 component to interface peripheral equipment to the (WR) microcomputer system bus. The functional configura. Write. A "low" on this input pin enables the CPU to write tion of the 8255A is programmed by the system software data or control words into the 8255A. so that normally no external logic is necessary to inter· face peripheral devices or structures. (Ao and AI) Port Select 0 and Port Select 1. These input Signals, in Data Bus Buffer conjunction with the RD and WR inputs, control the This 3-state bidirectional 8-blt buffer is used to interface selection of one of the three ports or the control word the 8255A to the system data bus. Data is transmitted or registers. They are normally connected to the least received by the buffer upon execution of input or output significant bits of the address bus (Ao and A l ). instructions by the CPU. Control words and status infor- mation are also transferred through the data bus buffer. 8255A BASIC OPERATION Al AO RD WR CS INPUT OPERATION (READ) Read/Write and Control Logic 0 0 0 1 0 PORT A= DATA BUS 0 1 0 1 0 PORT B = DATA BUS The function of this block is to manage all of the internal 1 0 0 1 0 PORT C = DATA BUS and external transfers of both Data and Control or Status OUTPUT OPERATION words. It accepts inputs from the CPU Address and Can· (WRITE) trol busses and in turn, issues commands to both of the 0 0 1 0 0 DATA BUS = PORT A 0 1 1 0 0 DATA BUS = PORT B Control Groups. 1 0 1 0 0 DATA BUS = PORT C 1 1 1 0 0 DATA BUS=CONTROL DISABLE FUNCTION (CS) X X X X 1 DATA BUS = 3-STATE 1 1 0 1 0 ILLEGAL CONDITION Chip Select. A "lOW" on this input pin enables the com· muniction between the 8255A and the CPU. X X 1 1 0 DATA BUS= 3-STATE POWER SUPPLlfS l ~·" _ .. _ GND c; _ _ _ _ ....J Figure 3. 8255A Block Diagram Showing Data Bus Buffer and Read/Write Control Logic Functions 6-167 AFN·OO744C inter 8255AJ8255A·5 (RESEn Ports A, B, and C ' Reset. A "high'" on this input clears the control register The 8255A contains three 8-bit ports (A, B, and C). All and all ports (A, B, C) are set to the input mode. can be configured in a wide variety of functional charac· teristics by the system software but each has its own special features or "personality" to further enhance the Group A and Group B Controls power and flexibility of the 8255A. The functional configuration of each port is program· med by the systems software. In essence, the CPU "out- Port A. One 8-bit data output latch/buffer and one 8-bit put's" a control word to the 8255A. The control word can· data input latch. tains information such as "mode", "bit set", "bit reset", etc., ~hat initializes the functional configuration of the Port B. One 8-bit data input/output latch/buffer and one 8255A. 8·bit data input buffer. Each of the Control blocks (Group A and Group B) accepts Port C. One 8-bit data output latch/buffer and one 8·bit "commands" from the Read/Write Control Logic, receives data input buffer (no latch for input). This port can be "control words" from the internal data bus and issues the divided into two 4·bit ports under the mode control. proper commands to its associated ports. Each 4·bit port contains a 4·bit latch and it can be used Control Group A - Port A and Port C upper (C7-C4) for the control signal outputs and status signal inputs in Control Group B - Port B and Port Clower (C3-CO) conjunction with ports A and B. The Control Word Register can Only be written Into. No Read operation O,f the Control Word Register is allowed. PIN CONFIGURATION POWER SI)PPLl~S { ~'" _~'" PIN NAMES RESET RESET INPUT os CHIP SelECT RD , I READ INPUT WR WRITE INPUT AO,~ PORT ADDRESS PA7·PAO PORT~_ PB7·PBO _ PORT---.!..(BIT) _ PC7-PCO ~~(BIT) Vee +5 VOllS GND 'VOLTS Figure 4. 8225A Block Diagram Showing Group A and Group B Control Functions 6-168 AFN-00744C 8255A18255A·5 8255A OPERATIONAL DESCRIPTION Mode Selection CONTROL WORD There are three basic modes of operation that can be select- ed by the system software: I0,\ 0, 0.\ 04\ 03\ 0,\ 0, \0 I0 Mode 0 - Basic Input/Output L,J Mode 1 - Strobed Input/Output Mode 2 - Bi-Directional Bus When the reset input goes "high" all ports will be set to the input mode (i.e., all 24 lines will be in the high im- / GROUP B \ pedance state). Afterthe reset is removed the 8255A can remain in the input mode with no additional initialization required. During the execution of the system program - PORT C (LOWER) , = INPUT 0= OUTPUT any of the other modes may be selected using a single output instruction. This allows a single 8255A to service a variety of peripheral devices with a simple software - PORTB 1 = INPUT O"'OUTPUT maintenance routine. MODE SELECTION 0= MODE 0 1 =MODE 1 The modes for Port A and Port B can be separately defined, while Port C is divided into two portions as required by the Port A and Port B definitions. All of the output registers, in- cluding the status flip-flops, will be reset whenever the / GROUP A mode is changed. Modes may be combined so that their - PORT C (UPPER) 1"" INPUT functional definition can be "tailored" to almost any I/O 0= OUTPUT structure. For instance; Group B can be programmed in Mode 0 to monitor simple switch closings or display compu- PORTA 1 = INPUT tational results, Group A could be programmed in Mode 1 O=QUTPUT to monitor a keyboard or tape reader on an interrupt-driven MODE SELECTION basis. 00'" MODE 0 01'" MODE 1 lX=MODE2 ADORESS BUS MODE SET FLAG 1 = ACTIVE CONTROL BUS Figure 6. Mode Definition Format MODEO The mode definitions and possible mode combinations may seem confusing at first but after a cur~ory review of the complete device operation a Simple, logical 1/0 ap- proach will surface. The design of the 8255A has taken into account things such as efficient PC board layout, control signal definition vs PC layout and complete functional flexibility to support almost any peripheral device with no external logic. Such design represents the maximum use of the available pins. Single Bit Set/Reset Feature Any of the eight bits of Port C can be Set or Reset using a Figure 5. Basic Mode Definitions single OUTput instruction. This feature reduces software and Bus Interface requirements in Control-based applications. 6-169 AFN-00744C 8255A18255A·5 When Port C is being used as status/control for Port A or B, CONTROL WORD these bits can be set or reset by using the Bit Set/Reset op- eration just as if they were data output ports. Il~l~J~l~l~I~I~I~1 Interrupt Control Functions I I I I X X I DON'T CARE X I Lr ., """" I 1 :;SET 0= RESET When the B255A is programmed to operate In mode 1 or mode 2, control signals are provided that can be used as interrupt request inputs to the CPU. The ·interrupt re- quest signals, generated from port C, can be inhibited or enabled by setting or reselling the associated INTE flip- BIT SELECT flop, using the bit sel/reset function of port C. 01234567 o '101'IOI1]&11Bol This function allows the Programmer to disallow or allow a 0011001181 .-00001111 82 specific I/O device to interrupt the CPU without affecting any other device in the interrupt structure. I NTE flip-flop definition: BIT SET/RESET FLAG 0= ACTIVE I (BIT -SET) -INTE is SET - Interrupt enable (BIT-RESET) - INTE is RESET -Interrupt disable Note: All Mask flip-flops are automatically reset during Figure 7. Bit Set/Reset Format mode selection and device Reset. Operating M,odes Mode 0 Basic Functional Definitions: • Two B-bit ports and two 4-bit ports. • Any port can be input or output. MODE 0 (Basic Input/Output). This functional configura- • Outputs are latched. tion provides simple input and output operations for • Inputs are not latched. each of the three ports. No "handshaking" is required, • 16 different Input/Output configurations are possible data is simply written to or read from a specified port. in this Mode. . tRR 0 ~r '--- 7 ~tIR_ -'HR-I INPUT C-- tAH - ---....:....--tRA~1 CS,Al,AO ---- -------1-( --- 'RO 0 r------'DF . MODE 0 (Basic Input) 'wW ~ r-- ~ 7 J---tow 'w~ x= tAW twA CS,Al,AO OUTPUT I----'-- 'wB---I MODE 0 (Basic Output) 6·170 AF~-OO744C 8255A18255A·5 MODE 0 Port Definition A B GROUPA GROUPB PORTC PORTC 04 03 01 DO PORTA # PORTB (UPPER) (LOWER) 0 0 0 0 OUTPUT OUTPUT 0 OUTPUT OUTPUT 0 0 0 1 OUTPUT OUTPUT 1 OUTPUT INPUT 0 0 1 0 OUTPUT OUTPUT 2 INPUT OUTPUT 0 0 1 1 OUTPUT OUTPUT 3 INPUT INPUT 0 1 0 0 OUTPUT INPUT 4 OUTPUT OUTPUT 0 1 0 "I OUTPUT INPUT 5 OUTPUT INPUT 0 1 1 0 OUTPUT INPUT 6 INPUT OUTPUT 0 1 1 1 OUTPUT INPUT 7 INPUT INPUT 1 0 0 0 INPUT OUTPUT 8 OUTPUT OUTPUT 1 0 0 1 INPUT OUTPUT 9 OUTPUT INPUT 1 0 1 0 INPUT OUTPUT 10 INPUT OUTPUT 1 0 1 1 INPUT OUTPUT 11 INPUT INPUT 1 1 0 0 INPUT INPUT 12 OUTPUT OUTPUT 1 1 0 1 INPUT INPUT 13 OUTPUT INPUT 1 1 1 0 INPUT INPUT 14 INPUT OUTPUT 1 1 1 1 INPUT INPUT 15 INPUT INPUT MODE 0 Configurations CONTROL WORD #0 CONTROL WORD #2 0, D. D. D. 03 O2 0, D. 0, D. D. D. 03 O2 0, D. , 0 0 0 , 10 1 1,101010101010101 1 10 1 I 0 I 1 1 \ 8 , 8 A PA,-PAo A PA,-PAo r8255A: lP~5A] 4 PC-,-pc. 4 °7-0 0 • . c{ 4 °7-0 0 c{ 4 "",-PC. PCl-peO PC3-PCO 8 8 8 PB7-PBo 8 P",-PDo CONTROL WORD #1 CONTROL WORD #3 0, D. D. D. 03 O2 0, D. 0, D. D. D. 03 O2 0, D. 1,10101010101 o I, 1 1,10101010101, 1 , 1 8 8 A PA,-PAo A PA,-PAo ~" , l~5~ 4 °7-0 0 . c{ . I' PC7-PC4 pc,-pc. °7.()O • . c{ . I' PC7 -PC4 } } PC3-PCo 8 8 8 PB7-PBo 8 P",-PDo 6-171 AFN·OO744C 8255A18255A·5 CONTROL WORD #4 CONTROL WORD #8 0, 0, 0, 0, 0, 0,' 0, DO 0, 0, Os 0, 0, 0, 0, DO 1 I 1 0 I I I [ 0 0 1 0 [ 0 [ 0 I l' I 0 [ o [ 1 [ 0 [ o [ 0 [ 0 1 A 8 PA,-PAo A . ) ,8 PA 7 -PA o ~ 8255A , ~8255A: , , °7,0 0 • . C{ , PC-,·PC, PCg-PCo °7-0 0 • c{ , PC 7 ·PC 4 PCl,PCO 8 8 B PB 7 ·PSO B PB 7 ,PBo - CONTROL WORD #5 CONtROL WORD #9 0, 0, Os 0, 0, 0, 0, DO , 0, 0, Os 0, 0, 0, 0, DO l' [ 0 [ 0 [ 0 [ 1 I I 0 0 [ 1 1 l' [ 0 [ 0 [ 1 [ 0 [ o [ 0 [ 1 1 A 8 PA,·pAo A . ) ,8 PA 7,PAn f!s2~5_AJ l8255A: , , D7-DO • c{ , PC 7·PC4 PC 3-PC O °7,0 0 .. . c{ . " ) PC 7 ·PC 4 Pel-PCO 8 8 B PB 7·PBo B PB 7,PBO CONTROL WORD #6 CONTROL WORD #10 0, 0, Os 0, 0, 0, 0, DO 0, 0, Os 0, 0, 0, 0, DO I [ [ I [ [ 1 0 0 0 1 0 [ 1 [ 0 1 1 1 [ 0 [ 0 [ 1 [ 0 [ 0 [ 1 [ 0 1 8 8 A PA 7,PAO A PArPA o r . r8255A~ l8255A 1 . , °1-0 0 I . c{ ) " , PC 7·PC4 PC 3 -PC O 0,-00 .. c{ , PC 7·PC4 PC 3-PC O - 8 ,8 B PBrPBo B • ) P~-PBO CONTROL WORD #7 CONTROL WORD #11 0, 06 0, 0, 0, °, ' 0, DO 0, 0, Os 0, 0, D, 0, DO 1 1 I I I I [ 0 0 0 1 0 [ 1 [ 1 1 l' [ 0 [ 0 [ 1 [ 0 [ 0 [ 1 [ 1 I 8 8 A PA 7,PAn A PA,-PAO [8255Aj , L8255j\; , °7-0 0 c{ , PC 7 ,PC4 PC 3-PC O DrDo c{ , PC 7·PC 4 PC 3 -PC O 8 8 B P~-PBo B PB 7,PBo 6-172 AFN-00744C 8255A18255A·5 CONTROL WORD #12 CONTROL WORD #14 07 06 05 D4 03 02 01 DO I I I I I I I, I I 0 A . I ,8 A 8 8255A . " [8255A] c{ . "• . c{ I • I 8 8 B B CONTROL WORD #13 CONTROL WORD #15 8 8 A PA,·pAo A 8255A [1!2.55A; • 4 c{ 4 . . c{ 4 8 8 B B Operating Modes . Mode 1 Basic Functional Definitions: • Two Groups (Group A and Group B) • Each group contains one B-bit data port and one 4-bit MODE 1 (Strobed Input/Output). This functional can· figuration provides a means for transferring 110 data to control/data port. or from a specified port in conjunction with strobes or • The B·bit data port can be either input or output. "handshaking" signals. In mode 1, port A and Port B use Both inputs and outputs are latched. the lines on port C to generate or accept these "hand· • The 4-bit port is used for control and status of the shaking" signals. B-bit data port. 6-173 AFN-00744C inter 8255A18255A.5 Input Control Signal Definition MODE 1 (PORT AJ STB (Strobe Input). A "low" on this input loads data into the input latch. IBF (Input Buffer Full F/F) A "high" on this output indicates that the data has been loaded into the input latch; in essence, an acknowledgement IBF is set by STB input being low and is reset by the rising edge of the RD input. INTR (Interrupt Request) A "high" on this output can be used to interrupt the CPU when an input device is requesting service. INTR is set by MODE 1 (PORT B) the STB is a "one", IBF is a "one" and INTE is a "one". It is reset by the falling edge of RD. This procedure allows CONTROL WORD an input device to request service from the CPU by simply 0, De 0 5 04 03 02 D, Do strobi ng its data into the port. 1, c>¢¢¢ TEST POINTS <:: 2.0 DEVICE UNDER TEST i c" ~150pF V -0 VEXT* o4S 0.8 08 -=- a A C TESTING INPUTS ARE DRIVEN AT 2 4V FOA A LOGIC 1 AND 45V FOR 'VEXT IS SET AT VARIOUS VOLTAGES DURING TESTING TO GUARANTEE THE A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 SPECIFICATION AND 0 BV FOR A LOGIC 0 6-183 AFN-00744C 8255A18255A·5 WAVEFORMS MODE 0 (BASIC INPUT) . tRR -r --,~ CIR- _tHR_1 INPUT t::=..t AR - - - - - - - tR A ---------:1 CS,Al,AO D7-DO--------+~-'""~ 1,__ tOF~J-- MODE 0 (BASIC OUTPUT) CS, A1, AO OUTPUT 6-184 AFN-DD744C 8255A18255A·5 WAVEFORMS (Continued) MODE 1 (STROBED INPUT) _ tST - - - Y IBF -'''B1) J r7 I~'RIB-I) tSlT INTR 1 / V J I-'PH-I INPUT FROM --- --------------------- . PERIPHERAL I, t,. MODE 1 (STROBED OUTPUT) t AOS -- INTR _twiT OUTPUT 6-185 AFN-Q0744C 8255A18255A·5 WAVEFORMS (Continued) MODE 2 (BiDIRECTIONAL) DATA FROM / , 8080 TO 8255 i //f - - - 7 - I AOB - 1 \ \ \L i.-IWOB-'+-\ I - - - - - - - - ' _l- Yll !\) L INTR----\\ \ /t'ri----+I--r--- :----\~-{---,ST-----r---+-----\ f'" ),- ----~-- IB, _ _ _ ".1-: I ----'1 \ 1; i i I 'L I BUS PERIPHERAL _ _ _ _ _ _ _ _ _ _ l_tADI__ -------.. ------t--- / DATA FROM PERIPHERAL TO 8255 DATA FROM 8255 TO 8080 NOTE: Any sequence where WR occurs before ACK and STB occurs before AD is permissible. (INTR ~ IBF • MASK' STB' RD + OBF • MASK' ACK' WR I WRITE TIMING READ TIMING 00-1. cs:=Jt I ~'---_ AO_ I _ cs=::x'-...,.....________~'_____ ,1- tAW - --; _;twAI"'- DATABUS______--'~i"-i__----x= 1- tow tWD --: RD .1tRDr-oI- ~tDF'" ~--------~~-- DATA BUS HIGH IMPEDANCE , %:a . VALJD :HIGH IMPEDANCE I----t 'ww 6-186 AFN-00744C inter 8256 MULTIFUNCTION UNIVERSAL ASYNCHRONOUS RECEIVER·TRANSMITTER (MUAR"O • Programmable Serial Asynchronous • Two 8·Bit Programmable Parallel I/O Communications Interface for 5·, 6·, 7·, Ports; Port 1 Can Be Programmed for or 8·Bit Characters, 1, 1112, or 2 Stop Port 2 Handshake Controls and Event Bits, and Parity Generation Counter Inputs • On·Board Baud Rate Generator Programmable for 13 Common Baud • Eight-Level Priority Interrupt Controller Rates up to 19.2K Bits/second, or an Programmable for 8085 or iAPX 86, External Baud Clock Maximum of 1M iAPX 88 Systems and for Fully Nested Bit/second Interrupt Capability • Five 8·Bit Programmable Timer/ Counters; Four Can Be Cascaded to • Programmable System Clock to 1 x , Two 16·Bit Timer/Counters 2 x , 3 x , or 5 x 1.024 MHz The Intel® 8256 Multifunction Universal Asynchronous Receiver-Transmitter (MUART) combines five com- \ monly used functions into a single 40-pin device. It is designed to interface to the 8048, 8085A, iAPX 86, and iAPX 88 to perform serial communications, parallel I/O, timing, event counting, and priority interrupt func- tions. All of these functions are fully programmable through nine internal registers. In addition, the five timer/counters and two parallel I/O ports can be accessed directly by the microprocessor. ADO ADO-AD4 AD1 AD2 AD3 AD4 DB5-DB7 DBS DB6 DB7 ALE RO cs WR RO RESET WR cs ALE INTA RESET RxD INT TxD EXTINT INT RxC ClK TxC RxC CTS RxD GND Figure 1. MUART Block Diagram Figure 2. MUART Pin Configuration 6-187 8256 Table 1. Pin Description Symbol Pin No. Type Name and Function Symbol Pin No. Type Name and Function ADO-AD4 1-5 I/O Address/Data: Three·State Address/Data Vee 40 PS Power. + 5V POWER supply. DB5-DB7 6-8 Imes which interface with the CPU lower P17-Pl0 32-39 I/O Parallel I/O Port 1: Each pi n can be pro· 8·blt address/data bus. The 5·bit address grammed as an input or an output to IS latched on the fallmg edge of ALE In I perform general purpose I/O functions 8048 and 8085 mode, ADO-AD3 are used for the CPU under software control. In to select the proper register, while AD1- addition to general I/O, I/O Port 1 can be AD4 are used in 8086 and 8088 mode. programmed to a variety of special The 8·bit bidirectional data bus is either functions for handshake control, written into or read from the chip counter inputs, and special com· depending on the latched CS and RD or munications functions. WIt P27-P20 24-31 110 Parallel I/O Port 2: Each nibble (4 bits) ALE 9 I Address latch Enable: Latches the 1; of this port can be either an input or an address lines on ADO-AD4 and CS on output. Also, this port can be used as a the falling edge. bidirectional 8·bit port using handshake RD 10 I Read Control: When this signal is low, lines In ~ort 1. the previously selected register is TxD 23 0 Transmit Data: This output carries the enabled onto the data bus. serial data to the terminal or modem WR 11 I Write Control: When this signal is low, from the MUART. the value on the data bus is placed into TxC 22 I/O Transmit Clock: If the baud rate Is 0, the previously selected register. this input clocks data out of the trans· RESET 12 I Pulse provided by the CPU to initialize mltter on the falling edge. I! a baud rate the system. The MUART remains "idle" of 1 or 2 is selected, this Input permits until it is reprogrammed by the CPU. the userto provide a 32 x or 64 x clock which is used for the receiver and trans· CS 13 I Chip Select: A low on this signal mitter. If the baud rate is 3-0F16, the enables the MUART. It Is latched with internal transmitter clock Is output. I! the address on the falling edge of ALE, 1V2 stop bits are selected and and RD and WR have no effect unless characters are continuously transmit- es was latched low during the ALE ted, the internal baud rate generator will cycle. be reset at the end of the stop bits and INTA 14 I Interrupt Acknowledge: If the MUART the clock will have a small positive has been enabled to respond to Inter· spike instead of a hal! clock. A hlgh·to· rupts, it puts an RST on the bus for the low transition occurs at the beginning of 8085 or a vector for the 8086. The bit in each bit and a low·to·high transition at the interrupt register is reset when the the.center of each bit. interrupt is placed onto the bus. CTS 21 I Clear to Send: This input enables the INT 15 0 Interrupt: A high Signals the CPU that serial transmitter. I! CTS Is low, any the MUART needs service character in the transmitter buffer will EXTINT 16 I External Interrupt: A high on this pin be sent. A Single negative·going pulse signals that an external device requests causes the transmission of a single service. EXTINT must be held high until previously loaded character out of the INTA or read interrupt occurs. transmitter buffer. I! this pulse occurs when the buffer is empty or during the ClK 17 I System Clock: This input provides an transmission of a character up to 0.5 of accurate timmg source for the MUART the first stop bit, it will be ignored. I! a It must be lx, 2x, 3x, or 5x baUd rate from 1-0F16 is selected, CTS 1.024MHz and is used by the baud rate must be low for at least 1132 of a bit, or it generator and real time clocks. will be ignored. RxC 18 I/O Receive Clock: I! baud rate 0 is selected, this input clocks bits into RxD on the rising edge. I! a baud rate from 1-0F16 is selected, this o~tput will provide a rising edge at the center of each received data bit. This output remains high during start, stop, and parity bits. RxD 19 I Receive Data: Serial data input from the modem or term mal to the MUART. GND 20 PS Ground: Power supply and logic ground reference 6-188 AFN·01498B 8256 FUNCTIONAL DESCRIPTION Command Register 1 The 8256 Multi-Function Universal Asynchronous Receiver-Transmitter (MUART) combines five commonly L1 I LO I 51 I SO ISRKII 81T11sosel FRO I (OR) (OW) used functions onto a single 40-pin device. The MUART performs asynchronous serial communications, parallel I/O, timing, event counting, and interrupt control. FRQ - Timer Frequency Select This bit selects between two frequencies for the five timers. If FRQ = 0, the timer input frequency is 16 kHz Serial Communications (62.5"s), If FRQ= 1, the limer input frequency is 1 kHz (1 ms). The selected clock frequency is shared by all the The serial communications portion of the MUART counter/timers enabled for timing; thus, all timers must contains a full-duplex asynchronous' receiver- run with the same time base. transmitter (UART), A programmable baud rate genera- tor is included on the MUART to permit a variety of 8086 - 8086 Mode Enable operating speeds without external components. The UART can be programmed by the CPU for a variety of This bit selects between 8048/8085 mode and 8086/8088 character sizes, parity generation and detection, error mode. In 8085 mode (8086 = 0), AO to A3 are used to detection, and start/stop bit handling. The receiver address the internal registers, and an RST instruction is checks the start and stop bits in the center of the bit, generated in respohse to the first INTA. In 8086 mode and a break halts the reception of data. The transmitter (8086= 1), A1 to A4 are used to address the internal can send breaks and can be controlled by an external registers, 'and AO is used as an extra chip select (AO enable pin. must equal zero to be enabled). The response to INTA is for 8086 interrupts where the first INTA is ignored, and an interrupt vector (40,6 to 47,6) is placed on the bus in response to the second INTA. Parallel 1/0 The MUART includes 16 bits of general purpose parallel BITI - Interrupt on Bit Change I/O. Eight bits (Port 1) can be individually changed from This bit disables the Timer 2 interrupt and enables an input to output or used for special I/O functions. The interrupt when a low-to-high transition occurs on pin 7 other eight bits (Port 2) can be used as nibbles (4 bits) or of Port 1 (pin 32). as bytes. These eight bits also include a handshaking capability using two pins on Port 1. BRKI - Break-In Detect Enable This bit enables the break-in detect feature. A bre~k-in is detected when pin 6 of Port 1 (pin 33) is low during the Counter/Timers first stop bil of a transmitted character. This could be There are five 8-bit counter/timers on the MUART. The used to detect a break-in condition by connecting the timers can be programmed to use either a 1 kHz or serial transmission line to pin 33. A break-in detect is 16 kHz clock generated from the system clock. Four of OR-ed with break detect in bit 3 of the Status Register. If the 8-bit counter/timers can be cascaded to two 16-bit RxC and TxC are used for the serial bit rates, break-in counteritimers, an'd one of the 8-bit counteritimers can cannot be detected. be reset to its initial value by an external signal. SO, S1 - siop Bit Length S1 SO Stop Bit Length Interrupts o 0 1 o 1.5 An eight-level priority interrupt controller can be configured for fully nested or normal interrupt priority. o 2 0,75 Seven of the eight interrupts service functions on the MUART (counter/timers, UART), and one external inter- If 0.75 stop bits is selected, CfS becomes edge rupt is provided which can be used for a particular sensitive rather than level sensitive. A high-to-Iow tran- function or for chaining interrupt controllers or more sition of CTS immediately initiates the transmission of MUARTs. The MUART will support 8085 and 8086/88 the next character. A high-to-Iow transition will be systems with direct interrupt vectoring, or the MUART Ignored if the transmit buffer is empty, or if it occurs can be polled to determine the cause of the interrupt. before 0.75 of the first stop bit. It will shorten the stop 6-189 AFN-01498B 8256 Table 2. MUART Registers Read Registers Write Registers 8085 Mode: AD3 AD2 AD1 ADO 8086 Mode: AD4 AD3 AD2 AD1 L1 I LO I S1 I SO 18RKII 81TI180861 FROI 0 0 0 0 I L1 I LO I S1 I SO 18RKII 81TI I 80861 FROI Command 1 Command 1 I PEN I EP I C1 I CO I 83 I 82 I 81 I 80 I 0 0 0 1 I PEN I EP I C1 I CO I 83 I 82 I 81 I 80 I Command 2 Command 2 I 0 I RxE I IAE I NIE I 0 IS8RKIT8RKI 0 I 0 0 o I SET I RxE I IAE I NIE I ENO IS8RKIT8R~ RST I Command 3 Command 3- I T351 T241 T5C I CT31 CT21 P2C21 P2C11 P2coI 0 0 1 1 T351 T241 T5C I CT31 CT21 P2C21 P2C11 P2coI Mode Mode I PHI P161 P151 P141 P131 P121 P11 I P10 I 0 0 o I PHI P161 P151 P141 P131 P12 I P11 I P10 I Port 1 Control Port 1 Control 1 L7 I L6 I L5 I L4 I L3 I L2 I L1 I LO 1 0 o 1 I L7 I L6 I L5 1 L4 I L3 I L2 I L1 I LO I Interrupt Enable Set Interrupts 1 07 1 06 1 05 I 04 I 03 I 02 I 01 I 00 I0 o lulul~IUI~I~IL1 ~I Interrupt Address Reset Interrupts 1 07 1 06 I 05 I 04 1 03 I 02 I 01 I 00 I 0 Iwlool~I~loolool~lool Receiver Buller Transmitter Buller I 07 I 06 I 05 I 04 I 03 I 02 1 01 I 00 1 1 o 0 0 I 07 I 06 I 05 I 04 I 03 I 02 I 01 I 00 I Port 1 Port 1 1 07 I 06 I 05 I 04 I 03 1 02 I 01 I 00 I o 0 I 07 I 06 I 05 I D4 I 03 I 02 I 01 I 00 I Port 2 Port 2 07 I 06 I 05 I 04 I 03 I 02 I 01 I 00 I 1 o o I 07 I 06 I 05 I 04 I 03 1 02 1- 01 I 00 I Timer 1 Timer 1 Iwlool~I~loolool~lool ' o I 07 I 06 I 05 I 04 I 03 I 02 I 01 I 00 I Timer 2 Timer 2 Iwlool~I~loolool~ 1001 1 o 0 I 07 I 06 I 05 I 04 I 03 I 02 1 01 I 00 I Timer 3 Timer 3 Iwlool~I~loolool~ 1001 1 o 1 07 I 06 1 05 I 04 I 03 I 02 1 01 I 00 I Timer 4 Timer 4 I 07 I 06 I 05 I 04 I 03 I 02 I 01 r 00 I 1 o I 07 I 06 I 05 I 04 I 03 I 02 I 01 1 00 I TimerS TimerS ,1 liNT I R8F 1T8E I TRE 1 80 I PE I OE I FE I 1 1 I 0 _I RS41 RS3 I RS2 I RS1 I RSO _ITME losc I Status Modification 6-190 AFN-01498B 8256 bit if it occurs after 3", of the stop bit has been sent. If Command Register 3 CTS is high or low or a low·to·high transition occurs, the transmitter remains idle. I SET I RxE \IAE I NIE I ENDlsBR~TBRKI RST I (2R) (2W) LO, L1 - Character Length Command Register 3 is differen\ from the first two L1 LO Character Length registers because it has a bit set/reset capability. o 0 8 Writing a byte with bit 7 high sets any bits which were o 1 7 also high. Writing a byte with bit 7 low resets any bits o 6 which were high. If any bit 0-6 is low, no change occurs 5 to that bit. When Command Register 3 is read, bits 0, 3, and 7 will always be zero. Command Register 2 RST - Reset I PEN I EP I C1 I CO I B3 I B2 I B1 BO If RST is set, the following events occur: (1R) (1W) 1. All bits in the Status Register except bits 4 and 5 are cleared, and bits 4 and 5 are set. BO, ~1, B2, B3 - Ba~d Rate Select 2. The Interrupt Enable, Interrupt Request, and Interrupt B3 B2 B1 BO Baud Rate Sampling Rate Service Registers are cleared. 0 0 0 0 TxC, RxC 1 3. The receiver and transmitter are reset. The transmit· 0 0 0 1 TxC/64 64 ter goes idle (TxD is high), and the receiver enters 0 0 0 TxC/32 32 start bit search mode. 0 0 1 19200 32 4. If Port 2 is programmed for handshake mode, IBF and 0 0 0 9600 64 OBF are reset high. 0 0 4800 64 0 1 0 2400 64 RST does not alter ports, data registers or command registers, but it halts any operation in progress. RST is 0 1 1 1 1200 64 autom~ticallY cleared. 0 0 0 600 64 0 0 1 300 64 TBRK - Transmit Break 0 1 0 200 64 0 1 1 150 64 This causes the transmitter data to be set low, and it 0 0 110 64 stays low until TBRK is Cleared. As long as break is active, data transfer from the Transmitter Buffer to the 0 1 100 64 Transmitter Register will be inhibited. 0 75 64 50 64 SBRK - Single Character Break If the baud rate is 0, then both the transmitter and This causes the transmitter data to be set low for one receiver operate from separate external clocks. If the character including start bit, data bits, parity bit, and baud rate is 1 or 2, then both the transmitter and receiver stop bits. SBRK is automatically cleared when time for divide the TxC by 64 or 32, respectively. the last data bit has passed. It will start after the character in progress completes and will delay the next CO, C1 - System Clock Divider data transfer from the Transmitter Buffer to the Trans· C1 CO Divider Ratio System Clock Frequency mitter Register until TxD returns to an idle (marking) o 0 5 5.120MHz state. If both TBRK and SBRK are set, break will be sent o 1 3 3.072 MHz as long as TBRK is set, but SBRK will be cleared after o 2 2.048 MHz one character time of break. If SBRK is set again, it remains set for another character. The user can send a 1.024MHz definite number of break characters in this manner by clearing TBRK after setting SBRK for the last character EP - Even Parity time. If parity is enabled, then even parity is enabled by a 1 lind odd parity is enabled by a O. END - End of Interrupt If fully nested interrupt mode is selected, this bit resets PEN - Parity Enable the currently served interrupt level in the Interrupt This enables parity detection and generation. The type Service Register. This command must occur at the end of parity is determined by the EP bit. of each interrupt service routine during fully nested AFN-01498B 6-191 inter 8256 interrupt mode. END is automatically cleared when the If test mode is selected and BRG of Port 1 Control Interrupt Service Register (internal) is cleared. See the Register is set, then the output from the internal baud NIE description for more information on nested rate generator is placed on pin 4 pf Port 1 (pin 35). interrupt servicing. END is ignored if nested interrupts are not enabled. CT2, CT3 - Counter/Timer Mode If CT2 or CT3 are high, then counterltimer 2 or 3 respec- NIE - Nested Interrupt Enable tively is configured as an event counter on pin 2 or 3 This bit enables fully nested interrupts. In this mode, respectively of Port 1 (pins 37 or 36). The event counter the service routine for a lower priority interrupt can be decrements the count by one on each low-to-high tran- interrupted by a request from a higher priority task. sition of th~ external input. If CT2 or CT3 is low, then the respective counter/timer is configured as a timer and In fully nested interrupt mode, INTA or reading the Inter- the Port 1 pins are used for parallel I/O. rupt Address Register resets the highest priority inter- rupt bit in the Interrupt Register (internal), sets the cor- T5C - Timer 5 Control responding bit in the Interrupt Service Register (internal), and resets INT. If an interrupt of higher If T5C is set, then Timer 5 can be preset and started by priority than the currently served interrupt is requested an external signal. Writing to the Timer 5 Register loads or the END bit is set while another interrupt request is the Timer 5 Save Register and stops the timer. A high-to- pending, the INT line will go high again. If an interrupt low transition on pin 5 of Port 1 (pin 34) loads the timer service routine is interrupted by an interrupt of higher with the saved value and starts the timer. The next high- priority, two or more bits in the Interrupt Service to-low transition on pin 5 retriggers the timer by Register will be set. reloading it with the initial value and continues timing. If NIE is low, interrupt priority is used only when two When the timer reaches zero it issues an interrupt interrupts occur at the same time. INT will be high as request, disables its interrupt level and continues long as the CPU has not responded to all the interrupts counting. A subsequent high-to-Iow transition on pin 5 in the Interrupt Register. resets Timer 5 to its initial value. For another timer interrupt, the Timer 5 interrupt enable bit must be set IAE - Interrupt Acknowledge Enable again. This bit enables an automatic response to INTA. The T35, T24 - Cascade Timers particular response is determined by the 8086 bit in Command Register 1. These two bits cascade Timers 3 and 5 or 2 and 4. Timers 2 and 3 are the lower bytes, while Timers 4 and 5 RxE - Receiver Enable are the upper bytes. If T5C is set, then both Timers 3 and 5 can be preset and started by an external pulse. When a This bit enables the serial receiver. The Receiver Buffer high-to-Iow tranSition occurs, Timer 5 is preset to its and all receiver status information will be disabled saved value, but Timer 3 is always preset to all ones. If except for the break detect status. either CT2 or CT3 is set, then the corresponding timer pair is a 16-bit event counter. SET - Bit Set/Reset If this bit is high during a write to Command Register 3, Port 1 Control Register then any bit markeCl by a high will be set. If this bit is low, then any bit marked by a high will be cleared. [PHI P161 P151 P141 P131 P121 P11 I P10 1 (4R) (4W) Mode Register Each bit in the Port 1 Control Register configures the I 1 T351 T241 T5C CT31 CT21p2C21 p 2C11p2CoI direction of the corresponding pin. If the bit is high, the pin is an output, and if it is low the pin is an input. Every (3R) (3W) Port 1 pin has another function which is controlled by other registers. If that special function is disabled, the P2C2, P2C1, P2CO - Port 2 Control pin functions as a general I/O pin as specified by this Direction register. The special functions for each pin are des- P2C2 P2C1 P2CO Mode Upper Lower cribed below. 0 0 0 nibble input input 0 0 nibble input output Port 10, 11 - Handshake Control 0 0 nibble output input If byte handshake control is enabled for Port 2 by the 0 1 1 nibble output output Mode Register, then Port 10 is programmed as STB/ACK 0 0 byte handshake input handshake control input and Port 11 is programmed as 0 1 byte handshake output IBF/OBF handshake control output. 0 DO NOT USE If byte handshake mode is enabled for output on Port 2, test OBF indicates that a character has been loaded into the 6-192 AFN-01498B 8256 Port 2 output buffer. When an external device reads the Port 1 data, it acknowledges this operation by driving ACK low. OBF is set low by writing to Port 2 and is reset high by ACK. 1 07 1 06 1 05 04 03 D2 I 01 00 (SR) (SW) If byte handshake mode is enabled for input on Port 2, Writing to Port 1 sets the data in the Port 1 output latch. STB is an input to the MUART to latch the data into Port Writing to an input pin does not affect the pin, but the 2. After the data is latched, IBF is driven low. IBF is reset data is stored and will be output if the direction of the high when Port 2 is read. pin is changed later. If the pin is used as a control signal, the pin will not be affected, but the data is Port 12, 13 - Counter 2,3 Input stored. Reading Port 1 transfers the data in Port 1 onto If Timer 2 or Timer 3 is programmed as an event counter the data bus. Reading an output pin or a control pin puts by the mode register, then Port 12 or 13 is the counter the data in the output latch (not the control signal) onto input for Event Counter 2 or 3, respectively. the data bus. Port 14 - Baud Rate Generator Output Clock If test mode is enabled by the Mode Register and Command Register 2 baud rate select is greater than 2, Interrupt Enable Register then Port 14 is an output from the internal baud rate generator. L7 1 L6 1 L5 L4 L3 L2 1 L1 LO "I (5R) (5W = enable, Port 15 - Timer 5 Trigger 6W = disable) If T5C is set in the Mode Register enabling are· Interrupts are enabled by writing to the Set Interrupts triggerable timer, then Port 15 is the input which starts Register (5W). Interrupts are disabled by writing to the and reloads Timer 5. Reset Interrupts Register (6W). Each bit set by the Set Interrupts Register (5W) will enable that level interrupt, Port 16 - Break-in Detect and each bit set in the Reset Interrupts Register (6W) will disable that level interrupt. The user can determine If break-in detect is enabled by BRKI in Command which interrupts are enabled by reading the Interrupt Register 1, then this input is used to sense a break-in. If Enable Register (5R). Port 16 is low while the serial transmitter is sending the last stop bit, then a break-in condition is signaled. Priority Source Highest LO Timer 1 Port 17 - Port Interrupt Source L1 Timer 2 or Port Interrupt If BITI in Command Register 1 is set, then a low-to-high L2 External Interrupt (EXTINT) transition on Port 17 generates an interrupt request on L3 Timer 3 or Timers 3 & 5 priority level 1. L4 Receiver Interrupt L5 Transmitter Interrupt Receiver and Transmitter Buffer L6 Timer 4 or Timers 2 & 4 Lowest L7 Timer 5 or I 07 I 06 I 05 I 04 I 03 I 02 I 01 00 Port 2 Handshaking (7R) (7W) Both the transmitter and the receiver in the MUART are fully double buffered. The Receiver Buffer full flag is cleared when the character is read. If the character is . Port 2 not read before the next character's first stop bit, then an overrun error is generated. Bytes written to the 1 07 I 06 1 05 I 04 1 03 I 02 1 01 00 Transmitter Buffer are held until the Transmitter (9R) (9W) Register (internal) is empty. If the Transmitter Register is empty, the byte is transferred immediately and the . Writing to Port 2 sets the data in the Port 2 output latch. Transmitter Buffer empty flag is set. If a serial character Writing to an input pin does not affect the pin, but it length is less than 8 bits, then the unused most signifi- does store the data in the latch. Reading Port 2 puts the cant bits are set to zero on a read and are ignored on a input pins onto the bus or the contents of the output write. latch for output pins. 6-193 AFN~01498B inter 8256 Timer 1-5 BD - Break Detect, Break-in Detect I 07 I 06 I 05 I 04 I 03 I 02 I 01 I DO If BRKI in Command Register 1 is set to enable break-in detect, then BO indicates a break-in condition. If Port 16 (OA'6-0E'6 R) (OA w OE'6 W) is low during the transmission of the last stop bit, then Reading Timer N puts the contents of the timer onto the BO will be set near the end of the last stop bit. Break-in data bus. If the counter changes while RO is low, the detect can only be detected if the internal baud rate value on the data bus will not change. If two timers are generator is used. Break-in remains set until the Status cascaded, reading the high order byte will cause the low Register is read or the chip is reset. order byte to be latched. Reading the low order byte will If BRKI is low, then BO indicates a break condition on unlatch them both. Writing to either timer or de- the receiver. BO is set when the first stop bit 01 a break cascading them also clears the latch condition. Writing is sampled and will remain set until the Status Register to a timer sets the starting value of that timer.,if two is read or the chip is reset. The receiver will remain idle timers are cascaded, writing to the high .order byte until the next high-to-Iow transition on RxO.·A detected presets the low order byte to all ones. Loading only the break inhibits the loading of the Receiver Buffer. high order byte with a value of X leads to a count of X' 256 + 255. Timers count down continuously. If the TRE - Transmitter Register Empty interrupt is enabled, it occurs when the counter changes from 1 to O. When the interrupt is set in the Interrupt This status bit indicates that the Transmitter Register is Register, interrupts are disabled in the Interrupt Mask busy. It is set by a chip reset and when the last stop bit ~egister. has left the transmitter. It is reset when a character is loaded into the Transmitter Register. If CTS is low, the Transmitter Register will be loaded during the trans- Status Register mission of the start bit. If CTS is high at the end of a character, TRE will remain high and no character will be liNT IReF ITeE ITRE I eo I PE I OE I FE loaded into the Transmitter Register until CTS goes low. (OF'6 R) If the transmitter was inactive before a character is loaded into the Transmitter Buffer, the Transmitter FE - Framing Error, Transmission Mode Register will be empty temporarily while the buffer is If transmi~sion mode is disabled (in Modification Regis- full. However, the data in the buffer will be transferred to ter), then FE indicates a framing error. A framing error is the transmitter register immediately and TRE will be detected during the first stop bit. The error is reset by cleared while TBE is set. reading the Status Register or by a chip reset. A framing error does not inhibit the loading of the Receiver Buffer. TBE - Transmitter Buffer Empty If RxD remains low, the receiver will assemble the next TBE indicates the Transmitter Buffer is empty and is character. The false stop bit is treated as the next start ready to accept a character. TBE is set by a chip reset or bit, and no high-to-Iow transition on RxO is required to the transfer of data to the Transmitter Register and is synchronize the receiver. cleared when a character is written to the transmitter If transmission mode is enabled, then this bit is used to buffer. suggest the transmitter was sending. FE will be high if RBF - Receiver Buffer Full the transmitter is active during the reception of the parity bit (or last data bit for no-parity). It is reset if the RBF is set when the Receiver Buffer has been loaded transmitter is not active or by a chip reset. The bit is with a new character during the sampling of the first intended to imply that the received character is from the stop bit. RBF is cleared by reading the receiver buffer or transmitter in half-duplex systems. by a chip reset. OE - Overrun Error INT - Interrupt Pending If the user does not read the character in the Receiver The INT bit reflects the state of the INT pin (pin 15) and Buffer before. the next character is received and indicates an interrupt is pending in the Interrupt transferred to this register, then the OE bit is set. The Register. It is reset by INTA or by reading the Interrupt OE flag is set during the reception of the first stop bit Address Register if only one interrupt is pending and by and is cleared when the Status Register is read or when a chip reset. a chip reset occurs. FE, OE, PE, RBF, and break detect all generate a level 4 interrupt when the receiver samples the first stop bit. PE - Parity Error . TRE, TBE, and break-in detect generate a level 5 inter- A parity error is set during the first stop bit and is reset rupt. TRE generates an interrupt when TBE is set and by reading the Status Register or by a chip reset. the Transmitter Register finishes transmitting. The 6-194 inter 8256 break-In detect Interrupt is issued at the same time as = of the bit (sample time 16)_ The receiver sample time TBE orTRE. can be modified, only if the receiver is not clocked by RxC. Modification Register Sample Time I 0 I RS41 RS31 RS21 RS11 RSO I TMEI Dsel (OF W) RS4 0 RS3 RS2 RS1 RSO=O RSO=1 2 1 16 0 1 0 4 3 DSC - Disable Start Bit Check 0 0 1 6 5 DSC disables the receiver's start bit check. In this state 0 0 0 8 7 the receiver will not be reset if RxD is not low at the 0 0 1, 1 10 9 center of the start bit. This function is disabled by a chip 0 0 1 0 12 11 reset. 0 0 0 14 13 0 0 0 0 16 15 TME - Transmission Mode Enable 18 17 TME enables transmission mode and disables framing 1 0 20 19 error detection. A chip reset disables transmission 0 22 21 mode and enables framing error detection. 1 0 0 24 23 - 0 26 25 RSO, RS1, RS2, RS3, RS4 - Receiver Sample Time 0 1 0 28 27 The number in RSn alters when the receiver samples 0 0 1 30 29 RxD. A chip reset sets this value to 0 whtch Is the center 0 0 0 32 31 6-195 AFN-01498B 8271/8271·6 PROGRAMMABLE FLOPPY DISK CONTROLLER • IBM 3740 Soft Sectored Format Compatible • Internal CRC Generation and Checking • Programmable Record Lengths • Programmable Step Rate, Settle·Time, Head Load Time, Head Unload Index Count • Multi·Sector Capability • Overhead Maintain Dual Drives with Minimum Software • Fully MCS·aO™ and MCS·8S™ Compatible Expandable to 4 Drives • Single + SV Supply • Automatic Verification Read/Write Head Positioning and • 40·Pin Package The Intel@ 8271 Programmable Floppy Disk Controller (FDC) is an LSI component designed to interface one to 4 floppy disk drives to an 8-bit microcomputer system. Its powerful control functions minimize both hardware and software overhead normally associated with floppy disk controllers. FAUL T RESET/OPO Vee WR DATA SELECT 0 LOW CUARENT NSYNC 4 MHl eLK LOAD HEAD SERIAL INTERfACE AfSET DIRECTION CONTROLLER READY 1 SEEK/STEP 1'>----- RODATA SELECT 1 WR ENBLE '--,==----- - - - - - - DATA WINDOW DACK INDEX ORO DAC"I<: PLO/SS ORO WR PROTECT INT Ali READY 0 WR TRKO READY 0 INT COUNT/OPI RTADVT DBO WR DATA TRACK 6 COUNTfopr DB. FAULT INDEX DB2 UNSEP DATA WRP~R6fECT FAULT DBJ DATA WINDOW ORIVE DB. PLO/SS INTERFACE CONTROLLEA DBS CS SELECTO SELECT 1 DB6 INSYNC WR ENABLE DB' A, LOAD HEAD GND Ao SEEK/STEP DIRECTION INTERNAL lOW CURRENT DATA BUS '--___ ---' - - - FAUll'RESET/OPO CPU INTERFACE DISK INTERFACE Figure 1. Block Diagram Figure 2. Pin Configuration 6-196 inter 8271/8271·6 Table 1. Pin Description (Continued) CPU Interface Description This interface minimizes CPU involvement by supporting Pin a set of high level commands and both OMA and non-OMA Symbol No. Type Name and Function type data transfers and by providing hierarchical status information regarding the result of command execution. PLO/SS 25 I Phase-Locked Oscillator/ Single Shot: This pin is used The CPU utilizes the control interface (see the Block to specify the type of data diagram) to specify the FOC commands and to determine separator used. the result of an executed command. This interface IS supported by five Registers which are addressed by the Write Data 29 0 Write Data: Composite write data. CPU via the A1, AQ, RO . OACK and WR transfer OMA data to the FOC. If a data transfer request (read or write) is not serviced within 31 I'sec, the command is cancelled, a late Figure 3. 8271 Block Diagram Showing CPU OMA status is set, and an interrupt is generated. In OMA Interface Functions mode, an interrupt is generated at the completion of the data block transfer. When configured to transfer data in non·OMA mode, the CPU must pass data to the FOC in response to the non· StatuI Regllter OMA data requests indicated by the status word. The Reflects the state of the FOC. data is passed to and from the chip by asserting the OACK and the RO or WR signals. Chip select should be inactive (HIGH). Al Ao 07 06 05 04 03 02 01 Do I0 I0I I I I I I0 I0 I II1I . ,~--~,.".- , ~ INTERRUPT REQUEST , .. RESULT REGISTER FULL REGISTeRS 1 = PARAMETER REGISTER FULL ' - - - - - - - - - - - 1 = COMMAND REGISTER FULL RESULT REG PARAMETER REG L - - - - - - - - - - _ l = COMMAND BUSY RESET Reset Register p..----LiNsE'PiiATA p..--~-~ Allows the 8271 to be reset by the program. Reset must be active for 11 or more chip clocks. """ F"C-:-'"h.._ REA5Yo Ro fiEADY'1 TRACK 0 WR INT (Interrupt Line) OOiJiiif/OPI INDEX ~ Another element of the control interface is t~e Interrupt A, A, ,""-,,,,"-___-FAULT line (INT!. This line is used to signal the CPU fhat an FOC operation has been completed. It remains active until the result register is read. DMA Operation DISK INTERfACE RESET/OPO CPU INTERFACE The 8271 can transfer data in either OMA or non OMA mode. The data transfer rate of !l floppy disk drive is high enough (one byte every 32 LJsec) to justify OMA transfer. Figure 4. 8271 Block Diagram Showing Disk Interface In OMA mode the elements of the OMA interface are: Functions· 6-198 AFN-00223B inter 8271/8271·6 Disk Drive Interface Data Separation The 8271 disk drive interface supports the high level command structure described in the Command Descrip- The 8271 needs only a data window to separate the data tion section. The 8271 maintains the location of bad tracks from the composite read data as well as to detect missing and the current track location for two drives. However, clocks in the Address Marks. with minor software support, this interface can support The window generation logic may be implemented using four drives by expanding the two drive select lines (select either a single-shot separator or a phase-locked oscillator. 0, select 1) with the addition of minimal support hardware. The FDC Disk Drive Interface has the following major Single-Shot Separator functions. READ FUNCTIONS The single-shot separator approach IS the lowest cost solution. Utilize the user supplied data window to obtain the clock and data patterns from the unseparated read data. The FDC samples the value of Data Window on the leading Establish byte synchronization. edge of Unseparated Data and determines whether the delay from the previous pulse was a half or full bit-ceil Compute and verify the 10 and data field CRCs. (high input = full bit-cell, low input = half bit-ceill. WRITE FUNCTIONS PLO/SS should be tied to Ground Encode composite write data. Compute the I'D and data field CACs and append them to Insync Pin thei r respective fields. This pin gives an indication of whether the 8271 is CONTROL FUNCTIONS synchronized with the serial data stream during read Generate the programmed step rate, head load time, head operations. This pin can be used with a phase·locked settling time, head unload delay, and monitor drive oscillator for soft and hard locking. functions. ' FOUND SYNC & 10 MARK READ 10 FIELD BUT TRACK OR SECTOR FOUND SYNC & 10 MARK DATA ~ INCORRECT 10 FIELD CORRECT / SEPARATOR IN SYNC DATA WINDOW UNSEPARATED DATA 7 FOUND SYNC & DATA MARK I FOUND SYNC & DATA MARK WRifE5ATA NOT AN ID MARK RE~O DATA SECTOR :: WRITE ENABLE :.- SEEK/STEP :--... DIRECTION CQUNT/OPI ...... LOAD HEAD INDEX DUAL 8271 FLOPPY FDC TRACK 0 DISK ... SHEeT 0 DRIVE ::- SELECT 1 .. :.- lOW CURRENT WR Iff PRoTecT WRITE FAULT ... WRITE FAULT RESET/CPO REAOVO READY 1 NOTE INPUTS TO CHIP MAY REQUIRE RECEIVERS (AT LEAST PULL UP/DOWN PAIRS) Figure 5. 8271 Disk Drive Interface 6-199 AFN'()()223B inter 8271/8271·6 DATA WINDOW R ETR IGG ERAB LE UNSEPARATED SINGLE-SHOT 8271 FDC DATA 2.85,us WINDOW' I }LO/SS 'FOR MINI-FLOPPY DATA WINDOW = 5.7,usec Figure 6. Single·Shot Data Separator Block Diagram UNSEPARATED DATA tDs>100ns_ Figure 7. Single-Shot Data Window Timing Phase-Locked Oscillator, Separator The FDC samples the value of Data Window on the leading Insync may be used to provide soft and hard locking edge of Unseparated Data and determines whether the control for the phase·locked oscillator. pulse represents a Clock or Data Pulse. PLO/SS should be lied to Vee (+5Vl. L DATA WINDOW UNSEPARATED DATA 1 ·i PLO t I 1 IL _____________________ 0 8271 FDC I ,I l rPLO/SS IN SYNC· +5V 'OPTIONAL Figure 8. PLO Data Separator Block Diagram 6-200 AFN-002238 827118271·6 D UNSEPARATED DATA "DATA WINDOW MAY BE 180 0 OUT OF PHASE IN PLO DATA SEPARATION MODE. Figure 9. PLO Data Window Timing Disk Drive Control Interface Write Enable The disk drive control interface performs the high level The Write Enable controls the read and write functions of a and programmable flexible disk drive operations. It flexible disk drive. When Write Enable is a logical one, it custom tailors many varied drive performance parameters enables the drive write electronics to pass current through such as the step rate. settling time, head load time, and the Read/Write head. When Write Enable is a logical zero, head unload Index count. The following IS the descrip110n the drive Write circuitry is disabled and the Read/Write of the control interface. head detects the magnetic flux transitions recorded on a diskette. The write current turn-on is as follows. WRITEDAT~ _ _ _ _ ~ --I .l-tWE f-twE-1 WRITE ENABLE 1 1.....____ Figure 10. Write Enable Timing 6-201 AFN·OO223B 8271/8271-6 Seek Control The Direction pin is a control level indicating the direction Seek Control is accomplished by Seek/Step, Direction, in which the R/W head is stepped. A logic high level on this and Count pins and can be implemented two ways to line moves the head toward the spindle (step-in). A logic pro\(ide maximum flexibility in the subsystem design. One low level moves the head away from the spindle (step-out). instance is when the programmed step rate is not equal to zero. In this case, the 8271 uses the Seek/Step and Direction pins (the Seek/Step pin becomes a Step pin). Programmable Step timing parameters are shown. Another instance is when the programmable step rate is equal to zero, in which case the 8271 holds the seek line high until the appropriate number of user-supplied step pulses have been counted on the count input pin. DIRECTION SEEK/ST~ _ _ _ _ _ _... n-i..____ ~ ts --i ~ ~tps tps=tos =tso =1 OI'S STANDARD: 1ms~ts~255ms MINI· FLOPPY: 2ms ~ ts ~ 510m~ Figure 11. Seek Timing SEEK/STEP k--tsc ~ Ltcs COUNT l-tc ~I ... I tpc ------IfL---- LAST COUNT tos=tso =tcs= lOI'S tsc:;" 11's tpc;' 20l's tc:;" 1ms Figure 12. Seek/Step/Count Timing AFN-00223B 6-202 8271/8271·6 Head Seek Settling Time The 8271 allows the head settling time to be programmed from 0 to 255ms, in increments of 1 ms. The head settling time is defined as the interval of time from completion of the last step to the time when reading or writing on the diskette is possible (R/W Enable), The R/W head is assumed loaded. SEEK OR LAST STEP I~ r LAST STEP COMPLETE WRITE/READ ENABLE *tsw ____--'1---- r- STANDARD: 0< *tsw<255ms *R/W HEAD IS ASSUMED LOADED. MINI·FLOPPY: 0 <*tsw< 510ms Figure 13. Head Load Settling Timing Load Head When active, load head output pin causes the drive's read/write head to be loaded on the diskette. When the head is initially loaded, there is a programmed delay (0 to 60ms in 4ms increments) prior to any read or write operation. Provision is also made to unload the head following an operation within a programmed number of diskette revolutions. LOAD HEAD _ _ _ _ _ _ _ _ _ _ _... ,..------ - -- 1 EARLIEST WRITE ENABLE OR INTERNAL READ DATA tLw--1 r- I STANDARD:. 0< tLW < 60ms MINI· FLOPPY: 0 < tLW < 120ms Figure 14. Head Load to Read/Write Timing 6-203 AFN·002238 827118271·6 Index The Index input is I:Jsed to determine "Sector not found" status and to initiate format track/read 10 commands and head unload Index and Count operations. U tPI_1 f-- tPI ;;, O.51's Figure 15. Index Timing Track 0 this signal is used to enable compensation for the lower This input pin indi~ates that the diskette is at track O. velocities encountered while recording on the inner During any seek o'peration, the stepping out of the tracks. actuator ceases when the track 0 pin becomes active. Write Protect Select 1, 0 The 8271 will not write to a disk when this input pin is Only one drive may be selected at a time. The active and will interrupt the CPU if a Write attempt is made. I nput/Output pins that must be externally qualified with Operations which check Write Protect are aborted if the Select 0 and Select 1 are: Write Protect line is active. U nseparated Data This sig!1al normally originates from a sensor which Data Window detects the presence or absence of the Write Protect Write Enable hole in the diskette jacket. Seek/Step Count/Optional Input Write Fault and Write Fault Reset Load Head Track 0 The Write Fault input is normally latched by the drive Low Current and indicates any condition which could endanger data Write Protect integrity. The 8271 interrupts the CPU anytime Write Write Fault Fault is detected during an operation and immediately Fault Reset/Optional Output resets the Write Enable, Seek/Step, Direction, and Low Index Current signals. The write fault condition can be cleared I:lY using the write fault reset pin. If the drive being used When a new set of selept bits is specified by a new com- does not support write fault, then this pin should be mand or the FDC finishes the index count before head connected to Vcc through a pull·up resistor. unload, the following pins will be set to the 0 state: Write Enable (35) Ready 1, 0 Seek/Step (36) These two pins indicate the functional status of the disk Direction (37) drives. Whenever an operation is attempted on a drive Load Head (38) which is not ready, an interrupt is generated. The inter- Low Head Current (39) face conti!1ually monitors this input during an operation and if a Not Ready condition occurs, immediately ter- The select pins will be set to the state specified by the minates the operation. Note that the 8271 latches the command or both are set to zero fol!owing the index Not Ready condition and it can only be reset by the exe· count before head unload. cution of a Read Drive Status command. For drives that do not support a ready signal, either one can be derived Low Curr~nt with a one shot and the index pulse, or the ready inputs This output pin IS active whenever the physical track can be grounded and Ready determined through some location of the selected drive is greater than 43. Generally software means. 6-204 AFN'()o223B 827118271·6 PRINCIPLES OF OPERATION The Command Phase As an 8080 peripheral device, the 8271 accepts commands The software writes a command to the command register. from the CPU, executes them and provides a RESULT As a function of the command issued, from zero to five back to the 8080 CPU at the end of command execution. parameters are written to the parameter reg ister. Refer to The communication with the CPU is established by the diagram showing a flow chart of the command phase. activation of CS and RD or WR. The Al, Ao inputs select Note that the flow chart shows that a command may not be the appropriate registers on the chip: issued if the FDC status register indicates that the device is busy. Issuing a command while another command is in progress is illegal. The flow chart also shows a parameter DACK CS A1 Ao RD WR Operation buffer full check. The FDC status indicates the state of the 1 a a a a 1 Read Status parameter buffer. If a parameter is issued while the 1 a a a 1 a Write Command parameter buffer is full, the previous parameter is over 1 a a 1 a 1 Read Result written and lost. 1 a a 1 1 a Write Parameter i a 1 a 1 a Write Reset Reg. a 1 x X 1 a Write Data a 1 x X a 1 Read Data I a a x x x X Not Allowed START The FDC operation is composed of the following STANDARD RESULT NO sequence of events. RETURNED YES IMMEDIATE RESULT NO 8080 WRITES THE COMMAND AND PARAMETERS INTO RETURNED THE 8271 COMMAND AND PARAMETER REGISTERS THE 8271 ISDN ITS OWN TO CARRY OUT THE COMMANDS THE 8271 SIGNALS THE CPU THAT THE EXECUTION HAS FINISHED THE CPU MUST PERFORM A READ OPERATION OF ONE OR MORE OF THE REGISTERS TO DETERMINE THE OUTCOME OF THE OPERATION COMMAND START , BUSY BIT SET NOTE STANDARD RESULT RETURNED CAN BE DETERMINED BY MASKING OUT THE DRIVE SELECT BITS OF THE COMMAND BYTE (BITS 7 AND 6) AND CHECKING FOR A VALUJ: OF lESS THAN 2C16 (IF LESS THAN 2C16, STANDARD RESULT IS RETURNED) IMMEDIATE RESULT RETURNED CAN BE DETERMINED BY ADDITIONALLY MASKING OUT BITS 5 AND 4 OF THE COMMAND BYTE AND CHECKING FOR A VALUE OF C16 OR GREATER (IF C16 OR GREATER, IMMEDIATE RESULT RETURNED) Figure 17. Checking for Result Type Following 8271 Command and Parameters The Execution Phase During the execution phase the operation specified during the command phase is performed. During this phase, there is no CPU involvement if the system utilizes DMA for the qata transfers. The execution phase of each command is discussed within the detailed command Figure 16. Passing the Command and Parameters descriptions. The following table summarizes many of the to the 8271 basic execution phase characteristics. 6-205 AFN'()()223B inter 8271/8271·6 EXECUTION PHASE BASIC CHARACTERISTICS The following table summarizes the various commands' with corresponding execution phase c,haracterlstlcs Table 2. Execution Phase Basic Characteristics 2 3 4 5 6 7 8 Deleted Write/ Seek Completion COMMANDS Data Head Ready Protect Seek Check Result Interrupt SCAN DATA SKIP LOAD j x YES YES YES YES SCAN DATA AND XFER LOAD j x YES YES YES YES DEL DATA WRITE DATA x LOAD j j YES YES YES YES WRITE DEL DATA x LOAD j j YES YES YES YES READ DATA SKIP LOAD j x YES YES YES YES READ DATA AND XFER LOAD v ! x YES YES YES YES DEL DATA READID x LOAD j x YES NO YES YES VERIFY DATA AND XFER LOAD / x YES YES YES YES v DEL DATA FORMAT TRACK x LOAD j j YES NO YES YES SEEK x LOAD y x YES NO YES YES READ DRIVE STATUS x x x ,NO NO NOTE 5 NO SPECIFY x x x NO NO NO NO RESET x UNLOAD x x NO NO NO NO R SP REGISTERS x x x NO NO NOTE 6 NO W SP REGISTERS x x x NO NO NO NO Note 1 "x" ~ DON'T CARE 2 ----+ check 3 "-" ----+ No change 4 "y" - Check at end of operation 5 See "READ DRIVE STATUS' ,command 6 See "READ SPECIAL REGISTER" command Explanation of the execution phase characteristics table. 1. Deleted Data Processing 4 Write Protect If deleted data IS encountered during an operation that The operations that are marked check Write Protect are is marked skip In the table, the deleted data record is immediately aborted if Write Protect line is active at the not transferred into memory, butthe record IS counted. beginning of an operation. For example, If the command and parameters specify a 5. Seek read of five records and one of the records was written with a deleted data mark, four records are transferred Many of the 8271 commands cause a seek to the to memory The deleted data flag is set in the result desired track. A current track register is maintained for byte. However, if the operation is marked transfer, all each drive or surface data IS transferred to memory regardless of the type of 6. Seek Check data mark. Operations that perform Seek Check verify that 2. Head selected data In the ID field is correct before the 8271 The Head column in the table specifies whether the accesses the data field. Read/Write head will be loaded or not. If the table specifies load, the head is loaded after It is positioned over the track The head loaded by a command remains loaded until the user specified number of index pulses have occurred. 3. Ready The Ready column indicates-if the ready line (Ready 1, Ready 0) associated with the selected drive is checked. A not ready state is latched by the 8271 un· til the user executes a read status command. 6-206 AFN~00223B CPU INTERRUPT POLLED INTERRUPT Bit 4: Result Full C _____S_TA..-R_T_ _-") ( START ) This bit indicates the state of the result buffer. It is valid only after Command Busy bit is low. This bit is set when the FOC finishes a command and is reset after the result byte is read by the CPU. The data in the result buffer is valid only after the FOC has completed a command. Reading the result buffer while a command is in progress Yields no useful information. Bit 3: Interrupt Request This bit reflects the state of the FOC INT pin. It is set when FOC requests attention as a result of the comple- tion of an operation or failure to complete an intended operation. This bit is cleared by reading the result register. Bit 2: Non-DMA Data Request When the FDC IS utilized without a OMA controller, this bit is used to indicate FOC data requests. Note that in the Figure 18_ Getting the Result non-OMA mode, an Interrupt is generated (interrupt request bit is set) with each data byte written to or read from the diskette. The Result Phase Bits 1 and 0: During the Result Phase, the FOC notifies the CPU of the Not used (zero returned), outcome of the command execution. This phase may be initiated by: After reading the Status Register, the CPU then reads the ResultiReglster for more information. 1. The' successful completion of an operation. THE RESULT REGISTER 2. An error detected during an operation. This byte format facilitates the use of an address table to look up error routines and messages. The standard PROGRAMMING result byte format is: 07 06 05 04 03 02 01 Do Al Ao CS RD CS WR I I0 I lTL__L___ ::::LS:;'~: 0 0 Status Reg Command Reg 0 1 Result Reg Parameter Reg 1 0 - Reset Reg 1 1 - - CODE ----~~ COMPLETION TYPE L -_ _ _ _ _ _ _ _ _ _ DELETED DATA FOUND STATUS REGISTER L -_ _ _ _ _ _ _ _ _ _ _ NOT USED" 00 FDC Status Bits 7 and 6: Not used (zero returned), COMMAND BUSY Bit 5: COMMAND REG FULL Deleted Data Found: ThiS bit is set when deleted data IS PARAMETER REG FULL encountered dUring a transaction. Bit 7: Command Busy Bits 4 and 3: Completion Type The command busy bit is set on writing to the command' The. completion type field provides general information register. Whenever the FDC is busy processing a regarding the outc'ome of an operation. command, the command busy bit is set to a one. This bit is The completion type field provides general information set to zero after the command is cOlT1pleted. regarding the outcome of an operation. Bit 6: Command Full Completion The command full bit is set on writing to the command Type Event buffer and cleared when the FOC begins processing the command 00 Good Completion - No Error 01 System Error - recoverable errors; Bit 5: Parameter Full 10 operator Intervention probably required This bit indicates the state of the parameter buffer. This bit for recovery. is set when a parameter is written to the FDC and reset 11 Command/Drive Error - either a program after the FOC has accepted the parameter. error or drive hardware failure. 6-207 AFN-002238 intJ 8271/8271·6 Blt82 and 1: Completion Code It is important to note the hierarchical structure of the The completion code field provides more detailed result byte. In very simple systems where only a GO-NO information about the completion type (See Table), GO result is required, the user may simply branch on a zero result (a zero result is a good completion), The next Completion Completion level of complexity is at the completion type interface. The Type Code Event completion type supplies enough information so that the 00 00 Good Completionl software may distinguish between fatal and non-fatal Scan Not Met errors. If a completion type 01 occurs, ten retries should 00 01 Scan Met Equal be performed before the error is considered unre- 00 10 Scan Met Not Equal coverable. 00 11 01 00 Clock Error 01 01 Late DMA The Completion Type/Completion Code interface sup- 01 10 10 CRC Error plies the greatest detail about each type of completion. 01 11 Data CRC Error This interface is used when detailed information about the 10 00 Drive Not Ready transaction completion is required. 10 01 Write Protect 10 10 Track 0 Not Found 10 11 Write Fault 11 00 Sector Not Found Bit 0: 11 01 Not used (ze~o returned), 11 10 11 11 Table 3. Completion Code Interpretation Definition Interpretation Successful Completion! The diskette operation specified was completed without error If scan operation Scan Not Met was specified, the pattern scanned was not found on the track addressed Scan Met Equal The data pattern specified wIth the scan command was found on the track addressed with the specified comparison, and the equality was met Scan Met Not Equal The data pattern specified with the scan command was found with the specified comparison on the track addressed, but the equa,ltty was not met Clock Error DUring a diskette read operation, a clock bit was missing {droppedl Note that this functIOn IS disabled when reading any of the 10 address marks (which contain miSSing clock pulses) If this error occurs, the operation IS terrT\.tnated Immedi- ately and an Interrupt IS generated Late DMA DUring either a diskette read or wnte operatIOn, the data channel did not respond WithIn the allotted time Interval to prevent data from being overwntten or lost ThIS error Immediately terminates the operation and generates an Interrupt 10 Field CRC Error The CRC word {two bytesl derived from the data read In an 10 field did not match the CRC word written In the 10 field when the track was formatted If thiS error occurs, the associated diskette operation IS prevented and no data IS transferred Data Field CRC Error DUring a diskette read operation, the CRC word derived from the data field read did not match the data field CRC word previously written If thiS error occurs. the data read from the sector should be conSIdered Invalid Drive Not Ready The dnve addressed was not ready ThIS indicatIOn IS caused by any of the following conditIOns 1 Drive not powered up 2 Diskette not loaded 3 Non-eXistent drive addressed 4 Drive went not ready dUring an operation Note that thiS completion code IS cleared only through an FDC read drIVe status command Write Protect A diskette write operation was specified on a write protected diskette The Intended write operation IS prevented and no :data IS written on the diskette Track 00 Not Found DUring a seek to track 00 operation, the drive failed to prOVide a track 00 Inolcatlon aftar being stepped 255 times Write Fault ThiS error IS dependent on the drive supported and Indicates that the fault Input to the FDC has been activated by the drive Sector Not Found Either the sector addressed could not be found Within one complet,e revolutIOn of the diskette (two Index marks encountered) or the track address specified did not match the track address contained In the 10 field Note that when tM track address specified and the track address read do not match, the FOG automatically mcrements Its track address register (steppmg the drive to the next track) and agam compares the track addresses If the track addresses stili do not match: the track address register IS Incremented a second time and another comparison IS made be,fore the sector not found completion code IS set 6-208 AFN-00223B 8271/8271·6 INITIALIZATION Load Bad Tracks Reset Command , 0 , 6 4 D3 D2 D , D0 o I , '" D IoI o I , o I o I o' II '' II I ' iI o 1 CMD 0 0 o ::: I' I I I I I I I I 0 0 0 0 0 0 0 0 \, I PAR PAR 0 0 , BAD TRACK NO 1 110 0 0 Function: The Reset command emulates the action of PAR 0 , BAD TRACK NO 2 the reset pin. It is issued by outputting a one followed PAR 0 , CURRENT TRACK by a zero to the Reset register. 1 The drive control signals are forced low 2 An In-progress command IS aborted Parameter 0 10H = Load Su:face zero bad tracks 3 The FOC status register flags are cleared 18H = Load Surface one bad track 4 The FOC enters an Idle state until the next command IS Parameter 1 Issued Bad track address number 1 (Physical Address), Reset must be active for 10 or more clock cycles. It is recommended to program both bad tracks and cur- SPECIFY COMMAND rent track to FFH during initialization. Many of the interface characteristics of the FDC are specified by the systems software. Prior to initiating any SEEK COMMAND drive operation command, the software must execute the three specify commands. There are two types of The seek command moves the head to the speCified track specify commands selectable by the first parameter Without loading the head or verifying the track issued. The seek operation uses the speCified bad tracks to First Parameter Specify Type compute the physical track address This feature Insures that the seek operation positions the head over the correct Initialization track. Load bad Tracks Surface '0' Load bad Tracks Surface '1' When a seek to track zero is specified, the FOC steps the head until the track 00 signal is detected. The SpeCify command is used prior to performing any diskette operation (including formatting of a diskette) to If the track 00 signal is not detected within (FF)H steps, a define the drive's Inherent operaling characteristics and track 0 not found error status is returned. also IS used following a formatting operatIOn or installation of another diskette to define the locations of A seek to track zero IS used to POSition the read/Write head bad tracks. Since the Specify command only loads when the current head position IS unknown (such as after internal registers within the 8271 and does not Involve an a power up) actual diskette operation, command processing is limited to only Command Phase. Note that once the operating characteristics and bad tracks have been specified for a given drive and diskette, redefining these values need only be done If a diskette with unique bad tracks IS to be used or If the system is powered down. Initialization: Seek operations are not verified. A subsequent read or D5 DO write operation must be performed to determine if the CMD 0 0 o I 0 I ' I ' I o I ' Io I ' correct track is located. PAR 0 , o I 0 I o Io I ' I ' Io I, PAR 0 , STEP RATE* READ DRIVE STATUS COMMAND PAR 0 , HEAD SETTLING TlMP This command is used to interrogate the drive status. PAR 0 , INDEX eNT BEFORE I HEAD LOAD TIME" Upon completion the result register will hold the final HEAD UNLOAD" drive status. 'Note Mini-floppy parameters are doubled Parameter 0 - OOH = Select SpeCify Initialization. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Parameter 1 - D7-00 = Step Rate (0-255ms In 1ms steps) Parameter 2 - 07-00 = Head Settling Time (0-255ms in 1 eMD I I IS~L IS~L I ' I I ' I, 0 0 0 0 I I 0 ms steps) {O - 51 Oms in 2ms steps} 0 = standard, {}= mini Parameter 3 - 07-04 = Index Count - SpeCifies the IF A DRIVE NOT READY RESULT IS RETURNED, THE READ STATUS MUST number of Revolutions (0-14) which are to occur before BE ISSUED TO CLEAR THE CONDITION the FOC automatically unloads the R/W head. If 15 is specified, the head remains loaded. * Note the two ready bits are zero latching. Therefore, to clear the drive 03-00 = Head Load Time (0-60ms in steps of 4ms). not ready condition, assuming the drive IS ready, and to detect it via soft· {0-120ms in 8ms steps} 0 = standard, {}= mini ware, one must issue this command twice. 6-209 AFN·OO223B inter 8271/8271·6 START r--- SET NON DMA AND/OR SINGLE ACTOATOR NO POWER UP ALL DRIVES RESET INTERFACE REseT FDC SPECIFY DRIVE CHARACTERISTICS INTERRUPT INTERRUPT NO SPECIFY I BAD TRACKS DRIVE 0 : I r- YES SPECIFY READ 2ND DRIVE YESJ BAD TRACKS RESULT PRESENT DRIVE 1 BYTE NO Figure 19. Initialization of the 8271 by the User ReadlWrite Special Registers Mode Register Write Parameter Formal This command is used to access special registers within o[o[ ~ _ the 8271. o DMA MODE, 0 1 NON DMA o DOUBLE, 1 SINGLE ACTUATOR CMD PAR Bits 6 & 7 Must be one Command code 3DH Read Special Register Bits 5·2 3AH Write SpeCial Register For both commands. the first parameter IS the register INot used) Must be set to zero address; for Write' commands a second parameter specifies data to be written Only the Read SpeCial "Bit 1 Register command supplies a result. Double/Single Actuator: Selects single or double actuator mode If the single actuator mode IS selected, the FDG Table 4. Special Registers assumes that the phYSical track location of both disks IS Register Address always the same. This mode facilitates control of a dnve Description In Hex Comment which has a single actuator mechanism to move two Scan Sector Number 06 See Scan Description heads Scan MSB of Count 14 See Scan Descrlptton Scan LSB of Count 13 See Scan Descrrptlon Surface 0 Current Track 12 "Bit 0 Surface 1 Current Track 1A Data Transfer Mode This bit selects the data transfer Mode RegIster 17 See Mode Register mode If thiS bit is a zero. the FDG operates in the DMA Description mode IDMA RequestlAGKl. If this bit IS a one, the FDG Dnve Control Output Port 23 See Drrve Output Port Description operates in non-DMA mode. When the FDG is operating In Dnve Control Input Port 22 See Dnve Input DMA mode, Interrupts are generated at the completion of Port Descnptlon commands. If the non-DMA mode IS selected, the FDG Surface 0 Bad Track 1 10 generates an Interrupt for every data byte transferred. Surface a Bad Track 2 11 Surface 1 Bad Track 1 18 Surface 1 Bad Track 2 19 *Blts 0 and 1 are Initialized to zero 6·210 AFN-00223B 8271/8271·6 Non·DMA Transfers In DMA Mode Track Format If the user desires, he may retain the use of interrupts Each Diskette Surface is divided into 77 tracks with each generated upon command completions. This mode Is track divided into fixed length sectors. A sector can hold a accomplished by selecting the DMA capability, but whole record or a part of a record. If the record is shorter using the DMA REQ/ACK pins as effective INT and CS than the sector length, the unused bytes are filled with signals, respectively. binary zeros. If a record is longer than the sector length, the record is written over as many sectors as its length requires. The sector size that provides the most efficient Drive Control Input Port use of diskette space can be chosen depending upon the Reading this port will give the CPU exactly the data that record length required. the FDC sees at the corresponding pins. Reading this Tracks are numbered from 00 (outer-most! to 76 (inner- port will update the drive not ready status, but will not most) and are used as follows: clear the status. (See Read Drive Status Command for TRACK 00 reserved as System Label Track Bit locations.) TRACKS 01 through 74 used for data TRACKS 75 and 76 used as alternates. Drive Control Output Port Format Each sector consists of an ID field (which holds a unique address for the sector> and a data field. The ID field is seven bytes long and is written for each 7 6 5 4 sector when the track is formatted. Each I D field consists I I I I I I I I I of an ID field Address Mark, a Cylinder Number byte which L= WRITE ENABLE SEEK/STEP DIRECTION identifies the track number, a Head Number byte which specifies the head used (top or bottom) to access the sector, a Record Number byte IdentifYing the sector number (1 through 26 for 128 byte sectors), an N-byte LOAD HEAD specifying the byte length of the sector and two CRC LOW HEAD CURRENT (Cyclic Redundancy Check) bytes WRITE FAULT RESETI OPTIONAL OUTPUT The Gaps separating the index mark and the ID and data SELECT 0 fields are written on a track when it is formatted. These SELECT 1 gaps provide both an Interval for switching the drive elec- tronics from reading or Writing and compensation for rota- tional speed and other diskette-to-dlskette and drlve-to- Each of these signals correspond to the chip pin of the . drive manufacturing tolerances to ensure that data written same name. On standard·sized drives with write fault on a diskette by one system can be read by another detection logic, bit 5 is set to generate the write fault (diskette interchangeability). reset signal. This signal is used to clear a write fault indication within the drive. On mini·sized drives, this bit IBM Format Implementation Summary can be used to turn on or off the drive motor prior to initio ating a drive operation. A time delay after turn on may be Track Format necessary for the drive to come up to speed. The regis· The disk has 77 tracks, numbered phYSically from 00 to 76, ter must be read prior to writing the register in order to with track 00 being the outermost track There are save the states of the remaining bits. When the register logically 75 data tracks and two alternate tracks. Any two is subsequently written to rT10dify bit 5, the remaining tracks may be initialized as bad tracks The data tracks are bits must be restored to their previous states. numbered logically in sequence from 00 to 74, skipping over bad tracks (alternate tracks replace bad tracks) Note' In IBM format track 00 cannot be a bad track. IBM DISKETTE GENERAL FORMAT INFORMATION Sector Forma! The IBM Flexible Diskette used for data storage and Each track is divided into 26,15, or8 sectors of 128, 256, retrieval is organized into concentric circulllr paths or or 512 bytes length respectively. The first sector is TRACKS. There are 77 tracks on either one or both sides numbered 01, and is phYSically the first sector after the (surfaces) of the diskette. On d0uble-sided diskettes, the physical index mark The logical sequence of the corresponding top and bottom tracks are referred to as a remaining sectors may be nonsequential physically. The CYLINDER. Each track is further divided into fixed length location of these IS determined at InitializattOn by CPU sections or SECTORS. The number of sectors per track- software. 26, 15 or 8 - is determined when a track is formatted and is Each sector consists of an I D field and a data field All dependent o"n the sector length - 128, 256 or 512 bytes fields are separated by gaps. The beginning of each field respectively - specified. is indicated by 6 bytes oj (OOlH followed by a one byte All tracks on the diskette are referenced to a physical address mark. index mark (a small hole in the diskette), Each time the Address Marks hole passes a photodetector cell (9ne revolution of the diskette), an Index pulse is generated to indicate the Address Marks are unique bit patterns one byte in length logical beginning of a track. This index pulse is used to which are used to identify the beginning of ID and Data initiate a track formatting operation. fields. Address Mark bytes are unique from all other data 6-211 AFN-00223B 827118271-6 Index last Sector G.p II I Sector 01 Sector 02 Sector 03 G.p 10 Fjeld Data Field A A 128,256, or 512 Bytes AM2 Data hex FB or F8 FB '" data f,eld Fa'" control field (The con!rotfleld can begin with a 0 or an F o ., deleted record F '" defectIVe record CD Pre-Index gap Clock hex C7) CD Post-mdex gap CD 6 bytes of zeroes Hex 00 for 128 byte per sector for mat Hex 01 for 256 byte per sector format Hex 02 for 512 byte per sector format o Cyclic redundancy check The check bytes are generated during a write operation They are used Hex 01 through lA for 128 byte per sector format diskette dUring a read operation Hex 01 through OF for 256 byte per sector format diskette to verify t hat data IS Hex 01 through 08 for 512 byte per sector format diskette read correctly L Hex 00 for one-sided diskettes and Side 0 of two Sided dIskettes L Post-iD gap Hal( 01 for Side 1 of two-sided diskettes Post-data gap Hex 00 through 4A lOeCIrT'I811 through 74 Cylinders 75 and 76 are ""sed as alternate cylinders", AM1 Idenlri'lel> 10 flilld Data hex FE Clock hex C7 Fiqur/il 20. Track Format bytes in that certain bit cells do not contain a clock bit lall 10 Field other data bytes have clock bits in every bit cell:) There are four different types of Address Marks used. Each of these MARK C H R N CRC CRC is used to identify different types of fields. index Address Mark C Cylinder (Track) Address, 00-74 H = Head Address The Index Address Mark IS located at the beginning of each track and is a fixed number of bytes in front of the R = Record (Sector) Address, 01-26 first record. N = Record (Sector) Length,00-02 Note: Sector Length = 128 x 2N bytes 10 Address Mark CRC = 16 Bit CRC Character (See Below) The I D Address Mark byte is located at the beginning of each I D field on the diskette Data Field Data Address Mark The Data Address Mark byte IS located at the beginning of MARK I DATA eRC eRe each non-deleted Data Field on the diskette. Data is 128, 256, or 512 bytes long. Deleted Data Address Mark Note: All marks, data, 10 characters and eRC The Deleted Data Address Mark byte IS located at the characters are recorded and read most beginning of each deleted Data Field on the diskette. significant bit first. Clock Data CRC Charllcter Address Mark Summary Pattern Pattern The 16-bit CRC character is generated using the I ndex Address Mark D7 FC generator polynominal X1S + X12 + X5 + 1, normally ID Address Mark C7 FE initialized to IFF)H. It is generated from all characters Data Address Mark C7 FB lexcept the CRC in the ID 6r data field), including the data Deleted Data Address Mark C7 Fe Inot the clocks) in the address mark. It is recorded and Bad Track ID Address Mark C7 FE read most significant bit first. . 6-212 AFN-002238 inter 8271/8271·6 Data Format 1. The parameter 2 (0 7 ,- 0 5) of the Format command specify record length, the bits are coded the same way as In the Data is written (general case) in the following manner: Read Data commands 2. The programmable gap sizes (gap 3, gap 5, and gap 1) must MISSING CLOCK CLOCK CLOCK CLOCK be programmed such that the 6 bytes of zero (sync) are sub- DATA "0" DATA "1" DATA "1" DATA "1" tracted from the Intended gap size I.e., If gap 1 is intended to be 16 bytes long, programmed length must be 16 - 6 = 10 bytes (of FFH's) TF=FULL BIT TIME= NOMINALLY 4.1'1- Mini-Floppy Disk Format T H:::: HALF BIT TIME =NOMINALLV 2jtS* The mini-floppy disk format differs from the standard disk format in the following ways: 1. Gap 5 and the Index Address mark have been elimi- References nated. "The IBM Diskette for Standard Data Interchange," IBM 2. There are fewer sectors/tracks. Document GA21-9182-0. "System 32," Chapter 8, IBM Document GA21·9176-0. GAPS Bad Track Format The follOWing IS the gap size and deSCription summary The Bad Track Format is the same as the good track Gap 1 Programmable format except that the bad track 10 field is initialized as Gap 2 17 Bytes follows. Gap 3 Programmable C = H = R = N = (FFiH Gap 4 Variable Gap 5 Programmable When formatting, bad track registers should be set to FFH for' the drive during the formatting, thus specifying no bad tracks. Thus, all tracks are left available for for- The last SIX bytes of gaps 1,2,3 and 5 are (OOiH, all other matting. bytes In the gaps are (FFiH The Gap 1,3 and 5 count specified by the user are the numberof bytes of (FFiH. Gap The track following the bad track(s) should be one 4 IS written until the leading edge of the Index pulse If a higher in number than track before the bad track(s). Gap 5 size of zero IS speCified, the Index Mark is not Upon completion of the format the bad tracks should be written. set up using the write special register command. The 8271 will then generate an extra step pulse to cross the Gap 1: This gap separates the index ad- bad track, locating a new track that now happens to be N bytes FF's dress mark of the index pulse from an extra track out. 6 bytes O's for sync the first 10 mark. It is,used to pro- tect the first ID field from a write on Format Track the last physical sector of the cur- Format Command rent track. Gap 2: This gap separates the 10 field from CMD 0 0 S~L J. S~LJ 1 J. o I 0 I I I0 1 1 11 bytes FF's the data mark and field such that PAR 0 1 TRACK ADDRESS 6 bytes O's for sync during a write only the data field PAR 0 1 GAP 3 SIZE MINUS 6 will be changed even' if the write PAR 0 1 RECORD LENGTH I NO OF SECTORS/TRACK gate turns on early, due to drive PAR 0 1 GAP 5 SIZE MINUS 6 speed changes. PAR 0 1 GAP 1 SIZE MINUS 6 Gap 3: This gap separates a data area from N bytes FF's the next 10 field. It is used so that 6 bytes O's for sync during drive speed changes the The format command can be used to initialize a disk track next ID mark will not be overwritten, compatible with the IBM 3740 format. A Shugart "IBM thus causing loss of data. Type" mini-floppy format may also be generated. Gap 4: This gap fills out the rest of the disk The Format command can be used to initialize a disk· FF's only and is used for slack during format- ette, one track at a time. When format command is used, ting. During drive speed variations the program must supply 10 fields for each sector on the this gap will shrink or grow if the track. During command execution, the supplied 10 fields disk is re-formatted. (track head sector addresses and the sector length) are Gap 5: This gap separates the last sector written sequentially on the diskette. The 10 address N bytes FF's from the Index Address mark and marks originate from the 8271 and are written auto- 6 bytes O's for sync is used to assure that the index ad- matically as the first byte of each 10 field. The eRe char- dress mark is not destroyed by acter is written in the last two bytes of the ID field and is writing on the last physical data derived from the data written in the first five bytes. Dur- sector on the track. ing the formatting operation, the data field of each sec- tor Is filled with data pattern (E5)H' The eRe, derived The number of FF bytes Is programmable for gaps 1, 3 from the data pattern is also appended to the last byte. and 5. 6-213 AFN-00223B 827118271·6 INDEX LlATA FIELD I GAP 4 I GAP 5 1 1 _~ GAP 1 1 10 fiELD I GAP 2 I DATA FIELD GAPS ~ INDEX ADDRESS MARK GAP 1 POST INDEX GAP I" "I SYNC I GAP 2. POST 10 FIELD GAP i' SYNC I ' - - - - - WRITE GATE TURN-ON FOR UPDATE OF NEXT DATA FIELD NOTE THE WRITE GATE TURN-ON SHOULD BE TIMED TO WITHIN ± "" 1 BIT BY COUNTING THE BYTES IN THE GAP UNTIL 1 BYTE BEFORE THE TURN·ON GAP 3. POST DATA FIELD GAP "\ I I SYNC I L WRITE GATE TURN-OFF fROM UPDATE OF PREVIOUS DATA FIELD NOTE IBM FORMAT REQUIRES AT LEAST 2 BINARY ''1'' BITS AS A DATA FIELD POSTAMBlE ' - - niTS GAP 4' FINAL GAP I" "I GAP 5: INITIAL GAP I" "I SYNC I Figure 21. Track Format 6-214 AFN-002238 827118271·6 ________ ~ n PHYSICAL INDEX LM~A~RK~ ____________________________.________ ~ __________________________________________ I~~~X, ADDRESS t~~~ GAP I INDEX , GAP I I SECTOR: 1 IP~~I6D I GAP seCTOR 1 DATA FIELD I ;~~! I FIELD SECTOR, 2 IP~I~I6D GAP I SECTOR 2 DATA FIELD I '0"' DATA FIELD SECTOR, 3 IP~I~I6D' I f/S~~~~Rf GAP DATA J GAe (GAP 5) MARK (GAP 1) 10 FIELD (GAP 2} (GGA'tS) ID FIELD (GAP 2) 1D FIELD (GAP 2) FIELD L__I~I (GAP 3) I ~ I HEX FF I ';::;0) I L.I-"""",,,',,,',-"I-,;I"..~;;;~~,.~l-,I [ HEX FF I(~::;O) I 40 BYTES 6 BYTES 2{1 BVTES 6 BYTES _______ oBYTES 6 BYlES 11 BYTES 6 BYTES (TYPICAL) (TYPICAL) r----~~" -~ [A~~R~~l 128 H 2 n USER DTA BYTES I B~~i 1 BYTE 1 BYTE 2 BYTE 3 BYTE 4 BYTE 5 NUMBER OF BYTES NUMBER GAP 1 GAP2 GAP 3 GAP 5 OF SECTORS ID FIELD DATA FIELD GAP 4 'ONES SYNC ONES SYNC 'ONES SYNC 'ONES SYNC 26 26 6 7 11 6 131 27 6 275 40 6 15 26 6 7 11 6 259 48 6 129 40 6 8 26 6 7 11 6 515 90 6 146 40 6 4 26 6 7 11 6 1027 224 6 236 40 6 2 26 6 7 11 6 2051 255 6 719 40 6 1 26 6 7 11 6 4099 0 0 1007 40 6 • Program Specified 5208 Bytes Per Track Figure 22. Standard Diskette Track Format ~PHYSICAL INDex MARK f S~~R OA1'A FIELD I FINAL GAP (GAP 4) II~~~~ GAP (GAP 1) I SECTOR, 1 ID FIELD IP~I~I6D GAP (GAP 2) SECTOR 1 DATA FIELD I '0", I :1'0"' ' I DATJtt FIELD (G~'PP:1) SECTOR 2 lD FIELD FIELD GAP (GAP 2) SECTOR 2 DATA FIELD 'OST I DATA FIELD (Ga::S) SECTOR 3 :I,",ST '" I to FIELD FIELD GAP (GAP 2) II' CAST'1 SECTOR DATA FIELD L-, I 16 BYTES 6 BYTES I HEXFF n BYTES ! (~::~) I 6 BYTES (TYPICAL) IA'lARREJiSIA1~~i~sIA~;:~ssl::~~:s ~:~~~= I 8~~1 8~~2 I IAo):~~sl 126x2n USER DATA BYTES I B~~1 I 8~~2 I BYTE 1 BYTE 2 BYTE:1 BYTE 4 BYTE 5 BYTE 6 BYTE 7 NUMBER OF BYTES NUMBER GAP 1 GAP 2 GAP 3 OF SECTORS ID FIELD DATA FIELD GAP 4 'ONES SYNC ONES SYNC 'ONES SYNC 18 16 6 7 11 6 131 11 6 24 10 16 6 7 11 6 259 21 6 30 5 16 6 7 11 6 515 74 6 88 2 16 6 7 11 6 1027 255 6 740 1 16 6 7 11 6 2051 0 0 1028 • Program Specified 3125 Bytes Per Track Figure 23. Mini·Diskette Track Format 6-215 AFN-00223B 8271/8271·6 NO TC STOP AND SET:{ - } :~~ LOAD AND DMA ENABLE BITS '----r---~ '--~=r;;,;...-....J DMA ENABLE BITS Figure 24. User DMA Channel Initialization Flowchart Read 10 Command Full power of the multisector read/write commands can be realized by doing DMA transfer using Intel@ 8257 DMA Controller, For example, in a 128 byte per sector CMD 0 0 S;l 1. s~Ll 0 1 ' l' I 0 I 1 1/' multisector write command, the entire data block PAR 0 , TRACK ADDRESS (containing 128 bytes times the number of sectors) can be PAR 0 , o 1 0 1 0 1 o 1 o 'I 0 1 o 1 0 located in a disk memory buffer Upon completion of the PAR 0 , NUMBER OF ID FIELDS command phase, the 8271 begins execution by accessing the desired track, verifying the 10 field, and locating the data field of the first record to be written. The 8271 then The Read 10 command transfers the specified number of OM A-accesses the first sector and starts counting and 10 fields Into memory (beginning with the first 10 field after writing one byte at a time until all 128 bytes are written. It Index), The CRC character 15 checked but not transferred. then locates the data field of the next sector and repeats the procedure until all the speCified sectors have been written. Upon completion of the execution phase the 8271 These fields are entered into memory in the order In enters into the result phase and interrupts the CPU for which they are physically located on the disk, with the availability of status and completion results. Note that all first field being the one starting at the index pulse. read/write commands, single or multisector are executed without CPU intervention. Data Processing Commands Note, execution of multi·sector operations are faster if All the routine ReadIWrite commands examine specific the sectors are not interleaved. drive status lines before beginning execution, perform an implicit seek to the track address and load the drive's read/write head. Regardless of the type of command 128 Byte Sln~!e Record Format (i.e., read, write or verify), the 8271 first reads the ID field(s) to verify that the correct track has been located (see sector not found completion code) and also to CMD 0 0 si L I Sgl I COMMAND OPCODE locate the addressed sector. When 'a transfer is com· PAR 0 , TRACK ADDR 0-255 plete (or cannot be completed), the 8271 sets the inter· rupt request bit in the status register and provides an in· PAR 0 , SECTOR 0 255 dication of the outcome of the operation in the result register. . Commands Opcode If a CRC error is detected during a multisector transfer, READ DATA 12 proceSSing is terminated with the sector in error The READ DATA AND DELETED DATA 16 address of the failing sector number can be determined by WRITE DATA OA examining the Scan Sector Number register using thE! WRITE DELETED DATA OE Read Special Register command. VERIFY DATA AND DELETED DATA 1E 6-216· AFN-00223B intJ 827118271·6 Variable Length/Multi-Record Format Scan Commands Do CMD 0 0 SlEL I ! S;L COMMAND QPCODE CMD 0 0 s~Ll S~L J .1 o L 0 0 lSDATAJ 0 S DELD 1 0 PAR 0 1 TRACK ADDR 0·255 PAR 0 1 TRACK ADDR 0 255 PAR 0 1 SECTOR 0 255 PAR 0 1 SECTOR 0 255 PAR 0 1 LENGTH I NO OF SECTORS 0 1 LENGTH J NO OF SECTORS D7-D5 of Parameter 2 determine the length of the disk PAR 0 1 SCAN TYPE I STEP SIZE PAR 0 1 FIELD LENGTH ~KEYf record. 000 128 Bytes o0 1 256 Bytes Command O2 = 0 Scan Data 010 512 Bytes O2 = 1 Scan Data and Deleted Data 011 1024 Bytes 00 2048 Bytes Scan Commands, Scan Data and Scan Data and Deleted 1 0 1 4096 Bytes Data, are used to search a specific data pattern or "key" 1 1 0 8192 Bytes from memory. The 8271 FDC operation during a scan is 1 1 1 16,384 Byte~ unique in that data is read from memory and from the diskette simultaneously. Commands Opcode DUring the scan operation, the key is compared READ DATA 13 repetitively (using the 8257 DMA Controller in auto load READ DATA AND DELETED DATA 17 mode) with the data read from the diskette (e.g., an eight WRITE DATA OB byte key would be compared with the first eight bytes (1-8) WRITE DELETED DATA OF read from the diskette, the second eight bytes (9-16), the VERIFY DATA AND DELETED DATA 1F third eight bytes (17-24), etc,). The scan operation is SCAN DATA 00 concludeowhen the key IS located or when the specified SCAN DATA AND DELETED DATA 04 number of sectors have been searched· without locating the key. When concluded, the 8271 FDC requests an Read Commands interrupt. The program must then read the result register Read Data, Read Data and Deleted Data to determine if the scan was successful (,f the key was located), If successful, several of the FDC's special registers can be examined (read special registers Function command) to determine more specific information The read command transfers data from a specified disk relating to the scan (, e , the sector number in which the record or group of records to memory. The operation of key was located, and the number of bytes within the sector this command IS outlined In execution phase table that were not compared when the key was located), Write Commands The 8271 does not do a sliding scan, it does a fixed Write Data, Write Deleted Data block linear search. This means the key in memory is compared to an equal length block in a sector; when Function these blocks meet the scan conditions the scan wi11 stop. Otherwise, the scan continues until all the sectors The write command transfers data from memory to a specified have been searched. specified disk record or group of records. The following factors regarding key length must be Verily Command considered when establishing a key in memory. Verify Data and Deleted Data. 1. When searching multiple sectors, the length of the key must be evenly divisible into the sector length to Function prevent the key from being split at subsequent sector The verify command IS Identical to the read data and boundaries. Since the character FFH is not compared, deleted data command except that the data IS not the key in memory can be padded tothe required length transferred to memory This command is used to check using this character. For example, if the actual pattern that a record or a group of records has been written compared on the diskette is twelve characters in length, correctly by verifying the CRC character the field length should be sixteen and four bytes of FFH 6-217 AFN·OO223B 827118271·6 would b~appended to the key. Consequently, tlae last 10-LEO Scan for each charaeter within the disk sec- block of sixteen bytes compared within the first sec- tor less than or equal to the corresponding tor would end at the sector boundary and the first character within the field length (key.). The· byte of the next sector would be compared with the scan s,tops after the first less than or equal first byte'of the key. Splitting data over sector bound- conditioli is met. arys will not work properly since the FOC expects the start of key at each sector boundary. Step Size: The Step Size field speCifies the offset to the next sector in a multisector 2. Smce the first byte of the key IS compared with the first scan. In this case, the next sector address is , byte of the sector, when the pattern does not begin with generated by adding the Step Size to the the first byte of the sector, the key must be offset using current sector address~ the character FF16 For example, if the first byte of a nme byte pattern begms on the fifth byte of the sector, four bytes ()f FF16 are prefixed to the key (and three Parameter 4, Field Length bytes of FF16 are appended to the key to meet the length requirement) so that the first actual comparison Specifies the number of bytes to be compared (length of begins on the fifth byte key). While the range of legal values is from 1 to 255, the field length specified should be evenly divisible into the The Scan Commands require five parameters' sector length to prevent the key from being spilt at sector boundaries, If the multi sector scan commands are used. Parameter 0, track Address Specifies the track number containing the sectors to be scanned. Legal values range from OOH to 4CH (0 to 76) for Scan Command Results a standard diskette and from OOH to 22H (0 to 34) for a More detailed information about the completion of Scan miryi·sized diskette. Commands may be obtained by executing Read Special Register commands. Parameter 1, Sector Addre~s Specifies the first sector to be scanned. The number of sectors scanned IS specified in parameter 2, and the order Read SpeCial Register m which sectors are scanned IS specified in parameter 3. Parameter Results (Hex) Parameter 2, Sector Length/Number of Sectors 06 The sector number of the sector in which the The sector length field (bits 7-5) specifies the number of specified scan data pattern was located. data bytes allocated to each sector (see parameter 2, routme read and write commands for field mterpretatiol)l. 14 MSB Count - The number of 128 byte blocks The number of sectors field (bits 4-0) specifies the number remaining to be compared in the current sector of sectors to be scanned. The number specified ranges when the scan data pattern was located This from one sector to the physical number of sectors on the register is decremented with each 128 byte block track. read 13 LSB Count - The number of bytes remaining to Parameter 3 be compared in the current sector when the scan data pattern is located. This register is Initialized 0 7-06: Indicate scan type to 128 and IS decremented with each byte OO-EO Scan for each character within the field compared. length (key) equill to the corresponding char- acter within the disk sector. The scan stops after the first equal condition is met. Upon a scan met condition,.the equation below can be 01-GEO Scan for each character within the disk sec- used to determine the last byte in the located pattern. tor greater than or equal to the correspond- ing character within the field length (key). Pemter= secter length -((Register 14H)'128 + (Register 13H)) The scan stops after the first greater than or equal condition is met. 6-218 AFN·00223B inter 8271/8271·6 8271 Scan Command Example Assume there are only 2 records on track 0 with the following data: Record 01: 01 02 03 04 05 06 07 08 000 .... 00 Record 02: 01 02 AA 55 00 00 00 00 ........00 Special Registers!'! Field!'! Starting # of Completion Command Length Sector # Sectors Key!'1 Code l31 R06 R14 R13 Comment SCAN EO 2 1 1 01,02 SME 01 0 1270 Met In first field SCAN EO 2 1 1 02,03 SNM X X X Not met SCAN EO 2 1 1 FF151,05 SNM X X X Not met with don't care SCAN EO 2 1 1 FF!51,06 SME 01 0 1230 Met with don't care • SCAN EO 2 1 2 AA,55 SME 02 O. 1250 Met In Record 02 ··SCAN EO SCAN EO 2 4 2 j 1 1 01,02 05,06,07,08 SME SME 02 01 0 0 1270 1210 Starting sector "I 1 Field. Key length = 4 ·· SCAN GEO SCAN GEO 4 4 1 1 1 1 05,06,07,08 05,04,07,08 SME SMNE 01 01 0 0 1210 1210 GEO-SME GEO-SMNE SCAN GEO 4 1 2 00,03,AA,44 161 SNM X X X GEO-SNM SCAN LEO 4 1 1 01,03,FF,04 SMNE 01 0 1250 LEO-SMNE SCAN LEO 4 1 1 01,02,FF,04 SME 01 0 1250 LEQ-SME NOTES Field Length - Each record IS partitioned Into a number of fields equal to the record size divided by the field length Note that the record size should be evenly d,v,sable by the field length to Insure proper operation of multi record scan Also, maximum field length = 256 bytes 2 Key - The key IS a string of bytes located In the user system memory The key length should equal the field length By programming the 8257 DMA Controller Into the auto load mode, the key will be recursively read In by the chip lonce per field I 3 Completion Code - Shows how Scan command was met or not met SNM - SCAN Not Met - a a lalso Good Completel SME - SCAN Met Equal - a 1 SMNE - SCAN Met Not Equal - 1 a 4 Special Registers R06 - ThiS register contains the record numper where the scan was met R14 - ThiS register contains the MSB count and IS decremented every 128 characters R14 = 21 - 1 Length (£) (Initialize at (D7-D5 of PAR 2) Record Size Beginning 01 Record) 000 128 Bytes a 001 256 Bytes 1 010 512 Bytes 3 011 1024 Bytes 7 ( •• • • • •• •• R13 - ThiS register contains a modulo 128 LSB count which IS Initialized to 128 at beginning of each record ThiS count IS decremented after each character IS compared except lor the last character In a pattern match situation 5 The OFFH character In the key IS treated as a don't care character position 6 The Scan comparison IS done on a byte by byte basIs That IS, byte 1 of each field IS compared to byte 1 of the key, byte 2 01 each field IS compared to byte 2 of the key, etc 6·219 AFN-00223B , I intJ 8271/8271·6 ABSOLUTE MAXIMUM RATINGS* 'NOTlCE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent daf(lage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ........ O·C to 70·C 1 tion of the device at these or any other conditions above Storage Temperature ............. - 65·C to + 150·C those indicated in the operational sections of this specifi- Voltage on Any Pin with cation is not implied. Exposure to absolute maximum Respect to Ground ................. - 0.5V to + 7V rating conditions for extended periods may affect device Power Dissipation .......................... 1 Watt reliability. ' D.C. CHARACTERISTICS (Vcc= +5.0V ±5% 8721 and 8271·8: TA= O·C to 70 ·C; 8271·6: TA = O·C to 50·C) Symbol Parameter Min. Max. Unit Test Conditions VIL Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 (Vcc+ 0.5) V VOLD Output Low Voltage (Data Bus) 0.45 V IOL=2.0 mA VOLI Output Low Voltage (Interface Pins) 0.5 V IOL= 1.6 mA VOH Output High Voltage 2.4 V IOH = - 220 !LA IlL Input Load Current ±10 !LA VIN=VCC toOV loz Off·State Output Current ± 10 !LA Vour=Vcc to 0.45V Icc Vcc Supply Current 180 mA CAPACITANCE (TA = 25°C; Vcc = GND = OV) Symbol Parameter Min. Typ. Max. Unit Test Conditions CIN Input Capacitance 10 pF te= 1 MHz CliO 1/0 Capacitance 20 pF Unmeasured Pins Returned to GND NOTE: 1, AmbIent temperature under bias for 8271-618 o·c to 5O'C. A.C. CHARACTERISTICS (Vcc = +5.0V ±5%) (8271 and 8271-8: TA= O°C to 70°C; 8271-6: TA= O°C to 50·C) READ CYCLE Symbol Parameter Min. Max. Unit Test Conditions tAC Select Setup to RD 0 ns Note 2 tCA Select Hold from RD 0 ns Note 2 tRR RD Pulse Width 250 ns tAD Data Delay from Address 250 ns Note 2 tRo Data Delay from RD 150 ns CL = 150 pF, Note 2 CL = 20 pF for Minimum; tOF Output Float Delay 20 100 ns 150 pF for Maximum toc DACK Setup to RD 25 ns tco DACK Hold from RD 25 ns tKo Data Delay from DACK 250 ns 6-220 AF~B 8271/8271-6 A.C. CHARACTERISTICS (Continued) WRITE CYCLE Symbol Parameter Min. Max. Unit Test Conditions tAC Select Setup to WR 0 ns tCA Select Hold from WR 0 ns tww WR Pulse Width 250 ns tow Data Setup to WR 150 ns two Data Hold from WR 0 ns toc DACK Setup to WR 25 ns tco DACK Hold from WR 25 ns DMA Parameter Test Conditions Request Hold from WR or RD (for Non·Burst Mode) OTHER TIMINGS . 8271/8271·6 Symbol Parameter Unit Test Conditions Min. Max. t RSTW Reset Pulse Width 10 tCY tr Input Signal Rise Time 20 ns tf Input Signal Fall Time 20 ns t RSTS Reset to First IOWR 2 tCY tCY Clock Period 250 Note 3 tCL Clock Low Period 110 ns tCH Clock High Period 125 ns tos Data Window Setup to Unseparated Clock and Data 50 ns tOH Data Window Hold from Unseparated Clock and Data 0 ns NOTES: , All timing measurements are made at the reference voltages unless otherwise specified. Input .. , .. at 2 OV. "0" at 08V Output .. , .. at 2 OV. "0" at 0 BV 2 tAD. tRO. tACo and tCA are not concurrent specs 3 Standard Floppy tCy=250 ns '±04% Mlnl·Floppy tCY = 500 ns ±04% A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. T~STING LOAD CIRCUIT IJCl DEVICE UNDER TEST A C TESTING INPUTS ARE DRiVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR -= A LOGIC 0 TIMING MEASUREM!:NTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 0 BY FOR A LOGIC 0 CL INCWDES JIG CAPACITANCE 6-221 AFN-002238 8271/8271·6 WAVEFORMS READ DACK =:J - t o c - X I+----tcD-1 ..L- AO, At, CS "") )( tRR -1~tCA-1 ~ -tAC-- tRD I-tDF-~ _ _ _ ---: _ _ _ .- - ------------ f DATA BUS tAD tKD WRITE DACK -----toc- ----tco--- ~ i----tAC- i tww ~~ )( -tCA---l DATA BUS l( I tDW two----l DMA __..JI =4 DRQ r tcc \~----~---------------------------- ~ORWR ----------------~~~ _______________________________________ CHIP CLOCK 6-222 AFN-002238 8271/8271-6 WAVEFORMS (Continued) READ DATA WRITE DATA I---F------· l~- -1--· -·-1. H F H - "'ICY = 250 ns ··ICY = 500 ns PULSE WIDTH PW = ICY :t 30 ns H (HALF BIT CELL) = 8 ICY F (FULL BIT CELL) =16 tCY F = 16 ICY ± 8 tCY H = 8 ICY ± 4 ICY ·ICY = 250n5 ±0.4% "ICY = 500ns ±04% 250 ns ±30 ns 500 ns ::t30 ns "STANDARD FLEXIBLE DISK DRIVE TIMING 20)..ls ± 8 ns 40/-<5 ± 16 "5 ""MINI·FLOPPY TIMING 40/.15 ±16ns 80)..15 ±32 ns SINGLE·SHOT DATA SEPARATOR PLO DATA SEPARATOR UNSEPARATED DATA ·DATA WINDOW MAY BE 180" OUT OF PHASE IN PLO DATA SEPARAT10N MODE 6-223 AFN-!10223B intel~ 8272A SINGLE/DOUBLE DENSITY FLOPPY DISK CONTROLLER • IBM Compatible in Both Single and Double Density Recording Formats • Data Mode Transfers In DMA or Non·DMA • 128,256,512, Programmable Data Record Lengths: or 1024 Bytes/Sector • Four Parallel Seek Operations on Up to Drives • Capability Multi·Sector and Multl·Track Transfer • Other Compatible with all Intel and Most Microprocessors • Disks Drives Up to 4 Floppy or Mlnl·Floppy • Single· Phase 8 MHz Clock • Single + 5 Volt Power Supply (± 10%) The 8272A is an LSI Floppy Disk Controller (FDC) Chip. which contains the circuitry and control functions for inter· facing a processor to 4 Floppy Disk Drives. It is capable of supporting either IBM 3740 single density format (FM). or IBM System 34 Double Density format (MFM) including double sided recording. The 8272A,provides control signals' 'which simplify the design of an external phase locked loop and write precompensation circuitry. The FDC simplifies and handles most of the burdens associated with implementing a Floppy Disk Drive Interface. The 8272A is a pin· compatible upgrade to the 8272. DB01 REGISTERS Vee RWISEEK LeT/DIR FRlSTP HoL ROY SERIAL WP/TS INTERFACE CONTROLLER FLTfrRKO PSo PS, WR DATA READY OSo WRITE PROTECTITWO SIDE OS, INDEX HoSEL FAULTITRACK 0 MFM WE DRIVE DRIVE SELECT 0 INTERFACE DRIVE SELECT 1 Voo CONTROLLER MFM MODE RD DATA 'AWISEEK OW HEAD LOAD elK -----.. HEAD SELECT Vee ---+- LOW CURRENT/DIRECTION GND ---+- FAULT RESET/STEP Figure 1. 8272A Internal Block Diagram Figure 2. Pin Configuration Intel Corporation assumes no responsibility for the use of any Circuitry other than CirCUitry embodied In an Intel product No other CirCUit patent licenses are Implied. © Intel Corporation, 1982 ORDER NUMBER 210608-001 6-224 inter 8272A Table 1. Pin Description Pin Connec· Pin Connec w Symbol No. Type tlon To Name and Function Symbol No. Type tlon To Name and Function RESET Reset: Places FDC in 1 I "p Vec 40 D.C. Power: +5V idle state. Resets out- put lines to FDD to "0" RW/SEEK 39 0 FDD Read Write / SEEK: (low). Does not clear the When "1" (high) Seek last specify command. mode selected and RD 2 1[1) Read: Control signal when "0" (low) Read/ "p for transfer of data from Write mode selected. FDC to Data Bus, when "0" (low). lCT/DIR 38 0 FDD LQw Current/Direction: lowers Write current WR 3 1[1) Write: Control signal on Inner tracks In "p for transfer of data to Read/Write mode, de- FDC via Data Bus. when termines direction head "0" (low) Will step In Seek mode -CS 4 I FR/STP 37 0 FDD "p Chip Select: IC selected Fault Reset/Step: Re- whe~'O" (low), allow- sets fault FF in FDD In Ing RD and WR to be Read/Write mode, pro- enabled Vides step pulses to move head to another Ao 5 1[1) Datal-Status Register cylinder In Seek mode. "p Select: Selects Data Reg (Ao = 1) or Status HDl 36 0 FDD Head Load: Command Reg (Ao = 0) contents which causes read/Write to be sent to Data Bus head In FDD to contact diskette. DBo-DB7 6-13 1/0[1) Data Bus: Bidirectional "p Ready: Indicates FDD 8-Blt Data Bus RDY 35 I FDD IS ready to send or re- ceive data. Must be tied DRO 14 0 DMA Data DMA Request: high (gated by the Index DMA Request IS being pulse) for mini floppies made by FDC when which do not normally DRO "1" have a Ready line. DACK 15 I DMA DMA Acknowledge: WP/TS 34 I FDD Write Protect / Two· DMA cycle IS active Side: Senses Write Pro- when "0" (low) and tect status In Read/ Controller IS perform- Write mode, and Two Ing DMA transfer Side Media In Seek mode TC 16 I DMA Terminal Count: Indi- cates the termmatlon of FlTITRKO 33 I FDD Fault/Track 0: Senses a DMA transfer when FDD fault condition In "1" (hlgh)[2) Read/Write mode and Track 0 condition In lOX 17 I FDD Index: Indicates the Seek mode beginning of a disk track PS PS O 31,32 0 FDD Precompensatlon (pre· " shift): Write precom- INT 18 0 "p Interrupt: Interrupt Re- pensallon status dUring quest Generated by MFM mode Determines FDC early, late, and normal Clock: Single Phase 8 times ClK 19 I MHz (4 MHz for mini floppies) Squarewave WR DATA 30 0 FDD Write Data: Serial clock Clock. and data bits to FDD GND 20 Ground: DC Power DS DS o 28,29 0 FDD Drive Select: Selects Return " FDD Unit. Note 1 Disabled when CS= 1 HDSEl 27 0 FDD Head Select: Head 1 Note 2 Te must be activated to terminate the Execution Phase of any command selected when "1" (high) Head 0 selected when "0" (low) 6-225 AFN-01259C inter 8272A Table 1. Pin Description (Continued) Pin Connec· Pin Connec· Symbol No. Type tion To Name and Function Symbol No. Type tion To Name and Function MFM 26 0 PLL MFM Mode: MFM mode DW 22 I PLL Data Window: Gener- when "1," FM mode ated by PLL, and used when "0," to sample data from FDD. WE 25 0 FDD Write Enable: Enables write data Into FDD. WR eLK 21 I Write Clock: Write data rate to FDD FM = 500 veo 24 0 PLL VCO Sync: Inhibits veo kHz, MFM = 1 MHz, with in PLL when "0" (low), a pulse width of 250 ns enables veo when "1 " for both FM and MFM RD DATA 23 I FDD Read Data: Read data Must be enabled for all from FDD, containing operations, both Read clock and data bits and Write Scan High or Equal Track 0) Scan Low or Equal Sense Interrupt Status CPU I Specify Sense Drive Status For more information see the Intel Application Notes :tt AP-116 and AP·121. L ;.. ,;:0.. SYSTEM BUS FEATURES 1 Address mark detection circuitry is internal to the FDC ~ i>- ,k DATA -8-r which simplifies the phase locked loop and read elec- tronics. The track stepping rate, head load time, and ,~ ORO WINDOW PlL head unload time may be programmed by the user. The AD DATA 8272A offers many additional features such as multiple WR DATA 8237 8272A sector transfers in both read and write modes with a DMA CONTROLLER DACK FDC 1ft INPUT CONTROL 0." INTERFACE single command, and full IBM compatibility in both ~ single (FM) and double density (MFM) modes. OUTPUT CONTROlJ\ TC TERMINAL I - - V 8272A ENHANCEMENTS COUNT On the 8272A, after detecting the Index Pulse, the Figure 3. 8272A System Block Diagram VCO Sync output stays low for a shorter period of time. See Figure 4A. DESCRIPTION On the 8272 there can be a problem reading data when Gap 4A is 00 and there is no lAM. This occurs Hand·shaking signals are provided in the 8272A which on some older floppy formats. The 8~72A cures this make DMA operation easy to incorporate with the aid of problem by adjusting the VCO Sync timing so that it an external DMA Controller chip, such as the 8237A. The is not low during the data field. See Figure 4B. FDC will operate in either DMA or Non·DMA mode. In the Non'DMA mode, the FDC generates interrupts to the ... processor for every transfer of a data byte between the Track Gap4AIIAM 1 Gap1 1 101 Gap2 I Data... CPU and the 8272A. In the DMA mode, the processor Index Pulse ~ need only load a command into the FDC and all data 8272 VCO Sync-' I transfers occur under control of the 8272A and DMA 8272A VCO Sy~ I controller. *560 J-lS in FM mode; 527 IJ.S in MFM mode There are 15 separate commands which the 8272A will A. Margin on the Index Pulse execute. Each of these commands require multiple 8·bit bytes to fully specify the operation which the processor, wishes the FDC to perform. The following commands Track Index Pulse ~ Gap 4A (00) I 10 I Gap2 I Data are available. 8272 I r- Read Data vco Sync Write Data Read ID 8272A Format a Track VCo Sync L.....J Read Deleted Data Write Deleted Data B. Ability to Read Data When Gap 4A Contains 00 Read a Track Seek Scan.Equal Recalibrate (Restore to Figure 4. 8272A Enhancements over the 8272 6-226 AFN-012S9C 8272A 8272A REGISTERS - CPU INTERFACE The 010 and ROM bits in the Status Register indicate when Data is ready and in which direction data will be The 8272A contains two registers which may be ac- transferred on the Data Bus. cessed by the main system processor; a Status Register and a Data Register_ The 8-bit Main Status Register con- Note: There is a 12,.5 or 24,.5 RQM flag delay when tains the status information of the FDC, and may be using an 8 or 4 MHz clock respectively. accessed at any time_ The 8-bit Data Register (actually consists of several registers in a stack with only one register presented to the data bus at a .time), stores DATA INOUT (010) OUT OF PROCESSOR AND INTO FOC I OU T OF FDC AND INTO .AOCESSOLA • data, commands, parameters, and FDD status informa- tion. Data bytes are read out of, or written into, the Data REOUEST I I Register in order to program or obtai n the results after execution of a command. The Status Register may only FOR MASTER (ROM) I be read and is used to facilitate the transfer of data I I between the processor and 8272A. YI I The relationship between the Status/Data registers and II_II II I the signals RD, WR, and Ao is shown in Table 2. I A I- A C A NOTES [!J - DATA REOISTER READY TO BE WRITTEN INTO BY PROCESSOR Table 2. AQ, RD, WR decoding for the selection 00 - DATA REGISTER NOT READY TO BE WRITTEN INTO BY PROCESSOR [g - DATA REOISTER READY FOR NEXT DATA BYTE TO BE READ BY THE of Status/Data register functions. @ - PROCESSOR DATA REGISTER NOT READY FOR NEXT DATA BYTE TO BE READ BY PROCESSOR An RD WR FUNCTION Figure 5. Status Register Timing 0 0 1 Read Main Status Register The 8272A is capable of executing 15 different com- 0 1 0 Illegal (see note) mands. Each command is initiated by a multi-byte 0 0 0 Illegal (see note) transfer from the processor, and the result after execu- tion of the command may also be a multi-byte transfer 1 0 0 Illegal (see note) back t() the processor. Because of this multi-byte inter- 1 0 1 Read from Data Register change of information between the 8272A and the proc- essor, it is convenient to consider each command as 1 1 1 Write into Data Register consisting of three phases: Command Phase: The FDC receives all information Note: DeSign must guarantee that the 8272A required to perform a particular is not subjected to illegal inputs. operation from the processor. Execution Phase: The FDC performs the operation it The Main Status Register bits are defined in Table 3. was instructed to do. Table 3. Main Status Register bit description. Result Phase: After completion of the operation', BIT NUMBER NAME SYMBOL DESCRIPTION status and other housekeeping in- FDD 0 Busy FDD number a IS In the Seek formation are made available to DO DOB mode the processor. 0, FDO 1 Busy D,B FDD number 1 IS In the Seek During Command or Result Phases the Main Status mode Register (described in Table 3) must be read by the proc- 02 FDO 2 Busy D2B FDD number 2 IS In the Seek mode essor before each byte of information is written into or read from the Data Register. Bits D6 and 07 in the Main 03 FDD 3 Busy D3 B FDO number 3 IS In the Seek mode Status Register must be in a 0 and 1 state, respectively, 04 FOG Busy CB A read or write command IS In before each byte of the command word may be written process into the 8272A. Many of the commands require multiple 05 Non·DMA mode NOM The FOG IS In the' non-DMA bytes, and as a result the Main Status Register must be mode This bit IS set only dur- read prior to each byte transfer to the 8272A. On the Ing the execution phase In non-DMA mode Transition to other hand, during the Result Phase, 06 and 07 in the "0" state Indicates execution Main Status Register must both be 1's (06 = 1 and 07 = 1) before reading each byte from the Data phase has ended 06 Data Input/Output 010 Indicates direction of data transfer between FOG and Dt~ Register. Note, this reading of the Main Status Register Register If 010="1" then before each byte transfer to the 8272A is required in transfer IS from Data Register to the Processor If 010= "0", only the Command and Result Phases, and NOT during then transfer IS from the Proc- the Execution Phase. essor to Data Register D7 Request for Master ROM Indicates Data Register IS During the Execution Phase, the Main Status Register ready to send or receive data need not be read. If the 8272A is in the non-DMA Mode, to or from the Processor Bot bits 010 and ROM should be then the receipt of each data byte (if 8272A is reading I used to perform the hand- data from FDD) is indicated by an Interrupt signal on pin shaking functions of "ready" and "direction" to the proc- 18 (INT = 1). The generation of a Read signal (RD = 0) essor will reset the Interrupt as well as output the Data onto 6-227 AFN·01259C inter 8272A - the Data Bus. For example, if the processor cannot It is important to note that during the Result Phase all handle Interrupts fast enough (every 13 I'S for MFM bytes shciwn in the Command Table must be read. The mode) then it may poll the Main Status Register and Read Data Command, for example, has seven bytes of then bit D7 (ROM) functions Just like the Interrupt data in the Result Phase. All seven bytes must be read signal. If a Write Command is in process, then the WR in order to successfully complete the Read Data Com- signal performs the reset to the Interrupt signal. mand. The 8272A' will not accept a new command until all seven bytes have been read. Other commands may The 8272A always operates in a multi-sector transfer require fewer bytes to be read during the Result Phase. mode. It continues to transfer data until the TC input is active. In Non·DMA Mode, the system must supply the The 8272A contains five Status Registers. The Main TC input. Status Register mentioned above may be read by the If the 8272A is in the DMA Mode, no Interrupts are gener· processor at any time. The other four Status Registers ated during the Execution Phase. The 8272A generates (STO, ST1, ST2, and ST3) are only available during the Result Phase, and may be read only after successfully DRO's (DMA Requests) when each byte of data is available. The DMA Controller responds to this request completing a command. The particular command which has been executed determines how many of the Status with both a DAOK = 0 (DMA Acknowledge) and a RD = 0 Registers will be read. (Read signal). When the DMA Acknowledge Signal goes low (DACK =0) then the DMA Request is reset (DRO =0). The bytes of data which are sent to the 8272A to form If a Write Command has been programmed then a WR the Command Phase, and are read out of the 8272A in Signal will appear instead of RD. After the Execution the Result Phase, must occur in the order shown in the Phase has been completed (Terminal Count has Table 4. That is, the Command Code must be sem first occurred) then an Interrupt will occur (lNT = 1). This and the other bytes sent in the prescribed sequence. No signifies the beginning of the Result Phase. When the foreshortening of the Command or Result Phases are first byte of data is read during the Result Phase, the In- allowed. After the last byte of data in the Command terrupt is automatically reset (INT =0). Phase is sent to the 8272A, the Execution Phase Table 4_ 8272A Command Set PHASE-r:;w Com mand W W W W W W W I D7 0 06 MT MFM SK 0 C Os 0 ______ H ______ ______ N _____ DATA BUS 04 READ DATA 0 0 _ _ _ _ EDT _ _ _ _ _ R 03 0 0 02 1 0, 1 DO 0 HOS DSl DSO I REMARKS Command Codes Sector 10 mformatlon prior to Command execution PHASE _~_,--__ ,-_•• RJW W WOO W W W W W r07 ____ 0 _______ C _ _~_ _ N 0 06 We." H 05 0 HDS OS, DSO R _____ DATA BUS 04 _ _ _ _ _ EDT _ _ _ _ _ 03 WRITE DATA " " 02 , 0, _~ __ " DO , REMARKS ~ ••• - , Sector 10 informatIon prior to Command execution W W GPL DTL W W I_ _ _ _ _ GPL oTL - - - - - Exec ullon Data transfer Execution Data transfer between the FDD between the mam- and main-system system and FOO Resu It A _ _ _ _ _ _ 8TO _ _ _ _ _ _ Status informatIon Result A ST 0 Status information A ST1 _ _ _ _ _ after Command A STl after Command A ST2 _______ execution A ST 2 eX8ClHIon A C A _ _ _ _ _ C_ -'-- A =1----- ~ ------ H READ DELETED DATA Sector 10 mformatlon after command execution A A A H A N Sector 10 Information after Command execution Com mand W MT MFM SK 0 , 1 0 0 Command Codes Command W MT MFM WRITE DELETED DATA 0 0 1 0 0 , Command Codes W 0 0 0 0 0 HDS OS, DSO W 0 0 0 0 0 HOS oSl DSO W _______ C Sector 10 information W C Sector lD information H _____ W -_._--- H - - - - - prior to Command W prior to Command W --- R ------ ---- N execution W A execution W ________ ______ W N W _______ EOT W EOT _ _ _ _ _ W _ _ _ _ _ GPL W GPL _ _ _ _ W _______ oTL W _ _ _ _ OTL Exec utlOn Data transfer Execution Data transfer between the FDD between the FDD and main-system and main-system Aesu It A _ _ _ _ STO _~ _ _ _ Status Information Result A _ _ _ _ STO Status information A ___ ~ _ _ STl _ _ _ _ STl _ _ _ _ _ _ ST2 - - - - - after Command A after Command A execution R ST 2 execution A _______ C ~ A C R ---~--- H --_._----- Sector ID information A H Sector 10 IOformatlon __________ R _ _ _ I __ R after Command ~~ __~ A after COr'Qmand A R _ _, _ _ _ _ _ N execution A N execution 1-------'------'----------- --'---------- Note Symbols used In thiS table are described at the end of thiS section AO = 1 for all operations 3 X =Don't care, usually m~de to equal binary 0 6-228 AFN-01259C 8272A Table 4. 8272A Command Set (Continued) I DATA BUS I I DATA BUS PHASE RIW D7 DS D5 D4 D3 D2 D, DO REMARKS PHASE RIW D7 Ds D5 D4 D3 D2 D, Do REMARKS, READ A TRACK SCAN LOW OR EQUAL Command W 0 MFM 5K 0 0 0 1 0 Command Codes Command W MT MFM 5K 1 1 0 0 1 Command Codes W 0 0 0 0 0 HOS D51 OSO W 0 0 0 0 0 HD5 DS1 D50 W C _____ Sector ID information W C Sector 10 rnformatlon W H pnor to Command W H prior Command W R execution W R execution W N W N W EDT W EDT W GPL W GPL W DTL _ _ _ _ _ W 5TP Execution Data transfer Execution Data compared between the FDD between the FOD and mam-system and mam-system FOG reads all of cylinders contents Result R 5TO Status informatIOn from Index hole to R 5T 1 after Command R _ _ _ _ _ 5T2 execution EDT R C _ _ _ _ 5TO _ _ _ _ _ R H _____ Sector 10 information Result R Status information R _ _ _ _ _ 8T1 after Command R R after Command R _ _ _ _ _ 5T2 _ _ _ _ _ execution R N execution R C SCAN HIGH OR EQUAL R R R H R _______ N Sector 10 Information after Command execution Command W MT MFM SK , , , 0 , Command Codes W 0 0 0 0 0 HOS OS1 Dsa READ ID W C ______ Sector 10 information W H prior Command Command W 0 MFM 0 0 1 0 1 0 Commands R _____ W execution W 0 0 0 0 0 HD5 DS' D50 W - - - - - N - - - - - -- _ _ _ _ _ EDT W Execution The first correct 10 W GPL Information on the W STP Cylinder IS stored In Data Register Execution Data compared between the FOO Result R STO _ _ _ _ _ _ Status information and main-system R ST, after Command R _ _ _ _ _ ST2 execution Result R _ _ _ _ _ STO Status information R C R _ _ _ _ ~ ST 1 _ _ _ _ _ after Command R H Sector 10 informatIOn R _ _ _ _ _ ST2 executIon R R dunng Execution R ------ C R N Phase R H Sector 10 InformatIon R R after Command FORMAT A TRACK Command W 0 MFM 0 0 , , 0 , Command Codes R N RECALIBRATE executton W W 0 0 0 0 N 0 HOS OS, OSO Bytes/Sector Command W 0 0 0 0 0 1 , , Command Codes W 5C SectorsfCyllnder W 0 0 0 0 0 0 DS' DSO W GPL _ _ _ _ _ Gap 3 Execution Head retracted to W D Filler Byte Track 0 Execution FDG formats an SENSE INTERRUPT STATUS entire cylinder Command W 0 0 0 0 , 0 0 0 Command Codes Result R STO Status information Result R STO Status information at R _ _ _ ~_ ST 1 _ _ _ _ _ after Command R PCN the end of each seek R ST2 _ _ _ _ execution operatIon about the R C FDC R H In thiS case, the ID SPECIFY R R R N information has no meanmg Command W 0 0 0 0 0 0 , , Command Codes W _ SRT _ _ .~ _ _ HUT - Command W MT MFM SK , SCAN EQUAL 0 0 0 , Command Codes W HLT ~ND SENSE DRIVE STATUS W W 0 0 0 0 C 0 HDS DSl 050 Sector 10 Information Command W 0 00 0 0 , 0 0 Command Codes -- W H pnor to Command W 0 0 0 0 HDS OS, DSO _____ R 0 W execution _ _ _ _ _ ST3 W _____ N Result R Status Information _ _ _ _ _ EDT about FDO W W GPL SEEK W STP Command W 0 00 0 1 , , , Command Codes Execution Data compared W 0 0 0 0 0 HDS OS, DSO between the FDO _ _ _ _ _ NeN _ _ _ _ _ _ and main-system W Execution Head IS positioned Result R ST 0 Status information R after Command over proper Cylinder ST' R ST 2 execution on Diskette R -- C INVALID R H Sector 10 informatIon R R after Command Command W _ _ _ _ Invahd Codes _ _ _ _ Invalid Command R N execution Codes (NoOp - FDC goes Into Standby State) Result R STO _ ST 0= 80 (16) 6-229 AFN-O'259C 8272A Table 5 Command Mneumonlcs SYMBOL NAME DESCRIPTION SYMBOL NAME DESCRIPTION AD Address Line 0 Ao controls selection of Main Status Register (Ao=O) or Data Raglst.r (Ao= 1). NCN New, Cylinder Number NCN stands for a new Cylinder number, which Is gOing to be reached as a result C Cylinder Number C stands for the current selec~ed Cylinder of the Seek operation Desired positron of track number 0 through 76 of the rned,um Head. 0 Data o stands for the data pattern which 18 NO Non-OMA Mode NO stands for operation In the Non-DMA gOing to be wntten into a Sector Mode °rOo Data BUB a·b,t Data Bus where 07 IS the most PCN Present Cylinder PeN stands for the Cylinder number at significant bit, and DO Is the least slgmfl' Number the completion of SENSE INTERRUPT cant bit STATUS Command Position of Head at I OSO,DS1 Drive Select DS stands for a selected dnve number 0 present time or 1 R Record R stands for the Sector number, which OTL Data Length When N IS defined as 00, Oll stands for Will be read or written the data length which users are gomg to RIW Read/Write R/W stands for either Read (R) or Wnte read out or write IOta the Sector (W) signal EOT End of Track EOT stands for the final sector number of SC Sector SC mdlcates the number of Sectors per a Cylinder Cylinder GPL Gap Length GPL stands for the length of Gap 3 SK Skip SK stands for Skip Deleted Data Address (spacmg between Sectors excluding veo Mark Sync Field) SRT Step Rate Time SAT stands for the StepPing Aate for the H Head Address H stands for head number 0 or 1, as FOD (1 to 16 ms In 1 ms Increments) The specified In 10 field same Stepping Rate applies to all drrves HDS Head Select HDS stands for a selected head number 0 (F=1 ms, E=2 ms, etc) or 1 (H = HDS In all command words) STO Status 0 ST 0-3 stand for one of four registers HLT H,ad Load Time HLT stands for the head load time In the ST1 Status 1 which store the status Information after FPO (2 to 254 ms In 2 rns Increments). ST 2 Status 2 a command has been executed ThiS ST3 Status 3 ,"formabon IS available dunng the result HUT Head Unload Time HUT stands for the head unload time after phase after command execution These a read or write operation has occurred (16 registers should not be confused With the to 240 ms In 16 ms Increments) maIO status register (selected by AO = 0) ST 0-3 may be read only after a command MFM FM or MFM Mode If MF IS low, FM mode IS selected and If has been executed and contain Infonnatlon It IS high, MFM mode IS selected relevant to that particular command MT Multi-Track If MT, IS high, a multi-track operation IS to be performed (a cylinder under both HOO STP DUring a Scan operation, If STP= 1, the data In conltguous sectors IS compared and H01 Will be read or written) byte by byte With data sent from the N Number N stands for the number of data bytes processor (or DMA), and If STP = 2, then written In a Sector alternate sectors are read and compared automatically starts. In a similar fashion, when the last into the Data Register. The 010 (DB6) and ROM (DB7) byte of data is read out in the Result Phase, the com- bits in the Main Status Register must be in the "0" and mand is automatically ended and the 8272A is ready for "1" states respectively, before each byte of the com- a new command. A command may be aborted by simpiy mand may be written into the 827~A. The beginning of sending a Terminal Count signal to pin 16 the execution phase for any of these commands will (TC = 1). This is a convenient means of ensuring that the cause 010 and ROM to switch to "1" and "0" states processor may always get the 8272A's attention even if respectively. the disk system hangs up in an abnormal manner. READ DATA POLLING FEATURE OF THE 8272A A set of nine (9) byte words are required to place the After power·up RESET, the Drive Select Lines DSO and FDC into the Read Data Mode. After the Read Data com- DS1 will automatically go into a polling mode. In be- mand has been issued the FOe loads the head (if it is in tween commands (and between step pulses in the SEEK the unloaded state), waits the specified head settling command) the 8272A polls all four FDDs looking for a time (defined in the Specify Command), and begins change in the Ready line from any of the drives. If the reading 10 Address Marks and 10 fields. When the cur- Ready line changes state (usually due to a door opening rent sector number ("R") stored in the 10 Register (lOR) or closing) then the 8272A will generate an interrupt. compares with the sector number read off the diskette, When Status Register 0 (STO)·is read (after Sense Inter- then the FDC outputs data (from the data field) byte-by- rupt Status is issued), Not Ready (NR) will be indicated. byte to the main system via the data bus, The polling of the Ready line by the 8272A occurs con- After completion of the read operation from the current tinuously between instructions, thus notifying the sector, the Sector Number is incremented by one, and processor which drives are on or off line. Approximate the data from the next sector is read and output on the scan timing is shown in Table 6, data bus. This continuous read function is called a "Multi·Sector Read Operation." The Read Data Com- Table 6. Scan Timing mand must be terminated by the receipt of a Terminal OS1 DSO APPROXIMATE SCAN TIMING Count signal. Upon receipt of this signal, the FDC stops 0 0 220"5 outputting data to the processor, but will continue to 0 1 22O",S read data from the current sector, check CRC (Cyclic 1 0 220"5 Redundancy Count) bytes, and then at the end of the 1 1 440,.5 sector terminate the Read Data Command. 'J'he amount of data which can be handled with a Single COMMAND DESCRIPTIONS command to the FDC depends'upon MT (multi-track), During the Command Phase, the Main Status Register MFM (MFM/FM), and N (Number of Bytes/Sector). Table must be polled by the CPU before each byte is written 7 on the next page shows the Transfer Capacity. 6-230 AFN·01259C 8272A Table 7. Transfer Capacity Mu"',Trock MFM/FM BytellSactor Maximum Tranaf.r Capacity F1nal sector Raad MT MFM N (Byles/Secto~ (Number •• Soctors) from Diskette 0 0 00 (128)(26)= 3.328 26 at Side 0 0 1 01 (256)(26) = 6,656 or 26 at Side 1 1 0 00 (128)(52)= 8,656 26 at Side 1 1 1 01 (256)(52)= 13,312 0 0 01 (256)(15)= 3,840 15 at Side 0 0 1 02 (512)(15)= 7,680 or 15 at Side 1 1 0 01 (256)(30)= 7,680 15 at Side 1 1 1 02 (512) (30)= 15.360 0 0 02 (512)(8) = 4,096 8 at Side 0 0 1 03 (1024)(8) = 8,192 or 8 at Side 1 1 0 02 (512)(16)= 8,192 8atS.de 1 1 1 03 (1024) (16)= 16,364 The "multi-track" function (MT) allows the FDC to read During disk data transfers between the FDC and the data from both sides of the diskette_ For a particular processor, via the data bus, the FDC must be serviced cylinder, data will be transferred ~tarting at Sector 1, by the processor every 27,..s in the FM Mode, and every Side 0 and completing at Sector L, Side 1 (Sector L = last 13,..s in the MFM Mode, or the FDC sets the OR (Over sector on the side). Note, this function pertains to only Run) flag in Status Register 1 to a 1 (high), and ter- one cylinder (the same track) on each side of the minates the Read Data Command. diskette. If the procEl{lsor terminates a read (or write) operation in When N = 0, then DTL defines the data length which the the FDC, then the ID Information in the Result Phase is FDC must treat as a sector. If DTL is smaller than the ac- dependent 'upon the state of the MT bit and EOT byte. tual data length in a Sector, the data beyond DTL in the Table 5 shows the values for C, H, R, and N, when the Sector is not sent to the Data Bus. The FDC reads (inter- processor terminates the Command. nally) the complete Sector performing the CRC check, and depending upon the manner of command termina- Table 8. 10 Information When Processor tion, may perform a Multi-Sector Read Operation. When Terminates Command N is non-zero, 'then DTL has no meaning and should be ID Infonnatkm a. Result Ph••• Final Sector Tranaferred to set to OFFH. MT EDT Proc...or C H R N At the completion of the Read Data Command, the head 1A Sector 1 to 25 at Side 0 OF Sector 1 to 14 at Side 0 NC NC R+1 NC is not unloaded until after Head Unload Time Interval 06 Sector 1 to 7 at Side 0 (specified in the Specify Command) has elapsed. If the 1A Sector 26 at Side 0 processor issues another command before the head OF Sector 15 at Side 0 C+1 NC R=01 NC unloads then the head settling time may be saved be- Q 08 Sector 8 at Side 0 tween subsequent reads. This time out is particularly 1A Sector 1 to 25 at Side 1 OF Sector 1 to 14 at SIde 1 NC NC R+1 NC valuable when a diskette is copied from one drive to 08 Sector 1 to 7 at Side 1 another, 1A Sector 26 at Side 1 If the FDC detects the Index Hole twice without finding OF Sector 15 at Side 1 C+1 NC R=01 NC 08 Sector 8 at Side 1 the right sector, (indicated in "R"), then the FDC sets 1A Sector 1 to 25 at Side 0 the NO (No Data) fllig in Status Register 1 to a 1 (high), OF Sector 1 to 14 at Side 0 NC NC R,+1 NC and terminates the Read Data Command. (Status 08 Sector 1 to 7 at Side 0 Register 0 also has bits 7 and 6 set to 0 and 1 respective- 1A Sector 26 at Side 0 ly.) OF Sector 15 at Side 0 NC LSB R=01 NC 06 Sector 8 at Side 0 1 After reading the II:> and Data Fields in each sector, the 1A Sector 1 to 25 at Side 1 FDC checks the CRC bytes. If a read error is detected OF Sector 1 to 14 at Side 1 NC NC R+1 NC 08 Sector 1 to 7 at Side 1 , (incorrec;t CRC in 10 field), the FOe;: sets the DE (Data Er- 1A Sector 26 at Side 1 ror) flag in Status Register 1 to a 1 (high), and if a CRC er- OF Sector 15 at Side 1 C+1 LSB R=01 NC ror occurs in the Data Field the FDC also sets the DO 08 Sector 8 at Side 1 (Data Error in Data Field) flag in Status Register 2 to a 1 Notes 1. NC (No Change) The same value as the one at the beglnmng of command (high), and terminates the Read Data Command. (Status execution Register 0 also has bits 7 and 6 set to 0 and 1 respec- 2 LSB (Least Slgmflcant Bit) The least Significant bit of H IS tively.) complemented If the FDC reads a Deleted Data Address Mark off the WRITE DATA diskette, and the SK bit (bit 05 in the first Command A set of nine (9) bytes are required to set the FDC into Word) is not set (SK = 0), then the FDC sets the CM (Con- the Write Data mode. After the Write Data command has trol Mark) flag in Status Register 2 to a 1 (high), and ter- been issued the FDC loads the head (if it is in the minates the Read Data Command, after reading all the unloaded state), waits the speCified head settling time data in the Sector. If SK= 1, the FDC skips the sector (defined in the Specify Command), and begins reading with the Deleted Data Address Mark and reads the next 10 Fields. When the current sector number (UR"), stored sector. in the 10 Register (lOR) compares with the sector 6-231 AFN·01259C 8272A number read off the diskette, then the FDC takes data all data fields on the track as continuous blocks of data. from the processor byte-by-byte via the data bus, and If the FDC finds an error in the 10 or DATA CRC check outputs it to the FDD. bytes, it continues to read data from the track. The FOC After writing data into the current sector, the Sector compares the 10 information read from each sector with Number stored in "R" is incremented by one, and the the value stored in the lOR, and sets the NO flag of next data field is written into. The FDC continues this Status Register 1 to a 1 (high) if there is no comparison. "Multi·Sector Write Operation" until the issuance of a Multi-track or skip operations are not allowed with this Terminal Count signal. If a Terminal Count Signal is sent I command. to the FDC it continues writing into the current sector to This command terminates when EOT number of sectors complete the data field. If the Terminal Count signal is have been read. If the FDC does not find an 10 Address received while a data field is being written then the reo Mark on the diskette after it encounters the INDEX mainder of the data field is filled with 00 (zeros). HOLE for the second time, then it sets the MA (missing The FDC reads the 10 field of each sector and checks address mark) flag in Status Register 1 to a 1 (high), and the CRC bytes. If the FDC detects a read error (incorrect terminates the command. (Status Register 0 has bits 7 CRC) in one of the ID Fields, it sets the DE (Data Error) and 6 set to 0 and 1 respectively.) flag of Status Register 1 to a 1 (high), and terminates the Write Data Command. (Status Register 0 also has bits 7 READID and 6 set to 0 and 1 respectively.) The READ ID Command is used to give the present posi- The Write Command operates in much the same manner tion of the recording head. The FDC stores the values as the Read Command. The following items are the from the first ID Field it is able to read. If no proper 10 same; refer to the Read Data Command for details: Address Mark is found on the diskette, before the IN· • Transfer Capacity DEX HOLE is encountered for the second time then the • EN (End of Cylinder) Flag MA (Missing Address Mark) flag in Status Register 1 is • NO (No Data) Flag set to a 1 (high), and if no data is found then the NO (No • Head Unload Time Interval Data) flag is also set in Status Register 1 to a 1 (high) and the command is terminated. • 10 Information when the processor terminates com· mand (see Table 2) FORMAT A TRACK • Definition of DTL when N = 0 and when N '" 0 The Format Command allows an entire track to be for- In the Write Data mode, data transfers between the proc· matted. After the INDEX HOLE is detected, Data is writ· essor and FDC must occur every 31 /AS in the FM mode, ten on the Diskette: Gaps, Address Marks, 10 Fields and and every 15 /As in the MFM mode. If the time interval Data Fields, all per the IBM System 34 (Double Density) between data transfers is longer than this then the FDC or System 3740 (Single Density) Format are recorded. sets the OR (Ovl;lr Run) flag in Status Register 1 to a 1 The particular format which will be written is controlled (high), and terminates the Write Data Command. by the values programmed into N (number of bytes/sec· For mini·floppies, multiple track writes are usually not tor), SC (sectors/cylinder), GPL (Gap Length), and 0 permitted. This is because of the turn· off time of the (Data Pattern) which are supplied by the processor duro erase head coils-the head switches tracks before the ing the Command Phase. The Data Field is filled with erase head turns off. Therefore the system should the Byte of data stored in D. The 10 Field for each sector typically' wait 1.3 mS before attempting to step or is supplied by the processor; that is, four data requests change sides. per sector are made by the FDC for C (Cylinder Number), H (Head Number), R (Sector Number) and N (Number of WRITE DELETED DATA Bytes/Sector). This allows the diskette to be formatted with nonsequential sector numbers, if desired. This command is the same as the Write Data Command except a Deleted Data Address Mark is written at the After formatting each sector, the processor must send beginning of the Data Field instead of the 'lormal Data new values for C, H, R, and N to the 8272A for each sec- Address Mark. tor on the track. The .contents of the R Register is in- cremented by one after each sector is formatted, thus, READ DELETED DATA the R register contains a value of R + 1 when it is read during the Result Phase. This incrementing and format· This command is the same as the Read Data Command ting continues for the whole track until the FDC en- except that when the FDC detects a Data Address Mark counters the INDEX HOLE for the second time, where- at the beginning of a Data Field (and SK = 0 (low)), it will upon it terminates the command. read all the data in the sector and set the CM flag in Status Register 2 to a 1 (high), and then terminate the If a FAULT signal is received from the FDD at the end of command. If SK= 1, then the FDC skips the sector with a write operation, then the FDC sets the EC flag of the Data Address Mark and reads the next sector. Status Register 0 to a 1 (high), and terminates the com- mand after setting bits 7 and 6 of Status Register 0 to 0 READ A TRACK and 1 respectively. Also the loss of a READY Signal at the beginning of a command execution phase causes This command is similar to READ DATA Command command termination. except that the entire data field is read continuously from each of the sectors of a track. Immediately after Table 9 shows the relationship between N, SC, and GPL encountering the INDEX HOLE, the FDC starts reading for various' sector sizes: 6-232 AFN-01259C 8272A Table 9. Sector Size Relationships. S" STANDARD FLOPPY SY. MINI FLOPPY I>' FORMAT SECTOR SIZE N SC GPL ' GPL2 REMARKS SECTOR SIZE N SC GPL ' GPL2 FM Mode 128 bytes/Sector 00 1A 07 18 IBM DIskette 1 128 bytes/Sector 00 12 07 09 256 01 OF OE 2A IBM DIskette 2 _. 128 00 10 10 19 512 02 08 18 3A 256 01 08 18 30 1024 03 04 47 8A 512 02 04 46 87 2048 04 02 C8 FF 1024 03 02 C8 FF 4096 05 01 C8 FF 2048 04 01 C8 FF MPM Mode 256 01 1A OE 36 IBM Diskette 20 256 01 12 OA OC 512 02 OF 18 54 256 01 10 20 32 1024 03 08 35 74 IBM Diskette 20 512 02 08 2A 50 2048 04 04 99 FF 1024 03 04 80 FO 4096 05 02 C8 FF 2048 04 02 C8 FF 8192 06 01 C8 FF 4096 05 01 C8 FF Note. 1 Suggested values of GPL In Read or Write Commands to avoid splice pOint between data held and 10 field of contiguous sections 2. Suggested values of GPL In format command SCAN COMMANDS Mark) flag of Status Register 2 to a 1 (high) and ter- minates the command. If SK= 1, the FDC skips the sec- The SCAN Commands allow data which is being read tor with the Deleted Address Mark, and reads the next from the diskette to be compared against data which is sector. In the second case (SK = 1), the FDC sets the CM being supplied from the main system (Processor in (Control Mark) flag of Status Register 2 to a 1 (high) in NON-DMA mode, and DMA Controller in DMA mode). order to show that a Deleted Sector had been en- The FDC compares the data on a byte-by-byte basis, and countered. looks for a sector of data which meets the conditions of = DFDD Dprocessor, D FDD ., Dprocessor, or DFDD;;' Dprocessor· When either the STP (contiguous sectors STP = 01, or Ones complement arithmetic is used for comparison = alternate sectors STP 02 sectors are read) or the MT (FF = largest number, 00 = smallest number). After a (Multi-Track) are programmed, it is necessary to whole sector of data is compared, if the conditions are remember that the last sector on the track must be read. not met, the sector number is incremented (R + STP - For example, if STP = 02, MT = 0, the sectors are R), and the scan operation is continued. The scan opera- numbered sequentially 1 through 26, and we start the tion continues until one of the following conditions oc- Scan Command at sector 21; the following will happen. cur; the conditions for scan are met (equal, low, or high), Sectors 21,23, and 25 will be read, then the next sector the last sector on the track is reached (EaT), or the ter- (26) will be skipped and the Index Hole will be en- minal count signal is received. countered before the EaT value of 26 can be read. This will result in an abnormal termination of the command. If the conditions for scan are met then the FDC sets the If the EaT had been set at 25 or the scanning started at SH (Scan Hit) flag of Status Register 2 to a 1 (high), and sector 20, then the Scan Command would be completed terminates the Scan Command. If the conditions for in a normal manner. scan are not met between the starting sector (as specified by R) and the last sector on the cylinder (EaT), During the Scan Command data is supplied by either the then the FDC sets the SN (Scan Not Satisfied) flag of processor or DMA Controller for comparison against the Status Register 2 to a 1 (high), and terminates the Scan data read from the diskette. In order to avoid having the Command. The receipt of a TERMINAL COUNT signal OR (Over Run) flag set in Status Register 1, it is nec- from the Processor or DMA Controller during the scan essary to have the data available in less than 27 /AS (FM operation will cause the FDC to complete the com- Mode) or 13 /As (MFM Mode). If an Overrun occurs the parison of the particular byte which is in process, and FDC terminates the command. then to terminate the command. Table 10 shows the SEEK status of bits SH and SN,under various conditions of SCAN. The read/write head within the FDD is moved from cylinder to cylinder under control of Ihe Seek Command. Table 10. Scan Status Codes The FDC compares the PCN (Present Cylinder Number) STATUS REGISTER 2 which is the current head position with the NCN (New COMMAND BIT2=SN BIT3=SH COMMENTS Cylinder Number), and performs the following operation if there is a difference: 0 1 DFDD = Dprocessor Scan Equal 1 0 DFDD:f: DProcessor PCN < NCN: Direction signal to FDD set to a 1 (high), 0 1 DFDO = Dprocessor and Step Pulses are issued. (Step In.) Scan Low or Equal 0 0 DFDD < DProcessor PCN > NCN: Direction Signal to FDD set to a 0 (low), 1 0 DFDD ~ Dprocessor 0 1 and Step Pulses are issued. (Step Out.) DFDO = DProcessor Scan High or Equal 0 0 DFDD > Dprocessor The rate at which Step Pulses are issued is controlled by 1 0 DFDD l: Dprocessor SRT (Stepping Rate Time) in the SPECIFY Command. After each Step Pulse is issued NCN is compared If the FDC encounters a Deleted Data Address Mark on against PCN, and when NCN = PCN, fhen the SE (Seek one of the sectors (and SK= 0), then it regards the sec- End) flag is set in Status Register 0 to a 1 (high), and the tor as the last sector on the cylinder, sets CM (Control command is terminated. 6-233 AFN·01259C 8272A During the Command Phase of the Seek operation the Table 11. Seek, Interrupt Codes FDC is in the FDC BUSY state, but during the Execution Phase it is in the NON BUSY state. While the FDC is in SEEK END INTERRUPT CODE the NON BUSY state, another Seek Command may be BIT 5 BIT6, BI17 CAUSE issued, and In this manner para'ilel seek operations may 0 1 1 Ready Line changed be done on up to 4 Drives at once. state, either polarity If an FDD is in a NOT READY state at the beginning of 1 0 0 Normal Termination the command execution phase or during the seek opera- of Seek or Recalibrate tion, then the NR (NOT READY) flag is set in Status Command Register 0 to a 1 (high), and the command is terminated. 1 1 0 Abnormal Termination of Note that the 8272A Read and Write Commands do not Seek or Recalibrate have implied Seeks. Any R/W command should be Command preceded by: 1) Seek Command; 2) Sense Interrupt SPECIFY Status; and 3) Read ID. The Specify Command sets the initial values for each of RECAllBRATE the three internal timers. The HUT (Head Unload Time) defines the time from the end of the Execution Phase of This command causes the read/write head within the one of the Read/Write Commands to the head unload FDD to retract to the Track 0 position. The FDC clears state. This timer is programmable from 16 to 240 ms in the contents of the PCN counter, and checks the status increments of 16 ms (01 = 16 ms, 02 = 32 ms. , .. OF = of the Track 0 signal from the FDQ. As long as the Track 240 ms). The SRT (Step Rate Time) defines the time in- o signal is low, the Direction signal remains 1 (high) and terval between adjacent step pulses. This timer is pro- Step Pulses are issued. When the Track 0 signal goes grammable from 1 to 16 ms in increments of 1 ms (F = 1 high, the SE (SEEK END) flag in Status Register 0 is set ms, E = 2 ms, 0 = 3 ms, etc.). The HlT (Head load Time) to a 1 (high) and the command is terminated. If the Track defines the time between when the Head load signal o signal is still low after 77 Step Pulses have been goes high and when the Read/Write operation starts. issued, the FDC sets the SE (SEEK END) and EC (EQUIP- This timer is programmable from 2 to 254 ms in in- MENT CHECK) flags of Status Register 0 to both 1s crements of 2 ms (01 = 2 ms, 02= 4 ms, 03= 6 ms .. ,. (highs), and terminates the command. FE=254 ms), The ability to overlap RECALIBRATE Commands to The step rate should be programmed 1 mS longer than multiple FDDs, and the loss of the READY signal, as the minimum time required by the drive. described in the SEEK Command, also applies to the RECALIBRATE Command. The time intervals mentioned above are a direct function of the clock (ClK on pin 19). Times indicated above are SENSE INTERRUPT STATUS for an 8 MHz clock, if the clock was reduced to 4 MHz (mini-floppy application) then all time intervals are in- An Interrupt signal is generated by the FDC for one of creased by a factor of 2. the following reasons: The choice of DMA or NON-OMA operation is made by 1. Upon entering the Result Phase of: the ND (NON-DMA) bit. When this bit is high (ND= 1) the a. Read Data Command NON-DMA mode is selected, and when NO = 0 the DMA b. Read a Track Command mode is selected. c. Read ID Command d. Read Deleted Data Command SENSE DRIVE STATUS e. Write Data Command This command may be used by the processor whenever f. Format a Cylinder Command it wishes to obtain the status of the FDDs, Status g. Write Deleted Data Command Register 3 contains the Drive Status information: h. Scan Commands 2. Ready Line of FDD changes state INVALID 3. End of Seek or Recalibrate Command If an invalid command is sent to the FDC (a command 4. During Execution Phase in the NON-OMA Mode not defined above), then the FDC Will terminate the com- Interrupts caused by reasons 1 and 4 above occur during mand. No interrupt is generated by the 8272A during this normal command operations and are easily discernible condition, Bit 6 and bit 7 (DIO and RQM) in the Main by the processor. However, interrupts caused by Status Register are both high ("1") indicating to the reasons 2 and 3 above may be uniquely identified with processor that the 8272A is in the Result Phase and the the .aid of the Sense Interrupt Status Command. This contents of Status Register 0 (STO) must be read. When command when issued resets the interrupt signal and the processor reads Status Register 0 it will find an 80H via bits 5, 6, and 7 of Status Register 0 identifies the indicating an invalid command was received. cause of the interrupt. A Sense Interrupt Status Command must be sent after a Neither the Seek or Recalibrate Command have a Result Seek or Recalibrate interrupt, otherwise the FDC will Phase. Therefore, i't is mandatory to use the Sense Inter- consider the next command to be an Invalid Command. rupt Status Command after these commands to effec- In some applications the user may wish to use this com- tively terminate them and to provide verification of the mand as a No-Op c'ommand, to place the FOC in a stand- head position (PCN), by or no operation state. 6-234 AFN·01259C intJ 8272A Table 12. Status Registers BIT BIT DESCRIPlilON DESCRIPTION NO. NAME SYMBOL NO. NAME SYMBOL STATUS REGISTER 0 STATUS REGISTER 1 (CONT~ 07 Interrupt IC 0 7 =0 and D6=0 01 Not NW DUring execution of WRITE DATA, Code Normal Termonatlon of Command, Writable WRITE DELETED DATA or Format A (N1). Command was completed and Cylinder Command, If the FDC properly executed. detects a write protect signal from 06 07=0 and 06= 1 the FDD, then this flag IS set. Abnormal Termonatlon of Com· MISSing MA If the FDC cannot detect the 10 Do mand, (A1). Execution of Command Address Address Mark after encountering the was started, tnJt was n9t Mark Index hole twice, then thiS flag 15 set successfully completed If the FDC cannot detect the Data 07= 1 and 06=0 Address Mark or Deleted Data Invalid Command issue, (I C). Address Mark, thiS flag IS set Also Command which was issued was at the same time, the MD (Mlssong never started. Address Mark In Data Field) of 0 7 = 1 and 0 6 = 1 Status Register 2 IS set Abnormal Termination because during command execution the STATUS REGISTER 2 ready signal from FDD changed 07 Not used ThiS bit IS always 0 (low) state 06 Control CM DUring executing the READ DATA or 05 Seek End SE When the FDC completes the Mark SCAN Command, If the FDC SEEK Command, this flag IS set to 1 encounters a Sector which contains (high). a Deleted Data Address Mark, thiS 04 EqUipment EC If a fault Signal IS received from the flag IS set Check FDD, or If the Track 0 Signal falls to 05 Data Error In DO If the FDC detects a CRC error In occur after 77 Step Pulses (Recall· Dat~ Field the data field then thiS flag IS set brate Command) then this flag IS set 04 Wrong WC ThiS bit IS related With the NO bit, 03 Not Ready NR When the FDD IS In the not·ready Cylonder and when the contents of C on the state and a read or write command IS medium IS different from that stored Issued, this flag IS set If a read or In the lOR, thiS flag IS set write command IS Issued to Side 1 of a songle Sided drive, then thiS flag 03 Scan Equal SH DUring execution, the SCAN IS set Hit Command, If the condition of "equal" IS satisfied, thiS flag IS set O2 Head HD ThiS flag IS used to Indicate the Address state of the head at Interrupt O2 Scan Not SN DUring executing the SCAN Satisfied Command, If the 'FoC cannot find a 01 Unit Select 1 US 1 These flags are used to indicate a Sector on the cylinder which meets Do Unit Select 0 usa Drive Unit Number at Interrupt the condition, then thiS flag Is set STATUS REGISTER 1 01 Bad BC ThiS bit IS related With the NO bit, Cylonder and when the content of C on' the 07 End of EN When the FOe tnes to access a medium IS different from that stored Cylonder Sector beyond the fonal Sector of a In the lOR and the content of C IS Cylinder, this flag IS set. FF, then thiS flag IS set 06 Not usad. ThiS bit IS always 0 (low) Missing MD When data IS read from the medium, Do 05 Data Error DE When the FDC detects a CRC error Address' If the FDC cannot fond a Data In 91therthe 10 field or the data field, Markin Data Address Mark or Deleted Data this flag is set. Field Address Mark, then thiS flag IS set ~ 04 Over Run OR If the FDC IS not servtced by the STATUS REGISTER 3 main-systems during data transfers, 07 Fault FT ThiS bit IS used to Indicate the Within a certain time interval, thiS status of the Fault signal from the flag IS set FDD 03 Not uslld ThiS bit always 0 (low). De Write WP , ThiS bit IS used to Indicate the 02 No Data NO Dunng execution of READ DATA, Protected status of the Write Protected signal WRITE DELETED DATA or SCAN from the FDD Command, If the FDC cannot find 05 Ready ROY ThiS bit is used to indicate the status the Sector speclfted on the lOR of the Ready signal from the FDD Register, thiS flag IS set 04 Track 0 TO ThiS bit IS used to Indicate the status DUring executong the READ 10 Com· mand, If the FDC cannot read the , of the Track 0 signal from the FDD 10 field Without an error, then thiS 03 Two Side TS Thrs bit IS used to mdlcate the status flag IS set. of the Two Side signal from the FDD DUring the, execution of the READ A O2 Head HD ThiS bit IS used to indicate the status Cylinder Command, If the starting Address of Side Select Signal to the FDD sector cannot be found, then thiS flag IS set 01 Unit Select I US 1 ThiS bit IS used to indicate the status of the Unit Select 1 Signal to the FDD Do Unit Select 0 usa ThiS bit IS used to Indicate the status of the Unit Select 0 Signal tei the FDD 6-235 AFN·01259C 8272A ABSOLUTE MAXIMUM RATINGS· Operating Temperature .................. ooc to + 70'C NOTICE: Stress above those listed under "Absolute Max- Storage Temperature ............. -40'C to + 125'C imum Ratings" may cause permanent damage to the de- All Output Voltages ............... "':0.5 to + 7 Volts vice. This is a stress rating only and functional operation of All Input Voltages •................ -0.5 to + 7 Volts the device at these or any other conditions above those Supply Voltage Vee ............... -0.5 to + 7 Volts indicated in the operational sections of this specification Power Dissipation .......................... 1 Watt is not implied. Expo~ure to absolute maximum rating conditions for extended periods may affect device reliability. D.C. CHARACTERISTICS (TA = O'Cto +70'C, Vee. = +5V ±10%) Limits Test Symbol Parameter Unit Min. Max. Conditions VIL Input Low Voltage -0.5 0.8 V V IH Input High Voltage 2.0 Vee+ 0.5 V VOL Output Low Voltage 0.45 V IOL=2.0 mA VOH Output High Voltage 2.4 Vee V IOH = -400,..A Icc Vee Supply Current 120 mA Input Load Current 10 ,..A VIN = Vee IlL (All Input Pins) -10 ,..A VIN=OV ILOH High Level Output 10 ,..A VOUT= Vee Leakage Current IOFL Output Float ±10 ,..A 0.45V ,s; VOUT ,s; Vee Leakage Current CAPACITANCE (TA = 25'C, tc = 1 MHz, Vee = OV) Limits Test Symbol Parameter Unit Conditions Min. Max. CIN( 08 TEST POINTS <~:c 08 - DEVICE UNDER TEST '1 CL =.OOPF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC l' AND 0 45V FOR A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 20V FOR A LOGIC 1" AND 0 8V FOR A LOGIC 0 . C L = 100pF C L INCWDES JIG CAPACITANCE WAVEFORMS =>t PROCESSOR READ OPERATION DACK Ao.ClI. , ....----'A-'----I.-.-----------------------"-,~~~===~~~--~---. . .-"'1----,-" }= 1-..0_----,,0.-----1 DATA - - - - - - - - - - - - INT 6-238 AF~·O'259C inter 8272A WAVEFORMS (Continued) PROCESSOR WRITE OPERATION Ao.C$. DACK ....-tAw I----tww----+-I -+--IOW---' DATA 1-- INT DMA OPERATION ~--------"'QCY-----------I ORO t--------tRQAW------~ WR or AD 6-239 AFN·01259C 8272A WAVEFORMS (Continued) CLOCK TIMING eLK FDD WRITE OPERATION WAITE ENABLE (WEI te, PRESHIFT a or 1 (PS o d PRESHIFT 0 PRESHIFT 1 NORMAL 0 0 LATE 0 1 EARLY 1 0 INVALID 1 1 6-240 AFN·01259C 8272A WAVEFORMS (Continued) SEEK OPERATION STABLE k-----tSTU------1~ I'D LeTI DIRECTION STEP I__---------I'c----------.-I FLT RESET INDEX FAULT RESET FAIL UNSAFE RESET 6-241 AFN-01259C 8272A WAVEFORMS (Continued) FDD READ OPERATION READDA4A tRDD ...... ~--------------------~ READ DA_TA_ _ _ _ _ _ _ _ WINDOW >{~"-_-_-__-_twR_D~~~~~ . _ ______ ~ __ -----twWCy-------I TERMINAL COUNT RESET RESET TC 6-242 AFN-01259C intJ 8273, 8273-4, 8273-8 PROGRAMMABLE HDLC/SDLC PROTOCOL, CONTROLLER • CCITT X.25 Compatible • Programmable NRZI EncodelDecode • HDLC/SDLC Compatible • Two User Programmable Modem Control Ports • SDLC Full Duplex, Half Duplex, or Loop Operation • Recovery Digital Phase Locked Loop Clock • Transfers Up to 64K Baud Synchronous • Checking Automatic FCS (CRC) Generation and • Minimum CPU Overhead • 8088/8086 Fully Compatible with 8048/8080/80851 CPUs • Up to 9.6K Baud with On·BQard Phase Locked Loop • Single +5V Supply The Intell!> 8273 Programmable HOLC/SOLC Protocol Controller is a dedicated device designed to support the ISOI CCITI's HOLC and IBM's SOLC communication line protocols. It is fully compatible with Intel's new high performance microcomputer systems such as the MCS-88I86™. A frame level command set is achieved by a unique microprogrammed dual processor chip architecture. The processing capability supported by the 8273 reHeves the system CPU of the low level real-time tasks normally asSOCiated with controllers. • REGISTERS rxlNT RESULT TEST MODE FLAG'"6ET Tx INT ~LK RESET 080-7 TxD~CK T.D r;c lxORO _ - - - - , TxDACK - - - - , om 32XCt"i< 'AxORO RTs fbDACK PB,-4 TxlNT AIIINT PAZ_4 AO A, REseT r-"""'-'\-._ R.D Fw: CPU INTERFACE MODEM INTERFACE \ Figure 1_ Block Diagram Figure 2. Pin Configuration Intel Corporation A••um•• No ReaponaibUty for the U.e of Anr CircUitry Other Than Circuitry ~mbodled In an Intel Product No Other Circuit Patent Licenses are Implied © INTEL CORPORATION. 1982 6-243 ORDER NUMBER: 21':~: intJ 8273, 8273·4, 8273·8 A BRIEF DESCRIPTION OF HDLC/SDLC types of frames; an Information Frame is used to transfer data, a Supervisory Frame is used for control purposes, PROTOCO!-S and a Non-se,q\lenced Frame is used for initialization and control of the secondary stations. General Frame Characteristics The High Level Data Link Control (HOLC) is a standard An important characteristic of a frame is that its con- communication link protocol established by International tents are made code transparent by use of a zero bit Standards Organization (ISOl. HOLC is the discipline insertion and deletion tectinique. Thus, the user can adopt used to implement ISO X.25 packet switching systems. any format or code suitable for his system - it may even The Synchronous Data Link Control (SOLC) is an IBM be a computer word length or a "memory dump". The communication link protocol used to implement the frame is bit oriented that is, bits, not characters in each System Network Architecture (SNA). Both the protocols field, have specific meanings. The Frame Check are bit oriented, code independent, and ideal for full Sequence (FCS) is an error detection scheme similar to duplex communication. Some common applications the Cyclic Redundancy Checkword (CRC) widely used in include terminal to terminal, terminal to CPU, CPU to magnetic disk stora€le devices. The Command and CPU, satellite communication, packetswitching and other Response information frames contain sequence numbers high speed data links. In systems which require expensive in the control fields identifying the sent and received cabling and interconnect hardware, any of the two frames. The sequence numbers are used in Error protocols could be used to simplify interfacing (by gOing Recovery Procedures (EAP) and as implicit acknowledge- serial), thereby reducing interconnect hardware costs. ment of frame communication, enhancing the true full- Since both the protocols are speed independent, rE!.ducing duplex nature of the HOLC/SOLC protocols. interconnect hardware could become an important In contrast, BISYNC is basically half-duplex (two way application. alternate) because of necessity to transmit immediate Network acknowledgement frames. HOLC/SOL.O therefore saves' propagation delay times and have a potent!al of twice the In both the HOLC and SOLC line protocols, according to a throughput rate of BISYNC. pre-assigned hierarchy, a PRIMARY (Controll STATION controls the overall network (data link) anq issues It is possible to use HOLC or SOLC over half duplex lines commands to the SECONDARY (Slave) STATIONS. The but there is a corresponding loss in throughput because latter comply with instructions and respond by sending both are primarily designed for full-duplex communi- . appropriate RESPONSES. Whenever a transmitting cation. As in any synchronous system, the bit rate is station must end transmission prematurely it sends an determined by the clock bits supplied by the modem, ABORT character. Upon detecting an abort character, a protocols themselves are speed independent. receiving station ignores the transmission block called a A byproduct of the use of zero-bit insertion-deletion FRAME. Time fill between frames can be accomplished by technique is the non-return-to-zero invert (NRZI) data transmitting either continuous frame preambles called transmission/reception compatibility. The latter allows FLAGS or an abort character. A time fill within a frame is HOLO/SOLC protocols to be used with asynchronous not permitted. Whenever a station receives a string of data communication hardware in which the clocks are more that fifteen consecutive ones, the station goes into derived from the NRZI encoded dala. an IDLE state. References Frames IBM Synchronous Data Lmk Control General Information, IBM, GA27- A single communication element is called a FRAME which 3093-1 St~ndard Network Acce•• Protocol SpecificatIOn, DATAPAC, Trans- can be used for both Link Control and data transfer Canada Telephone System CCG111 purposes. The elemerrts of a frame are the beginning eight Recommendalion X 25, ISO/CCITT March 2, 1976 bit FLAG (F) conSisting of one zero, six ones, and a zero, IBM 3650 Reta,l Store System Loop Interface OEM Informallon, IBM, GA an eight bit ADDRESS FIELD (A), an eight bit CONTROL 27-3098-0 FIELD (C), a variable (N-bit) INFORMATION FIELD (Il, a GUidebook to Data CommUniCations, Training Manual, Hewlett-Packard 5955-1715 sixteen bit FRAME CHECK SEQUENCE (FCS), and an IBM Introduction to Te/eprocessmg, IBM, GC 20-8095-02 eight bit end FLAG (F), having the same bit pattern as the System Network Architecture, Technical OverView, IBM, GA 27-3102 beginning flag. In HOLC the Address (A) and Control (C) Systel11 Network Architecture Format and Pr~tocol, IBM GA 27-3112 bytes are extendable. The HOLC and the SD~C use three OPENING ADDRESS CONTROL INFORMATION FRAME CHECK CLOSING FLAG (F) FIELD (A) FIELD (e) FIELD (I) SEQUENCE (FCS) FLAG (F) VARIABLE LENGTH 01111110 BBITS BBITS lBBITS 01111110 (ONLY IN I FRAMES) Figure 3. Frame Format 6-244 AFN-00743C 8273, 8273·4, 8273·8 Tilble 1. Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function Vcc 40 Power Supply: +5V Supply. 32X ClK 25 I 32X Clock: The 32X clock is used to GND 20 Ground: Ground. provide clock recovery when an asynchronous modem is used. In RESET 4 I Reset: A high signal on this pin will loop configuration the loop station force the 8273 to an idle state. The can run without an accurate 1X clock 8273 will remain idle until acommand by using the 32X ClK in conjunction IS Issued by the CPU. The modem with the DPll output. (This pin must Interface output signals are forced be grounded when not used.) high. Reset must be true for a minimum of 10 TCY. DPll 23 0 Digital Phase Locked Loop: Digital Phase locked loop output can be CS 24 I Chip Select: The RD and WR inputs tied to RxC andlor TxC when 1X clock are enabled by the chip select input. is not available. DPll IS used with DB7-DBo 19- 1/0 Data Bils: The Data Bus lines are bi- 32X ClK. 12 directional three-state lines which in- FLAGDET 1 Flag Detect: Flag Deiect signals that 0 terface with the system Data Bus. a flag (01111110) has been received WR 10 I Write Input: The Write signal is used by an active receiver. to control the transfer of either a RTS 35 0 Request to Send: Request to Send command or data from CPU to the signals that the 8273 IS ready to trans- 8273. mit data. RD 9 I Read Input: The Read signal IS used CTS 30 I Clear to Send: Clear to Send signals to control the transfer of either a data that the modem is ready to accept byte or a status word from the 8273 aata from the 8273. to the CPU. CD 31 I Carrier Detect: Carrier Detect sig- T>sINT 2 0 Transmitter Interrupt: The Trans- nals that the line transmission has mitter interrupt signal indicates that. started and the 8273 may begin to the transmitter logic requires service. sample data on RxD line. RxlNT 11 0 Receiver Interrupt: The Receiver PA2_4 32- I General purpose input ports: The interrupt signal indicates that the Re- 34 logic levels on these lines can be ceiver logic requires service. Read by the CPU through the Data TxDRQ 6 0 Transmitter Data Request: Re- Bus Buffer. quests a transfer of data between I memory and the 8273 for a transmit PB,.4 36- 39 0 General purpose output ports: The CPU can write these output lines operation. through Data Bus Buffer. RxRDQ 8 0 Receiver DMA Request: Requests a ClK 3 I Clock: A square wave TTL clock. transfer of data between the 8273 and memory for a receive operation. TxDACK 5 I Transmitter DMA Acknowledge: The Transmitter DMA acknowledge signal notifies the 8273 that the FUNCTIONAL DESCRIPTION TxDMA cycle has been granted. General RxDACK 7 I Receiver DMA Acknowledge: The The Intel® 8273 HDlC/SDlC controller is a microcom- Receiver DMA acknowledge signal puter peripheral ,device which supports the International notifies the 8273 that the RxDMA Standards Organization (ISO) High level Data Link. cycle has been granted. Control (HDlC), and IBM Synchronous Data Link Control A,-AO 22- I Address: These two lines are CPU (SDlC) communications protocols. This controller 21 Interface Register Select lines. minimizes CPU software by supporting a comprehensive TxD 29 0 Transmitter Data: This line trans- frame-level instruction set and by hardware implemen- mits the serial data to the communi- tation of the low level tasks associated with frame cation channel. assembly/disassembly and data integrity. The 8273 can be TxC 28 I Transmitter Clock: The transmitter used in either synchronous or asynchronous applications. clock is used to synchronize the In asynchronous applications the data can be program- transmit data. med to be encoded/decoded in NRZI code. The clock is RxD 26 I Receiver Data: This line receives derived from the NRZI data using a digital phase locked serial data from the communication loop. The data transparency is aChieved by using a zero- channel. bitlinsertion/deletion technique. Theframes are automati- RxC 27 I Receiver Clock: The Receiver Clock cally checked for errors during reception by verifying the is used to synchronize the receive Frame Check Sequence (FCS); the FCS is automatically data. generated and appen~ed before the final flag in transmit. 6-245 AFN-Q0743C 8273, 8273·4, 8273·8 The 8273 recognizes and can generate flags (01111110' A1 Ao TxDACK RxDACK cs RD WR Register Abort, Idle, and GA (EOP) characters. 0 0 1 1 0 1 0 Command The 8273 can assume either a primary (control) or a 0 0 1 1 0 0 ,1 Status secondary (slave) role. It can therefore be readily 0 1 1 1 0 1 0 Parameter implemented in an SDlC loop configuration as typified by 0 1 1 1 0 0 1 Result 1 0 1 1 0 1 0 Reset the IBM 3650 Retail Store System by programming the 1 0 1 1 0 0 1 TxlNT Result 8273 into a one-bit delay mode. In such a configuration. a 1 1 1 l' 0 1 0 - two wire pair can be effectively used for data transfer 1 1 1 1 0 0 1 RxlNT Result between controllers and loop stations. The digital phase' X X 0 1 1 1 0 Transmit Data locked loop output pin can be used by the loop station X X 1 0 1 0 1 Receive Data without the presence of an accurate Tx clock. CPU Interface Register Description The CPU interface ill optimized for the MCS-80/85~ bus Command with an 8257 DMA controller. However, the interface is flexible, and allows either DMA or non-DMA data Operations are initiated by writing an appropriate transfers, interrupt or non-interrupt driven. It further command in the Command Register. allows maximum line utilization by providing early ~arameter Interrupt mechanism for buffered (only the information field can be transferred to memory) Tx command over- Parameters of commands that require additional informa- tion are written to this register. lapping. It also provides separate Rx and Tx interrupt output channels for efficient operation. The 8273 keeps Result the interrupt request active until all the associated interrupt results have been read. Contains an immediate result describing an outcome of an The CPU utilizes the CPU interface to specify commands executed command. and transfer data. It consists of seven registers addressed via CS, A1, Ao, RD and WR signals and two independent Transmit Interrupt Result data registers for receive data and transmit data. A1, Ao are Contains the outcome of 8273 transmit operation generally derived from two low order bits of the address (good/bad completi~nl. bus. If an 8080 based CPU is utilized, the RD and WR signals may be'driven by the 8228 1I0R and I/OW.The Receive Interrupt Result table shows the seven register select decoding: Contains the outcome of 8273 receive operation (good/ REGISTERS bad completion). followed by additional results which de- tail the reason for interrupt. Stafus The status register reflects the state of the 8273 CPU Interface . 08 0 _ 7 . DMA Data Transfers T,D ;:;c The 8273 CPU Interface supports two Independent data interfaces. receive data and transmit data. At high data transmission speeds the data transfer rate of the 8273 is TxDRQ hDACK DPTI. great enough to justify the use of direct memory access 32X eLK RxDRQ (DMA) for the data transfers. When the 8273 IS configured RTs RxDACK in DMA mode, the elements of the DMA interfaces are. PB'_4 TxlNT CTS TxDRQ: Transmit DMA Request RxlNT CD PA 2 _ 4 Requests a transfer of data between memory and the iVA 8273 for a transnnlt operallbn. TxDACK: Transmit DMA Acknowledge RESET R,D R;C The TxDACK signal notifies the 8273 that a transmit DMA cycle has been granted. It is also used with WR to transfer data to the 8273 i,n non-DMA mode. Note: RD mu.st not be i=lAG OET asserted while TxDACK is active. RxDRQ: Receive DMA Request Figure 4. 8273 Block Diagram Showing CPU Requests a transfer of data between the 8273 and mem- Interface Functions ory for a receive operation. \, 6-246 AFN-Q0743C inter 8273, 8273-4, 8273·8 RxDACK: Receive DMA Acknowledge The RxDACK signal notifies the 8273 that a receive DMA cycle has been granted. It is also used with RD to read AEGISTERS data from the 8273 in non-DMA mode. Note: WR must not be asserted while RxDACK is active. Ro, WR: Read, Write The RD and WR signals are used to specify the direction of the data transfer. DMA transfers require the use of a DMA controller such as the Intel 8257. The function of the DMA controller is to provide sequential addresses and timing for the transfer, 08 0_ 7 at a starting address determined by the CPU. Counting of data block lengths is performed by the 8273. To request a DMA transfer the 8273 raises the appropriate DMA REQUEST. DMA ACKNOWLEDGE and READ en- ables DMA data onto the bus (Independently of CHIP SELECT). DMA ACKNOWLEDGE and WRITE transfers DMA data to the 8273 (Independent of CHIP SELECT). It is also possible to configure the 8273 In the non-DMA data transfer mode. In this mode the CPU module must pass data to the 8273 In response to non-DMA data re- quests indicated by the status word. Modem Interface The 8273 Modem interface provides both dedicated and user defined modem control functions. All the control signals are active low so that EIA RS·232C inverting drivers (MC 1488) and inverting receivers (MC 1489) may CPU INTERFACE MODEM INTERFACE be used to interface to standard modems. For asynchro· nous operation, this interface supports programmable NRZI data encode/decode, a digital phase locked loop for efficient clock extraction from N RZI data, and modem control ports with automatic CTS, CD monitor- Figure 5. 8273 Block Diagram Showing Control ing and RTS generation. This interface also allows the Logic Functions 8273 to operate in PRE-FRAME SYNC mode in which the 8273 prefixes 16 transitions to a frame to synchronize idle lines before transmission of the first flag. It should be noted that all the 8273 port operations deal Port B - Output Port with logical values, for instance, bit DO of Port A will be a DUring normal operation, if the CPU sets RTS active, the one when CTS (Pin 30) IS a phYSical zero (logical one). 8273 Will not change this pin; however, if the CPU sets RTS Port A - Input Port inactive, the 8273 Will activate it before each transmission During operation, the 8273 interrogates Input pins CTS and deactivate it one byte time after transmiSSion. While (Clear to Send) and CD (Camer Detect). CTS IS used to the receiver IS active the flag detect pin is pulsed each time condition the start of a transmission. If during transmis- a flag sequence is detected in the receive data stream. Sion CTS is lost the 8273 generates an interrupt. During Following an 8273 reset, all pinS of Port B are set to a high, reception, if CD is lost. the 8273 generates an interrupt. inactive level. '~I'~ l ICTS - CLEAR CD - CARRIER DETECT _!9 SEND L---'I-----J IUSER DEFINED OUTPUT PB4, PHl, pa2. pe, USER DEFI~~D INPUT P~4. PA3",.Pc-A"",_ _ FLAG DETECT The user defined Input bits correspond to the 8273 PA., The user defined output bits correspond to the state of PA 3 and PA, pinS, The 8273 does not Interrogate or. ma- PB4-PB, PinS. The 8273 does not Interrogate or manipu- mpulate these bits. late these bits. 6-247 AFN-O<>743C 8273, 8273·4; 8273·8 Serial Data Logic The Serial data is synchronized by the user transmit (TxC) circuitry in place of the RxO pin, thus allowing a CPU to and receive (RxC) clocks. The leading edge of TXC send a message to itself to verify operation of the 8273. generates new transmit data and the trailing edge of RxC I n the selectable clock diagnostic feature, when the data is is used to capture receive data. The NRZI encoding! looped back, the receiver may be presented incorrect decoding of the receive and transmit data is program- sample timing by the external circuitry. The user may mable. select to substitute the TxC pin for the RxC input on-chip The diagnos·tic features included in the Serial Oata logic' so that the clock used to generate the loop back data is are programmable loop back of data and selectable clock used to sample it. Since TxO is generated off the leading for the receiver. I n the loop-back mode, the data presented edge of TxC and RxO is sampled on the trailing edge, the to the TxO pin is internally routed to the receive data input selected clock allows bit synchronism. I I I \ \ \ TxC TxD X X X RxC RxD Figure 6. Transmit/Receive Timing Asynchronous Mode Interface Although the 8273 is fully compatible wtth the HOLC! guarantees that within a frame, data transitions will occur SOLC communication line protocols, which are primarily at least every five bit times - the longest sequence of ones designed for synchronous communication, the 8273 can which may be transmitted without zero-bit insertion. The also be used in asynchronous applications by using this OPLL should be used only when NRZI coding is used interface. The interface employs a digital phase locked since the NRZI coding will transmit zero sequence as line loop (OPLL) for clock.recovery from a receive data stream transitions. The digital phase locked loop also facilitates and programmable NRZI encoding and decoding of data. full-duplex and half-duplex asynchronous implemen- The use of NRZI coding with SOLC transmission tation with, or without modems. 6-248 AFN·OO743C 8273, 8273-4, 8273-8 Digital Phase Locked Loop In asynchronous applications, the clock is derived from the receiver data stream by the use of the digital phase locked loop ,0, 00 CPBF is set when the parameter buffer IS full, and is reset I CBSvl CBFIC~RBF I RXINTI TxlNT IRXIRAI TxlRA I by the 8273 when it accepts the parameter. The CPU may poll CPBF to determine when additional parameters may be written. Bit 7 CBSY (Command Busy) Indicates in-progress command. set for CPU poll when Bit 4 CRBF (Command Result Buffer Full) Command Register is full. reset upon command phase Indicates that an executed command immediate result is completion. It is improper to write a command when CBSY present In the Result Register. It IS set by 8273 and reset is set; it results in incorrect operation. when CPU reads the result. 6-252 AFN·00743C 8273, 8273·4, 8273·8 Bit 3 RxlNT (Receiver Interrupt) The Execution Phase RxlNT indicates that the receiver requires CPU attention. It is identical to RxlNT (pin 11) and isset by the 8273 either Upon accepting the last parameter, the 8273 enters into upon good/bad completion of a specified command or by the Execution Phase. The execution phase may consist Non-DMA data transfer. It is reset only after the CPU has of a DMA or other activity, and mayor may not require read the result byte or has received a data byte from the CPU intervention. The CPU intervention is eliminated in 8273 in a Non-DMA data transfer. this phase if the system utilizes DMA for the data trans- fers, otherwise, for non-DMA data transfers, the CPU is Bit 2 TxlNT (Transmitter Interrupt) interrupted by the 8273 via TxlNT and RxlNT pins, for The TxlNT indicates that the transmitter requires CPU each dat~ byte request. attention. It is identical to TxlNT (pin 2l. It is set by 8273 either upon good/bad completion of a specified command or by Non-DMA data transfer. It is reset only after the CPU has read the result byte or has transferred transmit data The Result Phase byte to the 8273 in a Non-DMA transfer. During the result phase, the 8273 notifies the CPU of the Bit 1 RxlRA (Receiver Interrupt Result Available) execution outcome of a command. This phase is initiated The RxlRA is ~et by the 8273 when an interrupt result by: byte is placed in the RxlNT register. It is reset after the 1. The successful completion of an operation CPU has read the RxlNT register. 2. An error detected during an operation. Bit 0 TxlRA (Transmitter Interrupt Result Available) To facilitate quick network software deciSions, two types The TxlRA is set by the 8273 when an interrupt result of execution results are provided: byte is placed in the TxlNT register. It is reset when the 1. An Immediate Result CPU has read the TxlNT register. 2. A Non-Immediate Result 01 Os 05 D. O2 0, I \ I f\ D7 De D5 D4 D3 D2 D, DO Recllver Interrupt R.ault Code Rx StatUI Aft,r INT Al 8 receIved} bits {: b 0 0 0 0 0 0 0 A1 match or general receive Active Active DO received °1-00 received / 0 0 0 0 0 0 0 , 1 1 A2 match CRCerror Active 02- DO received 0 0 0 0 0 1 0 0 Abort detected Active °3-00 received 0 0 0 0 0 1 0 1 Idle detect Disabled 04-00 received 0 0 0 0 0 1 1 0 EOP detected Disabled 05-DO received OS-DO received 0 0 0 0 0 0 0 0 , 0 1 0 1 0 1 0 Frame less than 32 bits DMA overrun detected Active Disabled 0 0 0 0 1 0 0 1 Memory buffer overflow Disabled ~ PartIal Byte Received 0 0 0 0 0 0 0 0 , 1 0 0 1 1 0 1 carrier detect failure Receive interrupt overrun Disabled Disabled Figure 10. Rx Interrupt Result Byte Format 01 Os 05 0, 03 02 0, Do 0 0 I I Early transmit Interrupt Frame transmit complete OMAunderrun' Clear to Send {eTS) error Abort complete Figure 11. Tx Interrupt Result Byte Format 6-253 AFN-007'3C 8273, 8273·4, 8273·8 Immediate result is provided by the 8273 for commands condition for the interrupt and, if required, one or more such as Read Port A and Read Port B which have bytes which detail the condition. information (C'fS, CD, RTS" etd that the network software needs to make qu~k operational decisions, Tx and Rx Interrupt Result Registers The Result Registers have a result code, the three high order bits D7-Ds of which are. set to zero for all but the A command which ca,nnot provide an immediate result will receive command, This command result contains a count generate an interrupt to signal the beginning of the Result that indicates the number of bits received in the last byte. If phase. The immediate results are provided in the Result a partial byte is received, the I'Tigh order bits of the last data Register; all non-immediate results are available upon byte are indeterminate. device interrupt, through, Tx Interrupt Result Register Txl/R or Rx Interrupt Result Register Rxl/R. The result All results indicated in the command summary must be may consist of a one-byte interrupt code indicating the read during the result phase. I DMA I MODE READ STATUS REGISTER I I I I I I r-______~VE~S~ ~N~O~--------~I READ STATUS REGISTER DATA REQUEST NQN,DMA MODE USE ilACR + RD OR WR TO READ OR WRITE DATA NO ( END) ( END) Figure'12. Result Phase Flowchart-Interrupt Results 6-254 AFN-00743C 8273, 8273-4, 8273-8 IMMEDIATE RESULTS AFTER COMMAND PHASE COMPLETION (READ PORT A, PORT B) READ STATUS READ RESUL T REGISTER REGISTER Figure 13. (Rx Interrupt Service) 6-255 AFN 00743C w 8273, 8273·4, 8273·8 DETAILED COMMAND DESCRIPTION Initialization Set/Reset Comman~s These commands are used to manipulate data within the General 8273 registers. The Set commands have a single param- The 8273 HOLC/SOLC controller supports a comprehen- eter which is a mask that correspo'nds to the bits to be set. sive set of high level commands which allows the 8273 to (They perform a logical-OR of the specified register with be readily used in full-duplex. half-duplex. synchronous. the mask provided as a parameter). The Register asynchronous and SOLC loop configuration. with or commands have a single parameter which is a mask that without modems. These frame-level commands minimize has a zero in the bit positions that are to be reset. (They CPU and software overhead. The 8273 has address and perform a logical-ANO of the specified register with the control byte buffers wh ich allow the receive and transmit mask). commands to be used in buffered or non-buffered modes. In buffered transmit mode. the 8273 transmits a flag Set One-Bit Delay (CMD Code A4) automatically. reads the Address and Control buffer registers and transmits the fields. then via OMA. it fetches the information field. "f7he 8273. having transmitted the information field. automatically appends the Frame Check Sequence (FCS) and the end flag. Correspondingly. in buffered read mode. the Address and Control fields are When one bit delay IS set. 8273 retransmits tMe received stored in their respective buffer registers and only data stream one bit delayed. This mode is entered at a Information Field is transferred to memory. receiver character boundary. and should only be used by In non-buffered transmit mode. the 8273 transmits the Loop Stations. beginning flag automatically. then fetches and transmits the Address. Control and Iflformation fields from the Reset One-Bit Delay (CMD Code 64) memory. appends the FCS character and an end flag .. In the non-buffered receive mode the entire contents of a frame are sent to memory with the exception of the flags and FCS. ~HDlC Implemenation The 8273 stops the one bit delayed retransmission mode. HOLC Address and Control 'field are extendable. The extension is selected by setting the low order bit of the Set Data Transfer Mode (CMD Code 97) field to be extended to a one. a zero in the low order bit indicates the last byte of the respective field. Since Address/Control field extension is normally done CMD with software to maximize extension flexibility. the 8273 PAR does not create or operate upon contents of the extended HOLC Address/Control fields. Extended fields are transparently passed by the 8273 to user as either . When the data transfer mode is set. the 827.3 will interrupt interrupt results or data transfer requests. Software must when data bytes are required for transmission or are assemble the fields for transmission and interrogate them available from a receive. If a transmit interrupt occurs and upon reception. the status indicates that there is no Transmit Result (TxlRA = 0). the interrupt is a transmit data request. If a However. the user can take advantage of the powerful receive interrupt occurs and the status indicates that there 8273 commands to minimize CPU/Software overhead and is no receive result (RxIRA = 0). the interrupt is a receive simplify buffer management in handling'extended fieldS. data request. For instance buffered mode can be used to separate the first two bytes. then interrogate the others from buffer. Buffered mode is perfect for a two byte address field. Reset Data Transfer Mode (CMD Code 57) The 8273 when programmed. recognizes protocol characters unique to HOLC such as Abort. which is a string of seven or more ones (01111111). Since Abort character is the same as the GA (EOP) character used in ::: 8TIT~ 1: 1: l' 1 l' l' 1:I0 SOLC Loop applications. Loop Transmit and Receive commands are not recommended to be used in HOLC. If the Oata Transfer Mode IS reset. the 8273 data transfers HOLC does not support Loop mode. are performed through the OMA requests without mterrupt· ing the CPU. 6-256 AFN'{)0743C 8273, 8273·4, 8273·8 Set Operating Mode (CMO Cod~ 91) Tx INTERRUPT PROCEDURE ~ ~I:I!I!I!I~I'I'I'I:I~I OTHER TRANSMIT COMPLETION (ODH) INTERRUPT I I, . FLAG STREAM MODE 1 = PREFRAME SYNC MODE 1 = BUfFERED MODE 1'" EARLY INTERRUPT MODE 1 = EOP INTERRUPT MODE 1"" HOLe MODE Reset Operating Mode (CMO Code 51) CMD PAR NO Any mode switches set in eMD code 91 can be reset using this command by placing zeros in the appropriate positions. (05) HOLC Mode In HOLe mode, a bit sequence of seven ones (01111111) is interpreted as an abort character. Otherwise, eight ones (011111111) signal an abort. OTHER PROCESSING (04) EOP Interrupt Mode Figure 14. In EOP interrupt' mode, an interrupt is generated If this bit is zero, the interrupt will be generated only after whenever an EOP character (01111111) is detected by an the final flag has been transmitted, active receiver. This mode is useful for the implementation of an SOLe loop controller in detecting the end of a (02) Buffered Mode message stream after a loop poll. If the buffered mode bit is set to a one, the first two bytes (normally the address (A) and control (e) fields) of a frame (03) Transmitter Early Interrupt Mode (Tx) are buffered bythe8273. If this bit isazero the address and control fields are passed to and from memory. The early interrupt mode is specified to indicate when the 8273 should generate an'end of frame interrupt. When set, an early interrupt is generated when the last data (01) Preframe Sync Mode character has been passed to the 8273, If the user software If this bit is set to a one the 8273 will transmit two'charac- responds with another transmit command before the final ters before the first flag of a frame. ' flag is sent, the final flag interrupt will not be ge(lerated To guarantee sixteen line transitions, the 8273 sends two and a new frame will immediately begin when the current bytes of data (OO)H If NRZIIS set or data (55)H if NRZI,s not frame is complete, This permits frames to be separated by set a single flag. If no additional Tx commands are provided, a final interrupt will follow. (00) Flag Stream Mode Note: In buffered mode, if a supervisory trame (no Infor- If this bit is set to a one, the following'table outlines the mation) Transmit command is sent in response to an early operation of the transmitter. Transmit Interrupt, the 8273 will repeatedly transmit the same supervisory frame with'one flag in' between, until a TRANSMITTER STATE ACTION non-supervisory transmit is Issued. Send Flags immediatelv. Idle Transmit or Transmit} Send F lags after the Early transmitter interrupt can be used in buffered mode Transparent Active transmission complete by waiting for a transmit complete interrupt instead of Loop Transmit Active Ignore command. early Transmit Interrupt before Issuing a transmit frame Ignore command. 1 Bit Delay Active command for a supervisory frame. See Figure 14. 6-257 AFN.()Q743C 8273, 8273·4, 8273·8 If this bit is reset to zero the following table outlines the The reset command emulates the action of the reset pin. operation of the transmitter. 1. The modem control signals are forced high (inactive level). TRANSMITTER STATE ACTION 2. The 8273 status register flags are cleared. 3. Any commands in progress are terminated Immedi- IDLE Send Idles on next character ately boundary. 4. The 8273 enters an idle state until the next command is Transmit or Transmit- Transparent Active } Send Id les after the transm ISsoon is complete. issued. Loop Transmit Active Ignore command. 5. The Serial I/O and Operating Mode registers are set 1 Bit Delay Active Ignore command. to zero and OMA data register transfer mode IS selected 6. The deVice assumes a !'lon-loop SOLC terminal role. Set Serial I/O Mod.e (CMO Code AO) Receive Commands The 8273 supports three receive commands: General Receive, Selective Receive, and Selective Loop Receive. 11 '" NRZl MODE 1 '" TxC __ Rxe General Receive (CMO, Code CO) , '" LOOP BACK TxD __ RxD General receive IS a receive mode In which frames are received regardless of the contents of the address field. Reset Serial 1/0 Mode (CMD Code 60) This command allows bits set in CMD code AD to be reset by placing zeros in the appropriate positions. CMD ° ,° 'I'!o!o!o!o!o!o LEAST SIGNIFICANT BYTE OF THE PAR ° , RECEIVE BUFFER LENGTH (80) MOST SIGNIFICANT BYTE OF RECEIVE PAR ° BUFFER LENGTH (Bl) NOTES: 1. If buffered mode is specified, the RO: Rl receive frame length (02) Loop Back (result) IS the number of data bytes received If this bit is set to a one, the transmit data is internally routed 2 If non-buffered mode IS specified, the RO, Rl receive frame to the receive data circuitry. length (result) IS the number of data bytes received plus two (the count Includes the address and control bytes) (01) TxC __ RxC 3. The frame check sequence (FCS) IS not transferred to memory If this bit is set to a one, the transmit clock is Internally 4. Frames With less than 32 bits between flags are ignored (no routed to the receive clock circuitry. It is normally used Interrupt generated) If the buffered mode IS specified With the loop back bit (02). 5 In the non-buffered mode an Interrupt IS generated when a less than 32 bit frame IS received, since data transfer requests have occurred (~O) NRZI Mode 6 The 8273 receiver IS always disabled when an Idle IS received If this bit IS set to a one, NRZI encoding and decoding of aftllr a valid frame. The CPU module must Issue a receive transmit and receive data is provided. If this bit is a zero, the command to re-enable the receiver. transmit and receive data is treated as a normal positive logiC 7. The intervening ABORT character between a final flag and an bit stream. IDLE does not generate an Interrupt. 8 If an ABORT Character IS not preceded by a flag and IS fol- NRZI encoding specifies that a zero causes a change In the lowed by an IDLE, an Interrupt Will be generated for the ABORT polarity of the transmitted signal and a one causes no polanty followed by an IDLE interrupt one character time later The change. NRZI is used in all asynchronous operations. reception of an ABORT Will disable the receiver Refer to IBM document GA27-3093 for details. Selective Receive (CMO Code Cl) Reset Device Command CMD ° °, ,!,!o!o!ofo!o!, LEAST SIGNIFICANT BYTE Of THE PAR ° RECEIVE BUFFER LENGTH (80) , MOST SIGNIFICANT BYTE OF RECEIVE PAR ° BUFFER LENGTH (Bl) An 8273 reset command is executed by outputi ng a (Ol)H , RECEIVE FRAME ADDRESS MATCH followed by (OO)H to the reset register (TMR). See 8273 PAR ° FIELD ONE (A1) AC timing characteristics for Reset pulse specifica- , RECEIVE FRAME ADDRESS MATCH tions. PAR ° FIELD TWO (A2) -- 6-258 AfN 00743C a 8273, 8273·4, 8273·8 Selective receive is a receive mode in which frames are Loop Transmit (CMD C~e CAl ignored unless the address field matches anyone of two address fields given to the 8273 as parameters , 'Ill oJ '1 0 1' J 0 CMD 0 0 01 When selective receive IS used in HDl!C the 8273 looks at PAR 0 LEAST SIGNIF ICANT BYTE OF FRAME LENGTH (LO) the first character, if extended, software must then decide PAR 0 , MOST SIGNIFICANT BYTE OF if the message is for this unit. fRAME LENGTH (L1) PAR 0 1 ADDRESS FIELD OF TRANSMIT FRAME (AI PAR 0 , CONTROL FIELD OF TRANSMIT FRAME (e) Selective Loop Receive (CMD Code C2) Transmits one frame in the same manner as the transmit frame command except: CMD 0 0 1 L lJO oI 0 I 0 I 1 I 0 0 0 LEAST SIGNIFICANT BYTE OF THE 1. If the flag stream mode is not active transmission Will PAR RECEIVE BUFFER LENGTH (SO) begin after a received EOP has been converted to a PAR 0 1 MOST SIGNifiCANT Byre Of RECEIVE flag. BUFFER LENGTH (B1) 2. If the flag stream mode IS active transmission Will PAR 0 1 RECEIVE FRAME ADDRESS MATCH fiELD ONE (A1) begin at the next.flag boundary for buffered mode or at PAR 0 1 RECEIVE FRAME ADDRESS MATCH the third flag boundary for non-buffered mode. fiELD TWO (A21 3. At the end of a loop transmit the one-bit delay mode IS entered and the flag stream mode IS reset. \ Selective loop receive operates like selective receive ex- Transmit Transparent (CMD Coded C9) cept that the transmitter IS placed In flag stream mode automatically after detecting an EOP (01111111) following CMD 0 0 I ' 101 0 1 0 0 1 a valid received frame The one bit delay mode IS also reset at the end of a selective loop receive. '. PAR 0 , 1 LEAST SIGNifiCANT BYTE OF FRAME LENGTH (LO) PAR 0 , MOST SIGNIFICANT BYTe OF FRAME LENGTH (L1) Receive Disable (CMD Code C5) The 8273 will transmit a block of raw data Without Terminates an active receive command immediately protocol, I.e., no zero bit insertion, flags, or frame check sequences. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ CMD 1 0 1 0 1 ' 1 ' 1 0 1 0 1 0 1 ' 1 0 1 ' PAR NONE Abort Transmit Commands An abort command IS supported for each type of transmit command. The abort commands are Ignored If a transmit Transmit Commands command IS not In progress. The 8273 supports three transmit commands: Transmit Frame, Loop Transmit, Transmit Transparent Abort Transmit Frame (CMD Code CC) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ CMD I 0 10 1 1 1110 10 1' 1 1 10 10 Transmit Frame (CMD Code Ca) PAR NONE 'After an abort character (eight contiguous ones) IS trans- CMD 0 0 mitted, the transmitter reverts to sending flags or Idles as a PAR 0 , '1'10101'101010 LEAST SIGNIFICANT BYTE OF function of the flag stream mode speCified. FRAME LENGTH (LO) PAR 0 1 MOST SIGNIFICANT BYTE OF FRAME LENGTH (L 1) Abort Loop Transmit (CMD Code CE) PAR 0 1 ADDRESS FIELD OF TRANSMIT FRAME IAI ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ PAR 0 1 CONTROL FIELD OF TRANSMIT FRAME (e) CMD 1 0 1 0 1 ' 1 ' 1 0 1 0 1 1 I. , 1 1 1 0 1 PAR NONE Transmits one frame including: initial flag, frame check After a flag is transmitted the transmitter reverts to one bit sequence, and the final flag. delay mode. If the buffered mode is specified, the LO, L1, frame length provided as a parameter IS the length of the information Abort Transmit Transparent (CMD Code CD) field and the address and control fields must be input. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ CMD 1 0 1 0 1 ' 1 ' 1 0 1 0 1' 1 ' 1 0 1 1 I n unbuffered mode the frame length provided must be the PAR NONE length of the information field plus two and the address and control fields must be the first two bytes of data. Thus The transmitter reverts to sending flags or Idles as a func- only the frame length bytes are required as parameters. tion of the flag stream mode speCified. 6-259 AFN·00743C inter 8273, 8273'4, 8273·8 Modem Control Commands (05) Flag Detect The modem control cOnimands are used to manipulate the This bit can be used to set the flag detect pin. However, it modem control ports. . will be reset when the next flag is detected. When read Port A or Port B commands are executed the (04-01) User Defined Outputs result of the command is returned in the result register. The Bit Set Port B command requires a parameter that is a These bits correspond to the state of the PB4-PB, output mask that corresponds to the bits to be set. The Bit Reset pins. Port B comniand requires a mask that has a zero in the bit (00) Request to Send positions that are to be reset. This is a dedicated 8273 modem control signal, and Read Port A (CMO Code 22) reflects the same logical state of RTS pin. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Reset Port B Bits (CMO Code 63) CMD [_~Qlil-"I':IiE I 0 I ' I 0 PAR NONE This command allows Port B user defined bits to be reset. 'l Read Port B (CIIIIO Code 23) eMD Al AO lil I I I I I I I I 0 07 0 06 0 05 1 D4 0 03 0 02 0 0, 1 DO 1 ~:: 1 1 1~ l' l' 1 1 1 l' l' I 0 0 0 0 0 ~ RTS - REQUEST TO SEND PAR NONE USER DEFIN~ _ _ _ _ __ Sel Port B Bits (CMO Code A3l FLAG DETECT This command allows user defined Port B pins to be set. This command allows Port B <04-01) user defined bits to be reset. These bits correspond to Output Port pins (PB4- PB1). 8273 Command Summary ~~-~---- Command ----~- , Result Completion Command Description (HEX) Parameter Results Port Interrupt Set One Bit Delay A4 Set Mask None - No Reset One Bit Delay 64 Reset Mask None - No Set Data Transfer Mode 97 Set Mask None - No Reset Data Transfer Mode 57 Reset Mask None - No Set Operating Mode 91 Set Mask None - No Reset Operating Mode 51 Reset Mask None - No Set Serial 1/0 Mode AD Set Mask None - No ------------- Reset Serial 110 Mode 60 Reset Mask None - No -- General Receive CO BO.Bl RIC,RO,R1,(A,C)12) RXI/R Yes -- Selective Receive Cl BO.Bl,Al,A2 RIC,RO,RI,(A,C)12) RXI/R Yes , Selective Loop Receive C2 BO.Bl,Al.A2 RIC,RO,RI,(A,C)12) RXI/R Yes Receive Disable C5 None None - No Transmit Frame C8 LO,L 1,(A,C){1) TIC TXI/R Yes Loop Transmit CA LO, L1,(A,C)(1) TIC TXI/R Yes Transmit Transparent C9 LO,Ll TIC TXI/R Yes ~ort Transmit Frame CC None TIC TXI/R Yes Abort Loop Transmit CE None TIC TXI/R Yes I Abort Transmit Transparent CD None TIC TXI/R Yes tgad Port A 22 None Port Value Result No Read Port B 23 None Port Value Result No I Set Port B Bit --------- A3 Set Mask None No t. Reset Port B Bil-- 63 Reset Mask None - No NOTES: 1. Issued only when In buffered mode. 6-260 AFN-00743C 2. Read as results only in buffered mode. intJ 8273, 8273·4, 8273·8 8273 Command Summary Key BO - Least significant byte of the receive buffer length. B1 - Most significant byte of the receive buffer length. LO - Least significant byte of the Tx frame length. L1 - Most significant byte of the Tx frame length. A1 - Receive frame address match field one. A2 - Receive frame address match field two. A - Address field of received frame. If non-buffered mode IS specified. this result IS not provided. C - Control field of received frame. If non-buffered mode IS ·specifled this result IS not provided. RXI/R - Receive Interrupt result register. TXI/R - Transmit Interrupt result register. RO - Least significant byte of the length of the frame received. R1 - Most Significant byte of the length of the frame received. RIC - Receiver interrupt result code. TIC - Transmitter interrupt result code. GENERAL COMMAND RECEIVE IRo. R,I DATA IN DMA REOUESTS OR DATA INTERRUPTS L-,--J NON-BUFFERED MODE FRAME CPU INTERRUPTS COMPLETE ----------------------~------------------~------~- Figure 15. Typical Frame Reception NOTE: In order to ensure proper operation to the maximum baud rate, Receive commands or Read/W"te Port commands should be written only when either the transmitter or the receiver IS inactive. In full duplex systems, it is recommended that these commands be Issued after serviCing a transmitter Interrupt but before a new transmit command IS issued. 6-261 AFN-00743C inter tJ273, 8273·4, 8273·8 LAST PARAMETER OF Tx COMMAND ~ I-- 2 BYTES-j RTS _ _ .1../--1/ CTS _ _ _ _ _---1 ORO ______________________________~11~, __~1~12__~1~13~____________________________________ BUFFER MODE INT ------------------------------------------~E~A~R~~------~---------------F~,~NA~L----- TxlNT TxlNT Figure 16a. Typical Frame Transmission, Buffered Mode LAST PARAMETER j 1---3 BYTES-! RTS _ _ ...L'_-,I CTS --------1 DRO _ _ _ _ _ ~~~~~1-A~lc--~11,~1~12~11~3----------------------- NON·BUFFER MODE INT -----------------------------------------------~E~A~R~~~--------------------~F~,~NA~L----- NW Nm Figure 16b. Typical Frame Transmission, Non-Buffered Mode MEMORIES ~ SYSTEM BUS D ~ ~ DBO_7 ~ A o' A1 MEMR DBo_7 lOW RD MEMW WR lOR cs cs TXINT HRO RXINT 7HACK 7 " " RXC TxORa RXD 8257 ,TXC DMA TxDACK CONTROLLER TXD 8273 MODEM RxDRO RxDACK MODEM CONTROLS -"- " Figure 17. 8273 System Diagram 6-262 AFN-00743C 8273, 8273·4, 8273·8 WAVEFORMS COMMAND PHASE ~ COMMAND / PARAMETER PARAMETER LAST '----11 \1 ~ \2/ \ARAMETER/ I I i n --: I--T2-1 I I--T4--1 CBSY / I I---T3---1 _CP_B_F__________________________ :J~~ _______J;I Table 2. Command Phase Timing (Full Duplex) Buffered Non·Buffered Symbol Timing Parameter Unit Min. Max. Min. Max. T1 Between command & first parameter 13 756 13 857 tcy T2 Between consecutive parameters 10 604 10 705 tcy T3 Command Parameter Buffer full bit 10 604 10 705 tcy Reset after Parameter loaded T4 Command busy bit reset after last 128 702 128 803 tcy parameter T5 CPBF bit reset after last parameter 10 604 10 705 tcy 6-263 AFN-00743C 8273, 8273·4, 8273·8 WAVEFORMS (Continued) RECEIVER INTERRUPT RD _ LAST \INTERRRUPT RESULj RxlRA \------ I I ~T2~ : \\...-- RxlNT / ~ Table 3. Receiver Interrupt Result Timing Buffered Non·Buffered Symbol Timing Parameter (clock cycles) Unit Min. Max. Min. Max. T1 RxlRA bit set after RIC read 18 29 18 29 , tcy T2 RxlNT goes away after last Int. Result 16 27 16 27 tcy read 6-264 AFN-00743C 8273, 8273·4, 8273·8 WAVEFORMS (Continued) TRANSMIT INTERRUPT o RD STATUS ,...-_ _ _ _ _ _ _..., INTERRUPT ,...-_ _ _ __ \ / LJ TxlRA I TxlNT / ----' Table 4. Transmit Interrupt Result Buffered Non-Buffered Symbol Timing (Clock Cycle) Unit Min. I Max. Min. I Max. T1 TxlNT inactive after Int. Results read 13 I 353 13 I 454 tcy 6·265 AFN-00743C intJ 8273, 8273·4, 8273·8 ABSOLUTE MAXIMUM RATINGS* 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ........ 0° C to 70° C device. This is a stress rating only and functional opera- Storage Temperature ., ............. -6S0Cto+1S0°C tion of the device at these or any other conditions above those indicated in the operational sections of this specifi- Voltage on Any Pin With cation is not implied. Exposure to absolute maximum Respect to Ground ..................... -0 SV to +7V rating conditions for extended periods may affect device Power DissipatIOn ....-... 1 Watt reliability. D.C. CHARACTERISTICS (8273,8273·4,8273-8) (TA= O°C to 70°C, Vcc= +S.OV ± S%) Symbol Parameter Min. Max. Unit Test Conditions VIL Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 Vcc + 0.5 V IOL = 2.0 mA for Data Bus Pins VOL Output Low Voltage 0.45 V IOL = 1.0 mA for Output Port Pins IOL = 1.6 mA for All Other Pins IOH = -200!,A for Data Bus Pins VOH Output High Voltage 2.4 V IbH= -100!'A for All Other Pins - IlL Input Load Current ±10 !,A VIN = Vcc to OV , Output Leakage Current ±10 !,A VOUT = Vee to .4SV IOFL i Icc Vcc Supply Current 180 mA CAPACITANCE (8273,8273·4,8273·8) (TA= 25°C, Vcc= GND= OV) Symbol Parameter Min. Typ. Max. Unit Test Conditions I C IN Input Capacitance 10 pF tc=1MHz --j Unmeasured Pins 110 Capacitance 20 pF CliO Returned to GND i A.C. CHARACTERISTICS (TA=O°C to 70·C, Vcc= +5.0V±5%) CLOCK TIMING (8273) Symbol Parameter Min. Typ. Max. Unit Test Conditions ICY Clock 250 1000 ns 64K Baud Max tCL Clock Low 120 ns Operating Rate tCH Clock High 120 ns i CLO'CK TIMING (8273-4) Symbol Parameter Min. Typ. Max. Unit Test Conditions ICY Clock 286 1000 ns 56K Baud Max tCL Clock Low 135 ns Operating Rate , tCH Clock High 135 ns CLOCK TIMING (8273-8) Test Conditions ! Symbol tCY Parameter Clock Min. 330 Typ. Max. 1000 Unit ns -i I 48K Baud Max I tCL Clock Low 150 ns I Ope rat i ng Rate I tCH Clock High 150 ---_. I ns i 6-266 AFN~OO743C 8273, 8273·4, 8273·8 A.C. CHARACTERISTICS (8273,8273·4, 8273·8) (TA = O"C to 70"C, Vee = +5.0V ±5%) READ CYCLE Symbol Parameter Min. Max. Unit Test Conditions tAC Select Setup to RD 0 ns Note 2 tCA Select Hold from RD 0 ns Note 2 tRR RD Pulse Width 250 ns tAD Data Delay from Add ress 300 ns Note 2 tRO Data.Delay from RD 200 ns C l = 150pF, Note 2 Cl = 20 pF for Minimum; tOF Output Float Delay 20 100 ns 150pF for Maximum toc DACK Setup to RD 25 ns tco DACK Hold from RD 25 ns tKO Data Delay from DACK 300 ns WRITE CYCLE Symbol Parameter Min. Max. Unit Test Conditions tAC Select Setup to WR 0 ns tCA Select Hold from WR 0 ns tww WR Pulse Width 250 ns tow Data Setup to WR 150 ns two Data Hold from WR 0 ns toc DACK Setup to WR 25 ns tco DACK Hold from WR 25 ns DMA Symbol Parameter Min. Max. Unit Test Conditions Request Hold from WR or RD tca 200 ns (for Non·Burst Mode) OTHER TIMING Symbol Parameter Min. Max. Unit Test Conditions tRSlW Reset Pulse Width 10 tCY tr Input Signal Rise Time 20 ns tf Input Signal Fall Time 20 ns tRSTS Reset to First IOWR 2 tCY tCY32 32X Clock Cycle Time 13.02' tCY ns tCL32 32X Clock Low Time 4' tCY ns tCH32 32X Clock High Time 4· tCY ns tOPll DPLL Output Low l ' tcy-50 ns tOCl Data Clock Low 1·tcy-50 ns tOCH Data Clock High 2' tCY ns tOCY Data Clock 62.5' tCY ns Note 3 tTD Transmit Data Delay - 200 ns tos Data Setup Time 200 ns tOH Data Hold Time 100 ns tFlO FLAG DET Output Low 8' tcy±50 ns NOTES: 1. All timing measurements are made at the reference voltages unless otherwise specified: Input "1" at 2.0V, "0" at O.SV; Output "1" !it 2.0V, "0" at O.BV. 2. tAD, tRO, tAC, and tCA are not concurrent specs. 3 If receive commands or Read/Write Port commands are issued while both the transmitter and receiver are active, this specification Will be 81.STCY min. 6·267 AFN-00743C inter 8273, 8273-4, 8273-8 , A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT =>( > <2o)C 24 2.0 DEVICE IJC'~150PF UNDER TEST POINTS TEST 0.8 08 045 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR -= A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 Cl ", 150pF AND 0 8Y FOA A LOGIC 0 CL INCLUDES JIG CAPACITANCE J WAVEFORMS READ OACK ---..J X 'DC 'CD -}j X 'RR I '--'CA-l i ji I,~-'DF~ ~ -'AC~ 'RD DATA BUS -- - ----- - --- )-------- 'AD 'K. WRITE DACK ===x= ~ 'c i D _______ }( ~ f-.-'AC-~ 'ww -'CA-I DATA BUS X I 'ow ,...---tWO--J ~------------------~-------------------------------------.--~~------~ 6-268 AFN.()()743C 8273, 8273·4, 8273·8 WAVEFORMS (Continued) DMA ORO --~ / =t ~--------------------- OACK _______ \~~~~l+---tc-o---------------------- AD OR ViR ~ t =1 ICY l=tCL £lcH--1------'1 CHIP CLOCK ~ =:l tCY32 32X CLOCK CtcL32=:CtcH32J------'1 TRANSMIT -1---------.1 - - - tDCL --~--- tOCH -- - ---- .-----;- I--------~- toCY --~--,----~---------I ------+-~ TxD RECEIVE 6-269 AFN-00743C inter 8273, 8273·4, 8273·8 WAVEFORMS (Continued) DPLLOUTPUT FLAG DETECT OUTPUT 6-270 AFN-00743C 8274 MULTI-PROTOCOL SERIAL CONTROLLER (MPSC) • Asynchronous, Byte Synchronous and • Byte Synchronous: Bit Synchronous Operation - Character Synchronization, Int. or Ext. - One or Two Sync Characters • Two Independent Full Duplex - Automatic CRC Generation and Transmitters and Receiv!.!rs Checking (CRC-16) • Fully Compatible with 8048, 8051, 8085, -IBM Bisync Compatible 8088, and 8086 CPU's; 8257 and 8237 • Bit Synchronous: DMA Controllers; and 8089 I/O Proc. - SDLC/HDLC Flag Generation and • 4 Independent DMA Channels Recognition - 8 Bit Address Recognition • Baud Rate: DC to 880K Baud - Automatic Zero Bit Insertion and -Future Selections to 1 M Baud Deletion - Automatic CRC Generation and • Asynchronous: Checking (CCITT-16) -5-8 Bit Character; Odd, Even, or No - CCITT X.25 Compatible Parity; 1, 1.5 or 2 Stop Bits -Error Detection: Framing, Overrun, • Available in EXPRESS and Parity -Standard Temperature Range The Intel® 8274 Multi-Protocol Series Controller (MPSC) is designed to interface High Speed Communications Lines using Asynchronous, IBM Bisync, and SOLC/HOLC protocol to Intel microcomputer systems. It can be interfaced with Intel's MCS-48, -85, -51; iAPX-86, and -88 families, the 8237 OMA Controller, or the 8089 I/O Processor in polled, interrupt driven, or OMA driven modes of operation. The MPSC is a 40 pin device fabricated using Intel's High Performance HMOS Technology. TXO ... TxC A OB 07 v" Rnn 2 CD... CD, elK m .. R;Cs 4 = FiTS... SYNDErA 1lTR, rfTSa/SYNDET B 10 ROYa/TxDRQA iPOITxDRQa iPilRxDRQB fNf TxDs A,---_l_ _~ 05 _ _ _- . . RD-----' SYNDETalRTSa Wl!----~-' DTAa Axes L-_ _ _ _ _ ~~-RxDB SYSTEM INTERFACE NETWORK INTERFACE Figure 1. Block Diagram Figure 2. Pin Configuration Inte! Corporation Assumes No ResponSibility for the Use of Any Circuitry Other Than CircUitry Embodied In an Intet Product No Other Circuit Patent licenses are Implied ©INTEL CORPORATION, 1981 DECEMBER 1981 6-271 intJ 8274 \ Table 1. Pin Description Pin Pin Symbol No. Type Neme and Function Symbol No. Typa Name and Function ClK 1 I Clock: System clock, TTL compat· ROY,,! 11 0 Ready Transmit Data: In mode 0 ible TxDRQ. this pin IS used to synchronize data transfers lor both Receive and RESET 2 I Reset: A low signal on this pin will Transmit of Channel B to the con- lorce the MPSC to an Idle state trolling processor's READY line TxD. and TxD;are lorced high. The (open collector). In modes 1 and 2 modem Interlace output signals are this pin requests a DMA transler 01 lorced high. The MPSC will remain data lor a transmit operatfon Idle until the control registers are (Channel A). initialized. Reset must be true lor one complete ClK cycle. DB7 12 I/O Data Bus: The Daia Bus lines are bi-directlonal three state lines CD. 3 I Carrier Detect (Channel It.): Car- which Interlace with the system's ner Detect (Channel A) signals that Data Bus. the line transmission has,started DB6 13 The MPSC \(fIll begin to sample data on the RxD. line il modem enables DB5 14 are selected .. DB4 15 RxC. 4 I Receiver Clock: The Receiver DB3 16 Clock (Channel B) clocks in data on DB2 17 the RxD. pin. DBl 18 CD. 5 I Carrier Detect (Channel B): Car- rier Detect (Channel B) signals that DBO 19 the line transmission has started. GND 20 Ground. The MPSC will begin to sample data Vee 40 Power: +5V Supply on the RxD. line if modem enables are selected crs. 39 I Clear To Send (Channel A): ThiS signals that the modem is ready to CTS. 6 I Clear To Send (Channel B): Clear accept data Irom the MPSC. Clear To Send (Channel B) signals that To Send will enable Channel B the modem is ready to accept data transmitter If modem enables are Irom the MPSC Clear To Send will selected, otherwise this pin may be enable Channel B transmitter II used as a general purpose Input. modem enables are selected, RTS. 38 0 Request To Send (Channel A): Re- otherwise thiS pin may be used as a quest To Send (Channel A) IS a gen- general pu~pose Input , eral purpose output generally used - - TxC. 7 I Transmit Clock (Channel B): to signal that Channel A is ready to send data. Transmit 'Clock (Channel B) lor TxDA 37 0 Transmit Date (Channel A): ThiS TxD. pin line transmits the senal data to the communications channel (Channel TxD. 8 0 Transmit Data (Channel B): This A). line transmits the senal data to the communications channel (Channel TxCA 36 I Transmitter Clock (Channel A): B). The transmitter clock (Channel A) clocks out data on the TxD. pin. RxD. 9 I Receive Data (Channel B): ThiS line RxC. 35 I Receiver Clock (Channel A): The receives senal data Irom the com- receiver clock (Channel A) clocks In municati?ns channel (Channel B) data on the RxD. plh. SYNDET,,! 10 Synchronous Detection (Channel RxDA 34 I Receive Data (Channel A): This 1/0 B): This pin is used In byte syn- line receives senal data Irom the RTS. chronous mode as either an internal communications channel (Channel sync detect (output) or as a means A). to force external synchrOnization SYNDETA 33 I/O Synchronoua Detection (Channel (input). In SDlC mode, this pin is:an A): ThiS pin is used In byte syn- output indicating Flag detection. In chronous. mode as either an internal asynch ronous mode It is a general sync detect (output) or as a means purpose Input (Channel B). Request to force external synchrOnization To Send (Channel B) is a general (Input). in SDle mode, this pin IS an purpose output, generally used to output indicating IIag detection. In signal that Channel B is ready to . asynchronous mode It is a general send data. purpose input (Channel A). 6-272 AFN-01701C inter 8274 Table 1. Pin Description (Continued) Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function - - ROY,I 32 a Ready: In mode 0 th,s prn is used INT 28 0 Interrupt: The rnterrupt sIgnal rn- RxORO, to synchronize data transfers for dlcates that the hIghest Priority both receIve and transmIt of Chan- Internal Interrupt requires service nel A to the controlling processor's (open collector). Prrorrty can be re- READY lIne (open collector). In solved via an external interrupt con- modes 1 and 2 RxORO, requests a troller or a dalsy-charn scheme. DMA transfer of data for a receIve operatIon for Channel A INTA 27 I Interrupt Acknowledge: ThIS In- DTR, 31 a Data Terminal Ready: This prn is terrupt Acknowledge allows the Data Terminal Ready (Channel A) highest prrorrty interruptIng devIce which is a general purpose output. to generate an interrupt vector. This pin must be pulled high (inactive) in IPO! 30 a Interrupt Priority Out: In modes 0 non-vector mode. TxDRO, and 1, IPO IS Interrupt Prrorrty Out It IS used to establIsh a hardware rnterrupt prrorrty scheme wIth IPI. It DTR. 26 0 Data Terminal Ready (Channel B): ThIS IS a general purpose output. IS low only If IPI IS low and the con- trollrng processor is not servIcing Ao 25 I Address: ThIS Irne selects Chan- an Interrupt from th,s MPSC. In nel A or B during data or command mode 2, TxDRO, requests a OMA transfers A low selects Channel A. transfer of data for a transmIt opera- tion for Channel B. A, 24 I Address: This line selects between IPI! 29 1/0 Interrupt Priority In: In modes 0 data or command InformatIon RxORO, and 1, IPI is Interrupt Priorrty In. A transfer. A low means data low on IPI means that no hIgher Priority device IS being serviced by CS 23 I Chip Select: ChIp Select enables' the controllrng processor's rnter- RD or WR. rupt service routine In mode 2, - RxDRO, requests a DMA transfer of RO 22 I Read: Read controls a data byte or data for a receive operation for status byte transfer from the MPSC Channel B. In Interrupt mode, this to CPU. pin must be tied low. WR 21 I Write: Wrrte controls transfer of data or commands to the MPSC GENERAL DESCRIPTION register and command description, general system operations, specifications, and waveforms. The Intel® 8274 Multi-Protocol Serial Controller is a microcomputer peripheral device which supports FUNCTIONAL DESCRIPTION Asynchronous (Start/Stop), Byte Synchronous This section of the data sheet describes how the (Monosync, IBM Bisync), and Bit Synchronous (ISO's HOLC, IBM's SOLC) protocols. This con- Asynchronous and Synchronous protocols are im- plemented in the MPSC. It describes general con- troller's flexible architecture allows easy implemen- tation of many variations of these three protocols siderations, transmit operation, and receive opera- with low software and hardware overhead. tion for Asynchronous, Byte Synchronous, and Bit Synchronous protocols. The Multi-Protocol Serial Controller (M PSC) imple- ASYNCHRONOUS OPERATIONS ments two independent serial receiver/transmitter channels. General For operation in the asynchronous mode, the MPSC The MPSC supports several microprocessor inter- must be initialized with the following information: face options; Polled, Wait, Interrupt driven and OMA character length (WR3; 07, 06 and WR5; 06, 05), driven. The MPSC is designed to support Intel's® clock rate (WR4; 07, 06), number of stop bits (WR4; MCS-85 anp iAPX 86, 88 families. 03, 02), odd, even orno parity (WR4; 01, 00), inter- rupt mode (WR1, WR2), and receiver (WR3; 00) or This data sheet will describe the serial protocol transmitter (WR5; 03) enable. When loading these functions, the microprocessor interface, a detailed parameters into the MPSC, WR4 information must 6-273 AFN·01701C inter 8274 be written before the WR1, WR3, WRS parameters/ Transmit commands. (See Detailed Command Description Section). The transmit function begins when the Transmit For transmission via a modem or RS232C interface, Enable bit (WRS; 03) is set. The MPSC automatically the Request To Send (RTS) (WRS; 01) and Data Ter- adds the start bit, the programmed parity bit (odd, minal Ready (OTR) (WRS; 07) bits must be set along even or no parity) and the programmed number of with the Transmit Enable bit (WRS; 03). Setting the stop bits (1, 1.5 or 2 bits) to the data character being Auto Enables (WR3; DS) bit allows the programmer transmitted. 1.5 stop bits option must be used with to send the first character of the message without X16, X32 or X64 clock option only. waiting for a clear to .send (CTS). The Serial data is shifted out from the Transmit Data Both the Framing Error and Receive Overrun Error (TxD) output on the falling edge of the Transmit flags are latched and cause an interrupt, i.e., if status Clock (TxC) input, at a rate programmable to 1,1/16, affects vector (WR1 B; D2) is selected, the interrupt 1/32nd, or 1/64th of the clock rate supplied to the vector indicates a special Receive condition. TxC input. If the External/Status Interrupt bit (WR1, DO) IS enabled, Break Detect (RRO; 07) and Carrier Detect The TxO output is held high when the transmitter has (RRO; 03) will cause an interrupt. Reset External/ no data to send, unless, under program control, the Status Interrupts (WRO; OS, 04, D3) will clear Break Send Break (WRS; 04) command is issued to hold Detect and Carrier Detect bits If they are set. the TxD low. A status read after a data read will include error If the External/STATUS Interrupt bit (WR1; DO) is set, status for the next word in the buffer. If the Interrupt the status of CD, CTS and SYNDET are monitored, on First Character (WR1; 04, 03) is selected, then and, if any changes occu r for a period oftime greater data and error status are held until an Error Reset than the minimum specified pulse width, an inter- command (WRO; OS, D4, 03) is given. rupt is generated. CTS is usually monitored using thiS interrupt feature. If the Interrupt on Every Character Mode bit (WR 1, D4, D3) is selected, the interrupt vector is different if If tlie Auto Enables (WR; 05) option is selected, the there is an error status in RR 1. When the character is programmer must wait for the CTS before sending read, the error status bit IS set and the Special Re- the first character. The MPSC will generate an Exter- ceive Condition vector is returned if Status Affects nal/STATUS Interrupt when CTS becomes active and vector (WR1 B; 02) is selected. at this point the first data character should be sent to In a polled environment, the Receive Character the MPSC. Available bit (RRO; ~O) must be monitored so that the CPU can determine when d'ata is available. The The Transmit Buffer Empty bit (RRO; D2) is set by the bit is reset automatically when the data is read. MPSC when the data byte from the buffer. is loaded in the transmit shift register. =rhe data is written to If the Xi clock mode is selected, the bit synchroniza- the MPSC only when the Tx buffer becomes empty to tion must be accomplished externally. prevent overwriting. Asynchronous Mode Register Setup 07 06 05 04 03 02 01 DO 00 Rx 5 b/char WR3 01 Rx 7 b/char AUTO 0 0 0 0 Rx 10 Rx 6 b/char ENABLES ENABLE 11 Rx 8 b/char 00 Xi Clock 00 ENABLE SYNC MODES EVENI WR4 01 X16 Clock 0 0 01 1 STOP BIT ODD PARITY 10 X32 Clock 10 1'/2 STOP BITS PARITY ENABLE 11 X64 Clock 11 2 STOP BITS 00 Tx 5 b/char WR5 DTR 01 Tx 7 b/char SEND Tx 0 RTS 0 10 Tx 6 b/char BREAK ENABLE 11 Tx 8 b/char • Active, and at thiS pOint, the first data character should be sent to the MPSC. 6-274 AFN-01701C 8274 Receive SYNCHRONOUS OPERATION- MONO SYNC, BI SYNC The receive function begins when the Receive En- able (WR3; DO) bit is set. If the Auto Enables (WR3; General 05) option is selected, then Carrier Detect (CD) must also be low. A valid start bit is detected if a low per- The MPSC must be initialized with the following pa- sists for at least 1/2 bit time on the Receive Data rameters: odd or even parity (WR4; 01,00), X1 clock (RxO) input. mode (WR4; 07, 06), 8~ or 16-bit sync character (WR4; OS, 04), CRC polynomial (WR5; 02), Trans- The data is sampled at mid-bit time, on the rising mitter Enable (WR5; 03), interrupt modes (WR1, edge of RxC, until the entire character is assembled. WR2), transmit character length (WR5; 06,05) and The receiver inserts 1's when a character is less than receive character length (WR3; 07, 06). WR4 pa- 8 bits. If parity (WR4; 01, ~O) is enabled and the rameters must be written before WR1, WR3, WR5, character is less than 8 bits the panty bit is not WR6 and WR7. stripped from the character. The data is transmitted on the falling edge of the The receiver also stores error status for each of the 3 Transmit Clock, (TxC) and is received on the rising data characters in the data buffer. When a parity edge of Receive Clock (RxC). The X1 clock is used error is detected, the parity error flag (RR1; 04) is set for both transmit and receive operations for all three and remains set until it is reset by the Error Reset sync modes: Mono, Bi and External. command (WRO; OS, 04, 03). When a character is assembled without a stop bit Transmit Set-Up-Monosync, Bisync being detected, the Framing Error bit (RR1; 06) is set. The detection of a Framing Error adds an ad- Transmit data is held high after channel reset, or if ditional 1/2 bit time to the character time so the the transmitter is not enabled. A break may be pro- Framing Error IS not Interpreted as a new start bit. grammed to generate a spacing line that begins as soon as the Send Break (WR5; 04) bit is set. With the If the CPU falls to read a data character while more transmitter fully Initialized and enabled, the default than three characters have been received, the Re- condition is continuous transmission of the 8- or ceive Overrun bit (RR1, 05) IS set. Only the overwrit- 16-bit sync character. ten character IS flagged with the Receive Overrun bit. When this occurs, the 'fourth character assem- Using Interrupts for data transfer requires that the bled replaces the third character In the receive buf- Transmit Interupt/pMA Enable bit (WR1; 01) be set. fers. The Receive Overrun bit (RR1; 05) is reset by An interrupt is generated each time the transmit buf- the Error Reset command (WRO; OS, 04, 03). fer becomes empty. The interrupt can be satisfied Synchronous Mode Register Setup-Monosync, Bisync 07 06 05 04 03 02 01 00 00 Rx 5 b/char ENTER SYNC WR3 01 Rx 7 b/char AUTO HUNT RxCRC 0 CHAR Rx 10 Rx 6 b/char ENABLES MODE ENABLE LOAD ENABLE 11 Rx 8 b/char INHIBIT 00 8 bit Sync EVEN/ WR4 0 0 01 16 bit Sync 0 0 0i5D PARITY 11 Ext Sync PARITY ENABLE 00 Tx 5 b/char 1 , WR5 DTR 01 Tx 7 b/char SEND Tx (SELECTS RTS TxCRC 10 Tx 6 b/char BREAK ENABLE CRC-16) ENABLE 11 Tx 8 b/char 6-275 AFN-01701C 8274 either by writing another character into the transmit- the MPSC. Although the MPSC automatically ter or by resetting the Transmitter Interrupt/DMA transmits up to two sync characters (16 bit sync), it is Pending latch with a Reset Transmitter InterruptI wise to send a few more sync characters ahead of DMA Pending Command (WRO; D5, D4, D3). If noth- the message (before enabling Transmit CRC) to ing more is written into the transmitter, there can be ensure synchronization at the receiving end. no further Transmit Buffer Empty interrupt, but this situation does cause a Transmit Underrun condition The Transm it CRC Enable bit can be changed on the (RRO; D6). fly any time in the message to include or exclude a particular data character from CRC accumulation. Data Transfers using the RDY signal are for software The Transmit CRC Enable bit should be in the de- controlled data transfers such as block moves. RDY sired state when the data character is loaded from tells the CPU that the MPSC is not ready to accept/ the transmit shift register. To ensure this bit in the provide data and that the CPU must extend the proper state, the Transmit CRC Enable bit must be output/input cycle. DMA data transfers use the issued before sending the data character to the TxDRQ AlB signals which indicate that the transmit MPSC. buffer is empty, and that the MPSC is ready to accept the next data character. If the data character is not Transmit Transparent Mode. Transparent mode loaded into the MPSC by the time the transmit shift (Bisync protocol) operation is made possible by the register is empty, the MPSC enters the Transmit ability to change Transmit CRC Enable on the fly and Underrun condition. by the additional capability of inserting 16 bit sync characters. Exclusion of DLE characters from CRC The MPSC has two programmable options for solv- calculation can be achieved by disabling CRC calcu- ing the transmit underrun condition: it can insert lation immediately preceding the DLE character sync characters, or It can send the CRC characters transfer to the MPSC. generated so far, followed by sync characters. Fol- lowing a chip or channel reset, the Transmit In the transmit mode, the transmitter always sends Underrun/EOM status bit (RRO; D6) is in a set condi- the programmed number of sync bits (8 or 16) (WR4; tion allowing the insertion of sync characters when D5, D4). When in the Monosync mode, the transmit- there is no data to send. The CRC is not calculated ter sends from WR6 and the receiver com pares on these automatically inserted sync characters. against WR7. One of two CRC polynomials, CRC 16 When the CPU detects the end of message, a Reset or SDLC, may be used with synchronous modes. In Transmit Underrun/EOM command can be issued. the transmit initialization process, the CRC This allows CRC to be sent when the transmitter has generator is initialized by setting the Reset Transmit no data to send. CRC Generator command (WRO; D7, D6). In the case of sync insertion, an interrupt is gener- The External/Status interrupt (WR1; DO) mode can ated only after the first automatically inserted sync be used to monitor the status of the CTS input as character has been loaded in Transmit Shift Regis- well as the Transmit Underrun/EOM latch. Option- ter. The status indicates the Transmit Underrunl ally, the Auto Enable (WR3; D5) feature can be used EOM bit and the Transmit Buffer Empty bit are set. to enable the transmitter when CTS is active. The first data transfer to the MPSC can begin when the In the case of CRC Insertion, the Transmit External/Status interrupt occurs (CTS (RRO; D5) Underrun/EOM bit is set and the Transmit Buffer status bit set) fOllowing the Transmit Enable com- Empty bit is reset while CRC is being sent. When mand (WR5; D3). CRC has been completely sent, the Transmit Buffer Empty status .bit is set and an interrupt is generated Receive to indicate to the CPU that another message can begin (this interrupt occurs because CRC has been After a channel reset, the receiver is in the Hunt sent and sync has been loaded into the Tx Shift Reg- phase, during which the MPSC looks for character ister). If no more messages are to be sent, the pro- synchronization. The Hunt begins only when the re- gram can terminate transmission by resetting RTS, ceiver is enabled and data transfer begins only when and disabiling the transmitter (WR5; D3). character synchronization has been achieved. If character synchronization is lost, the hunt phase Bisync CRC G,eneration. Setting the Transmit CRC can be re-entered by writing the Enter Hunt Phase enable bit (WR5; DO) indicates CRC accumulation (WR3; D4) bit.. The assembly of received data con- when the program sends the first data character to tinues until the MPSC is reset or until the receiver is 6-276 AFN-01701C ifltel' 8274 disabled (by command or by CD while in the Auto buffer. Errors and Special Receive Conditions gen- Enables mode) or until the CPU sets the Enter Hunt erate a special vector if the Status Affects Vector Phase bit. Under program control, all the leading (WR1 B; 02) is selected. Also the Parity Error may be sync characters of the message can be inhibited program med (WR 1; 04, 03) not to generate the spe- from loading the receive buffers by setting the Sync cial vector while in the Ipterrupt On Every Character Character Load In hi bit (WR3; 01) bit. After character mode. . synchronization is achieved the assembled charac- ters are transferred to the receive data FIFO, After The Special Receive Condition interrupt can only receiving the first data character, the Sync Character occur while in the Receive Interrupt On First Charac- Load Inhibit bit should be reset to zero so that all ter Only or the Interrupt On Every Receive Character characters are received, including the sync charac- modes. The Special Receive Condition interrupt is ters. This is important because the received CRC caused by the Receive Overrun (RR1; 05) error con- may look like a sync character and not get received. dition. The error status reflects an error in the cur- rent word in the receive buffer, in addition to any Oata may be transferred with or without interrupts. Parity or Overrun errors since the last Error Reset Transferring data without interrupts is used for a (WRO; OS, 04, 03). The Receive Overrun and Parity purely polled operation or for off-line conditions. error status bits are latched and can only be reset by There are three interrupt modes available for data the Error Reset (WRO; OS, 04, 03) command. transfer: Interrupt on First Character Only, Interrupt on Every Character, and Special Receive Conditions The CRC check result may be obtained by checking Interrupt. for CRC bit (RR1; 06). This bit gives the valid CRC result 16 bit times after the second CRC byte has Interrupt on First Character Only mode is normally been read from the MPSC. After reading the second used to start a polling loop, a block transfer se- CRC byte, the user software must read two more quence using ROY to synchronize the CPU to the in- characters (may be sync characters) before check- coming data rate or a OMA transfer using the RxORQ ing for CRC result in RR1. Also for proper CRC com- signal. The MPSC interrupts on the first character putation by the receiver, the user software must reset and thereafter only interrupts after a Special Re- the Receive CRC Checker (WRO; 07,06) after receiv- ceive Condition is detected. This mode can be ing the first valid data character. The receive CRC reinitialized using the Enable Interrupt On Next Re- Enable bit (WR3; 03) may also be enabled at this ceive Character (WRO; OS, 04, 03) command which time. allows the next character received to generate an interrupt. Parity Errors do not cause interrupts, but SYNCHRONOUS OPERATION-SOLC End of Frame (SOLC operation) and Receive Over- run do cause interrupts in this mode. If the external General status interrupts (WR1; 00) are enabled an interrupt may be generated any time the CD changes state. Like the other synchronous operations the SOLC mode must be initialized with the following parame- Interrupt On Every Character mode generates an ters: SOLe mode (WR4; OS, 04), SOLC polynomial interrupt whenever a character enters the receive (WR5; 02), Request to Send, Oata Terminal Ready, Synchronous Mode Register Setup-SOLe/HOLe 07 06 05 04 03 02 01 DO 00 Rx 5b/char ENTER Rx ADDRESS Rx WR3 01 Rx 7b/char AUTO HUNT CRC SEARCH 0 ENABLE 10 Rx 6b/char ENABLES MODE ENABLE MODE 11 Rx 8b/char 0 0 1 0 0 0 0 0 WR4 (SELECTS SDLCI HDLC MODE) 0 00 Tx .;5b/char WR5 DTR 01 Tx 7b/char 0 Tx (SELECTS RTS Tx ENABLE SDLCI CRC 10 Tx 6b/char HDLC ENABLE 11 Tx 8b/char CRC) 6-277 AFN·01701C inter 8274 transmit character length (WRS; 06; 05), interrupt Receive modes (WR1; WR2), Transmit Enable (WRS; 03), Receive Enable (WR3; 00), Auto Enable (WR3; 05) After initialization, the MPSC enters the Hunt phase, and External/Status Interrupt (WR1; 00).WR4 and remains in the Hunt phase until the first Flag is parameters must be written before W,R1, WR3, received. The MPSC never again enters the Hunt WRS, WR6 and WR7. phase unless the microprocessor writes the Enter Hunt command. The MPSC will also detect flags , , separated by a single zero. For example, the bit pat- The Interrupt modes for SOLC operation are similar tern 011111101111110 wi" be detected as two flags. to those~discussed previously in the synchronous operations section. The MPSC can be programmed to receive all frames or it can be programmed to the Address Search Transmit Mode. In the Address Search Mode, only frames with addresses that match the value in WR6 or the global After a channel reset, the MPSC begins sending SOLC flags. address (OFFH) are received by the MPSC. Extended address recognition m'ust be done by the micropro- cessor software. Following the flags in an SOLC operation the a-bit address field, control field and information field may The control and information fields are received as be sent to the MPSC by the microprocessor. The data. MPSC transmits the Frame Check Sequence using the Transmit Underrun feature. The MPSC automat- SOLC/HOLC CRC calculation does not have an a-bit ically inserts a zero after every sequence of 5 con- delay, since all characters are included in the calcu- secutive 1 's except when transmitting Flags or lation, unlike Byte Synchronous Protocols. Aborts. . Reception of an abort sequence (7 or more 1's) will SOLC-like protocols do not have provision for fill cause the Break/Abort bi! (RRO; 07)to be set and will characters within a message. The MPSC therefore cause an External/Status interrupt, if enabled. After automatically terminates an SOLC frame when the the Reset External/Status Interrupts Command has transmit data buffer and output shift register have been issued, a second interrupt will occur at the end no more bits to send. It does this by sending the two of the abort sequence. bytes of CRC and then one or rT)ore flags. This allows very high-speed transmissions under.OMA or CPU control without requiring the CPU to respond MPSC quickly to the end-of-message situation. Detailed Command Description After a reset, the Transmit Underrun/EOM status bit is in the set state and prevents the insertion of CRC GENERAL characters during the time there is no data to send. The MPSC supports an extremely flexible set of se- Flag characters are sent. The'MPSC begins to send rial and system interface modes. the frame when data is written into the transmit buf- fer. Between the time the first data byte is written, The system interface to the CPU consists of a ports and the end of tlie message, the Reset Transmit or buffers: Underrun/EOM (WRO; 07, 06) command must be issued. The Transmit Underrun/EOM status bit (RRO; cs A, A Read Operation Write Operation 06) is in the reset state at the end of the message 0 0 0 Ch A Data Read Ch A Data Write which automatically sends the CRC characters. 0 1 0 Ch A Status Read Ch A Command/Parameter 0 0 1 Ch B Data Read Ch B Data Write 0 1 1 Ch B Status Read Ch B Command/Parameter 1 X X High Impedance High Impedance The MPSC may be programmed to issue a send Abort command (WRO; OS, 04, 03). This command causes at least eight 1's but less than fourteen 1's to Oata buffers are addressed by A1 = 0, and Command be sent before the line reverts to continuous flags. ports are address,ed by A 1 = 1. 6-278 AFN·01701C 8274 COMMAND/STATUS POINTER 02 ~1 ~0_---.jL.......IL---IL--L_...J._-'-_-'-_...I-_ ~I w : : o :R 1 LI_R___R ___________..J ... --~L-- ~I w _R_ _ _ _ _ _ _ _ _ _ _~I I~_R R ____________- - - I 1- ~ 1w__________~I I~R~________~I --_~ R R MSB LSB Read Registers ~ 1w R .·0 w R ·1 ~I w R ~ 1w R ~I w 0 - - - - 1 1... R MSB LSB Write Registers Figure 3. Command/Status Register Architecture (each serial channel) Command, parameter, and status information is After reset, the contents of the pointer register are held in 22 registers within the MPSC (8 write regis· zero. The first write to a command register causes ters and 3 read registers for each channel). They are the data to be loaded into Write Register 0 (WRO). all accessed via the command ports. The three least significant bits of WRO are loaded into the Command/Status Pointer. The next read or An internal pOinter register selects which of the write operation accesses the read or write register command or status registers will be read or written selected by the pointer. The pointer is reset after the dUring a command/status access of an MPSC read or write operation is completed. channel. 6-279 AFN·01701C 8274 COMMAND/STATUS DESCRIPTION Command 0 Null-has no effect. The following command and status bytes are used Command 1 Send Abort-causes the genera- during initialization and execution phases of opera- tion of eight to thirteen l's when tion. All Command/Status operations on the two in the SDLC mode. channels are identical, and independent, except where noted. Command 2 Reset External/Status Interrupts- resets the latched status bits of Write Register 0 (WRO): RRO and re'enables them, allowing interrupts to occur again. Command 3 Channel Reset-resets the Latch- ed Status bits of RRO, the interrupt prioritization logic and all control registers for the channel. Four extra system clock cycles should be allowed COMMAND/STATUS POINTER for MPSC reset time before any REGISTER POINTER additional commands or controls are written into the channel. Command 4 Enable Interrupt on Next Receive Character-'-if the Interrupt on First Receive Character mode is NULL CODe SEND ABORT (SOLe) selected, this command reacti- RESET EXT/STATUS INTERRUPTS vates that mode after each com- CHANNEL RESET plete message is received to ENABLE INTERRUPT ON NEXT Rx CHARACTER prepare the MPSC for the next RESET TxINT/DMA PENDING message. ERROR RESET END OF INTERRUPT Command 5 Reset Transmitter Interrupt/DMA Pending-if The Transmit Interru pt/DMA Enable mode is selected, the MPSC automatically interrupts or requests DMA data transfer when the transm it buffer becomes empty. When there are no more characters to. be sent, NULL CODe RESET Rx CRe CHECKER issuing this command prevents RESET Tx CRe GENERATOR further transmitter interrupts or RESET Tx UNDERRUN/EOM LATCH DMA requests until the next character has been completely sent. Command 6 Error Reset-error latches, Pari- Detailed Register Description ty and Overrun errors in RRl are reset. Command 7 End of Interru pt-resets the WRO interrupt-in-service latch of the D2, Dl, DO-Command/Status Register Pointer bits highest-priority internal device determine which write-register the next byte is to be under service. written into, or which read-register the next byte is to be read from. After reset, the first byte written into D7, D6 CRC' Reset Code either channel goes into WRO. Following a read or 00 Null-has no effect. write to any register (except WRO) the pointer will point to WRO. 01 Reset Receive CRC Checker- resets the CRC checker to D's. If in D5, D4, D3-Command bits determine which of the SDLC mode the CRC checker is basic seven commands are to be performed. . initialized to all 1's. 6-280 AFN·01701C 8274 10 Reset Transmit CRC Generator 01 Transmitter Interrupt/OMA Enable -resets the CRC generator to -allows the MPSC to interrupt or O's. If in SOLC mode the CRC request a OMA transfer when the generator's initialized to aIl1's. transmitter buffer be~omes empty. 11 Reset Tx Underrun/End of Message 02 Status Affects vector-(WR1, 02 Latch. active in channel B only.) If this bit is not set, then the fixed vector, programmed in WR2, is returned from an interrupt acknowledge Write Register 1 (WR1): sequence. If the bit is set then the vector returned from an interrupt MSB LSB acknowledge is variable as shown ID710IDSID4:D'ID2ID1IDOI in the Interrupt Vector Table. '--...---' I EXT INTERRUPT ENABLE 04,03 o 0 Receive Interrupt Mode Receive Interrupts/OMA Disabled 'f)cINTERAUPT/ o Receive Interrupt on First Charac- DMAENABLI: ter Only or Special Condition o Interrupt on All Receive Charac- 1::0 VARIABLE STATUS AFFECTS VECTOR ters or Special Condition (Parity VECTOR (CH B ONLV) (NULLCODECH A) 0 FIXED VECTOR Error is a Special Receive Condi- tion) ~ Interrupt on All Receive Charac- 0 0 RxlNT/DMA DISABLE ters or Special Condition (Parity 0 1 RxlNT ON FIRST CHAR OR SPECIAL Error is not a Special Receive CONDITION Condition). 1 0 INT ON ALL Rx CHAR (PARITV AFFECTS VECTOR) OR SPECIAL CONDITION 05 Wait on Receive/Transmit-when 1 1 INT ON ALL Rx CHAR (PARITV DOES NOT AFFECT VECTOR) OR SPECIAL the following conditions are met CONDITION the ROY pin is activated, otherwise it is held in the High-Z state. 1 '" WAIT ON Ax, 0 .: WAIT ON Tx (Conditions: Interrupt Enabled MUSTBEZERO Mode, Wait Enabled, CS = 0, AO = ,0/1, and A1 = 0). The ROY WAIT ENABLE 1 = ENABLE, 0 =- DISABLE pin is pulled low when the trans- mitter buffer is full or the receiver buffer is empty and it is driven High when the transmitter buffer is DO External/Status Interrupt Enable empty or the receiver buffer is full. -allows interrupt to occur as the The ROYA and ROY e may be result of transitions on the CO, wired OR connected since only CTS or SYNOET inputs. Also one signal is active at anyone time allows interrupts as the result of a while the other is in the High Z Break/Abort detection and termi- state. nation, or at the beginning of CRC, 06 Must be Zero or sync character transmission when the Transmit Underrun/EOM 07 Wait Enable-enables the wait latch becomes set. function. 6-281 AFN·01701C intJ 8274 WR2 Channel A 05, 04, 03 Interrupt Code-specifies the behavior of the MPSC when it re- D1, DO System Configuration-These ceives an .interrupt acknowledge specify the data transfer from seq uence from the CPU. (See Inter- MPSC channels to the CPU, either rupt Vector Mode Table). interrupt or OMA based. a x X Non-vectored interrupts-in- o 0 Channel A and Channel B both use tended for use with external OMA interrupts CONTROLLER. The Data Bus re- mains in a high impedence state a Channel A uses OMA, Channel B during INTA sequences. uses interrupt a 0 8085 Vector Mode 1-intended for a Channel A and Channel B both use as the primary MPSC in a daisy use OMA chained priority structure. (See System Interface section) Illegal Code 1 0 1 8085 Vector Mode 2-intended for 02 Priority-this bit specifies the use as any secondary MPSC in a relative priorities of the internal daisy chained priority structure. MPSC interruptiOMA sources. (See System Interface section) a (Highest) RxA, TxA, RxB, TxB a 8086/88 Vector Mode-intended ExTA, ExTB (Lowest) for use as either a primary or secondary in a daisy chained (Highest) RxA, RxB, TxA, TxB, priority structure. (See System ExTA, ExTB (Lowest) Interface section) 07, D6 Must be zero. Write Register 2 (WR2): Channel A MSB LSB I 07 : 0 , 05 , 04 : 03 , 02' 01 : 00 , ~ ~ • 0 0 80TH INTERRUPT 0 1 A OMA, B INT 1 0 BOTHDMA 1 1 ILLEGAL 1 PRIORITY RxA RxB TxA TxB EXTA* EXTS' 0 PRIORITY RxA TxA RxB TxB EXTA* EXTS* ~ 0 0 8085 MODE 1 0 1 8085 MODE 2 1 0 8086/88 MODE 1 1 ILLEGAL 1 VECTORED INTJ:RRUPT 0 NON VECTORED INTERRUPT MUST BE ZERO 1 PIN 10 SYNDET 6 o PIN 10 RTS a 'EXTERNAL STATUS INTERRUPT· ONLY IF EXT INTERRUPT ENABLE (WR1, 00)18 seT 6-282 AFN·01701C inter 8274 The following table describes the MPSC's response to an interrupt acknowledge sequence: - 05 04 03 IPI MODE INTA Data Bus D7 DO 0 X X X Non-vectored Any INTA High Impedance 1 0 0 0 85 Mode 1 1st INTA 1 1 0 0 1 1 0 1 2nd INTA V7 V6 V5 V4' V3' V2' V1 VO 3rd INTA 0 0 0 0 0 0 0 0 1 0 0 1 85 Mode 1 1st INTA 1 1 0 0 1 1 0 1 2nd INTA High Impedance 3rd INTA High Impedance 1 0 1 0 85 Mode 2 1st INTA High Impedance 2nd INTA High Impedance 3rd INTA High Impedance 1 1 0 0 86 Mode 1st INTA High Impedance 2nd INTA V7 V6 V5 V4 V3 V2' V1'VO' 1 1 0 1 86 Mode 1st INTA High Impedance 2nd INTA High Impedance 'These bIts are variable tf the "status affr;lcts vector" mode has been programmed, (WR1B, p.2) InterruptJDMA Mode, Pin Functions, and Priority Int/OMA Ch. A WR2 Mode Pin Functions Priority ROYAl ROYBI IPI! IPOI RxORQA TxORQA RxORQB TxORQB O2 0, Do CH.A CH.B Pin 32 Pin 11 Pin 29 Pin 30 Highest Lowest 0 0 0 INT INT RxA, TxA.RxB,TxB,EXT~ EXTe RDYA RDY B fPj IPO 1 0 0 INT INT RxA, RxB, TxA, TxB, EXTA, EXT e 0 0 1 DMA RxA, TxA (DMA) f--- -- -- f--,----------- INT - - RxA ,RxB, TxB, EXTA, EXTe(lNT) RxDRO A TxDROA IPI IPO 1 0 1 DMA RxA, TxA (DMA) - -- - -- r-------------- INT RxA" RxB, TxB, ElQ'A' EXT e (INT) 0 1 0 DMA DMA RxA'1 TxA, ~xB, TxB (DMA) RxDROA TxDROA - RxDRO B TxDRO e RxA , RxB , EXTA, EXTe (INT) RxA. RxB, TxA, TxB, (OMA) 1 1 0 DMA DMA RxA " RxB', EXTA' EXT B (INT) 'Speclal Receive Condition AFN·01701C 6-283 8274 Interrupt Vector Mqde Table 8085 Modes V~ V3 V2 I 8086/88 Mode V2 V1 Vo Channel Condition Note 1 Special 0 0 0 B Tx Buffer Empty Receive Condltlon= 0 0 1 Ext/Status Change Panty Error, 0 1 0 Rx Char Available Rx Overrun Error, 0 1 1 Special Rx Condition Frafli)Jng Error, (Note 1) End of Frame (SDLC) 1 0 0 A Tx Buffer Empty 1 0 1 Ext/Status Change 1 1 0 Rx Char. Available 1 1 1 Special Rx Condition (Note 1) Write Register 2 (WR2): Channel B WR2 CHANNEL B MSB lSB D7-DO Interrupt vector-This register contains the value of the interrupt vector placed on the data bus during interrupt ac- knowledge sequences. Write Register 3 (WR3): MSB lSB Ax ENABLE SYNC CHAR LOAD INHIBIT ' - - - - - A o o R SRCH MODE (SolC) ' - - - - - - - R x CRe ENABLE ' - - - - - - - - - E N T E R HUNT MODE ' - - - - - - - - - - A U T O ENABLES Rx 5 BITS/CHAR Rx 7 BITS/CHAR Rx 6 BITSfCHAR Rx 8 BITS/CHAR 6-284 intJ 8274 WR3 Write Register 4 (WR4): DO Receiver Enable-A one enables the re- ceiver to begin. This bit should be set only after the receiver has been initialized. 01 Sync Character Load Inhibit-A one pre- vents the receiver from loading sync characters into the receive buffers. In 1 = EVEN PARITY SOLC, this bit must be zero. o • OOD PARITY 02 Address Search Mode-If the SOLC mode has been selected, the MPSC will re- o 0 ENABLE SYNC MODES ceive all frames unless this bit is a 1. If this bit is a 1, the MPSC will receive only frames o 1 1 STOP BIT with address bytes that match the global I O U STOP BITS address (OFFH) or the value loaded into WR6. This bit must be zero in non-SOLC 1 1 25TO' BITS modes. o 0 IaIT SYNC CHAR 03 Receive CRC Enable-A one in this bit o 1 1811ITSYNCCHAR enables (or re-enables) CRC calculation. 1 0 SDLClHDLCMODE(01111110\FLAG CRC calculation starts with the last charac- ter placed in the Receiver FIFO. A zero in 1 1 EXTERNAL SYNC MODE this bit disables, but does not reset, the o 0 XI CLOCK Receiver CRC generator. o 1 X11CLOCK 04 Enter Hunt Phase-After initialization, the 1 0 X32 CLOCK M PSC automatically enters the Hunt mode. If synchronization is l'1st, the Hunt phase 1 1 X64CLOCK can be re-entered by writing a one to this bit. 05 Auto Enables-A one written to this bit WR4 causes CO to be automatic enable signal DO Parity-a one in this bit causes a parity for the receiver and CTS to be an automatic bit to be added to the programmed number enable signal for the transmitter. A zero of data bits per character for both the written to this bit limits the effect of CD and transmitted and recei,ved character. If the CTS signals to setting/resetting their corre- MPSC is programmed to receive 8 bits per sponding bits in the status register (RRO). character, the parity bit is not transferred to the microprocessor. With other receiver 07, 06 Receive Character length character lengths, the par,ity bit is trans- ferred to the microprocessor. o 0 Receive 5 Data bits/character 01 Even/Odd Parity-if parity is enabled, a o Receive 7 Data bits/character one in this bit causes the MPSC to transmit and expect even parity, and a zero causes o Receive 6 Data bits/character it to send and expect odd parity. Receive 8 Data bits/character 03, 02 Stop bits/sync mode 6-285 AFN.o1701C 8274 o 0 Selects synchronous modes. WRS DO Transmit CRC 'Enable-a one in this bit o Async mode, 1 stop bit/character enables the transmitter CRC generator. The CRC calculation is done whe'n a o Async mode, 1-112 stop bits/character character is moved from the transm it 1 Async mode, 2 stop bits/character buffer into the shift register. A zero in this bit disables CRC calculations. If this bit is 05, 04 Sync mode select not set when a transmitter underrun occurs, the CRC will not be sent. o 0 8 bit sync character o 16 bit sync character 01 Request to Send-a one in this bit forces the RTS pin active (low) and zero in this bit o SO~C mode (Flag sync) forces the RTS pin inactive (high). External sync mode 02 CRC Select-a one in this bit selects the CRC -16 polynomial (X 16 + X 15 + X2 + 1) 07, 06 Clock mode-selects the clock/data rate and a zero in this bit selects the CCITT-CRC multiplier for both the receiver and the polynomial (X 16 + X12 + X5 + 1). In SOLC transmitter. 1x moqe must be selected for mode, CCITT-CRC must be selected. synchronous modes. If the 1 x mode is selected, bit synchronization must be done externally. 03 Transmitter Enable-a zero in this bit forces a marking state on the transmitter o 0 Clock rate = Data rate x output. If this bit is set to zero during data or sync character transmission, the mark- o Clock rate = Data rate x 16 ing state is entered after the character has been sent. If this bit is set to zero during o Clock rate = Data rate x32 transmission of a CRC character, sync or flag bits are substituted for the remainder Clock rate = Data rate x 64 of the CRC bits. 04 Send Break-a one in this bit forces the Write Register S (WRS): transmit data low. A one in this bit allows normal transmitter operation. 06, 05 Transmit Character length o 0 Transmit 5 or less bits/character RTS ' - -_ _ SDLe/eRe·'. (eRe MODE) o Transmit 7 bits/character ' - - - - - - T X ENABLE o Transmit 6 bits/character ' - -_ _ _ _ _ SEND BREAK Transmit 8 bits/character 1)( 5 BITS o~ LESS/CHAR Bits to be sent must be right justified least significant Tx 7 BITS/CHAR bit first, eg: Tx 6 BITS/CHAR Tx 8 BITS/CHAR 07 06 05 04 03 02 01 DO L -_ _ _ _ _ _ _ _ _ _ DTR o o B5 B4 B3 B2 B1 BO AFN-01701C 6-286 inter 8274 Five or less mode allows transmission of one to five bits per character. The microprocessor must format the data in the following way: 07 06 05 04 03 02 01 00 BO Sends one data bit 0 0 0 B1 BO Sends two data bits 0 0 0 B2 B1 BO Sends three data bits 0 0 0 B3 B2 B1 BO Sends four data bits 0 0 0 B4 B3 B2 B1 BO Sends five data bits 07 Oata Terminal Ready-when set, this bit forces the OTR pin active (low). When reset, this bit forces the OTR pin inactive (high). Write Register S (WRS): Write Register 7 (WR7): Msa lSB MSB LSB IM:~:~:M:oo:~:m:ool IM:~:~:M:oo:oo:m:ool Least slgmflcant 1MOS! S'gn,foean! Sync byte (Address Sync byte (must In SOLe/HOLe Mode) be 01111110 In SOLe/HOLe Mode) WR7 07-00 Sync/Flag-this register contains the re- WRS ceive sync character i.n Monosync mode, 07-00 Sync/Address-this register contains the the high order 8 sync bits in Bisync mode, transmit sync character in Monosync or the Flag character (01111110) in ·SOLC mode, the low order 8 sync bits in Bisync mode. WR7 is not used in External Sync mode, or the Address byte in SDLC mode. mode. 6-287 AFN·01701C 8274· Read Register 0 (RRO): MSB LSB IMIMI~I~I~lool~jooJ l Ax CHAR AVAILABLE Int PENDING (CHA ONLY) Tx BUFFER EMPTY CARRIER DETECT SYNC/HUNT CTS EXTERNAL STATUS INTERRUPT MOOE Tx UNDERRUN/EOM BREAK/ABORT RRO DO Receive Character Available-this bit is 04 Sync/Hunt-In asynchronous modes, the set when the receive FIFO contains data operation of this bit is similar to the CD and is reset when the FIFO is empty. status bit, except that Sync/Hunt shows the state of the SYNDET input. Any High-to- 01 Interrupt Pending*-This Interrupt-Pend- Low transition on the SYNDET pin sets this ing bit is reset when an EOI command is bit, and causes an External/Status inter- issued and there is no other interrupt re- rupt (if enabled). The Reset External/Status quest pending at that time. Interrupt command is issued to clear the interrupt. A Low-to-H igh transition clears 02 Transmit Buffer Empty-This bit is set this bit and sets the External/Status inter- whenever the transmit buffer is empty rupt. When the External/Status interrupt is except when CRC characters are being set by the change in state of any other input sent in a synchronous mode. This bit is or condition, this bit shows the inverted reset when the transmit buffer is loaded. state of the SYNDET pin at time of the This bit is set after an MPSC reset. change. This bit must be read immediately following a Reset External/Status Interrupt 03 Carrier Detect-This bit contains the state command to read the current state of the of the CD pin at the time of the last change SYNDET input. of any of the External/Status bits (CD, CTS, Sync/Hunt, Break/Abort, or Tx In the External Sync mode, the Sync/Hunt Underrun/EOM). Any change of state of the bit operates in a fashion similar to the CD pin causes the CD bit to be latched and Asynchronous mode, except the Enter causes an External/Status interrupt. This bit Hunt Mode control bit enables the external indicates current state of the CD pin im- sync detection logic. When the External mediately following a Reset External/Status Sync Mode and Enter Hunt Mode bits are Interrupt command. set (for example, when the receiver is enabled following a reset), the SYNDET *In vector mode this bit is set at the falling edge of input must be held High by the external the second INTA in an INTA cycle for an internal logic until external character synchroniza- . interrupt request. In non-vector mode, this bit is tion is achieved. A High at the SYNDET set at the falling edge of RD input after pointer 2 input holds the Sync/Hunt status in the is specified. This blJ IS always zero in Channel B.- reset condition. 6-288 AFN·01701C 8274 When external synchronization IS In the SDLC mode, the Sync/Hunt bit is achieved, SYNDET must be driven Lowon initially set by the Enter Hunt mode bit, or the second rising edge of RxC after the when the receiver is disabled. In any case, it rising edge of RxC on which the last bit of IS reset to 0 when the opening flag of the the sync character was received. In other first frame is detected by the MPSC. The words, after the sync pattern is detected, External/Status interrupt is also generated, the external logic must wait for two full and should be· handled as discussed Receive Clock cycles to activate the SYN- previously. DET input. Once SYNDET is forced Low, it is good practice to keep it Low until the CPU informs the external sync logic that Unlike the Monosync and Bisync modes, synchronization has been lost or a new orice the Sync/Hunt bit is reset in the SDLC message is about to start. The High-to-Low mode, it does not need to be set when the transition of the SYNDET output sets the end of message is detected. The MPSC au- Sync/Hunt bit, which sets the External/ tomatically maintains synchronization. Status interrupt. The CPU .must clear the The only way the Sync/Hunt bit can be set interrupt by issuing the Reset External/ again is by the Enter Hunt Mode bit, or by Status Interrupt Command. disabling the receiver. When the SYNDET input goes High again, another External/Status interrupt is gener- D5 Clear to Send-this bit contains the in- ated that must also be cleared. The Enter verted state of the CTS pin at the time of the Hunt Mode control bit isset whenever last change of any of the External/Status character synchronization IS lost or the end bits (CD, CTS, Sync/Hunt, Break/Abort, or of message is detected. In this case, the Tx Underrun/EOM). Any change of state of MPSC again looks for a High-to-Low transi- the CTS pin causes the CTS bit to be tion on the SYNDET input and the opera- latched and causes an External/Status tion repeats as explained previously. This interrupt. This bit indicates the inverse of implies the CPU should also inform the ex- the current state of the CTS pin im- ternallogic that character synchronization . mediately following a Reset External/ has been lost and that the MPSC is waiting Status Interrupt command. for SYNDET to become active. In the Monosync and Bisync Receive D6 Transmitter Underrun/End of Message- modes, the Sync/Hunt status bit is initially this bit is in aset condition following a reset set to 1 by the Enter Hunt Mode bit. The (internal or external). The only command Sync/Hunt bit is reset when the MPSC es- that can reset this bit is the Reset Transmit tablishe~ character synchronization. The Underrun/EOM Latch command (WRO, D6 High-to-Low transition of the Sync/Hunt bit and D7)' When the Transmit Underrun con- causes an External/Status interrupt that dition occurs, this bit is set, which causes must be cleared by the CPU issuing the the External/Status Interrupt which must Reset External/Status Interupt command. be reset by issuing a Reset External/Status This enables the MPSC to detect the next command (WRO; command 2). transition of other External/Status bits. When the CPU detects the end of message D7 Break/Abort-in the Asynchronous Re- or that character synchronization is lost, it ceive mode, this bit is set when a Break sets the Enter Hunt Mode control bit, which .sequence (null character plus framing sets the Sync/Hunt bit to 1. The Low-to- error) IS detected In the data stream. The High transition of the Sync/Hunt bit sets the External/Status interrupt, if enabled, is set External/Status Interrupt, which must also when break is detected. The interrupt ser- be cleared by the Reset External/Status vice routine must issue the Reset Interrupt Command. Note that the SYNDET External/Status Interrupt command (WRO, pin acts as an output in this mode, and Command 2) to the break detection logic goes low every time a sync pattern is de- so the Break sequence termination can be tected in the data stream. recognized. 6-289 8274 SOLC Residue Code Table (I Field Bits in 2 Previous Bytes) 8 bits/char 7 bits/char 6 bits/char 5 bits/char RR1 Previous 2nd Prevo Previous 2nd Prevo Previous 2nd Prevo Previous 2nd Prevo 03,02,01 Byte Byte Byte Byte Byte Byte Byte Byte 1 a a a 3 a l' a a 4 a 6 1 1 a a 5 a a 1 a 6 a 5 1 a 1 a I 7 , a 1 1 a 8 - - f---- 1 1 1 1 8 a a a '-- 2 8 a 7 The Break/Abort bit is reset when the ter- 00 All sent-this bit is set when all charac- mination of the Break sequence is detected ters have been sent, in asynchronou's in the incoming data stream. The termina- modes. It is reset when characters are in tion of the Break sequence also causes the the transmitter, in asynchronous modes. External/Status Interrupt to be set. The In synchronous modes, this bit is always Reset External/Status Interrupt command set. must be issued to enable the break detec- tion logic to look for the next Break se- 03, 02, 01 Resid ue Codes-bit synchronous pro- quence. A single extraneous null character tocols allow I-fields that are not an inte- IS present in the receiver after the termina- gral number of characters. Since trans- tion of a break; it should be read and fers from the M PSC to the CPU are char- discarded. acter oriented, the residue codes provide the capability of receiving leftover bits. Residue bits are right jus- tified in the last two data bytes received. In the SOLC Receive mode, this status bit is 04 Parity Error-If parity is enabled, this bit set by the detection of an Abort sequence is set for received characters whose par- (seven or more 1 's). The External/Status ity does not match the programmed interrupt is handled the same way as in the sense (Even/Odd). This bit is latched. case of a Break. The Break/Abort bit is not Once an error occurs, it remains set until uSEld in the Synchronous Receive mode. the Error Reset command is written. 6-290 AFN-01701C intel' 8274 Read Register 1 (RR1): (Special Receive Condition Mode) MSB LSB 1~1~1~1~1~:oo:mlool '---...-----'1 L ALL SENT I FIELD BITS I FIELD BITS ~ PREVIOUS BYTE 2ND PREVIOUS BYTE o 0 0 o 0 1 o 1 0 o 1 1 RESIDUE DATA 8 BITS/CHAR. MODE 1 0 0 1 0 1 1 1 0 1 1 1 ' - - - - - - - - - - P A R I T y ERROR ' - - - - - - - - - - - - R x OVERRUN ERROR ' - -_ _ _ _ _ _ _ _ _ _ _ CRC/FRAMING ERROR '--_ _- - - - - - - - - - - E N O OF FRAME (SOLC/HOLC MODE) 05 Receive Overrun Error-this bit indi- ing error. In synchronous modes, a one cates that the receive FIFO has been in this bit indicates 'that the calculated overloaded by the receiver. The last CRC value does not match the last two c haracte r in the FI FO is overwritten and bytes received. It can be reset by issuing flagged with this error. Once the over- an Error Reset command. written character is read, this error con- dition is latched until reset by the Error Reset command. If the MPSC is in the status affects vector mode, the overrun 07 End of Frame-this bit is valid only in causes a special Receive Condition SOLC mode. A one indicates that a valid Vector. ending flag has been received. This bit is reset either by an Error Reset command 06 CRC/Framing Error-In async modes, a or upon reception of the first character one in this bit indicates a receive fra,m- of the next frame. 6·291 AFN-01701C 8274 Read Register 2 (RR2): DMA operation is accomplished via an ex,ternal DMA controller. When the MPSC needs a data transfer, it >..; MSB LSB request a DMA cycle from the DMA controller. The , V7 : vS; vs : V4' : V3' Vl': VO', DMA controller then takes control of the bus and simultaneously does a read from the MPSC and a write to memory or vice-versa. The following section describes the many config- . ,.n,. ,e_rr-,up_,_ _ _ _ ~~:~~asb:ff:cts urations of these basic types of system interface Vector Vector Mode (WR1; 02) techniques for both serial channels. AR2 Channel B Polled Operation: 07-00 Interrupt vector-contains the interrupt vector programmed into WR2. If the status In the polled mode, the CPU must monitor the de- sired conditions within the MPSC by reading the ap- affects vector mode is selected, it contains the modified vector. (See WR2) RR2 con- propriate bits in the read registers. All data available, tains the modified vector for the highest status, and error conditions are represented by the priority interrupt pending. If no interrupts appropriate bits in read registers 0 and 1 for chan- are pending, the variable bits in the vector nels A and B. are set to one. There are two ways in which the software task of monitoring the status of the MPSC has been re- SYSTEM INTERFACE duced. One is the "ORing" of all conditions into the Interrupt Pending bit. (RRO; 01 channel A only). This General bit is set when the MPSC requires service, allowing The MPSC to Microprocessor System interface can the CPU to monitor one bit instead offour status reg- be configured in many flexible ways. The basic inter- isters. The other is available when the "status- face types are polled, wait, interrupt driven, or direct affects-vector" mode is selected. By reading RR2 memory access driven. Channel B, the CPU can read a vector who's value will indicate that one or more of group of conditions Polled operation is accomplished by repetitively has occurred, narrowing the field of possible condi- reading the status of the MPSC, and making deci- tions. See WR2 and RR2 in the Detailed Command sions based on that status. The MPSC can be polled Description section. at any time. Wait operation allows slightly faster data throughput Software Flow, Polled Operation for the MPSC by manipulating the Ready input to the microprocessor. Block Read or Write Operations to the MPSC are started at will by the microprocessor and the MPSC deactivates its ROY signal if it is not yet ready to transmit the new byte, or ifreception of new byte is not completed. Interrupt driven operation is accomplished via an internal or external interrupt controller. When the MPSC requires service, it sends an interrupt request signal to the microprocessor, which responds with an interrupt acknowledge signal. When the internal or external interrupt controller receives the ac- knowledge, it vectors the microprocessor to a ser- vice routine, in which the transaction occurs. AFN.(I1701C 6-292 8274 Hardware Configu",ation, Polled Operation ~ ADDRESS BUS I I .. - 1" II b DATA BUS (, RD \Vii DBO-7 INTA U Vee 8205 ~~ Ao - 0'-- A, MPSC CS RD WR WAIT OPERATION: instruction (8085 mode) and interrupt vector (8085 Wait Operation is intended to facilitate data trans- and 8088/86 mode) on the data bus. mission or reception using block move operations. If a block of data is to be transmitted, for example, the The MPSC can be programmed to cause an interrupt CPU can execute a String I/O instruction to the due to up to 14 conditions in each channel. The MPSc-. After writing the first byte, the CPU will at- status of these interrupt conditions is contained in tempt to write a second byte immediately as js the Read Registers a and 1. These 14 conditions are all case of,block move. The MPSC forces the RDY directed to cause 3 different types of internal inter- signal low which inserts wait states in the CPU's rupt request for each channel: receive/Interrupts, write cycle until the transmit buffer is ready to ac- transmit interrupts and external/status interrupts (if cept a new byte. At that time, the RDY signal is high enabled). allowing the CPU to finish the write cycle. The CPU then attempts the third write and the process is This results in up to 6 internal interrupt request repeated. signals. The priority of those signals can be pro- grammed to one of two fixed modes: Similar operation can be programmed for the re- ceiver. During initialization, wait on transmit (WR2; Highest Priority Lowest Priority D5 = 0) or wait on receive (WR1; D5 = 1) can be selected.The wait operation can be enabled/ RxA RxB TxA TxB ExTA ExTB disabled by setting/resetting the Wait Enable Bit RxA TxA R~B TxB ExTA ExTB (WR1; D7). CAUTION: ANY CONDITION THAT CAN CAUSE THE The interrupt priority resolution works differently for . TRANSMITTER TO STOP (EG, CTS GOES INAC- vectored and non-vectored modes . TIVE) OR THE RECEIVER TO STOP (EG, RX DATA STOPS) WILL CAUSE THE MPSC TO HANG THE CPU UP IN WAIT STATES UNTIL RESET. EXTREME PRIORITY RESOLUTION: VECTORED MODE CARE SHOULD BE TAKEN WHEN USING THIS FEA- Any interrupt condition can be accepted internally. TURE. to the MPSC at any time, unless the MPSC's internal INTA signal is active, unless a higher priority inter- INTERRUPT DRIVEN OPERATION: rupt is currently accepted, or if fiST is inactive (high). The MPSC can be programmed into several inter- The MPSC's internallNTA is set on the leading (fail- rupt modes: Non-Vectored, 8085 vectored, and ing) edge of the first External INTA pulse and reset 8088/86 vectored. In both vectored modes, multiple on the trailing (rising) edge of the second External MPSC's can be daisy-chained. INTA pulse. After an interrupt is accepted internally, an External INT request is generated and the IPO In the vectored mode, the M PSC responds to an goes inactive. IPO and fPT are used for daisy- interrupt acknowledge sequence by placing a call chaining MPSC's together. 6-293 inter 8274 Interrupt Condition Grouping INTERNAL INTERRUPT CONDITION MODE REQUEST INTERRUPT ON ALL RECEIVE CHARACTERS INTERNAL LOWER PRIORITY INTERRUPTS NOT ACCEPTED INTERRUPT ACCEPTED iNTERFiUPT (EXTERNAL) iNTA (EXTERNAL) HIGHER INTA (INTERNAL) ......+-t-_____ NO~~6~~~~&TS-------<~:4--I:r~I~:~~~S----.. ACCEPTED The MPSC's internallNTA is set on the leading (fail- an external INT request is generated and IPO goes ing) edge of the first external INTA pulse, and reset inactive (high). jf5""() and fi5i are used for daisy- on the trailing (rising) edge of the second external chaining MPSC's together,. INTA pulse. After an interrupt is accepted internally, 6-294 AFN.(I1701C 8274 In-Service Timing INTERNAL INTERRUPT ACCEPTED ~ -' (~ri~~~~~ ~~__________________________________-'~ INTA (EXTERNAL) INTA (INTERNAL) IN-SERVICE (INTERNAL) Each of the six interrupt sources has an associated highest priority In-Service latch is set. After the In- In-Service latch. After priority has been resolved, the Service latch is set, the INT pin goes inactive (high). 6-295 AFN-01701C 8274 EOI Command Timing SERVICE ROUTINE INTERNAL INTERRUPT /,...-----------------~ ~----~ ACCEPTED ---.I I:,"X';-~", ':."."J ~I... ___________ ...J/ im'A (EXTERNAL) - INTA (INTERNAL) / LOWER IN-SERVICE (INTERNAL) / /().o--r:~~:~1JPTS ACCEPTED _ _- - - - J EO"COMMAND (INTERNAL) Lower prrority interrupts are not accepted Internally After the interrupt is serviced, the End-of.lnterrupt while the In-Service latch is set. However, higher (EOI) command should be written to the MPSC. This priority interrupts are accepted Internally and a new command will cause an internal pulse that is used to external INT request is generated. If the CPU re- reset the In-Service Latch which allows service for sponds with a new INTA sequence, the MPSC will re- lower priority interrupts in the daisy-chain to re- spond as before, suspending the lower priority sume, provided a new INTA sequence does not start interrupt. for a higher priority interrupt (higher than the high- est under service). If there is no interrupt pending in- ,ternally, the IPO follows IPI. 6-296 AFN·01701C 8274 Non-Vectored Interrupt Timing SERVICE ROUTINE LOWER PRIORITY INTERRUPTS NOT ACCEPTED - - - INTERNAL INTERRUPT ACCEPTED INTERRUPT (EXTERNAL.) Ro (EXTERNAl) INTERNAL POINTER SETTOREG2 IN·SERVICE (INTERNAL) EOICOMMAND (INTERNAL) PRIORITY RESOLUTION: In this case, the internal pointer being set to RR2 NON-VECTORED MODE provides the same furiction as the internal INTA slghal in the vectored mode. It inhibits acceptance of any additional internal interrupts and its leading In non-vectored mode, the MPSC does not respond edge starts the interrupt priority resolution circuit. to interrupt acknowledge sequences. The INTA input The interrupt priority resolution is ended by the lead- (pin 27) must be pulled high for proper operation. ing edge of the read signal used by the CPU to The MPSC should be programmed to the Status- retrieve the modified vector. The leading edge of Affects-Vector mode, and the CPU should read RR2 read sets the In-Servi!(e latch and forces the external (Ch. B) in its service routine to determine which inter- INT output inactive (high). The internal pointer is rupt requires service. reset to zero after the trailing edge ofthe read pulse. 6-297 AFN-01701C 8274 Vee INTH~ INTA CPU INT 6 INTA INT 6 INTA INT b INTA ~ IPI IPO IPI IPO IPI IPO MPSC MPSC MPSC HIGHEST PRIORITY lOWEST PAIORITY Note that if RR2 is specified but not read, no internal interrupts, regardless of priority, are accepted. I DAISY CHAINING MPSC: In the vectored interrupt mode, multiple MPSC's can If Wi is active (low), the MPSC knows that all higher be daisy-chained on the same INT, INTA signals. priority MPSC's have no interrupts pending. The Wi These signals, in conjunction with the Wi and IPO pin of the highest priority MPS~ is strapped active allow a daisy - chain - like interrupt resolution (low) to ensure that it always has priority over the scheme. This scheme can be configured for either rest 8085 or 8086/88 based system. MPSC's Daisy-chained on an 8088/86 CPU should be In either mode, the -same hardware configuration is programmed to the 8088/86 Interrupt mode (WR2; called for. The INT request lines are wire-OR'ed to- D4, D3 (Ch. A). MPSC's Daisy-chained on an 8085 gether at the input of a TTL inverter which drives the CPU should be programmed to 8085 interrupt mode INT pin of the CPU. The INTA signal from the CPU 1 if it is the highest priority MPSC. In this mode, the drives all of the daisy-chained MPSC's. highest priority MPSC issues the CALL instruction during the first INTA cycle, and the interrupting The MP8c:; drives IPO (Interrupt Priority Output) in- MPSC provides the interrupt vector during the fol- active (high) if IPI (Interrupt Priority Input) is inactive lowing INTA cycles. Lower priority MPSC's should (high), or if the MPSC has an interrupt pending. ' be programmed to 8085 interrupt mode 2. The IPO of the highest priority MPSC is connected to M PSC's used alone in 8085 systems should be' pro- the Wi of the next highest priority MPSC, and so on. grammed to 8085 mode 1 interrupt operation. 6-298 AFN-01701C 8274 DMA Acknowledge Circuit DACK o - - - - , DACK,----, DACK,--~~r-~ DACK,-~~~r-~ I-A"---"---- A, 1-:::::----:----- A, i--'--{)o---- cs DMA Timing DRQ,J \'------- A.,A"CS---""X"-_ _ _ _ _ _ _ _ _ _ >C ---J/ iiD, Wii - - - - - - . . . , , \ ' - -_ _ _ _ _ DMA OPERATION permutations of Interupt, wait, and DAM modes for Each MPSC can be programmed to utilize up to four channels A and B, Bits 0" Do of WR2 Ch, A deter- DMA channels: Transmit Channel A, Receive Chan- mine these permutations. nel A, Transmit Channel B, Receive Channel B. Each Permutation DMA Channel has an associated DMA Request line. WR2 Ch. A Acknowledgement of a DMA cycle is done via nor- mal data read or write cycles. This is accomplished 0,00 Channel A ChannelS by encoding the, DACK signals to generate AD, A" Walt Wait and CS signals, and multiplexing them with the 00 Interrupt Interrupt Polled Polled normal AD, A" and CS signals. ' o1 DMA Interrupt Polled Polled PERMUTATIONS 1 0 DMA , DMA Channels A and B can be used with different system Polled Polled . interface modes. In all cases it is impossible to poll the MPSC. The following table shows the possible 01. DO = 1.1 is illegal. q..299 AFN'()1701C inter 8274 .... DE ~ A16-A19 01 DO A16-A19 ALE - ST. A8-A15 ~ A8-.\15 --:!:!::!:::...VCC - II 8274 8284A 8.88 AD H='- :i:;O.-- H!HO>- 82~O,~ r;:= 01 i - ST. DO ,-A II, ~' H O'l READV 8282 WR A~ ~ B4 OE -T- ....... j 00,-00" 8282 STS ~ i- c" DE 01,-01 7 i- RESET ADO .. AD7 I 00 D, DB, HOLD HLOA DB, ~ ADSTS Oo-D .237 A,-A MEMO DRO o RxOR MnlWA =, - fJ HLOA ORO" TxOR 0, i- elR 0 74lS74 HRO AEN =, - OR0 2 R.OR 0, elK 17011 =, MUL.TlPLEXER -- - -,, .: : ~ lk r-, y-T !-- iiOW T ,DR READY ... ClK I!l5l' r-- NC A, RESET 'J ..... r :....-1' A, v ' .... CS -t>ot>o : v ». , l-IC------J os ..... (FROM 8205) V RD WR '-- 6-300 AFN-01701C 8274 ABSOLUTE MAXIMUM RATINGS* Ambient Temperature Under Bias ........................ O°C to + 70°C 'NOTICE Stresses above those listed under "Absolute Storage Temperature Maximum Ratings" may cause permanent damage to the (Ceramic Package) ............. -65°C to +150°C device. This is a stress rating only and functIOnal opera- tion of the device at these or any other conditIOns above (Plastic Package) . . ........... - 40°C to + 125°C those indicated In the operational sections of this specifi- Voltage On Any Pin With cation is not Implied. Exposure to absolute maximum Respect to Ground .............. -0.5V to +7.0V rating conditions for extended periods may affect device Power Dissipation ......................... 1.5W reliability. D.C. CHARACTERISTICS (TA = DoC to 70°C; Vee = +5V ±10%) Symbol Parameter Min. Max. Units Test Conditions V IL Input Low Voltage -05 +08 V V IH Input High Voltage +20 Vee +05 V VOL Output Low Voltage +045 V IOL = 2.0mA VOH Output High Voltage +24 V IOH = -200/LA IlL Input Leakage Current +10 /LA VIN = Vee to OV IOL Output Leakage Current +10 /LA VOUT = Veeto OV lee Vee Supply Current 180 mA CAPACITANCE (TA = 25°C, Vee = GND = OV) Symbol Parameter Min. Max. Units Test Conditions C IN Input Capacitance 10 pF Ic = 1 MHz; C OUT Output Capacitance 15 pF Unmeasured CliO InpuVOutput Capacitance 20 pF pins returned to GND 6-301 AFN-01701C .,274 A.C. CHARACTERISTICS (T. = O°C to 70°C; Vee = +5V ±100/0) Symbol Parameter Min. Max. Units Test Conditions ICY CLK Period 250 4000 ris 'Cl ClK low Time 105 2000 ns 'CH CLK High Time 105 2000 ns Ir ClK Rise Time 0 30 ns If ClK Fall Time 0 30 ns 'AR AO, AI Selup to RD) 0 ns 'AD AO, AI 10 Dala Oulpul Dlay ,200 ns (:l=150 pf 'RA AO, AI Hold After RD 1 0 ns 'RD ' RD) 10 Dala Oulpul Delay 200 ns C l =15Q pf 'RR' All Pulse Widlh 250 ns IOF Outpul Floal Del~y 120 ns 'AW CS, AO, AI Selup 10 WR j 0 ns IWA CS, AO, AI Hold after WR 1 0 ns IWW WR Pulse Widlh 25Q ns lOW Dala Selup to WRl 150 ns IWO Data Hold After WR 1 0 ns 'pi iPT Selup 10 INTA) 0 ns 'iP IPI Hold after INTA 1 0 ns 'II INTA Pulse Widlh INTAj 10 IPO Delay 250 200 ns ns 'IAPO IplPO IPI) 10 IPO Delay 100 ns '10 INTA j 10 Dala Oulpul Deay 200 ns I 'ca AD or WR 10 ORO) 150 ns 'RV Recovery Ti me Belween Conlrols 300 ns ICW CS, AO, AI 10 ROYA or ROY B !?elay , 120 ns toCY Dala Clock Cycle, 400 ns 'OCl Data Clock low Time 180 ns lOCH Dala Clock High Time 180 ns 'TO TxC 10 TxD Delay 300 ns los RxD Selup 10 Rx9l 0 ns IOH RxD Hold after Rxct 140 ns 'ITO TxC 10 INT Delay 4 6 Icy 'IRO RxC 10 INT Delay 7 10 Icy I 'pi CTS, CD, SYNDET Low Time 200 ns 'pH CTS, CD, SYNDET High Time 200 ns tlPo EXlernaliNT from CTI), CD, SYNDET 500 ns 6-302 AFN·OI701C 8274 A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUTfOUTPUT DEVICE UNDER TEST lC,-,5OPF A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FDA A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 20V FOR A LOGIC 1 Cl = 150 pF AND 0 BV FDA A LOGIC 0 CL INCLUDES JIG CAPACITANCE WAVEFORMS CLOCK CYCLE READ CYCLE CS, AO, A1 1 - - - - .RR-----J t RA ----+- RD DBo-DB? HIGH IMPEDANCE t-----·AD------o~ 6-303 AFN-01701C 8274 WAVEFORMS (Continued) WRITE CYCLE ~ _/ 1=",~_,w"_~ .ud< INTA CYCLE IMPEDANCE DMA CYCLE ORO / -----' es, AO, A1 RDORWR NOTES: 1. INTA signal acts as RD signal. 2. IPI signal acts as CS signal. 6-304 AFN-01701C inter 8274 WAVEFORMS (Continued) READ/WRITE CYCLE (SOFTWARE POLLED MODE) i5j,AO.A1 ADOAwli 1 - - - - - - - - '.. - - - - - - - 1 "------- TRANSMIT DATA CYCLE OTHER r::::::._ ~.~----". . ."-----0----,"'----~~--- 1 "~--Q-I.'~__ 6-305 AFN-01701C 8275H PROGRAMMABLE CRT CONTROLLER • Programmable Format Screen and Character • MCS·S1®, MCS·8S®, iAPX 86, and iAPX 88 Compatible • 6 Independent Visual Field Attributes • Dual Row Buffers • 11 Visual Character Attributes (Graphic Capability) • Programmable DMA Burst Mode • Cursor Control (4 Types) • Single + SV Supply • Light Pen Detection and Registers • High Performance HMOS·II The Intel® 8275H Programmable CRT Controller is a single chip device to interface CRT raster scan displays with Intel® microcomputer systems. It is manufactured on Intel's advanced HMOS-II process. Its primary function is to refresh the display by buffering the information from main memory and keeping track of the display position of the screen. The flexibility designed in the 8275H will allow simple interface to almost any raster scan CRT display with a minimum of external hardware and software overhead. CCLK LC3 vcc LC2 LAo LC, LA, 080_7 CCO_6 LCo LTEN DRO RVV DACK VSP HRTC GPA, VRlC GPAO iffi HLGT DRQ lCO_3 WR IRO LPEN CCLK DBO CCe DB, CC5 DB2 CC4 AD READI WRITEI DB3 CC3 LAO_l WI'i DMA CONTROL W HATe DB4 CC2 AO- LOGIC VRTC HLGT DB5 CC, RVV DBe CCo LTEN os VSP DB7 cs GPAO_l GND AO LPEN Figure 1. Block Diagram Figure 2. Pin Configuration Intel Corporation Assumes N6 ResponsibIlity for the Use of Any CircUitry Other Than Circuitry Embodied In an Intel Product No Other CirCUit Patent Licenses are Implied @INTELCORPORATlON, 1982 APRIL 1982 6-306 ORDER NUMBER: 210464-001 inter 8275 Table 1. Pin Descriptions Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function L~ 1 0 Line Count: Outputfrom the line count- Vcc 40 +5V Power Supply. LC. 2 er which Is used to address the charac- LAo 39 0 Line Attribute Codes: These attribute LC, 3 ter generator for the line positions on the LA, 3B codes have to be decoded externally by LCo 4 screen. the dot/timing logic to generate the ORO 5 '0 DMA Request: Output signal to the horizontal and vertical line combina- 8257 DMA controller requesting a DMA tions for the graphic displays specified cycle. by the character attribute codes. DACK, 6 I DMA Acknowledge: Input signal from LTEN 37 0 Light Enable: Output signal used to the 8257 DMA controller acknowledging enable the video signal to the CRT. This that the requested DMA cycle has been output is active at the programmed granted. underline cursor position, and at posi- HRTC 7 0 Horizontal Retrace: Output signal tions specified by attribute codes. which is active during the programmed RW' 36 0 Reverse Video: Output Signal used to horizontal retrace interval. During thiS indicate the CRT circuitry to reverse the period the VSP output is high and the video signal. This output IS active at the LTEN output is low. cursor position if a reverse Video block VRTC 8 0 Vertical Retrace: Output signal which cursor is programmed, or at the posi- IS active dUring the programmed tions specified by the field attribute vertical retrace Interval. During this codes. period the VSP output is high and the VSP 35 0 Video Suppression: Output signal LTEN output IS low. used to blank the video signal to the RD I Read Input: A control signal to read CRT. ThiS output is active: 9 registers. -during the horizontal and vertical re- trace Intervals. WR 10 I Write Input: A control signal to write commands into the control registers or -at the top and bottom lines of rows If write data Into the row buffers during a underline is programmed 'to be num- DMAcycle, ber 8 or greater. -when an end of row or end of screen LPEN 11 I Light Pen: Input signal from the CRT code IS detected. system signifying that a light pen signal has been detected. -when a DMA underrun occurs, -at regular Intervals (1/16 frame fre- DBo 12 1/0 Bi-Dlrectional Three-State Data Bus quency for cursor, 1132 frame fre- DB, 13 Lines: The outputs are enabled during quency for, character and field attri- DB. 14 a read of the C or P ports. butes)-t6 create blinking displays as DB3 15 specified by cursor, character attri- DB. 16 bute, or field attribute programming. DBs 17 DBs 18 GPA, 34 0 General .Purpose Attribute Codes: DB7 19 GPAo 33 Outputs which are enabled by the gen- eral purpose field attribute codes. Ground 20 Ground. HLGT 32 0 Highlight: Output signal used to inten' Slfy the display at particular positions on the screen as specified by the character attribute codes or field attribute codes. IRQ 31 0 Interrupt Request. CCLK 30 I Character Clock (from dot/tlmlng logic). CCs 29 0 Character Codes: Output from the CC s 28 row buffers used for character selection CC. 27 In the character generator. CC3 26 CC. 25 CC, 24 CCo 23 CS 22 I Chip Select: The read and write are en- abled by CS. Ao 21 I Port Address: A high input on Ao selects the "c" port or command regis- ters and, a low input selects the "P" port or parameter registers. 6-307 AFN·00224B intJ 8275 FUNCTIONAL DESCRIPTION RD (Read) . A "low" on this input informs the 8275 that the CPU is Data Bus Buffer reading data or status information from the 8275. This 3-state, bidirectional, 8-bit buffer is used to interface the 8275 to the system ~ata Bus. WR (Write) A "low" on this input informs the 8275 that the CPU is This functional block accepts inputs from the System Can· writing data or control words to the 8275. trol Bus and generates control signals for overall device operation. It contains the Command, Parameter, and Status CS (Chip Select) Registers that store the various control formats for the device functional definition. A "low" on this input selects the 8275. No reading or writ- ing will occur unless the device is selected. When CS is high, the Data Bus in the float state and RD and WR will have no AO OPERATION REGISTER effect on the chip. 0 Read PREG DRQ (DMA Request) 0 Write PREG A "high" On this output informs the DMA Controller that 1 Read SREG the 8275 desires a DMA transfer. 1 Write CREG DACK (DMA Acknowledge) A "low" on this input informs the 8275 that a DMA cycle is in progress. Ao RD \'VR CS IRQ (Interrupt Request) 0 0 1 0 Write 8275 Parameter 0 0 0 Read 8275 Parameter A "high" on this output informs the CPU that the 8275 0 1 0 Write 8275 Command desires interrupt service. 0 0 Read 8275 Status X 0 Three-State X X X Three-state 6-308 AFN-00224B 8275 FUNCTIONAL DESCRIPTION CCLK Character Counter The Character Counter is a programmable counter that is used to determine the number of characters to be displayed per row and the length of the horizontal retrace interval. It CCO_6 is driven by the CCLK (Character Clock) input, which should be a derivative of the external dot clock. Line Counter The Line Counter is a programmable counter that is used to DRa _ _ _ _ ~ determine the number of horizontal lines (Sweeps) per LCO_3 DACK character row. Its outputs are used to address the external IRa character generator ROM. Row Counter LAO_l The Row Counter is a programmable counter that is used to HRTe VATe determine the number of character rows to be displayed per HLGT RVV frame and length of the vertical retrace interval. LTEN VSP GPAO_l Light Pen Registers LPEN The Light PeH Registers are two registers that store the can· tents of the character counter and the row counter when· ever there is a rising edge on the LPEN (Light Pen) input. Figure 3. 8275 Block Diagram Showing Counter Note: Software correction IS required. and Register Functions Raster Timing and Video Controls FIFOs The Raster Timing circuitry contrbls the timing of the There are two 16 character FIFOs in the 8275. They are HRTC (Horizontal Retrace) and VRTC (Vertical Retrace) used to provide extra row buffer length in the Transparent outputs. The Video Control circuitry controls the genera· Attribute Mode (see Detailed Operation section). tion of LAO_1 (Line Attribute). HGLT (Highlight). RVV (Reverse Video). LTEN (Light Enable), VSP (Video Sup- Buffer Input/Output Controllers press), and GPAO_1 (General Purpose Attribute) outputs. The Buffer Input/Output Controllers decode the characters being placed in the row buffers. If the character is a charac· Row Buffers ter attribute, field attribute or speCial code, these con· The Row Buffers are two 80 cl,aracter buffers. ihey are trollers control the appropriate action. (Examples: An fi lied from the microcomputer system memory with the "End of Screen-Stop DMA" special code will cause the character codes to. be displayed. While one row buffer is Buffer Input Controller to stop further DMA requests. A displaying a row of characters, the other is being filled with "Highlight" field attribute will cause the Buffer Output the next row of characters. Controller to activate the HG LT output.) 6-309 AFN·00224B 8275 SYSTEM OPERATION The 8275 is programmable to a large number of different It is designed to interface with the 8257 DMA Controller display formats. It provides raster timing. display row buf- and standard character generator ROMs for dot matrix fering. visual attribute decoding. cursor timing. and light decoding. Dot level timing must be provided by external pen detection. circuitry. , - MEMORIES I{ SYSTEM BUS U ( DBO_7 MUiIR AO lOW DBO_7 MEMW WR lOR RD CS CS HRQ IRQ HACK DRQ LCO_3 8257 VIDEO SIGNAL DMA CHARACTER CONTROLLER DACK GENERATOR HORIZONTAL SYNC 8275 CCO_6 DOT CRT. TIMING VERTICAL SYNC CONTROLLER CCLK AND INTERFACE INTENSITY VIDEO CONTROLS Figure 4. 8275 Systems Block Diagram Showing Systems Operation 6-310 AFN·OO224B 8275 General Systems Operational Description The number of lines per character row, the underline posi- tion, and blanking of top and bottom lines are program- The 8275 provides a "window" into the microcomputer mable. (See Programming Section.) system memory. The 8275 provides special Control Codes which can be used Display characters are retrieved from memory and dis- to minimize DMA or software overhead. It also provides played on a row by row basis. The 8275 has two row buf· Visual Attribute Codes to cause special action or sYll)bols fers. While one row buffer is being used for display, the on the screen without the use of the character generator other is being filled with the next row of characters to be (see Visual Attributes Section). displayed. The number of display characters per row and The 8275 also controls raster timing. This is done by gen- the number of character rows per frame are software pro· erating Horizontal Retrace (H RTC) and Vertical Retrace grammable, providing easy interface to most CRT displays. (VRTC) signals. The timing of these signals is program· (See Programming Section.) mabie. The 8275 can generate a cursor. Cursor location and format The 8275 requests DMA to fill the row buffer that is not are programmable. (See Pr<:>gramming Section.) being used for display. DMA burst length and spacing is programmable. (See Programming Section.) The 8275 has a light pen input and registers. The light pen input is used to load the registers. Light pen registers can be The 8275 displays character rows one line at a time. read on command. (See Programming Section.) --------- 1st Character 2nd Character 3rd Character 4th Character 5th Character 6th Character 00•••• 000.0000.80 • • • • • 000000000 • • • • 0000 • • • 000.000.0 First Line of a Character Row 7th Character ------------- 1st 2nd 3rd 4th 5th 6th 7th Character Character Character Character Character Character Character 00•••• 000.0000.00 • • • • • 000000000 • • • • 0000 • • • 000.000.0 0.0000.00 •• 000.00.0000000000000.000800.000800.00080 Second Line of a Character Row ------------ 1st 2nd 3rd 4th 5th 6th 7th Character Character Character Character Character Character Character OO •••• ODO.OOOO.OO • • • • • ODOOOOOOO •••• OUDO ••• ODO.OOO.O 0.0000.00 •• 000.00.0000000000000.000.00.0008,00.000.0 0.ooon_OO.ODDO.OO.OOOOOOOOOOOOO.00080D.000.OO.000.O Third Line of a Character Row ------------ 1st Character 2nd Character 3rd Character 4th Character 5th Character 6th Character 00 •••• 000.0000.00 • • • • • 000000000 • • • • 0000 • • • 000.000.0 0.0000.00 •• 000.00.00000000000008000800.000.008000.0 0.0000.00.0800.00.0000000000000.000.0080008008000.0 0.0000.00.0000.00 • • • • 0000000000 • • • • DOD. DOD. 00. O. O. 0 0.0000.00.00.0.00.0000000000000.0.0000.000.00.0.0.0 - 0.0000.00.000 • •00.0000000000000800.000.000.00.0.080 7th Character 00• • • •000.0000.00 • • • • • 000000000. 00.0000 • • • 0000.0800 Seventh Line of a Character Row Figure 5. Display of a Character Row 6-311 AFN·OO224B intJ 8275 Display Row Buffering After all the lines of the character row are scanned. the Before the start of a frame. th~ 8275 requests DMA and roles of the two row buffers are reversed and the same one row buffer is filled with characters. procedure is followed for the next row. eelK CCLK CCO_8 ceo-. ORQ lCo_3 BACK ORQ LCO_3 IRQ DACK IRQ RD WR lAo_l RD HATe lAO-l VRle WI! Ao HLGT HATe RW VATe LTEN A. HLGT vsp Rw Ell GPAo_l LTEN VIP Ell GPAO_l LPEN LPEN Figure 6. Firs. Row Buffer Filled When the first horizontal sweep is started. character codes Figure 8. First Buffer Filled with Third Row, are output to the character generator from the row buffer' Second Row Displayed just filled. Simultaneously. DMA begins filling the other row buffer with the next row of characters. This is repeated until all of the character rows are dis· played. CCLK ORO _ _ _ _, DACK IRa lAo--, HATC VRle HlGT RW LTEN VSP . . .-----.r~ GPAo--, LPEN Figure 7. Second Buffer Filled, Firs. Row Displayed 6-312 8275 Display Format Row Format The 8275 is designed to hold the line count stable while outputting the appropriate character codes during each horizontal sweep. The line count is incremented during Screen Format horizontal retrace and th~ whole row of character codes are The 8275 can be programmed to generate from 1 to 80 output again during the next sweep. This is continued until characters per row, and from 1'to 64 rows per frame. the whole character row is displayed. The number of lines (horizontal sweeps) per character row is programmable from 1 to 16. The output of the line counter can be programmed to be in one of two modes. 123456789 . . . . . . . . . . . . . . 80 In mode 0, the output of the line counter is the same as the 2 line number. 3 In mode 1, the line counter is offset by one from the line 4 number. 5 6 Note: In mode 1. while the first line (line number 01 IS being dis' 7 played, the last count IS output by the line counter (see 8 examplesl. 9 Line Line Line Counter Counter Number Mode 0 Model 64 0 0 0 0 0 0 0 0 0 0000 0 1111 1 0 0 0 o • 0 0 0001 0 0 0000 2 0 0 o • 0 • 0 o 0 ,0010 0001 Figure 9. Screen Format 3 4 0 o • 0 • 0 0 0 00. 0 0 0 0 o • 0 0011 0100 0010 0011 5 o • 0 0 0 00. 0 0101 Ql00 6 7 o • o • •••••• 0 0 0 0 0 o • 0 0110 0111 0101 0110 8 o • 0 0 0 0 o • 0 1000 0-111 9 o • 0 0 0 0 o • 0 1001 1000 The 8275 can also be programmed to blank alternate rows. 10 0 0 0 0 0 0 000 1010 1001 In this mode, the first row is displayed, the second blanked, 11 0 0 0 0 0 o 0 o 0 1011 1010 the third displayed, etc. DMA is not requested for the 12 0 0 0 0 0 0 0 o 0 1100 1011 13 0 0 0 0 0 0 0 0 0 1101 1100 blanked rows. 0 0 o 0 0 14 0 0 0 0 1110 1101 15 o 0 0 0 0 0 0 o 0 1111 1110 Figure 11. Example of a 16-Llne Format Line Line Line Counter Counter 123456789 . . . . . . . . . . . . . . . 80 Number Modo 0 Mode 1. ;1 '0 0 0 0 0 0 o ,0 0000 1001 3 1 0 0 0 • 0 0 0 0001 0000 2 0 0 • • 0 0 0 0010 0001 4 3 0 • • 0 0 0 0 00 11 0010 5 4 0 • • 0 0 0 0 0100 0011 5 0 ••••• 0 a 10 1 ,0100 6 0 • 0 0 0 • 0 0110 0101 7 8 0 0 • 0 0 0 0 0 0 0 • 0 0 0 0111 1000 0110 0111 9 0 0 0 0 0 0 0 100 1 1000 64 Figure 12. Example of a 10-Llne Format Figure 10. Blank Alternate Rows Mode Mode 0 is useful for character generators that leave address zero blank and start at address 1. Mode 1 is useful for char- acter gener.ators which start at address zero. 6-313 AFN-00224B 8275 Underline placement is also programmable (from line num- Dot Format ber 0 to 15). This ,is independent of the line counter mode. Dot width and character width are dependent upon the If the line number of the underline is greater than 7 (line external timing and control circuitry. number MSB = 1), then the top and bottom lines will be blanked. ' Dot level timing circuitry should be designed to accept the parailel outPUt Of the character generator and shift it out serially at the rate required by the CRT display. Line Line Line Counter Counter Number Mode 0 Mode 1 a 0 0 0 0 0 [J 0 0 0 0000 1011 1 0 0 0 0 • 0 0 0 0 0001 0000 2 0 0 0 • • 0 0 0 0 00 10 0001 3 0 0 • 0 0 0 • 0 0 a all 0010 4 0 • 0 o • 0 0 0100 0 0 0011 5 o • 0 0 • 0110 0 0101 0 0 0 0100 6 0 • • • • • • • 0 0101 7 o • 0 0 • 0111 0 0 0 0 0110 8275 8 0 • 0 0 • 1000 0 0 0 0 0111 9 o • o 0 • 1010 0 1001 0 0 0 1000 10 11 • • • • • • • • • 1011 0 0 0 0 0 0 0 0 0 1001 1010 VIDEO Vspr---1.~~::=::..J Top and Bottom Lines are Blanked Figure 15. Typical Dot Level Block Diagram Figure 13. Underline In Line Number 10 If the line number of the underline is less than or equal to 7 Dot width is a function of dot clock frequency. (line number MSB = 0), then the top and bottom lines will Character width is a function of the character generator not be blanked. width. Horizo;:ttal character spacing is a function of the shift register length. Note: Video control and timing signals must be synchronized with the video Signal due to the character generator access delay line Line Line Counter Counter Number Mode 0 Mode 1 0 0 0 0 • 0 0 0 0000 0111 1 0 • • 0 0 0 0 0001' 0000 2 o • • 0 0 0 0 0'010 00,0 1 3 0 • • 0 0 0 0 0011 0010 4 0 ••••• 0 0100 a all 5 0 • • 0 0 0 0 0101 0100 6 0 • • 0 0 0 0 0110 0101 7 ••••••• 0111 0110 Top and Bottom Lines are not Blanked Figure 14. Underline In Line Number 7 If the line number of the underline is greater than the maxi- mum number of lines, the underline will not appear. Blanking is accomplished by the VSP (Video Suppression) signal. Underline is ,accom'plished by the LTEN (Light Enable) signal. 6-314' AFN-D0224B intJ 8275 Raster Timing The row counter is an internal counter driven by the line The character counter is driven by the charaater clock input counter. It controls the functions of the row buffers and (CCLK). It counts out the characters being displayed counts the number of character rows displayed. (programmable froin 1 to 80). It then causes the line ONE CHARACTER ROW counter to increment, and it 'Starts counting out the hori· , zontal retrace interval (programmablE! from 2 to 32). This is constantly repeated. CCLK~ Jl ~--~~ "~awWE"~~ ~ , PROGRAMM:BLE 1 TO 16 LINE cou".rs HRTe Figure 17. Row Timing \----11 PROGRAMMABLE 1 TO eo CCLkS After the row counter counts all of the rows in a frame , NEXT LC()'3 PRESENT LINE COUNT ________________ J LIHECOUNT (programmable from 1 to 64), it starts counting out the vertical retrace interval (programmable from 1 to 4). figure16. Line Timing . ONE FRAME The line counter is driven by the character counter. It is "~I~~~~:; Jtxxx:x:xXXx FIRST DISPLAV ROW LAST DISPLAY ROW FIRST LAST RETRACE RETRACE ROW ROW used to generate the line address outputs (LC o_ I for the character generator. After it counts all of the ~ines in a character row (programmable from 1 to 16), it increments the row counter, and starts over again. (See Character For· mat Section for detailed description of Line Counter • PROGRAMMABLE. 1 TO 64 ROW COUNTS • PROGRAMMABLE 1 TO 4 ROW COUNTS functions. ) Figure 18. Frame Timing The Video Suppression Output (VSP) is active during horizontal and vertical retrace intervals. Dot level timing circuitry must synchronize these outputs with the vicjeo signal to the CRT Display. 6-315 AFN·OO224B 8275 DMATlming Interrupt Timing The 8275 can be programmed to request burst DMA trans- The 8275 can be programmed to generate an interrupt fers of 1 to 8 characters. The interval between bursts is also request at the end of each frame. This can be used to programmable (from 0 to 55 character clock periods ±1). reinitialize the DMA controller. If the 8275 interrupt This allows the user to tailor his DMA overhead to fit his enable flag is set, an interrupt request will occur at the system needs. beginning of the last display row. The first DMA request of the frame occurs one row time before the end of vertical retrace. DMA requests continue as programmed, until the row buffer is filled. If the row buffer is filled in the middle of a burst, the 8275 terminates the burst and resets the burst counter. No more DMA INTERNAL~ ROW COUNTER requests will occur until the beginning of the next row. s ., DISPLAY RETRACE At that time, DMA requests are activated as programmed ROW ROW until the other buffer is filled. The first DMA request for a row will start at the first char- VRTC ~I-_ _~_..J acter clock of the preceding row. If the burst mode is used the first DMA request may occur a number of character IRQ clocks later. This number is' equal to the programmed burst space. Figure 20. Beginning of Interrupt Request If, for any reason, there IS a DMA underrun, a flag in the status word will be set. I RQ will go inactive after the status register is read. INTERNAL _~ ~ COUN~~ LAST RETRACE ROW __ FIRST DISPLAY ROW '-------' \ IRQ } RD ~I-----...Jr- Figure 21. End of Interrupt Request Figure 19. DMA Timing A reset command will also cause IRQ to go inactive, but this is not recommended during normal service. Another method of reinitializing the DMA controller is to have the DMA controller itself interrupt on terminal count, With this method, the 8275 interrupt enable flag should not be set. Not.: Upon power-up, the 8275 Interrupt Enable Flag may be set. The DMA controller is typically initialized for th~ next As a result, the user's cold start routine should write a reset frame at the end of the current frame. command to the 8275 before system interrupts are enabled. 6-316 AFN.()Q224B 8275 VISUAL ATTRIBUTESl AND SPECIAL Character Attribute CoCIes CODES Character attribute codes are codes that can be used to gen- erate graphics symbols without the use of a character generator. This is accomplished by selectively activating the Line Attribute outputs (LAo_ll. the Video Suppression The characters processed by the 8275 are 8-bit quantities_ output (VSP), and the Light Enable output. The dot level The character code outputs provide the character generator timing circuitry can use these signals to generate the proper with 7 bits of address_ The Most Significant Bit is the extra svmbols. bit and it is used to determine if it is a normal display Character attributes can be programmed to blink or be character (MSB = 0), or if it is a Visual Attribute or Special highlighted individually. Blinking is accomplished with the Code (MSB = 1)_ Video Suppression output (VSPl. Blink frequency is equal There are two types of Visual Attribute Codes_ They are to the screen refresh frequency divided by 32. Highlighting Character Attributes and Field Attributes_ is accomplished by activating the Highlight output (HG LTl. Character Attributes MSB LSB 1 1 ,::C-=.C.....::.C-=.C B H I I L HIGHLIGHT BLINK L _ _ _ _ _ CHARACTER ATTRIBUTE COOE HORIZ RIGHT HALF oo~~~~---~~--+==========~=> CHAR GEN ENABLE o'f--==-+-n----t======lD 02~-------i---~~---+==========~=> CHARACTER GENERATORI ---------+---~~--_t===t===F~{) SHIFT ~~1~ 03r REGISTER 8275 HORIZ L~FT HALF VIDEO LAD LTEN HGLT Figure 22. Typical Character Attribute Logic 6-317 AFN-00224B inter 8275 Table 2. Character Attributes Character attributes were designed to produce the followiog graphics: DESCRIPTION Top Left Corner 0001 Top Right Corner 0010 Bottom Left Corner 0011 Bottom Right Corner 0100 Top Intersect 0101 0110 Left Intersect 0111 1000 1001 1010 1011 Not Recommended * 1100 1101 Illegal 1110 Illegal 1111 Illegal *Character Attribute Code 1011 is not recommended for Character Attribute Codes 1101, 1110, and 1111 are illegal. normal operation. Since none of the attribute outputs are active, the character Generator will not be disabled, and Blinking is active when B = 1. an indeterminate character will be generated. Highlight is active when H = 1. 6-318 AFN·OO224B 8275 Special Codes character following the code up to, and including, the Four special codes are available to help reduce memory, character which precedes the next field attribute code, or software, or DMA overhead. up to the end of the frame. The field attributes are 'reset during the vertical retrace interval. Special Control Character There are six field attributes: MSB' LSB 1 1 1 1 0 0 S S 1. Blink - Characters follOWing the code are caused ~ SPECIAL CONTROL CODE 'to blink by activating the Video Suppression out- put (VSP). The blink frequency is equal to the screen refresh frequency divided by 32. S S FUNCTION 2. Highlight - Characters following the code are 0 0 End of Row caused to be highlighted by activating the High- 0 1 End of Row-Stop DMA light output (HGLT). 0 End of Screen End of Screen-Stop DMA 3. Reverse Video - Characters following the code are caused to appear with reverse video by activating the Reverse Video output (RVV). The End of Row Code (00) activates VSP and holds it to 4. Underline - Characters follOWing the code are the end of the line. caused to be underlined by activating the Light The End of Row-Stop DMA Code (01) causes the DMA Enable output (LTEN). Control Logic to stop DMA for the rest of the row when It 5,6. General Purpose - There are two additional 8275 is written into the Row Buffer. It affects the display in the outputs which act as general purpose, independ- same way as the End of Row Code (00). ently programmable field attributes. GPAO-1 are The End of Screen Code (10) activates VSP and holds It to active high outputs. the end of the frame. The End of Screen·Stop DMA Code (11) causes the DMA Field Attribute Code Control Logic to stop DMA for the rest of the frame when T'j ~~~~~~IGHT it is written into the Row Buffer. It affects the display In MSB LSB 1 0 the same way as the End of Screen Code (10). U RI If the Stop DMA feature is not used, all characters after an 1 L------GENERAL PURPOSE End of Row character are ignored, except for the End of ' - - - - - - - REVERSE VIDEO Screen character, which operates normally. All characters '--------UNDERLINE after an End of Screen character are ignored. H = 1 FOR HIGHLIGHTING B = 1 FOR BLINKING Note: If a Stop DMA character IS not the last character In a burst or R = 1 FOR REVERSE VIDEO row, DMA IS not stopped until after the next character IS U = 1 FOR UNDERLINE read. In thiS Situation, a dummy character must be placed In GG = GPA1, GPAo memory after the Stop OMA character Field Attributes 'More than one attribute can be enabled at the same time. The field attributes are control codes which affect the If the blinking and reverse video attributes are enabled visual characteristics for a field of characters, starting at the simultaneously, only the reversed characters will blink. 6-319 AFN-002248 8275 The 8275 can be programmed to provide visible or invisible Each row buffer has a corresponding FIFO. These FIFOs field attribute characters. are 16 characters by 7 bits in size. If the 8275 is programmed in the visible field attribute When a field attribute' is placed in the row buffer during' mode, al/ field attributes will occupy a position on the DMA, the buffer input controller recognizes it and places screen. They will appear as blanks caused by activation, of the next character in the proper FIFO. the Video Suppression output (VSP). The chosen visual When a field attribute is placed in the Buffer Output Con- attributes are activated after this blanked character. troller during display, it causes the controller to immedi- ately put a character from the FIFO on the Character Code outputs (CCo-a). The chosen Visual Attributes are also activated. ' ABCDE FGHI J KLM Since the FIFO is 16 characters long, no more than 16 field NOPORSTUV attribute characters may be used per line in this mode. If more are used, a bit in the status word is set and the first characters in the FIFO are written over and lost. Not.: Since the FIFO is 7 bits wide, the MSB of any characters put in it are stripped off. Therefore, a Visual Attribute or Special Code must not immediately follow a field attribute code. If this situation does occur, the Visual Attribute or SpeCial 1 2 3 4 5 6 7 8 9 Code will be treated 8S a normal display character. Figure 23. Example of the Visible Field Attribute Mode (Underline Attribute) If the 8275 is programmed in the invisible field attribute mode, the 8~75 FIFO is activated. ABC 0 E F G H I J K L M NOPORSTUV CClK 123 4 5 6 7 8 9 OBo-7 C"o-6 Figure 25_ Example of the Invisible Field Attribute Mode (Underline Attribute) ORO-----, lCO_3 OACK " IRQ LAo-, HRTe VRTe HI..GT RVV LTEN VS1' ~1.ld and Character Attribute Interaction ,...-----r.-~ GPAo_1 Character Attribute Symbols are affected by the Reverse LPfN Video (RVV) and General Purpose (GPAO-1) field attri- butes. They are not affected by Underline, Blink or High- light field attributes; however, these characteristics can be programmed individually for Character Attribute Symbols. Figure 24. Block Diagram Showing FIFO Activation 6-320 AFN-00224B inter 8275 Cursor Timing Device Programming The cursor location is determined by a cursor row register The 8275 has two programming registers, the Command and a character position register which are loaded by com· Register (CREG) and the Parameter Register (PREG). It mand to the controller. The cursor can be programmed to also has a Status Register (SREG). The Command Register appear on the display as: can dnly be written into and the Status Registers can only 1. a blinking underline be read from. They are addressed as follows: 2. a blinking reverse video block AO OPERATION REGISTER 3. a non·blinking underline 4. a non·bl inking reverse video block 0 Read PREG The cursor blinking frequency is equal to the screen refresh 0 Wrate PREG frequency divided by 16. 1 Read SREG If a non·blinking reverse video cursor appears in a non· 1 Wnte CREG blinking reverse video field, the cursor will appear as a normal video block. The 8275 expects to receive a command and a sequence If a non·blinking underline cursor appears in a non·blinking of 0 to 4 parameters, depending on the command. If the underline field, the cursor will not be visible. proper number of parameter bytes are not received before another command is given, a status flag is set, indicating an Light Pen Detection improper command. A light pen consists of a micro switch and a tiny light INSTRUCTION SET sensor. When the light pen is pressed against the CRT screen, the micro switch enables the light sensor. When the raster The 8275 instruction set consists of 8 commands. sweep reaches the light sensor, it triggers the light pen output. COMMAND NO. OF PARAMETER BYTES If the output of the light pen is presented to the 8275 Reset 4 LPEN input, the row and character position coordinates are Start Display o stored in a pair of registers. These registers can be read on Stop Display o command. A bit in the status word is set, indicating that Read Light Pen 2 the light pen signal was detected. The LPEN input must be Load Cursor 2 a 0 to 1 transition for proper operation. Enable Interrupt o Disable Interrupt o Note: Due to internal and exter:nal delays, the character position Preset Counters 0 coordinate will be off by at least three character positions. This has to be corrected in software. In addition, the status of the 8275 (SREG) can be read by the CPU at any time. 6-321 AFN-00224B 8275 1. Reset Command: Parameter - UUUU Underline Placement DATA BUS LINE NUMBER OF OPERATION AO DESCRIPTION MSB LSB U U U U UNDERLINE Command Wnte 1 Reset Command 0 0 0 0 0 0 0 0 a 0 a 0 1 -- -- Screen Camp' 0 a 0 1 2 Write 0 S H H H H H H H Byte 1 a 0 a 3 Screen Camp Write a Byte 2 V V R R R R R R Parameters Screen Camp Write 0 U U U U L L L L Byte 3 Screen Camp 1 1 1 16 Write 0 M F C C Z Z Z Z "" -- - -- Byt~ 4 - -----'---- - Action - After the reset command is written, DMA re- quests stop, 8275 interrupts are disabled, and the VSP Parameter - LLLL Number of Lines per Character Row output IS used to blank the screen. HRTC and VRTC can' L L L L NO. OF LINES/ROW tinue to run. HRTC and VRTC timing are random on power-up. 000 0 a 0 a 2 As parameters are written, the screen composition is defined. a a 0 3 Parameter - S Spaced Rows 1 1 16 S FUNCTIONS o Normal Rows 1. Spaced Rows Parameter - M Line Counter Mode M LINE COUNTER MODE Parameter - HHHHHHH Horizontal Characters/Row a Mode a (Non-Offsetl NO. OF CHARACTERS Mode 1 (Offset by 1 Countl H H H H H H H PER ROW 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 3 Parameter - F Field Attribute Mode F FIELD ATTRIBUTE MODE a Transparent Non-Transparent o 0 1 1 1 80 o 0 a 0 a Undefined Parameter - CC Cursor Format C C CURSOR FORMAT 1 1 1 1 1 UndefIned o 0 Blinking reverse vIdeo block o 1 Blinking underline Parameter - VV. Vertical Retrace Row Count a Nonblmklng reverse vIdeo block Nonblmkmg underling V V NO. OF ROW COUNTS PER VRTC a 0 1 a 1 2 a 3 Parameter - ZZZZ Horizontal Retrace Count 4 NO. OF CHARACTER Z Z Z Z COUNTS PER HRTC a a 0 a 2 Parameter - RRRRRR Vertical Rows/Frame 0 a 0 4 ~~~~~ 0 0 a 6 :0' INO O"T"OAM' o a a a I 1 1 32 I I 1 1 1 1 I 64 Note: uuuu MSB determines blanking of top and bottom lines (1 = blanked, 0 = not blanked). 6-322 AFN-00224B 8275 2. Start Display Command: 5. Load Cursor Position: OATA BUS DATA BUS IOPERATION AO DESCRIPTION MSB LSB OPERATION AO DESCRIPTION MSB LSB Command I Write 1 Start ~.splay 0 0 1 S S S B B Command Write 1 Load Cursor 1 0 0 0 0 0 0 0 No parameters Write 0 Char Number (Char POSition In Row) Parameters Write 0 Row Number {Row Numbed SSS BURST SPACE CODE Action - The 8275 is conditio;:md to place the next two NO. OF CHARACTER CLOCKS parameter bytes into the cursor position registers. Status S S S BETWEEN DMA REQUESTS flags not affected. a a a a a 0 1 a a 15 a 1 1 23 6. Enable Interrupt Command: a a 31 DATA BUS 0 1 39 [OPERATION AO DESCRIPTION MSB LSB 0 47 55 Commandj Write 1 Enable Interrupt 1 0 1 0 0 0 0 0 No parameters BB BURST COUNT CODE NO. OF DMA CYCLES PER Action - The interrupt enable status flag is set and inter- B B BURST rupts are enabled. a a a 2 a 4 8 7. Disable Interrupt Command: Action - 8275 interrupts are enabled, DMA requests begin, DATA BUS video is enabled, Interrupt Enable and Video Enable status I OPERATION AO DESCRIPTION MSB LSB flags are set. Command I Wn 045 2.0 08 TEST POINTS < )C 2.0 08 DEVICE UNDER TEST ICc A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "1" AND 0 45V -= FOR A LOGIC "0 "TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A CL INCLUDES JIG CAPACITANCE LOGIC "1" AND 0 BV FOR A LOGIC "0 " 6-326 AFN-Q02248 infel' 8275 WAVEFORMS TYPICAL DOT LEVEL TIMING EXT DOT eLK CCLK·lL_ _ _ _ _ _.....J ceO_6 FIRST CHARACTER CODE SECOND CHARACTER CODE i~----------~--------J~---------------------J 1__ -- - - ROM ACCESS CHARACTER --------"'""'\1,-------------""""'\ ,---------- GENERATOR OUTPUT _ _ _ _ _ _ _ _....J ' -_ _ _ _FIRST __ CHARACTER _ _ _ _ _ _- J ' -_ _SECOND _ _CHARACTER _ _ _ __ _ ATTRIBUTES ATTRIBUTES & CONTROLS FOR FIRST CHAR & CONTROLS SHIFT REGISTER SETUP~- VIDEO fFROMSHIFT REGISTER} FIRST CHARACTER SECOND CHARACTER ATTRIBUTES & CONTROLS ATTRIBUTES & CONTROLS (FROM ATTRIBUTES & CONTROLS FOR FIRST CHAR FOR 2ND CHAR SYNCHRONIZeR} ·CCLK IS A MULTIPLE OF THE DOT CLOCK AND AN INPUT TO THE 8275 LINE TIMING ceO_6 HATe ,r-'LC LCO_3 -+____ -I \-______________~r-N-E-XT-Ll-N-EC-O-U-N-T PR_E_S_EN_T_L_'N_E_C_O_U_NT_ _ _ VIDEO CONTROLS AND ATTRIBUTES" *LAO_l. VSP, l TEN, HGL T, RVV, GPAO_l 6-327 AFN-00224B intJ 8275 WAVEFORMS (Continued) ROW TIMING CCLK HRTe LCO_3 ROW ir-----------,\------, INTERNAL - - - - ' \ COUNTER _ _ _ _" I"_ _ _ _ _ _ _ _ _ _ ~ \-_ _ _ _..J FRAME TIMING CCLK AST ~ INTERNAL ROW RETRACE COUNTER ROW VRTC INTERRUPT TIMING AD cs iID IRQ ti 6-328 AFN-li0224C 8275 WAVEFORMS (Continued) DMATIMING CClK DRQ~ LPEN -"lJ----- WRITE TIMING READ TIMING INVALID INVALID CLOCK TIMING CCLK tKF 6-329 8276H SMALL SYSTEM CRT CONTROLLER • Programmable Screen and Character • Dual Row Buffers Format • Single +5V Supply • 6 Independent Visual Field Attributes • 40-Pin Package • Cursor Control (4 Types) • MCS-51®, MCS-85®, iAPX 86, and • 3 MHz Clock with 8276-2 iAPX 88 Compatible • High Performance HMOS-III The Intel 8276H Small System CRT Controller is a single chip device intended to interface CRT raster scan displays with Intel microcomputers in minimum device-count systems. Its primary function is to refresh the display by buffering character information from main memory and keeping track of the display position of the screen. The flexibility designed into the 8276H will allow simple interface to almost any raster scan CRT display. It can be used with the 8051 Single Chip Microcomputer for a minimum IC count design. It is manufactured on Intel's advanced HMOS-II processor. CCLK LC3 Vce LC2 NC LC, NC LCo LTEN BRDY RVV 080 _ 7 CC O-6 as VSP HRTC GPA1 VRTC GPAo RD HLGT lCO- 3 WR INT NC INT DBo CC. DB, CC s RD DB2 HRTC DB3 VRTC RASTER TIMING HLGT DB4 CC2 CIP- RVV AND VIDEO CONTROL LTEN DBs CC, vsp GPA O_ 1 DB. CCo DB7 cs GND Figure 1. Block Diagram Figure 2. Pin Configuration 6-330 intJ 8276 Table 1. Pin Descriptions Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function LC3 1 0 Line count. Output from the line count- Vee 40 +5V power supply. LC2 2 er which IS used to address the charac- NC 39 No connection. LC1 3 ter generator for the line positions on LCo 4 the screen NC 38 No connection. LTEN 37 0 Light enable. Output Signal used to BRDY 5 0 Buffer ready. Output signal indicating enable the video Signal to the CRT. This that a Row Buffer is ready for loading of output IS active at the programmed character data. underline cursor pOSition, and at posi- tions specified by attribute codes. BS 6 I Buffer select. Input signal enabling RVV 36 0 Reverse video. Output signal used to WR for character data Inlo Ihe Row activate the CRT circuitry to reverse the Buffers. video Signal. ThiS output IS active at the cursor poSItion If a reverse video block cursor is programmed or at the posi- HRTC 7 0 Horizontal retrace. Output signal tions specified by the field attribute which IS active dUring the programmed codes. hOrizontal retrace Interval DUring this period Ihe VSP outpulls high and the VSP 35 0 'Video suppression. Output signal LTEN output IS low. used to blank the video Signal to the CRT ThiS output IS active: - dUring the hOrizontal and vertical re- VRTC 8 0 Vartical retrace. Output signal which trace intervals. IS active dUring the programmed verti- cal retrace Interval. DUring this period - at the top and bottom lines of rows If the VSP output IS high and the LTEN underline is programmed to be num- output IS low ber 8 or greater - when an end of row or end of screen code is detected. RD 9 I Read input. A control signal to read registers - when a Row Buffer underfun occurs. - at regular intervals (1/16 frame fre- quency for cursor, 1/32 frame fre- WR 10 I Write input. A control signal to write quency for attributes)-to create commands Into the control registers or blinking displays as specified by write data Into the row buffers cursor or field attribute programming NC 11 No connection. GPA1 34 0 General purpose attribute codes.- GPAo 33 Outputs which are enabled by the gen- DBo 12 I/O Bidirectional data bus. Three-stale eral purpose field attribute codes DB1 13 lines The outputs are enabled dUring a HLGT 32 0 Highlight. Output Signal used to Inten- DB2 14 read of the C or P ports Sify tile display at particular positions DB3 15 on the screen as speCified by the field DB4 16 attribute codes. DB5 17 I DB6 18 INT 31 0 Interrupt output. DB7 19 CCLK 30 I Character clock (from. dot/timing logiC). Ground 20 Ground. CC6 29 0 Character codes. Output from the I CC5 28 row buffers used for character selec- CC4 27 tlon In the character generatpr. CC3 26 CC2 25 CC1 24 CCo 23 CS 22 I Chip select. Enables RD of status or WR of command or parameters. C/ P 21 I Port address. A high input on this pin selects the "c" port or command regis- ters and B low input selects the" P" port or perameter registers. I 6-331 AFN-00224B 8276 FUNCTIONAL DESCRIPTION Character Counter The Character Counter is a programmable counter Data Bus Buffer that is used to determine the number of characters to be displayed per row and the length of the hori- This 3-state, bidirectional, 8-bit buffer is used to zontal retrace interval. It is driven by the CCLK interface the 8276 to the system Data Bus. (Character Clock) input, which should be derived from the external dot clock. This functional block accepts inputs from the Sys- tem Control Bus and generates control signals for overall device operation. It contains the Command, Parameter, and Status Registers that store the vari- Line Counter ous control formats for the device functional definition. The Line Counter is a programmable counter that is used to determine, the number of horizontal lines (Raster Scans) per character row, Its outputs are C/P OPERATION REGISTER used, to address the external character generator. 0 Read RESERVED 0 , Write PARAMETER 1 Read STATUS Row Counter 1 Write COMMAND The Row Counter is a programmable counter that is used to determine the number of character rows to be displayed per frame and length of the vertical re- RD (READ) trace interval. A "low" on this input informs the 8276 that the CPU is reading status information from the 8276. WR (WRITE) Raster Timing and Video Controls A "low" on this input informs the 8276 that the CPU is writing data or control words to the 8276. The Raster Timing circuitry controls the timing of the HRTC (Horizontal Retrace) and VRTC (Vertical Retrace) outputs. The Video Control circuitry con- CS (CHIP SELECT) trols the generation of HGLT (Highlight), RVV (Re- A "low" on this input selects the 8276 for RD or WR verse Video), LTEN (Light Enable), VSP (Video Sup- of Commands, Status, and Parameters. press), and GPA O- 1 (General' Purpose Attribute) outputs. BRDY (BUFFER READY) A "high" on this output indicates that the 8276 is ready to receive character data. Row Buffers BS (BUFFER SELECT) The Row Buffers are two 80-character buffers. They A "low" on this input enables WR of character data are filled from the microcomputer system memory to the 8276 row buffers. with the character codes to be displayed. While one row buffer is displaying a row of characters, the INT (INTERRUPT) other is being filled with the next row of characters, A "high" on this output informs the CPU that the 8276 needs interrupt service. Buffer Input/Output Controllers C/P RD WR cs BS 0 0 1 0 1 Reserved The Buffer Input/Output Controllers decode the 0 1 0 0 1 Write 8276 parameter characters being placed in the row buffers, If the 1 0 1 0 1 Read 8276 Status character is a field attribute or special code, they 1 1 0 0 1 Write 8276 Command X 1 0 1 0 Write 8276 Row Buffer control the appropriate action. (Example: A "High- X 1 1 X X High Impedance light" field attribute will cause the Buffer Output X X X 1 1 High Impedance Controller to activate the HGLT output.) 6-332 AFN'OO22~B 8276 SYSTEM OPERATION The 8276 uses BRDY to request character data to fill the row buffer that is not being used for display. The 8276 is programmable to a large number of dif- ferent display formats. It provides raster timing, dis- The 8276 displays character rows one scan line at a play row buffering, visual attribute decoding and time. The number of scan lines per character row, cursor timing. the underline position, and blanking of top and bot- tom lines are programmable. (See Programming It is designed to interface with standard character Section.) generators for dot matrix decoding. Dot level timing must be provided by external circuitry. The 8276 provides special Control Codes which can be used to minimize overhead. It also provides Vis- ual Attribute Codes to cause special action on the General Systems Operational Description screen without the use of the character generator. (See Visual Attributes Section.) Display characters are retrieved from memory and displayed on a row-by-row basis. The 8276 has two The 8276 also controls raster timing. This is done by row buffers. While one row buffer is being used for generating Horizontal Retrace (HRTC) and Vertical display, the other is being filled with the next row of Retrace (VRTC) signals. The timing of these signals characters to be displayed. The number of display is also programmable. characters per row and the number of character rows per frame are software programmable, provid- The 8276 can generate a cursor. Cursor location and ing easy interface to most CRT displays. (See Pro- format are programmable. (See Programming gramming Section.) . Section.) Leo 3 VIDEO SIGNAL INT BRDY 8088 MICRO· I---c c-o -,--,/1 ~~~:~i~6~ I--~\I PROCESSOR HIGH HORIZONTAL SYNC {ROM OR SPEED RAM) DOT 8276 I cs I~=----~ CRT CONTROLLER I_---~o=-,,.------I CClK TIMING lOGIC AND VERTICAL SYNC TO CRT INTERFACE l DEg~J.R I VIDEO CONTROLS INTENSITY ~t ..., ~ L; ".. SYSTEM BUS ..., ".. ., ,.. --< 7 ""- ;- 8253·5 PROGRAM! 8255A-S COUNTERI 8251A DISPLAY , KEYBOARD USART j TIMER MEMORY CONTROLLER t ~~ I I .ERIA! COMMUNICATIONS KEYBOARD STATUS CHANNEL Figure~. CRT System Block Diagram 6-333 AFN-00224B 8276 1st 2nd 3rd 4th 5th 6th 7th Character Character Character Character Character Character Character .---.-...---.-..~.---.-...---.-...---.-.. 00••••000.0000.00 • • • • • 000000000 • • • • 0000 ••• 000.000.0 First Lin~ of. Charactar Row 1st 2nd 3rd 4th 5th 6th 7th Charact.r Character Character Character Character Character Character .---.-...---.-...---.-...---.-...---.-...---.-...---.-.. 00•••• 000.0000.00 • • • • • 000000000 • • • • 0000 ••• 000.000.0 o.oooo.oo..ooo.oo.ooooooooooooo~ooo.oo.ooo.oo.ooo.o Second Line of a Character Row 1st 2nd 3rd 4th 5th 6th 7th Character Character Character Character Character Chara~er Character ~.---.-...---.-...---.-...---.-...---.-.. 00•••• 000.0000.00 • • • • • 000000000 • • • • 0000 ••• 000.000.0 0.0000.00••000.00.0000000000000.000.00.000.00.000.0 0.0000.00.0000.00.0000000000000.000.00.000.00.000.0 Third Line of a Charecter Row 1 st 2nd 3rd 4th 5th 6th 7th Character Character Character Character Character Character Character ~.---.-...---.-...---.-...---.-...---.-.. 00••••000.0000.00 • • • • • 000000000 • • • • 0000 • • • 000.000.0 0.0000.00••000.00.0000000000000.000.00.000.00.000.0 0.0000.00.0.00.00.0000000000000.000.00.000.00.000.0 0.0000.00.0000.00 • • • • 0000000000 • • • • 000.000.00.0.0.0 0.0000.00.00.0.00.0000000000000.0.0000.000.00.0.0.0 0.0000.00.000•• 00.0000000000000.00.000.000.00.0.0.0 00• • • •000.0000.00 • • • • • 000000000.00.0000 • • • 0000.0.00 Seventh Line of a Character' Row Figure 4. Display Of A Character Row Display Row Buffering Before the start of a frame, the 8276 uses BRDY and BS to fill one row buffer with characters. When the first horizontal sweep is started, character codes are output to the character generator from the row buffer just filled. Simultaneously, the other row buffer is filled with the next row of characters. After all the lines of the character row are scanned, the'buffers are swapped and the same procedure is followed for the next row. CCo-e This process is repeated until all of the character rows are displayed. Rpw Buffering allows the CPU access to the display memory at all times except during Buffer Loading (about 25%). This compares favorably to alternative approaches which restrict CPU access to the display memory to occur only during horizontal and vertical retrace intervals (80% of the bus time is used to re- fresh the display.) Figure 5. First Row Buffer Filled. 6-334 AFN·OO224B inter 8276 123456789 . . . . . . . . . . . . . . 80 2 3 4 5 6 7 8 9 DBo_, t::HDiitAT~A:....tESI--Ie~~. BUFFER 64 Figure 8. Screen Format The 8276 can also be programmed to blank alternate rows. In this mode, the first row is displayed, the second blanl(ed, the third displayed, etc. Display data is not requested for the blanked rows. Figure 6. Second Row Buffer Filled, First Row Displayed 123456789 . . . . . . . . . . . . . . . 80 2 3 4 5 64 DBo_, C;9HDiiiJATiiA~~'-I~~~~. BUFFER Figure 9. Blank Alternate Rows Mode ROW FORMAT The 8276 is designed to hold the line count stable while outputting the appropriate character codes during each horizontal sweep. The line count is in- cremented during horizontal retrace and the whole row of character codes are output again during the next sweep. This is continued until the entire char- 'Figure 7. First Row Buffer Filled With Third Row, acter row is displayed. Second Row Displayed The number of lines (horizontal sweeps) per charac- ter row is programmable from 1 to 16. Display Format The output of the line counter can be programmed SCREEN FORMAT to be in one of two modes. The 8276 can be programmed to generate from 1 to 80 characters per row, and from 1 to 64 rows per In mode 0, the output of the line counter is the same frame. as the line number. AFN·00224B 6-335 8276 In mode 1. the line counter is offset by one from the If the line number of the underline is greater than 7 line number. (line number MSB = 1). then the top and bottom lines will be blanked. Note: In mode 1. while the first line (line number 0) is being dis- played, the last count is output by the line counter (see examples). Line Line Line Counter Counter Number 'Mode 0 Mode 1 Line line 0 b 0 0 0 0 [J 0 0 0 0000 1011 Lme Counter Counter 1 0 0 0 0 • 0 0 0 0 0001 0000 Number Mode 0 Mod. 1 2 0 0 0 • 0 • 0 0 0 0010 0001 3 0 0 • 0 0 0 •o ,. 0 0 001 1 0010 0 o .0 0 0 0 0 0 0 0 0000 1111 4 0 • 0 0 0 0 0 0100 0011 • • • • • • • • .. • 1 0 0 0 0 0 0 0 0 0001 0000 5 0 0 0 0 0 0 0 0101 0100 2 0 0 0 • 0 • 0 0 0 0010 0001 6 0 0 01 10 0101 3 0 b • 0 0 0 • 0 Q 001 1 0010 7 Q • 0 0 • 0 0 0 0 0111 0110 4 0 • •0 0 0 0 0 0 0100 0011 8 0 • 0 0 • 0 0 0 0 1000 0111 5 o • •0 0 0 0 0 0 0101 0100 9 0 • 0 0 • Q 0 0 0 100 1 1000 6 0 ••••••• 0 0110 0101 10 ••••••••• 1010 1001 7 0 • •0 0 0 0 0 0 0111 0110 11 0 0 0 0 0 0 0 0 0 1011 1010 8 0 • •0 0 0 0 0 0 1000 0111 9 10 o • 0 0 Q 0 0 0 0 0 0 0 0 0 • 0 0 0 1001 1010 1000 1001 Top and Bottom Lmes are Blanked 11 0 0 0 0 0 0 0 0 0 1011 1010 12 0 0 0 0 0 0 0 0 0 1 100 1011 13 0 0 0 0 0 0 0 0 0 1 101 1100 Figure 12. Underline in Line Number 10 14 0 0 0 0 0 0 0 0 0 1110 1101 15 0 0 0 0 0 0 0 0 0 1111 1110 If the line number of the underline is less than or equal to 7 (line number MSB = 0). then the top and Figure 10. Example of a 16-Line Format bottom lines will not be blanked. Line Line Line Line Line Counter Counter Line Counter Counter Number Mode 0 Mode 1 Number Mode 0 Model 0 0 0 0 0 0 0 0 0000 100 1 a 0 0 o • 0 0 0 0000 0111 1 0 0 0 • 0 0 0 0001 0000 0 • 0 o • 0 0 0001 0000 2 0 0 • • [J 0 0 0010 0001 2 o • •0 0 0 0 0010 0001 3 0 • 0 • 0 0 0 0011 0010 3 o • •0 0 0 0 • 0 011 a 010 4 0 • 0 • 0 0 0 0100 00 11 4 o • •••• [] 0100 a all 5 0 ••••• [] a1a1 0100 5 0 • •[] [] [] 0 0101 0100 6 0 • 0 • 0 [] [] a 11 a 0101 6 o • •0 [] 0 [] 0110 0101 7 [] • • [] 0 [] 0 0111 0110 ••••••• 0111 0110 8 [] 0 [] [] 0 [] 0 1000 011 1 9 0 [] 0 0 0 [] 0 1001 1000 Top and Bottom Lines are not Blanked Fi,gure 11. Example of a 10-Line Format Figure 13. Underline In Line Number 7 Mode 0 is useful for character generators that leave address zero blank and start at address 1. Mode 1 is If the linenumber olthe underline is greater than the useful for character generators which start at maximum number of lines. the underline will not ap- address zero. pear. Underline placement is also programmable (from Blanking is, accomplished by the VSP (Video Sup- line number 0 to 15). This is independent of the line pression) signal. Underline is accomplished by the counter mode. LTEN (Light Enable) signal. 6-336 AFN-00224B intJ 8276 DOT FORMAT The line counter is driven by the character counter. It Dot width and character width are dependent upon is used to generate the line address outputs (LCo- 3 ) the f;xternal timing and control circuitry. for the character generator. After it counts all of the lines in a character row (programmable from 1 to Dot level timing circuitry should be'designed to ac- 16), it increments the row counter, and starts over cept the parallel output of the character generator again. (See Character Format Section for detailed and shift it out serially atthe rate required by the CRT description of Line Counter functions.) display. The row counter is an internal counter driven by the line counter. It controls the functions of the row buf- fers and counts the number of character rows displayed. . . . ONE CHARACTER ROW .. VIDEO HRTC --UUU-U- Figure 14. Typical Dot Level Block Diagram Dot width is a function of dot clock frequency. LCO'3k~ INTERNAL ROW COUNTER PRESENT ROW NEXT ROW Character width is a function of the character generator width. PAOGRAMM:BLE 1 TO 16 LINE COUNTS Horizontal character spacing is a function of the shift register length. Figure 16. Row Timing Note: Video control and timing signals must be synchronized with the video signal due to the character generator ac- cess delay. After the row counter counts all of the rows in a frame (programmable from 1 to 64), it starts count- ing out the vertical retrace interval (programmable Raster Timing from 1 to 4). The character counter is driven by the character clock input (CCLK). It counts out the characters being displayed (programmable from 1 to 80). It then causes the line counter to increment, and it starts . ONE FRAME counting out the horizontal retrace interval (pro- grammable from 2 to 32). This process is constantly ROW'~~~~~~~~~m FIRST LA,ST FIRST LAST repeated. DISPLAY ROW DISPLAY ROW RETRACE RETRACE ROW ROW VRTC\--;~~ CCLK~ .. II: j • y PROGRAMMABLE PROGRAMMABLE 1 TO 64 ROW COUNTS 1 TO 4 ROW COUNTS Figure 17. Frame Timing HRTC , 1----1' PROGRAMMABLE 1 TO aoCCLKS The Video Suppression Output (VSP) is active dur- LCO" _ _ _ PR_E_SE_N_TL_'N_E_CO_U_N_'__oJ NEXT LINE COUNT ing horizontal and vertical retrace intervals. Dot level timing circuitry must synchronize these Figure 15. Line Timing outputs with the video signal to the CRT Display. 6-337 AFN·OO224B 8276 Interrupt Timing Special Codes The 8276 can be programmed to generate an inter- Four special codes are available to help reduce bus rupt request at the end of each frame. If the 8276 usage. interrupt enable flag is set, an interrupt request will occur at the beginning of the last display row. SPECIAL CONTROL CHARACTER MSB LSB 1 1 1 1 o 0 S S ~ SPECIAL CONTROL CODE INTERNAL~ ROW COUNTER LAST FIRST DISPLAY RETRACE' S S FUNCTION ROW ROW 0 0 End of Row 0 1 End of Row-Stop Buffer Loading 0 End of Screen End of Screen-Stop Buffer Loading INT The End of Row Code (00) activates VSP and holds it to the end of the line. Figure 18. Beginning of Interrupt The End of Row-Stop Buffer Loading (BROY) Code (01) causes the Buffer Loading Control Logic to stop buffer loading for the rest of the row upon being INT will go inactive after the status register is read. written into the Row Buffer. It affects the display in the same way as the End of Row Code (00). INT r The End of Screen Code (10) activates VSP and holds it to the end of the frame. The End of Screen-Stop Buffer Loading (BROY) Code (11) causes the Row Buffer Control Logic to RD ~'----'}- stop buffer loading for the rest of the frame upon being written. It affects the display in the same way as the End of Screen Code (10). Figure 19. End of Interrupt If the Stop Buffer Loading feature is not used, all characters after an End of Row character are ig- nored, except for the End of Screen character, A reset command will also cause INT to go inactive, which operates normally. All characters after an End but this is not recommended during normal service. of Screen character are ignored. Note: Upon power-up, the8276 Interrupt Enable Flag may be set. Note: If a Stop Buffer Loading is not the last character in a row, As a result, the user's cold start routine should wnte a reset Buffer Loadmg IS not stopped until after the next character command to the 8276 before system Interrupts are is read. In thiS situation, a dummy character must be enabled. placed in memory after the Stop Buffer Loading character. VISUAL ATTRIBUTES Field Attributes AND SPECIAL CODES The field attributes are control codes which affect The characters processed by the 8276 are 8-bit the visual characteristics for a field of characters, quantities. The character code outputs provide the starting at the character following the code up to, character generator with 7 bits of address. The Most and including, the character which precedes the Significant Bit is the extra bit and it is used to deter- next field attribute code, or up to the end of the mine if it is a normal display character (MSB = 0), or frame. The fierd attributes are reset during the verti- if it is a Field Attribute or Special Code (MSB = 1). cal retrace interval. 6-338 AFN-00224B 8276 The 8276 can be programmed to provide visible field H = 1 FOR HIGHLIGHTING attribute characters; all field attribute codes will oc- B = 1 FOR BLINKING R = 1 FOR REVERSE VIDEO cupy a position on the screen. These codes will ap- U = 1 FOR UNDERLINE pear as blanks caused by activation of the Video GG = GPA1, GPAo Suppression output (VSP). The chosen visual attri- butes are activated after this blanked character. Note: More than one attribute can be enabled at the same time. If the blinking and reverse Video attributes are enabled There are six field attributes: simultaneously, only the reversed characters will blink. 1. Blink~Characters following the code are caused to blink by activating the Video Sup- pression output (VSP). The blink frequency is Cursor Timing equal to the screen refresh frequency divided by 32. The cursor location is determined by a cursor row 2. Highlight-Characters following the code are register and a character position register which are caused to be highlighted by activating the High- loaded by command to the controller. The cursor light output (HGLT). can be programmed to appear on the display as: 3. Reverse Video-Characters following the code 1. a blinking underline are caused to appear with reverse video by ac- 2. a blinking reverse video block tivating the Reverse Video output (RVV). 3. a non-blinking underline 4. a non-blinking reverse video block 4. Underline-Characters following the code are caused to be underlined by activating the Light The cursor blinking frequency is equal to the screen Enable output (LTEN). refresh frequency divided by 16. 5,6. General Purpose-There are two additional 8276 outputs which act as general purpose, in- If a non-blinking reverse video cursor appears in a dependently programmable field attributes. non-blinking reverse video field, the cursor will ap- GPAO-1 are active high outputs. pear as a normal video block. If a non-blinking underline cursor appears in a non- blinking underline field, the cursor will not be visible. 'A BCD E F G H'I J K L M NOPQRSTUV Device Programming The 8276 has two programming registers, the Com- mand Register and the Parameter Register. It also has a Status Register. The Command Register can 1 234 5 6 7 8 9 only be written into and the Status Register can only be read from. They are addressed as follows: Figure 20. Example of a Visible Field Attribute elF' OPERATION REG!STER (Underline Attribute) 0 Read Reserved 0 Write Parameter 1 Read Status FIELD ATTRIBUTE CODE 1 Write Command MSB LSB 1 0 TI U R G G B H : I 1 - 1- - - - HIGHLIGHT The 8276 expects to receive a command and a sequ- ence of 0 to 4 parameters. depending on the com- . . . '---~========== ~~I::RAL PURPOSE REVERSE VIDEO mand. If the proper number of parameter bytes are not received before another command is given. a ' - - - - - - - - - - - UNDERLINE status flag is set. indicating an improper command. 6-339 AFN-002248 8276 Instruction Set Parameter-VV Vertical Retrace Row Count V V NO.OFROWCOUNTSPERVRTC The 8276 instruction set consists of 7 commands. 001 012 COMMAND NO. OF PARAMETER BYTES 103 Reset 4 1 1 4 Start Display o Stop Display o Load Cursor 2 Parameter-RRRRRR Vertical Rows/Frame Enable Interrupt o R R R R R R NO. OF ROWS/FRAME Disable Interrupt o 000000 1 Preset Counters o 000001 2 In addition, the status of the 8276 can be read by the 000010 3 CPU at any time. 1. RESET COMMAND 111111 64 DATA BUS OPERATION C/P DESCRIPTION MSB LSB Command 'Wnte 1 Reset Command 00000000 Screen Camp Parameter-UUUU Underline Placement Wnte 0 SHHHHHHH Byte 1 Screen Comp LINE NUMBER OF Write 0 VVRRARRA Byte 2 U U U U UNDERLINE Parameters Screen Camp Write 0 Byte 3 UUUULLLL o0 0 0 1 Wnte 0 Screen Camp M 1 CCZZZZ 000 1 2 Byte 4 001 0 3 Action-After the reset command is written, BRDY goes inactive, 8276 interrupts are disabled, and the VSP output is used to blank the screen. HRTC and 1 1 16 VRTC continue to run. HRTC and VRTC timing are random on power-up Parameter-LLLL Number of Lines As parameters are written, the screen composition is per Character Row defined. L L L L NO. OF LINES/ROW Parameter-S Spaced Rows o0 0 0 1 00012 S FUNCTIONS o0 1 0 3 o Normal Rows Spaced Rows 1 1 16 Parameter-HHHHHHH Horizontal Characters/Row Parameter-M Line Counter Mode NO. OF CHARACTERS H H H H H H H PER ROW M LINE COUNTER MODE o 0 0 0 000 1 o Mode 0 (Non·Offset) o 0 0 0 001 2 1 Mode 1 (Offset by 1 Count) 0000010 3 Parameter-CC Cursor Format 001111 80 C C CURSOR FORMAT o 1 000 0 Undefined o0 Blinking reverse video block o1 Blinking underline 1 0 Non-blinking reverse video block 1 1 1 1 1 1 Undefined 1 1 Non·blinking underline 6-340 AFN-00224B 8276 Parameter-ZZZZ Horizontal Retrace Count 6. DISABLE INTERRUPT COMMAND NO. OF CHARACTER 'oATA BUS MSB LSB Z Z Z Z COUNTS PER HRTC 11000000 0 0 0 0 2 0 0 0 t 4 0 0 1 0 6 Action-Interrupts are disabled and the interrupt enable status flag is reset. ' 1 1 32 7. PRESET COUNTERS COMMAND Note: uuuu MSB determines blanking of top and bottom lines DATA BUS MSB LSB (1 = blanked, 0 = not blanked). 11100000 2. START DISPLAY COMMAND Action-The internal timing counters are preset, MSB OATA BUS LSB correspondi ng to a screen display position at the top Command 0 0 1 0 0 0 0 0 left corner. Two character clocks are required for this operation. The counters will remain in this state until any other command is given. Action-8276 interrupts are enabled, BRDY goes This command is useful for system debug and syn- active, video is enabled, Interrupt Enable and Video chronization of clustered CRT displays on a single Enable status flags are set. CPU. 3. STOP DISPLAY COMMAND Status Flags DATA BUS MSB LSB DATA BUS 01000000 MSB LSB Command o IE IR X Ie VE BU X Action-Disables video, interrupts remain enabled, IE - (Interrupt Enable) Set or reset by command. HRTC and VRTC continue to tun, Video Enable It enables vertical retrace interrupt. It is auto- status flag is reset, and the "Start Display" com- matically set by a "Start Display" command mand must be given to reenable the display. and reset with the "Reset" command. IR - (Interrupt Request) This flag is set at the be- ginning of display of the last row of the frame 4. LOAD CURSOR POS,ITION if the interrupt enable flag is set. It is reset OPERATION C/P DESCRIPTION MSB DATA BUS LSB after a status read operation. Command Write 1 Load Cursor 1 0 0 0 0 0 0 0 Write 0 Char Number (Char Position In Row) IC - (Improper Command) This flag is set when a Parameters Write 0 Row Number (Row Number) com.mand parameter string is too long 'or too short. The flag is automatically reset after a Action-The 8276 is conditioned to place the next status read. two parameter bytes into the cursor position regis- ters. Status flag not affected. VE - (Video Enable) This flag indicates that video operation of the CRT is enabled. This flag is set on a "Start Display" command, and reset on a "Stop Display" or "Reset" command: 5. ENABLE INTERRUPT COMMAND MSB DATA BUS LS8 BU - (Buffer Underrun) This flag is set whenever a 10100000 Row Buffer is not filled with character data in time for a buffer swap required by the display. Upon activation of this bit, buffer loading Action-The interrupt enable flag is set and inter- ceases, and the screen is blanked until after rupts are enabled. the vertical retrace interval. 6-341 AFN-00224B 8276· ABSOLUTE MAXIMUM RATINGS* Ambient Temperature Under Bias .... ooe to 70°C Storage Temperature .... '...... -65°C to +150o e 'NOTICE: Stresses above those listed under "Absolute Maxi- mum Ratings" may cause permanent damage to the device. This Voltage On Any Pin is a stress rating only and functional operation of the device at With Respect to Ground ........ -O.5V to + 7V these or any other conditions above those indicated in the opera- Power Dissipation .' ...................... 1 Watt tional sections of this specification IS not implied. D.C. CHARACTERISTICS (TA = O'C to 70'C; Vce = 5V ±5%) SYMBOL PARAMETER MIN. MAX. UNITS TEST CONDITIONS VIL Input Low Voltage -0.5 0.8 V VIH Input High Voltage 2.0 Vee + 0.5V V VOL Output Low Voltage 0.45 V IOL = 2.2 mA VOH Output High Voltage 2.4 V IOH = -400 /LA IlL Input Load Current ±10 /LA VIN = Vee to OV IOFL Output Float Leakage ±10 /LA Your = Vee to 0.45V lee Vee Supply Current 160 mA CAPACITANCE (TA = 25°C; Vee = GND = OV) SYMBOL PARAMETER MIN. MAX. UNITS TEST CONDITIONS CIN Input Capacitance 10 pF Ie = 1 MHz CliO I/O Capacitance 20 pF Unmeasured pins returned to Vss. A.C. TESTING LOAD CIRCUIT rr DEVICE UNDER TEST cc -= C l INCLUDES JIG CAPACITANCE 6·342 AFN·OO2248 8276 A.C. CHARACTERISTICS (TA = O°C to 70°C; VCC = 5.0V ±5%; GND = OV) Bus Parameters READ CYCLE Symbol Parameter Min. Max. ·Unlts Test Conditions tAR Address Stable Before READ 0 ns tRA Address Hold Time for READ 0 ns tRR READ Pulse Width 250 ns tRO Data Delay from READ 200 ns CL = 150pF tOF READ to Data Floating 100 ns WRITE CYCLE Symbol Parameter Min. Max. Units Test Conditions tAW Address Stable Before WRITE 0 ns tWA Address Hold Time for WRITE 0 ns tww WRITE Pulse Width 250 ns tow Data Setup Time for WRITE 150 ns two Data Hold Time for WRITE 0 ns CLOCK TIMING 8276 8276-2 Symbol Parameter Min. Max. Min. Max. Units Test Conditions tCLK Clock Period 480 320 ns tKH Clock High 240 120 ns tKL Clock Low 160 120 ns tKR Clock Rise 5 30 5 30 ns tKF Clock Fall 5 30 5 30 ns OTHER TIMING 8276 8276-2 Symbol Parameter. Min. Max. Min. Max. Units Test Conditions tcc Character Code Output Delay 150 150 ns CL = 50 pF tHR Horizontal Retrace Output Delay 200 150 ns Ct. = 50 pF tLC Line Count Output Delay 400 250 ns CL = 50 pF tAT Controll Attribute Output Delay 275 250 ns CL = 50 pF tVR Vertical Retrace Output Delay 275 250 ns CL = 50 pF tRI INT~ from IIDt 250 250 ns Ct. = 50 pF twa BRDYt from WRt 250 250 ns Ct. = 50 pF tRO BRDY~ from WR~ 200 200 ns CL = 50 pF tLR B~ toWR~ 0 0 ns tRL WRt to BSt 0 0 ns 6-343 AFN·OO224B 8276' WAVEFORMS Typical Dot Level Timing eXT DOT eLK CCLK·lL-_ _ _ _ _ _...J L CCO_6 FIRST CHARACTER CODE SECOND CHARACTER CODe r i -AOMACCESS-·-i I CHARACTER - - - - - - - -....... , - - - - - - - - - - - - - - , . , - - - - - - - - - - GENERATOR OUTPUT _ _ _ _ _ _ _ _..J _ _FIRST '-_~___ CHARACTER SECOND _ _ _ _ _--J ' -_ _ _ ___CHARACTER _ __ ATTRIBUTES &: CONTROLS VIDEO (FROM SHIFT REGISTER) FIRST CHARACTER SECOND CHARACTER ATTRIBUTES & CONTROLS ATTRIBUTES& CONTROLS (FROM ATTRIBUTES & CONTROLS FOR FIRST CHAR FOR 2ND CHAA SYNCHRONIZER) 'CCLK IS A MULTIPLE OF THE DOT CLOCK AND AN INPUT TO THE 8276 Line Timing CCLK 1---f\--;'V\JVV J I HATe ~ __----\'r--_A -r--------~~-----------------__,.\ -i tLC lCO_3 PRESENT LINE COUNT NEXT LINE COUNT j 'V'DEO~~ ',', V ANDATTCR~~~~~;~ T}---/~~-------\I)tl-'____-,-_"- , VSP, LTEN, HGLT, RVV, GPAO_l 6-344 AFN-00224B intJ 8276 AowTlmlng CCLK HRTe lCO_3 INTERNAL ----·d------------\I------"\J~--­ ROW ____["1____________-\ I - - - - - - J COUNTER Frame Timing CClK ~AST INTERNAL ROW COUNTER ROW RETRACE VRTe Interrupt Timing \ CCLK rJPJ \ CC0-6 LAST RETRACE CHARACTER ------!' '----- X FIRST RETRACE CHARACTER cs~ / LCo-3 FIRST LINE COUNT ----------4----------- t~ RD \ HATe \'---- INT INTERNAL COUN: --------LAST-l-DI-tSPt.-A-f-~--_t-,R~~=== 6-345 AFN·00224B 8276 Timing for Buffer Loading CCLK ---{tKOt BRDY ~-------------------- Write Timing Read Timing liS, C/ p, CS INVALID C/P, CS WR RO INVALID OBO_7 OBO-7 Clock Timing Input and Output Waveforms for A.C. Tests FOR A C TESTING, INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC "1" AND 0 45V FOR A LOGIC "0 " TIMING MEASUREMENTS FOR INPUT AND OUTPUT SIGNALS ARE MADE AT 2 OV FOR A LOGIC "1" AND oBV FOR A LOGIC "0" , 6-346 AFN-Q0224B 8279/8279·5 PROGRAMMABLE KEYBOARD/DISPLAY INTERFACE • Simultaneous Keyboard Display • Single 16·Character Display Operations • Right or Left Entry 16·Byte Display • Scanned Keyboard Mode RAM • Scanned Sensor Mode • Mode Programmable from CPU • Strobed Input Entry Mode • Programmable Scan Timing • 8·Character Keyboard FIFO • Interrupt Output on Key Entry • 2·Key Lockout or N·Key Rollover with Contact Debounce • Available in EXPRESS -Standard Temperature Range • Dual 8· or 16·Numerical Display -Extended Temperature Ran~e The Intel'" 8279 is a general purpose programmable keyboard and display 1/0 interface deVice designed for use'with Intel'" microprocessors. The keyboard portion can provide a scanned interface to 'a 64-contact key matrix. The keyboard portion will also interface to an array of sensors or a strobed interface keyboard, such as the hall effect and ferrite variety. Key depressions can be 2-key lockout or N-key rollover. Keyboard entries are debounced and strobed in an 8-character FIFO. If more than 8 characters are entered, overrun status is set. Key entries set the interrupt output line to the CPU. The display portion provides a scanned display interface for LED, incandescent, and other popular display technologies. Both numeric and alphanumeric segment displays may be used as well as simple indicators. The 8279 has 16X8 display RAM which can be organized into dual 16X4. The RAM can be loaded or interrogated by the CPU. Both right entry, calculator and left entry typewriter display formats are possible. Both read and write of the display RAM can be done with auto-increment of the display RAM address. IRQ DATA BUS SHIFT 1 - - - - - KEY DATA RO CNTLfSTB WA. CPU INTERFACE cs SLOJ SCAN AO OUT AOl l RESET ClK OUI B0-3 DISPLAY DATA Vss --_ ..... Vss Figure 1. Logic Symbol Figure 2. Pin Configuration 6-347 8279/8279·5 HARDWARE DESCRIPTION The 8279 is packaged in a 40 pm DIP. The following is a fUnctional description of each pin. Table 1. Pin Descriptions Pin Pin Symbol No. Name and Function Symbol No. Name and Function DBo-DB7 8 Bi·directional data bus: All data SHIFT 1 Shift: The shift input status is and commands between the CPU stored along with the key position and the 8279 are transmitted on on key closure in the Scanned Key- these lines. board modes. It has an active in- ClK 1 Clock: Clock from system used to ternal pull up to keep it high until a generate internal timing. switch closure pulls it low. RESET 1 Reset: A high signal on this pin re- CNTLlSTB 1 Control/Strobed Input Mode: For sets the 8279. After being reset the keyboard modes this line is used 8279 is placed in the following as a control input and stored like mode: status on a key closure. The line 1) 16 8-bit character display is also the strobe line that enters -left entry. the data into the FIFO in the 2) Encoded scan keyboard-2 Strobed Input mode. key lockout. Along with this the program clock (Rising Edge). It has an active in- prescaler is set to 31. ternal pullup to keep it high until a sWitch closure pulls it low. CS 1 Chip Select: A low on this pin en- ables the interface functions to OUT Ao-OUT A3 4 Outputs: These two ports are the receive or transmit. OUT Bo-OUT B3 4 outputs for the 16 x 4 display re- fresh registers. The data from Ao 1 Buffer Address: A high on this these outputs is synchronized to line indicates the signals In or out the scan lines (Slo-Sl3) for multi- are interpreted as a command or plexed digit displays. The two 4 status. A low indicates that they bit ports may be blanked inde- are data. pendently. These two ports may RD,WR 2 Input/Output Read and Write: also be considered as one 8-bit These signals enable the data port. buffers to either send data to the BD 1 Blank Display: This output is external bus or receive It from the used to blank the display during external bus. digit switching or by a display IRQ 1 Interrupt Request: In a key- blanking command. board mode, the mterrupt line is high when there is data in the FIFO/Sensor RAM. The interrupt line goes low with each FIFO/ Sensor RAM read and returns high if there is still information in the RAM. In a sensor mode, the FUNCTIONAL DESCRIPTION interrupt line goes high whenever a change in a sensor is detected. Vss , Vce 2 Ground and power supply pins. Since data Input and display are an integral part of many Slo-Sl3 4 Scan Lines: Scan lines which are microprocessor designs, the system designer needs an used to scan the key switch or Interface that can control these functions without placing sensor matrix and the display a large load on the CPU. The 8279 provides thiS function digits. These lines can be either for 8-bit microprocessqrs. encoded (1 of 16) or decoded (1 of 4). The 8279 has two sections keyboard and display The keyboard section can Inrerface to regular typewriter style Rlo-Rl7 8 Return Line: Return line inputs keyboards or random toggle or thumb sWitches The which are connected to the scan display sectIOn drives alphanumeric displays or a bank of lines through the keys or sensor switches. They have active internal indicator lights Thus the CPU IS relieved from scanning pullups to keep them high until a the keyboard or refreshing the display switch closure pulls one low. They The 8279 is designed to directly connect to the also serve as an 8-bit input in the microprocessor bus. The CPU can program all operating Strobed Input mode. modes for the 8279. These modes include: 6-348 AFN-D07428 8279/8279-5 Input Modes PRINCIPLES OF OPERATION • Scanned Keyboard - with encoded (8 x 8 key keyboard) or decoded (4 x 8 key keyboard) scan lines. The following is a description of the major elements of the A key depression generates a 6-bit encoding of key 8279 Programmable Keyboard/Display interface device. position. Position and shift and control status are Refer to the block diagram in Figure 3. stored in the FIFO. Keys are automatically debounced with 2-key lockout or N-key rollover. • Scanned Sensor Matrix - with encoded (8 x 8 matrix 1/0 Control and Data Buffers sWitches) or decoded (4 x 8 matrix switc!les) scan lines. Key status (open or closed) stored in RAM addressable The I/O control section uses the es, Ao, RD and WR lines by CPU. to control data flow to and from the various internal registers and buffers. All data flow to and from the 8279 is • Strobed Input -- Data on return lines during control enabled by es. The character of the information, given or line strobe IS transferred to FIFO. desired by the CPU, is identified by Ao. A logic one means the information is a command or status. A logic Output Modes zero means the information is data. AD and WR determine the direction of data flow through the Data Buffers. The • 8 or 16 character multiplexed displays that can be or- Data Buffers are bi-directional buffers that connect the = ganized as dual 4-bit or single 8-bit (Bo Do, A3 07)' = internal bus to ihe external bus. When the chip is not • Right entry or left entry display formats selected (CS = 1), the devicesilre in a high impedance state. The drivers input during WR.CS and output during Other features of the 8279 include: RD .es. • Mode programming from the CPU. • Clock Prescaler Control and Timing Registers and Timing Control • Interrupt output to signal CPU when there',s keyboard or sensor data available. These registers store the keyboard and display modes and • An 8 byte FIFO to store keyboard Infqrmatlon other operating conditions programmed by the CPU. The, modes are programmed by presenting the proper • 16 byte internal Display RAM for display refresh. This command on the data lines with Ao = 1 and then sending RAM can also be read by the CPU. a WR. The command is latched on the riSing edge of WR. eLK REseT 080-7 IRQ KEYBOARD DEBOUNCE AND CONTROL TIMING AND CONTROL OUT Ao 3 OUT 80.3 Figure 3. Internal Block Diagram 6-349 AFN-00742B 8279/8279·5 The command is then decoded and the appropriate SOFTWARE OPERATION function is set. The timing control contains the basIc liming counter chain. The first counter is a .;. N prescaler 8279 commands that can be programmed to yield an internal frequency The following commands program the 8279 operating of 100 kHz which gives a 5.1 ms keyboard scan time and modes. The commands are sent on the Data Bus with CS a 10.3 ms debounce time. The other counters divide low and Ao high and are loaded to the 8279 on the riSing doWn the basic internal. fre.quency to provide the proper edge of WR. key scan, row scan, keyboard matrix scan, and display scan times. Keyboard/Display Mode Set MSB LSB Scan Counter The'scan counter has two modes. In the encoded mode, Code I 0 10 I 0 I DID I K I K I K I the counter provides a binary count that must be externally decoded to provide the scan lines for the Where DD IS the Display Mode and KKK IS the Keyboard keyboard and display In the decoded mode, the scan counter decodes the least significant 2 bits and provides a Mode decoded 1 of 4 scan Note than when the keyboard is In decoded scan, so is the display. This means that only the DO first 4 characters In the Display RAM are displayed o 0 8 8-bit character display - Left entry In the encoded mode, the scan lines are active high o 1 16 8-bit character display - Left entry' outputs. In the decoded mode, the scan lines are active low outputs. o 8 8-blt character display - Right entry 16 8-blt character display - Right entry Return Buffers and Keyboard Debounce For deSCription of right and left entry, see Interface and Control The 8 return lines are buffered and latched by the Return Considerations Note that when decoded scan IS set In Buffers. In the keyboard mode, these lines are scanned, keyboard mode, the display IS reduced to 4 characters looking for key closures In that row If the debounce Independent of display mode set cirCUIt. detects a closed sWitch, It walts about 10 msec to check If the sWitch remains closed. If It does, the address KKK of the sWitch in the matrix plus the status of SHIFT and 0 0 0 Encoded Scan Keyboard - 2 Key Lockout' CONTROL are transferred to the FIFO In the scanned Sensor Matrix modes, the contents of the return lines IS 0 0 Decoded Scan Keyboard - 2-Key Lockout directly transferred to the corresponding row of the 0 0 Encoded Scan Keyboard - N-Key Rollover Sensor RAM (FIFO) each key scan time. In Strobed Input mode, the contents of the return lines are transferred to 0 Decoded Scan Keyboard - N-Key Rollover the FIFO on the rising edge of the CNTlISTB line pulse 0 0 Encoded Scan Sensor MatriX FIFO/Sensor RAM and Status 0 Decoded Scan Sensor MatriX ThiS block IS a dual function 8 x 8 RAM In Keyboard or 0 Strobed Input, Encoded Display Scan Strobed Input modes, It IS a FIFO Each new entry IS Strobed Input, Decoded Display Scan written into successive RAM positIOns and each IS then read In order of entry FIFO status keeps track of the Program Clock number of characters In the FIFO and whether It IS full or empty Too many reads or writes will be recognized as an error The status can be read by an RD With CS low and Code: I 0 I 0 11 I pip I pip IP I Ao high. The status logic also provides an IRQ signal All timing and multiplexing signals for the 8279 are when the FIFO IS not empty In Scanned Sensor MatriX mode, the memory IS a Sensor RAM Each row of the generated by an internal prescaler. This prescaler Sensor RAM IS loaded With the status of the correspond- divides the external clock (pin 3) by a programmable ing row of sensor in the. sensor matrix. In this mode, IRQ is integer. Bits PPPPP determine the value of this integer high If a change In a sensor. IS detected which ranges from 2 to 31. ChOOSing a divisor that yields 100 kHz will give the specified scan and debounce Display Address Registers and Display RAM times. For instance, if Pin 3 of the 8279 is being clocked The Display Address Reglster's hold the address of the by a 2 MHz Signal, PPPPP should be set to 10100 to word currently oelng written or read by the CPU and the divide the clock by 20 to yield the proper 100 kHz operat- two 4-blt nibbles being displayed The read/Write ing frequency. addresses are programmed by CPU command They also can be set to auto Increment after each read or write The Read FIFO/Sensor RAM Display RAM Cdn be directly read by the CPU after the correct mode an'd a·~dress IS set The addresses for the A and B nibbles are '''Jtamatlcally updated by the 8279 to Code: I' 0 11 1 0 1 AI 1 X 1 A 1 A 1 A I X = Don't Care match data entry by the CPU The A and B nibbles can be entered Independently or as one word, according to the The CPU sets up the 8279 for a read of the FIFO/Sensor mode that IS set by the CPU 'Data entry to the display can RAM by first writing this command. In the Sca'n Key- be set to either left or right entry. See Interface Considerations for details 'Default after reset ! 6-350 AFN-00742B 8279/8279·5 board Mode, the Auto-Increment flag (AI) and tlie RAM Clear address bits (AAA) are irrelevant. The 8279 will automati- cally drive the data bus for each subsequent read (Ao = 0) in the same sequence in which the data first entered the Code: 11 11 10 I CDI CO I CD 1 CF 1 C. I FIFO. All subsequent reads will be from the FIFO until The Co bits are available in this command to clear all another command is issued. rows of the Display RAM to a·selectable blanking code as follows: In the SenSor Matrix Mode, the RAM address bits AAA select one of the 8 rows of the Sensor RAM. If the AI flag is set (AI = 1), each successive read will be from the sub- sequent row of the sensor RAM. I'C: ': ' """'., 'X . 000" Cu,' 1 0 AB = Hex 20 (0010 0000) Read Display RAM 1 1 All Ones Code: 1 0 11 11 1 AliA 1 A 1A 1A I Enable clear display when = 1 (or by CA = 1) During the time the Display RAM is being cleared ("-100 143), The CPU sets up the 8279 for a read of the Display RAM it may not be written to. The most significant bit of the by first writing this command. The address bits AAAA FIFO status word is set during this time. When the Dis- select one of the 16 rows of the Display RAM. If the AI play RAM becomes available again, it automatic$ly flag is set (AI = 1), this row address wi II be incremented resets. after each following read or write to the Display RAM. Since the same counter is used for both reading and If the C F bit is asserted (CF = 1), the IFIFO status is writing, this command sets the next read or write cleared and the interrupt output line is reset. Also, the address and the sense of the Auto·lncrement mode for Sensor RAM pointer is set to row O. both operations. CA, the Clear All bit, has the combined effect of CD and Write Display RAM CF; it uses the Cb clearing code on the Display RAM anel also clears FIFO status. Furthermore, it resynchronizes Code: 11 1 0 1 0 1AliA 1 A 1 A 1A I the internal timing chain. The CPU sets u'p the 8279 for a write to the Display RAM End Interrupt/Error Mode Set by first writing this command. After writing the com- mand with Ao= 1, all subsequent writes with Ao= 0 will be to the Display RAM. The addressing and Auto· . Increment functions are identical to those for the Read Display RAM. However, this command does not affect For the sensor matrix modes this commanQlolf/Ws the the source of subsequent Data Reads; the CPU will read IRQ line and enables further writing into RAM. (The .IRQ from whichever RAM (Display or FIFO/Sensor) which line would have been raised upon the detection of a was last specified. If, indeed, the Display RAM was last change.in a sensor value. This would have also inhibited specified, the Write Display RAM will, nevertheless, further writing .into the RAM until resell. change the next Read location. For the N-key rollover mode - If the E bit IS programmed Display Write Inhibit/Blanking to "1" the chip will operate In the special Error mode. (For further details, see Interface Conside~atlons Section) A B A B Status Word Code: 11 10 11 1X IIW IIW I BL 1 BL 1 The status word contains the FIFO status, error. and display unavailable Signals. This word is read by the CPU The IW Bits can be used to mask nibble A and nibble B when Ao is high and CS and RD are low. See Interface in applications requiring separate 4'bit display ports. By Considerations for more detail on status word. setting the IW flag (IW = 1) for one of the ports, the port Data Read becomes marked so that entries to the Display RAM from the CPU do not affect that port. Thus, if each nibble Data is read when Ao. CS and RD are all low. The sOurce is input to a BCD decoder, the CPU may write a digit to of the data is specified by the Read FIFO or Read Display the Display RAM without affecting the other digit being commands. The trailing edge of RD Will cause the address displayed. It is important to note that bit Bo corresponds of the RAM being read to be Incremented if the Auto- to bit Do on the CPU bus, and that bit A3 corresponds to Increment flag is set FIFO reads always increment (if no bit D7• error occurs) Independent of AI. If the user wishes to blank the display, the BL flags are Data Write available for each nibble. The last Clear command issued Data that is written with Ao. CS and WR low is always determines the code to be used as a "blank." This code written to the Display RAM. The address is specified by the' defaults to all zeros after a reset. Note that both BL latest Read' Display or Write Display com,mand. Auto- flags must be set to blank a display formatted with a Incrementing on the rising edge of WR occurs if AI set by single 8·bit port. the latest display command. 6-351 AfN-00742B inter 8279/8279·5 INTERFACE CONSIDERATIONS Scanned Keyboard Mode, 2·Key Lockout There are. three possible combinations of conditio~s Increment flag is set to z!,!ro, or by the End Interrupt that can occur during debounce scanning. When a key is command if the Auto-Increment flag is set to one. depressed, the debounce logic is set. Other depressed Ndte: Multiple changes in the matrix Addressed by (S1.o-3 keys are looked for during the next two scans. If none = 0) may cause multiple interrupts. (SLo =0 in the Decoded are encountered, it is a single key depression and the Mode). Reset may cause the 8279 to see multiple changes. key position is entered into the FIFO along with the status of CNTL and SHIFT lines. If the FIFO was empty, Data t:orrnat IRQ will be set to signal the CPU that there is an entry in In the Scanned Keyboard mode, the character entered the FIFO. If the FIFO was full, the key will not be entered into the FIFO corresponds to the position of the switch and the error flag will be set. If another closed switch is in the keyboard plus the status of the CNTL and SHIFT encountered, no entry to the FIFO can occur. If all other lines (non-inverted). CNTL is the MSB of the character keys are released before this one, then it will be entered and SHIFT is the next most significant bit. The next to the FIFO. If this key is released before any other, it three bits are from the scan counter and indicate the will be entirely ignored. A key is entered to the FIFO row the key was found in. The last three bits are from the only once per depression, no matter how many keys column counter and indicate to which return line the key were pressed along with it or in what order they were was connected. released. If two keys are depressed within the debounce MSB LSB cycle, it is a simult'aneous depression. Neither key will be recognized until one key remains depressed alone. The last key will be treated as a single key depression. ICNTL !SHIFT! ~ETUR~ SCANNED KEVBOARD DATA FORMAT Scanned Keyboard Mode, N·Key Rollover In Sensor Matrix mode, the data on the return lines is entered directly in the row of the Sensor RAM that With N-key Rollover each key depression is treated corresponds to the row In the matrix being scanned. independently from all others. When a key is depressed, Therefore, each switch postion maps directly to a Sensor the debounce circuit walts 2 keyboard scans and then RAM position. The SHIFT and CNTL inputs are ignored in checks to see If the key IS still down. If it IS. the key IS this mode Note that switches are not necessarily the only entered Into the FIFO. Any number of keys can be thing that can be connec~ed to the return lines in this depressed and another, can be recognized and entered mode Any logic that can be triggered by the scan lines Into the FIFO. If a simultaneous depreSSion occurs, the can enter data to the return line inputs. Eight multiplexed keys are recognized and entered according to the order input ports could be tied to the return lines and scanned by the keyboard scan found them the 8279. Scanned Keyboard - Special Error Modes MSB LSB For N-key rollover mode the user can program a speCial error' mode. ThiS IS done by the "End Interrupt/Error Mode RL71 RL61 RL5! RL41 RLal RL2! RL, ! RLo Set"' command. The debounce' cycle and key-validity check are as. In normal ,N-key mode. If dUring a single debounce cycle. two keys are found depressed, this is In Strobed Input mode, the data is also entered tothe FIFO considered a simultaneous multiple depreSSion, and sets from the return lines. The data is entered by the rising an error flag. ThiS flag Will prevent any further writing into edge of a CNTLlSTB line pulse. Data can come from the FIFO and Will set Interrupt (if not yet set) The error flag another encoded keyboard or simple switch matrix. The could be read in thl!! mode by reading the FIFO STATUS return lines·can also be used as a general purpose strobed word. (See "FIFO STATUS" for further details.) The error input. flag is reset by sending the normal CLEAR command with CF = 1 MSB LSB Sensor Matrix Mode RL7! RLa! RL5! RL41 RLal RL2! RL, ! RLo In Sensor Matrix mode, the, debpunce I~gic IS inhibited .. The status of the sensor switch is inputted directly to the Sensor RAM. In this way the Sensor RAM keeps an image Display of the state of the s\!olltches in the sensor matrix. Although Left Entry debouncing IS not prOVided., this mode has the advantage Left Entry mode is the simplest display format in that each that the CPU knows how long the sensor was closed and display position directly corresponds to a byte (or nibble) when It was released. A keyboard mode can only indicate in the Display RAM. Address 0 in the RAM is the left-most a validated closure To make the software easier, the display character and address 15 (or address 7 in 8 designer should functionally group the sensors by row character display) is the right most display character. since thiS is the format in which the CPU will read them. Entering characters from pOSition zero causes the display The IRQ line goes high if any sensor value ctlange is to fill from the left. The 17th (9th) character is entered back detected at the end of a.sensor matrix scan. The IRQ line is In the left most pOSition and filling again proceeds from cleared by the first data read operation if the Auto- there. 6-352 AFN-00742B 8279/8279·5 o 1 14 15_DlSplay 0 1 2 4 G:=J = -_-CD 3 5 6 7--Display RAM RAM 1 -[ 1st entry 1st entry 11 [ Address 1 1 1 Address 0 1 14 15 -=r=o 0 1 2 3 4 5 6 7 2nd entry QI~:[ - 2nd entry 11 [2 [ [ [ [ [ [ 1 ·0 1 14 15 0 1 2 3 4 5 6 7 ~=== =~ 16th entry Command 11 121 I I I I I 1 10010101 0 1 14 15 Enter next at Location 5 Auto Increment 17th entry ECiI= 0 =EE 1 14 15 3rd entry 0 1 2 3 4 5 6 7 11 121 13 1 18th entry Ci!E= =EB LEFT ENTRY MODE 4th entry 0 1 2 I 3 I 4 5 6 I 7 1 (AUTO INCREMENT) [1 [2[ [ [ [3[4[ LEFT ENTRY MODE Right Entry (AUTO INCREMENT) Right entry IS the method used by most electronic In the Right Entry mode, Auto Incrementing and non calculators The first entry IS placed In the right most Incrementing have the same effect as In the Left Entry display character The next entry IS also placed In the right except If the address sequence IS Interrupted most character after the display IS shifted left one character The left most character IS shifted off the end 2 3 4 5 6 7 04- DISplay and IS lost 1st entry r - I' [ - , [ - - - , - - [--r[-[r-r--r[-'11 ::d~ess 2 14 15 O-DlSplay 3456701 1s1 entry IT[ [ [ [ 1 RAM Address 2nd entry 2 3 15 0 2nd entry ITI-- 111 2 23456701 3 4 0 2 Enter next at Location 5 Auto Increment 3rd entry [IJ-- 3 I 1 I 21 34567012 o 1 C2:GJ= --= 13 14 15 3rd entry ,-I-,-I-'.1_3.1.-1..J........-J1_l.1-12-'.1-11 16th entry [141151161 45670123 1 2 14 15 0 4th entry ]3141 11 121 1 I 17th entry !2E[ - - = i [15 16 117 1 RIGHT ENTRY MODE (AUTO INCREMENTI 2 3 15 0 1 Starting at an arbitrary location operates as shown below' 18th entry ~= =1161171181 o 1 2 3 4 5 6 74- DISplay RIGHT ENTRY MODE (AUTO INCREMENT) Command 10010101 1 [ [ [ [ [ [ [ 1 ::d~ess Note that now the display position and register address do Enter next at Location 5 Auto Increment not correspond. Consequently, entering a character to an arbitrary position In the Auto Increment mode may have '1 2 3 4 5 6 7 0 unexpected results Entry starting at Display RAM address 1st entry o with sequential entry IS recommended. 11 1 Auto Increment 23456 0 2nd entry I] 11 12 1 1 ] I In the Left Entry mode, Auto Incrementing causes the address where the CPU Will next write to be Incremented by one and the character appears In the next location 8th entry H5[6[7[sI1[2i 3 1 With non-Auto I ncrementlng the entry IS both to the same RAM address and display position Entry to an arbitrary 9th entry 1 5 [6[7[8[9[2[3[41 address In the Auto Increment mode has no undeSirable side effects and the result IS predictable RIGHT ENTRY MODE (AUTO INCREMENT) 6-353 AFN-00742B inter 8279/8279·5 Entry appears to be from the initial entry pOint. In a Sensor Matrix mode, a bit is set in the FIFO status word to indicate that at least one sensor closure indica- 8/16 Character Display Formats tion is contained in the Sensor RAM. If the display mode is set to an 8 character display, the on In Special Error Mode the S/E bit is showing the error duty-cycle is double What It would be for a 16 character flag and serves as an indication to whether a simultane- display (e.g., 5.1 ms scan time for 8 characters vs. 10.3 ms ous multiple closure error has occurred. for 16 characters with 100 kHz internal frequency) FIFO STATUS WORD G. FIFO Status ,FIFO Full FIFO status is used in the Keyboard and Strobed Input modes to indicate the number of characters In the FIFO and to indicate whether an error has occurred. There are two types of errors possible overrun and underrun. Overrun occurs when the entry of another character into a full FIFO is attempted. Underrun occurs when the CPU Flag for tries to read an empty FIFO. Multiple Closures ' - - - - - - Display unavailable The FIFO status word also has a bit to Indicate that the Display RAM was unavailable because a Clear Display or Clear All command had not completed its clearing operation. KEYBOARD SHIFT MATRIX CONTROL 8/RETURN 8 COLUMNS LINES 8 ROWS INT SHIFT CNTL R,·,0 M8 v"n, INT VDD 3 ... 8 DECODER 8-BIT MICRO· PROCESSOR SYSTEM DATA BUS 8/ DATA BUS ° 0 _1 OV j; 3 LSB" AD lOR 50 _3 4/ WR 8279 SCAN LINES CONTROLS { RESET lOW t4 RESET CS 4 -16 DECODER ADDRESS { CS AD t} BUS A, elK CLOCK ClK r~~:'~~Yi B O_3 W 4 ADDRESSES (DECODED) DISPLAY CHARACTERS 4 DATA / DISPLAY • Do not drive the keyboard decoder with the MSB of the scan lines Figure 4. System Block Diagram 6-354 AFN-00742B inter 8279/8279·5 ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating, only and functional opera- Ambient Temperature .,., •.••••..•. O°Cto 70°C tion of the device at these or any other conditions above Storage Temperature ...•.•.....•• -65°C to 125"C those indicated in the operational sections of this specifi- Voltage on any Pin with cation is not implied. Exposure to absolute maximum Respect to Ground •.......•.... , -0.5V to +7V rating conditions for extended periods may affect device Power Dissipation .......••...•.••.....• 1 Watt reliability. D.C. CHARACTERISTICS [TA = O°C tQ 70"C, Vss = Vee = +5V ± 5%, Vee = +5V ±10% (8279-5)] , Symbol Parameter Min. Max, Unit Test Conditions VIL1 Input Low Voltage for -0.5 1.4 V Return Lines VIL2 Input Low Voltage for All Others -0.5 O.S V VIH1 Input High Voltage for 2.2 V Return Lines VIH2 Input High Voltage for All Others 2.0 V VOL Output Low Voltage 0.45 V Note 1 VOH1 'Output High Voltage on Interrupt 3.5 lJ Note 2 Line I VOH2 Other Outputs 2.4 IOH = -400,.,.A 11L1 Input Current on Shift, Control and +10 tJ.A VIN = Vee Return Lines -100 tJ. A VIN = OV -. IIL2 Input Leakage Current on All Others ±to ,/J.A VIN = Vcc to OV IOFL Output Float Leakage ±to tJ.A VOUT = Vee to 0.45V _. Icc Power Supply Current t20 mA CAPACITANCE Symbol Parameter Typ, Max, Uriit Test Conditions CIN Input Capacitance 5 to pF fe = 1 MHz Unmeasured COUT Output Capacitance 10 20 pF pins retu rned to VSS A.C. CHARACTERISTICS [TA = O"C to 70"C, Vss = OV, (Note 3)] , Bus Parameters READ CYCLE 8279 8279-5 Symbol Perameter Min. Max. Min, Max. Unit tAR Address Stable Before READ 50 0 ns tRA Address Hold Time for READ 5 0 ns tRR READ Pulse Width 420 250 ns tRO[4] Data Delay from READ 300 150 ns' tAO [4] Address to Data Valid 450 250 ns tOF READ to Data Floating to 100 to , tOO ns tRCY Read Cycle Time 1 1 tJ.s 6·355 AFN.(J()742B inter 8279/8279·5 A.C. CHARACTERISTICS (Continued) WRITE CYCLE 8279 8279-5 Symbol Parameter Min. Max_ Mln_ Max. Unit tAW Address Stable Before WRITE 50 0 ns tWA Address Hold Time for WR ITE 20 0 ns tww WRITE Pulse Width 400 250 ns tow Data Set Up Time for WR ITE 300 150 ns two Data Hold Time for WRITE 40 0 ns tWCY Write Cycle Time 1 1 /lS OTHER TIMINGS 8279 8219-5 Symbol Parameter Min. Max. Min. Max. Unit --- tq,w Clock Pulse Width 230 120 nsec tCY Clock Period 500 320 nsec Keyboard Scan Time ........................ 5.1 msec Digit-on Time .............................. 480 /Lsec Keyboard Debounce Time .................. 10.3 msec Blanking Time ............................. 160 /Lsec Key Scan Time .............................. 80 /Lsec Internal Clock Cycle[5] ....................... 10 /Lsec . Display Scan Time ......................... 10.3 msec NOTES: 1. 8279, IOL = 1.6mA; 8279-5, IOL = 2.2mA. 2. IOH = -100 /LA 3. 8279, Vcc = +5V ±50/0; 8279-5, Vee = +5V ±10%. 4. 8279, CL = 100pF; 8279-5, CL = 150pF. 5. The Prescaler should be programmed to provide a 10 p.S internal clock cycle. • For Extended Temperature EXPRESS, use M8279A electrical parameters. A_C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT "=X > 0.45 2.0 08 TEST POINTS . < :c 2.0 0.8 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A lOGIC "" AND 0 45V FOR A lOGIC 0 TIMING MEASUREMENTS ARE MADE AT 20V FOR A lOGIC ",' DEVICE UNDER TEST CL = '20pF ~.~ " .. AND 0 BV FOR A LOGIC 0" CL INCWDES JIG CAPACITANCE 6-356 AFN-00742B 8279/8279·5 WAVEFORMS READ OPERATION (SYSTEM'S 1"--------:....-----------"'" , _______________ ADDRESS BUSI _tAR_·I·.~----------tRcv ----1--------1 I-----'RR-----I lITi (READ CONTROll -tOF I----'AO----~I DATA BUS (OUTPUT)~~~~~~~~~~~~~~----------~~~~~~~~~~~~~~~ WRITE OPERATION (SYSTEM'S ' -_ _ _ _ _ _ _ _ _ _ _ _ _ _ ADDRESSBUSI ~---~w------~ (WRITE CONTROL) DATA BUS DATA \oj - O A T A V A L l D - V DATA oNPUT1 _ _ _ _ _ ....JI'- M_AY_C_HA_N_G;.;E_ _ _ - -l\'-_____M...A...Y.:C...H.:AN.;,G:.;E:...._ _ _ __ CLOCK INPUT ~---------------------------------------------------------~ 6-357 AFN-Q07428 8279/8279-5 WAVEFORMS (Continued) SCAN ENCODED s, L SCAN s, L s, L u u u DECODED u u u u SCAN s, u u U- s, u u u LJ DISPLAY PRE5CALER PROGRAMMED FOR IN- TERNAL FREQUENCY ~ 100 kHz SO 1-------640/As= 64t c y - - - - - - - ! tCY == 10~s So s, AO-A3 BLANK ACTIVE HIGH AI') COOP -SLANK CODe IS EITHER ALL 0'$ OR ALl1's OR 20 HEX 80- 8 3 ACTIVE HIGH 8(1) 490 fls----~-I- RLO- Rl7 NOTE: SHOWN IS ENCODED SCAN LEFT ENTRY 8 2.$3 ARE NOT SHOWN BUT THEY ARE SIMPLY 81 DIVIDED BY 2 AND 4 6-358 AFN-00742B 8291A GPIB TALKER/LISTENER • Designed to Interface • 1-8 MHz Clock Range Microprocessors (e.g., 8048/49, 8051, • 16 Registers (8 Read, 8 Write), 2 for 8080/85, 8086/88) to an IEEE Standard Data Transfer, the Rest for Interface 488 Digital Interface Bus Function Control, Status, etc. • Programmable Data Transfer Rate • Directly Interfaces to External • Complete Source and Acceptor Non-Inverting Transceivers for Handshake Connection to the GPIB • Complete Talker and Listener • Provides Three Addressing Modes, Functions with Extended Addressing Allowing the Chip to be Addressed • Service Request, Parallel Poll, Device Either as a Major or a Minor Talker/ Clear, Device Trigger, Remote/Local Listener with Primary or Secondary Functions Addressing • Selectable Interrupts • DMA Handshake Provision Allows for Bus Transfers without CPU • On-Chip Primary and Secondary Intervention ' Address Recognition • Trigger Output Pin • Automatic Handling of Addressing and Handshake Protocol • On-Chip EOS (End of Sequence) Message Recognition Facilitates • Provision for Software Implementation Handling of Multi-Byte Transfers of Additional Features The 8291A is an enhanced version of the 8291 GPIB Talker/Listener designed to interface microprocessors to an IEEE Standard 488 Instrumentation Interface Bus. It implements all of the Standard's interface functions except for the controller. The controller function can be added with the 8292 GPIB Controller, and the 8293 GPIB Transceiver performs the electrical interface for Talker/Listener and Talker/Listene"Controlier configurations. i8291A 8291A I GPIB DATA INTERFACE FUNCTIONS SH TO NON-INVERTING AH BUS TRANSCEIVERS TE LE SR RL I T/R CONTROL Figure 1. Block Diagram Figure 2. Pin Configuration 6-359 8291A 8291A FEATURES AND IMPROVEMENTS 7. To avoid confusion between holdoff on DAV ver- sus RFD if a device is readdressed from a talker to a listener role or vice-versa during a holdoff, the "Hold off on Source Handshake" has been eliminated. Only "Holdoff on Acceptor Hand- The 829iA is an improved design of the 8291 GPIB shake" is available. Talker/Listener. Most of the functions are identical to the 8291, and 1he pin configuration is unchanged. 8. The rsv local message is cleared automatically upon exit from SPAS if (APRS.STRS.SPAS) oc- curred. The automatic resetting of the bit after The8291A offers the following improvements to the the serial poll is complete simplifies the service 8291: request software. 9. The SPASC interrupt on the 8291 has been 1. EOI is active with the data as a ninth data bit replaced by the SPC (Serial Poll Complete) in- rather than as a control bit. This is to comply terrupt on the 8291A. SPC interrupt is set on exit with some additions to the 19751EEE-488 Stan- from SPAS if APRS.STRS.SPAS occurred, indi- dard incorporated in the 1978 Standard. cating that the controller has read the bus status byte after the 8~91A requested service. The 2. The BO interrupt is not asserted until RFD is SPASC interrupt was ambiguous because a true. If the Controller asserts AT'f\I controller could enter SPAS and exit SPAS gen- synchronously, the data is guaranteed to be erating two SP~SC interrupts without reading transmitted. If the Controller asserts ATN the serial poll status byte. The SPC interrupt also asynchronously, the SH (Source Handshake) simplifies the CPU's software by eliminating the will return to SIDS (Source Idle State), and the interrupt when the serial poll is half way done. output data will be cleared. The, if ATN is released while the 8291A is addressed to talk, a 10. The rtl Auxiliary Command in the 8291 has been new BO interrupt will be generated. This change replaced by Set and Clear rtl Commands in the fixes 8291 problems which caused data to be 8291A. Using the new commands, the CPU has lost or repeated and a problem with the RQS bit the flexibility to extend the length of local mode (sometimes cannot be asserted while talking). or leave it as a short pulse as in the 8291. 3. llOC and REMC interrupts are setting flipflops '11. A holdoff RFD on GET, SOC; and DCl feature rather than toggling flipflops in the interrupt has been added to prevent additional bus ac- backup register. This ensures that the CPU tivity while the CPU is responding to any of knows that these state changes have occurred. these 'commands. The feature is enabled by a The actual state can be determined by checking new bit (B.) in the AUXiliary Register B. the llO and REM status bits in the upper nibble of the Interrupt Status 2 Register. 12. On the 8291, BO could cease to occur upon IFC going false if IFC occurred asynchronously. On 4. DREQ is cleared by DACK (RD + WR). DREQ on the 8291A, BO continues to occur after ~ has the 8291 was cleared only by DACK which is not gone false even if it arrived asynchronously. compatible with the 8089 I/O Processor. 13. User's software can distinguish between the 5. The INT bit in Interrupt Status 2 Register is du- 8291 and the 8291A as follows: plicated in bit 7 of the Address 0 Register. If ' software polling is used to check for an inter- a) pon (OOH to register 5) rupt, INT in the Address 0 Register should be b) RESET (02H to register 5) , polled rather than the Interrupt Status 2 Regis- c) Read Interrupt Status 1 Register. If BO inter- ter. This ensures that no interrupts are lost due rupt is set, the device is the 8291. If BO is clear, to asynchronous status reads and interrupts. it is the 8291A. 6. The 8291A's Send EOI Auxiliary Command This can be used to set a flag in the user's works on any byte including the first byte of a software which will permit special routines to be message. The 8291 did not assert EOI after this executed for each device. It could be included 'command for a one byte message nor on two as part of a normal initialization procedure as consecutive bytes. the first step after a chip reset. 6-360 AFN.()()229B 8291A Table 1. P·in Description Pin Pin Symbol lYpe Name and Function Symbol Type Name and Function No. No. Do-D7 12-19 I/O Data Bus Port: To be con- RESET 4 I Reset Input: When high, nected to microprocessor forces the device into an data bus. "idle" (initialization) mode. RSo-RS, 21-23 I Register Select: Inputs, to The device will remain at be connected to three non- "idle" until released by the multiplexed microproces- microprocessor, with the sor address bus lines. "Immediate Execute pon" Select which of the 8 inter- local message. nal read (write) registers DIO,-DIO. 28-35 I/O S-Bit GPIB Data Port: Used will be read from (written for bidirectional data byte into) with the execution of transfer between 8291 A RD(WR.) and GPIB via nOli-inverting CS 8 I Chip Select: When low, external line transceivers. enables reading from or DAV 36 I/O Data Valid: GPIB hand- writing into the register se- shake control line. Indi- lected by RSo-RS,. cates the availability and RD 9 I Read Strobe: When low valid!!,Lof information...Q!l with CS or DACK low, se- the DIO,-DlO. and EOI lected register contents lines. are read. NRFD 37 I/O Not Ready for Data: GPIB WR 10 I Write Strobe: When low handshake control line. In- with CS or DACK low, data dicates the condition of is written into the selected readiness of device(s) con- register. nected to the bus to accept data. INT (INT) 11 a Interrupt Request: To the NDAC 38 I/O Not Data Accepted: GPIB microprocessor, set high for request and cleared handshake control line. In- when the appropriate reg- dicates the condition of ac- ister is accessed by the ceptance of data by the CPU. May be software con- device(s) connected to the figured to be active low. bus. DREQ 6 a DMA Request: Normally ATN 26 I Attention: GPIB command low, set high to indicate line. Specifies how data on byte output or byte input in DIO lines are to be inter- DMA mode; reset by DACK. preted. DACK 7 I DMA Acknowledge: When IFC 24 I Interface Clear: GPIB low, resets DREQ and command line. Places the selects data in/data out interface functions in a register for DMA data known quiescent state. transfer ~dual transfer SRQ 27 a Service Request: GPIB done by RD/WR pulse). command line. Indicates the need for attention and Must be high if DMA is not requests an interruption of used. the current sequence of TRIG 5 a Trigger Output: Normally events on the GPIB. low; generates a triggering REN 25 I Remote Enable: GPIB pulse with 1 ""sec min. command line. Selects (in width in response to the conjunction with other GET bus command or Trig- messages) remote or local ger auxiliary command. control of the device. CLOCK 3 I External Clock: Input, EOI 39 I/O End or Identify: GPIB com- used only for T, delay mand line. Indicates the generator. May be any end of a multiple byte, speed in 1-8 MHz range. transfer sequence or, in conjunction with ATN, ad- dresses the device during a polling sequence. 6-361 AFN-00229B 8291A Table 1. Pin Description (Continued) Pin Pin Symbol ~pe Name and Function Symbol ~pe Name and Function No. No. TiR1 1 0 External Transceivers T/R2 2 0 External Transceivers Control Line: Set high to Control Line: Set to indio indicate outpJ!.L datal cate output signals on the , signals on the 010,-010. EOf line. Set low to indicate and OAV lines and input expected input signal on Sign~S on the NRFO and the EOI line during parallel NOA lines (active source poll. handshake). Set low to in· 40 P.S. Positive Power Supply: Vee dicate .l!:!.!?ut .J!!ta/signals (5V ±10%). on the 010,-010. and OAV lines and output signals on GND 20 P.S. Circuit Ground Potential. the NRFO and NOAC lines NOTE: (active acceptor hand· All signals on the 8291A pins are specified with positive logic shake). However, IEEE 488 specifies negative logiC on its 16 signal lines. Thus, the data is inverted once from Do-D, to DiDo-DiD. and non-inverting bus transceivers should be used. Figure 3. 8291 A System Diagram 1M1 GINERAL PURPOSE INTERFACE IEEE-488 Standard except for the controller func- h i (OPla) tion. If an implementation of the Standard's Control- ler is desir,ed, it can be connected with an Intel® 8292 t~. General Purpose Interface Bus (GPIB) is to form a complete interface. defined in the IEEE Standard 488-1978 "Digital In- terface for Programmable Instrumentation." The 8291A handles communication between a mi- Although a knowledge of this standard is assumed, croprocessor-controlled device and the GPIB. Its Figure" provides the bl./s structure for quick refer- capabilities include data tra.nsfer, handshake ence. Also, Tables 2 and 3 reference the interface protocol, talkerllistener addressing procedures, state mnemonics and the interface messages device clearing and triggering, service request, and mpectlYely. Modified state diagrams for the 8291A both serial and parallel polling. In most procedures, .r. presented in Appendix A. it does not disturb the microprocessor unless a byte has arrived (input buffer full) or has to be sent out (output buffer empty). General Description the 3291A is a microprocessor-controlled device The 8291A architecture includes 16 registers. Eight desig,ned to interface microprocessors, e.g., of these register!! may be written into by the micro- 8048/49, 8051, 8080/85, 8086/88 to the GPIB. It im- processor. The other eight registers may be read by plements an of the interface functions defined in the th~ microprocessor. One each of these read and 6·362 AFN.()I)229B 8291A write registers is for direct data transfers. The rest of III"~ the write registers control the various features ofthe "'f .' chip, while the rest of the read registers provide the DEVICE A microprocessor with a monitor of GPIB states, vari- ABLE TO ous bus conditions, and device conditions. TALK LISTEN AND 1= DATA BUS CONTROL legcalcutator) GPIB Addressing DEVICE,S ABLE TO Each device connected to the GPIB must have at TALK AND LISTEN ~ least one address whereby the controller device in leg floppy disk) DATA BYTE TRANSFER charge of the bus can configure it to talk, listen, or CONTROL send status. An 8291A implementation of the GPIB DEVICE C offers the user three alternative addressing modes Or-,lLY ABLE for which the device can be initialized for each appli- TO LISTEN 1= ~e 9 sI90al cation. The first of these modes allows for the device generator) GENERAL INTERFACE to have two separate primary addresses. The second MANAGEMENT mode allows the user to implement a single DEVICE 0 talker/listener with a two byte address (primary ad- ONLY ABLE TO TALK F dress + secondary address). The third mode again allows for two distinct addresses but in this instance, leg countet) they can each have a ten-bit address (5 low-order bits of each of two bytes). However, this mode re- , _~==}DIOl 8 ~ quires that the secondary addresses be passed to DAV NRFD the microprocessor for verification. These three NDAC addressing schemes are described in more detail in lFe ATN the discussion of the Address Registers. SRO R'N 'A' Figure 4. Interface Capabilities and Bus Structure Table 2. IEEE 488 Interface State Mnemonics Mnemonic State Represented Mnemonic State Represented ACDS Accept Data State PACS Parallel Poll Addressed to Configure State ACRS Acceptor Ready State PPAS Parallel Poll Active State AIDS Acceptor Idle State PPIS Parallel Poll Idle State ANRS Acceptor Not Ready State PPSS Parallel Poll Standby State APRS Affirmative Poll Response State PUCS Parallel Poll Unaddressed to Configure State AWNS Acceptor Walt for New Cycle State .. :CA-CS - - ------------------, Controller Active State REMS Remote State RWLS Remote With Lockout State I CADS Controller Addressed State Controller Active Walt State SACS System Control Active State I CAWS I CIDS Controller Idle State SDYS Source Delay State I CPPS Controller Parallel Poll State SGNS Source Generate State I CPWS Controller Parallel Poll Walt State SIAS System Control Interface Clear Active State I CSBS Controller Standby State SIDS Source Idle State Controller Service Not Requested State SIIS System Control Interface Clear Idle State : CSNS Controller Service Requested State SINS System Control I nterface Clear Not Active State I CSRS I CSWS Controller Synchronous Walt State SIWS Source Idle Walt State SNAS System Control Not Active State ~~T~~ _ ~~t.':?~I:}.!:.a~s!=r":>t~t:.. ______ J SPAS Serial Poll Active State DCAS DeVice Clear Active State SPIS Serial Poll Idle State DCIS DeVice Clear Idle State SPMS Serial Poll Mode State DTAS DeVice Trigger Active State SRAS System Control Remote Enable Active State DTIS DeVice Trigger Idle State SRIS' System Control Remote Enable Idle State LACS LIstener Active State SRNS System Control Remote Enable Not Active State LADS Listener Addressea State SRQS Service Request State LIDS Listener Idle State STRS Source Transfer State LOCS Local State SWNS Source Walt for New Cycle State LPAS Listener Primary Addressed State TACS Talker Active State LPIS Listener Primary Idle State TADS Talker Addressed State LWLS Local With Lockout State TIDS Talker Idle State NPRS Negative Poll Response State TPIS Talker Primary Idle State "The Controller function IS Implemented on the Intel® 8292. 6-3~3 AFN-00229B 8291 A T.bl. 3. IEEE 488 Int.rface M••••g. R.fer.nc. Li.t Mnemonic Message Interface Functlon(s) LOCAL MESSAGES RECEIVED (By Interface Functions) 'gts go to standby C ist individual status PP Ion listen only L, LE Ipe local poll enable PP nba new byte available SH pon power on SH,AH,T,TE,L,LE,SR,RL,PP,C rdy ready AH 'rpp request parallel poll C 'rsc request system control C rsv request service SR rtl return to local RL 'sic send interface clear C 'sre send remote enable C ltca take control asynch ronously C 'tcs take control synchronously AH,C ton talk only T, TE REMOTE MESSAGES RECEIVED ATN Attention SH,AH,T,TE,L,LE,PP,C DAB Data Byte (Via L, LE) DAC Data Accepted SH DAV Data Vljlid AH DCL Device Clear DC END End (via L, LE) GET Group Execute Trigger DT GTL Go to Local RL lOY Identify L,LE,PP IFC I nterface Clear T,TE,L,LE,C LLO Local Lockout RL MLA My Listen Address L,LE,RL,T,TE MSA My Secondary Address TE,LE,RL MTA My Talk Address T,TE,L,LE OSA Other Secondary Address TE OTA Other Tall< Address T, TE PCG Primary Command Group TE,LE,PP 2PPC Parallel Poll Configure PP 2[PPD] Parallel Poll Disable PP 2[PPE] Parallel Poll Enable PP 'PPR. Parallel Poll Response N (via C) 2PPU Parallel Poll Unconfigure PP REN Remote Enable RL RFD Ready for Data SH ROS Request Service (via L, LE) [SOC] Select Device Clear DC SPD Serial Poll Disable T, TE SPE Serial Poll Enable T, TE 'SOR Service Request (via C) STB Status Byte (via L, LE) 'TCTor[TCn Take Control C UNL Unlisten L, LE NOTE: 1. These messages are handled only by Intel's 8292. 2. Undefined commands which may be passe"d to the microprocessor. 6-364 AFN-00229B intJ 8291A Table 3. (Cont'd) IEEE 488 Interface Message Reference List Mnemonic Message 'Interface Function(s) REMOTE MESSAGES SENT ATN Attention C DAB Data Byte (via T, TE) DAC Data Accepted AH DAV Data Valid SH DCl Device Clear (via C) END End (via T) GET G roup Execute Trigger (via C) GTl Go to local (via C) lOY Identify C IFC I nterface Clear C llO local lockout (via C) MlA or [MlAj My Listen Address (via CI MSA or [MSAj My Secondary Address (via C) MTA or [MTA] My Talk Address (via C) OSA Other Secondary Address (via C) OTA Other Talk Address (via C) PCG Primary Command Group (via C) PPC Parallel Poll Configure (via C) [PPDj Parallel Poll Disable (via C) [PPE] Parallel Poll Enable (via C) PPRN Parallel Poll Response N PP PPU Parallel Poll Unconfigure (via C) REN Remote Enable C RFD Ready for Data AH ROS Request Service T, TE [SOC] Selected Device Clear (via C) SPD Senal Poll Disable (via C) SPE Senal Poll Enable (via CI SRO Service Request SR STB Status Byte (via T, TEl TCT Take Control (via CI UNl Unlisten (via CI NOTE: 3. All Controller messages must be sent via Intel's 8292. 8291 A Registers Data Registers A bit-by-bit map of the 16 registers on the 8291A is presented in Figure 5. A more detailed explanation I \ 0171 016\ DIS 0141 0131 012\ 011 I010 \ of each of these registers and their functions fol- DATA-IN REGISTER (OR) lows. The access of these registers by the microprocessor is accomplished by using the es, 1007100610051004100310021001\ 000 \ RD, WR, and RS o-RS 2 pins. DATA-OUT REGISTER (OW) Register CS RD WR RSo·RS2 The Data-In Register is used to move data from the GPIB to the microprocessor or to memory when the All Read Registers 0 0 1 eee 8291A is addressed to listen. Incoming information All Write Regist~rs 0 0 eee is separately latched by this register, and its con- High Impedance d d ddd tents are not destroyed by a write to the data-out 6-365 AFN-00229B inter 8291A register. The RFD (Ready for Data) message is held Interrupt Registers false until the byte is removed from the data in regis- ter, either by, the microprocessor or by DMA. The ICPTIAPTIGETIEND I ~EC I ERR I BO I BIJ 8291 A then completes the handshake automatically. In RFD holdoff mode (see Auxiliary Register A), the INTERRUPT STATUS 1 (1R) handshake is not finished until a command is sent telling the 8291A to release the holdoff. In this way, the same byte may be read seveal times, or an over . I I liNT ISPASILLOjREM SPC LLOclREMCIADSC I anxious talker may be held off until all available data has been processed. INTERRUPT STATUS 2 (2R) When the 8291A is addressed to talk, it uses the data-out register to move data onto the GPIB. After I /CPT/APT GET I END I DEC I ERR I BO I I BI the BO interrupt is received and a byte is written to INTERRUPT ENABLE 1 (1W) this register, the 8291A initiates and completes the handshake while sending the byte out over the bus. In the BO interrupt disable mode, the user should I 0 I 0 IDMAO IDMAllsPC ILLOclREMCIADSC I wait until BO is active before writing to the register. INTERRUPT ENABLE 2 (2W) (In the DMA mode, this will happen automatically.) A read of the Data-In Register does not destroy the information in the Data-Out Register. ADDRESS 0 REGISTER Figure 5. 8291A Registers READ REGISTERS REGISTER SELECT' WRITE REGISTERS CODE RS2 RSl RSO 1017 I 016 D15! 014 Dl3 I 012 011 I 010 I 0 I 007 I 006 I 005 I 004 I 003 I 002 I 001 I DO"Q] DATA IN DATA OUT I CPT I APT I GET I END I DEC I ERR I BD I BI I 0 1 I CPT I APT I 'GrrJ!ND I DEC I ERR I BO I BI INTERRUPT STATUS 1 INTERRUPT ENABLE 1 liNT I SPAS ILLD I REM I SPC ILLOC I REMCI ADScl 0 0 I 0 I 0 I DMAOIDMAII 5PC ILLOcl REMCIAD5~1 INTERRUPT STATUS 2 INTERRUPT ENABLE 2 I S8 I S~QS I S6 I S5 I S4 I S3 I S2 I Sl I 0 1 I 58 I rsv I 56 I S5 I S4 I S3 I 52 151 SERIAL POLL STATUS SERIAL POLL MODE ! ton Ion EOI I LPAS [ TPAS I I LA TA I MJMNI o I TO ILO I 0 I 0 I 0 I 0 I ADMll ADMOI ADDRESS STATUS ADDRESS MODE I CPT?I ePT61 ePT51 CPT4,] ePT31 CPT21. CPT1] ePTO I I CNT21 cNnl CNTol COM41 COM31 CDM21 COMll COMO I COMMAND PASS THROUGH AUX MODE liNT I DTO I DLO I AD5.01 ADO.ol AD3·0 I AD2.01 ADJ.OI 1 a I ARS I DT DL r AD5 I AD4 I AD3 I AD2 [ ADl ADDRESS a ADDRESS all I x I on DLl I AD5.11 AD4.11 AD3.11 AD2.11 AD1.ll I EC7 I ECG EC5, I EC4 I EC3 I EC2 I Eel I ECO· ADDRESS 1 EOS 6-366 AFN-00229B in1:ef 8291A The 8291A can be configured to generate an inter- The mnemonics for each of the bits in these regis- rupt to the microprocessor upon the occurrence of ters and a brief description of their respective func- any of 12 conditions or events on the GPIB. Upon tions appears in Table 4. This tables also indicates receipt of an interrupt, the microprocessor must how each of the interrupt bits is set. read the Interrupt Status Registers to determine which event has occurred, and then execute the NOTE: The INT bit in the Address 0 Register is a duplicate of the INT bit In the Interrupt Status 2 Register. It IS only a status appropriate service routine (if necessary). Each of bit. It does not generate interrupts and thus does not have the 12 interrupt status bits has a matching enable bit a correspondi ng enable bit. in the interrupt enable registers. These enable bits are used to select the events that will cause the INT. The BO and BI interrupts enable the user to perform pin to be asserted. Writing a logic "1" into any of data transfer cycles. BO indicates that a data byte these bits enables the corresponding interrupt should be written to the Data Out Register. It is set by status bits to generate an interrupt. Bits in the Inter- TACS . (SWNS + SGNS) . RFD. It is reset when the rupt Status Registers are set regardless of the states data byte is written, ATN is asserted, or th'e 8291A of the enable bits. The I nterrupt Status Registers are exits TACS. Data shou Id never be written to the Data then cleared upon being read or when a local pon Out Register before BO is set. Similarly, BI is set (power-on) message is executed. If an event occurs when an input byte is accepted into the 8291A and while one of the Interrupt Status Registers is being reset when the microprocessor reads the Data In read, the event is held until after its register is Register. BO and BI are also reset by pon (power-on cleared and then placed in the register. local message) and by a read of the Interrupt Table 4. Interrupt Bits Indicates Undefined Commands CPT An undefined command has been received. Set by (TPAS + LPAS)oSCGoACDSoMODE 3 APT A secondary address must be passed through to the microprocessor for recognition. Set by DTAS GET A group execute trigger has occurred. Set by (EOS + EOl)oLACS END An EOS or EOI message has been received. Set by DCAS DEC Device Clear Active State has occurred Set by TACSonbaoDAC.RFD ERR Interface error has occurred, no listeners are active TACSo(SWNS+ SGNS) BO A byte should. be output. Set by LACS·ACDS BI A byte has been input Shows status of the INT pin INT The device has been enabled fCfr a serial poll SPAS These are status only. They Will not generate The device is In local lock out state LLO interrupts, nor do they have corresponding (LWLS+RWLS) mask bits. The device is in a remote state REM (REMS+RWLS) SPAS ~SPAS if APRS:STRS:SPAS was true SPC Serial Poll Complete interrupt. LLCNO LLO LLOC Local lock out change Interrupt. Remot[Jocal REMC Remote/Local change Interrupt. AddresseUnaddressed ADSC Address status change interrupt.' NOTE: 'In ton (talk-only) and Ion (listen-only) modes, no ADSC interrupt is generated 6-367 AFN-002298 8291A Status 1 Register. However, if it is so desired, data The APT interrupt bit indicates to the processor that transfer cycles may be performed without reading a secondary address is available in the CPT register the Interrupt Status 1 Register if all interrupts except for validation. This interrupt will only occur if for BO or BI are disabled; BO and BI will auto- Mode 3 addressing is in effect. (Refer to the section matically reset after each byte is transferred. on addressing.) In Mode 2, secondary addresses will be recognized automatically on the 8291 A. They will be ignored in Mode 1. If the 8291A is used in the interrupt mode, the INT and DREO pins can be dedicated to data input and output interrupts respectively by enabling BI, The CPT interrupt bit flags the occurrence of an and DMAO, provided that no other interrupts are undefined command and of all secondary com- enabled. This eliminates the need to read the inter- mands following an undefined command. The Com- rupt status registers if a byte is received or mand Pass Through feature is enabled by the BO bit transmitted. of Auxiliary Register B.Any message not decoded by the 8291A (not included in the state diagrams in Appendix B) becomes an undefined command. Note that any addressed command is automatically ig- The ERR bit is set to indicate the bus error condition nored when the 8291A is not addressed. when the8291A is an active talker and tries to send a byte to the GPIB, but there are no active listeners (e.g., all devices on the GPIB are in AIDS). The logi- cal equivalent of (nba . TACS . DAC . RFD) will set Undefined commands are read by the CPU from the this bit. . Command Pass Through register of the 8291A. This register reflects the logic levels present on the data lines at the time it is read. If the CPT feature is enabled, the 8291Awill hold off the handshake until The DEC bit is set whenever DCAS has occurred. this register is read. The user must define a known state to which all device functions will return in DCAS. Typically this state will be a power-on state. However, the state of An especially useful feature of the 8291 A is its ability the device functions at DCAS is at the designer's to generate interrupts from state transitions in the discretion. It should be noted that DCAS has no interface functions. In particular, the lower 3 bits of effect on the interface functions which are returned the Interrupt Status 2 Register, if enabled by the to a known state by the IFC (interface clear) message corresponding enable bits, will cause an interrupt or the pon local message. upon changes in the following states as defined in the IEEE 488 Standard. The END interrupt bit may be used by the micropro- cessor to detect that a multi-byte transfer has been Bit 0 ADSC change in LIDS or TIDS or MJMN completed. The bit will be set when the 8291 A is an Bit 1 REMC change in LOCS or REMS active listener (LACS) and either EOS (provided the Bit 2 LLOC change in LWLS or RWLS End on EOS Received feature is enabled in the Auxil- iary Register A) or EOI is received. EOS will generate an interrupt when the byte in the Data In Register The upper 4 bits of the Interrupt Status 2 Register are matches the byte in the EOS register. Otherwise the available to the processor as status bits. Thus, if one interrupt will be generated when a true input i$ of the bits 1 and 2 generates an interrupt indicating a detected on EOL state change has taken place, the corresponding status bit (bits 4 and 5) may be read to determine what the new state is. To determine the nature of a The GET interrupt bit is used by the microprocessor change in addressed status (bit 0) the Address Status to detect that DTAS has occurred. It is set by the Register is available to be read. 'The SPC interrupt 8291A when the GET message is received while it is (bit 3 in Interrupt Status 2) is set upon exit from SPAS addressed to listen. The TRIG output pin of the if APRS:STRS:SPAS occurred which indicates that 8291A fires when the GET message is received. the GPIB controller has read the bus serial poll status Thus, the basic operation of device trigger may be byte after the 8291 A requested service (-asserted started without microprocessor software interven- SRO). The SPC interrupt occurs once after the con- tion. troller reads the status byte if service was requested. 6-368 AFN.00229B 8291A The controller may read the status byte later, and the The Serial Poll Mode Register determines the status byte will contain the last status the 8291A's CPU byte that the 8291A sends out on the GPIB data lines wrote to the Serial Poll Mode Register, but the SRQS when it receives the SPE (Serial Poll Enable) bit will not be set and no interrupt will be generated. message. Bit 6 of this register is reserved for the rsv Finally, bit 7 monitors the state of the 8291 A INT pin. (request service) local message. Setting this bit to 1 Logically, it is an OR of all enabled interrupt status causes the8291A to assert its SRQ line, indicating its bits. One should note that bits 4-7 of the Interrupt need for attention from the controller-in-charge of Status 2 Register do not generate interrupts, but are the GPIB. The other bits of this register are available available only to be read as status bits by the proces- for sending status information over the GPIB. sor. Bit 7 in Interrupt Status 2 is duplicated in Ad- Sometime after the microprocessor initiates a re- dress 0 Register, and the latter should be used when quest for service by setting bit 6, the controller of the polling for interrupts to avoid losing one of the inter- GPIB sends the 8PE message and then addresses rupts in Interrupt Status 2 Register. the 8291A to talk. At this point, one byte of status is returned by the 8291A via the Serial Poll Mode Reg- ister. After the status byte is read by the controller, Bits 4 and S (DMAI, DMAO) of the Interrupt Mask 2 rsv is automatically cleared bythe8291A and an SPC Register are available to enable direct data transfers interrupt is generated. The CPU may request service between memory and the GPIB; DMAI (DMA i.n) again by writing another byte to the Serial Poll Mode enables the DREQ (DMA request) pin ofthe8291A to Register with the rsv bit set. If the controller per- be asserted upon the occurrence of BI. Similarly, forms a serial poll when the rsv bit is clear, the last DMAO (DMA out) enables the DREQ pin to be as- status byte written will be read, but the 8RQ line will serted upon the occurrence of BO. One might note not be driven by the 8291A and the SRQS bit will be that the DREQ pin may be used as a second interrupt clear in the status byte. output pin, monitoring BI and/or BO and enabled by DMAI and DMAO. One should note that the DREQ pin is not affected by a read of the Interrupt Status 1 The Serial Poll Status Register is available for read- Register. It is reset whenever a byte is written to the ing the status byte in the Serial Poll Mode Register. Data Out Register or read from the Data In Register. The processor may check the status of a request for service by polling bit 6 of this register, which corre- sponds to SRQS (Service Request State). When a To ensure that an interrupt status bit will not be Serial Poll is conducted and the controller-in- cleared without being read, and will not remain un- charge reads the status byte, the SRQS bit is cleared after being read, the 8291A implements a cleared. The SRQ line and the rsv bit are tied special interrupt handling procedure. When an together. enabled interrupt bit is set in either of the Interrupt Status Registers, the input of the registers are blocked 'until the set bit is read and reset by the Address Registers microprocessor. Thus, potential problems arise when interrupt status changes while the register is being blocked. However, the 8291A stores all new interrupts in a temporary register and transfers them I ton lion I EOII LPASI TPAS I LA I TA I' MJMN I to the appropriate Interrupt Status Register after the ADDRESS STATUS (4R) interrupt has been reset. This transfer takes place only if the corresponding bits were read as zeroes. I liNT DTO! DLO!AD5-0!AD4-0 IAD3-0!AD2-0!AD1-0 ! ADDRESS 0 (6R) Serial Poll Registers I X ! DT1! DL1!ADS-1! AD4-1!AD3-1! AD2-1/ AD1-1 / ADDRESS 1 (7R) Isal 8RQ8 186 I 85 I 84 I 8~ I 82 I 81 I ITO ILO I 0 I 0 I 0 I 0 I ADM1/ADMO / SERIAL POLL STATUS (3R) ADDRESS MODE (4W) I sa I rsv I 86 ISS I S4 IS31 S2 I81 I IARS IDT / DL I ADS I AD4 I AD3 / AD2 IAD1 I SERIAL POLL MODE (3W) ADDRESS 0/1 (6W) 6-369 AFN.Q0229B 8291A The Address Mode Register is used to select one of Setting the LO bit generates the Iqcal Ion (listen- the five modes of addressing available on the 8291 A. only) message and sets the 8291A to a listen-only It determines the way in which the 8291A uses the mode. This mode allows the device tel operate as a information in the Address 0 and Address 1 listener in an interface system without a controller. Registers. The above bits may also be used by a controller-in- . charge to set itself up for remote command or data communication. -In Mode 1, the contents of the Address 0 Register constitute the '.'Major" talker/listener address while the Address 1 Register represents the "Minor" The mode of addressing implemented by the 8291A talker/listener address. In applications where only may be selected by writing one of the following bytes one address is needed, the major talker/listener is to the Address Mode Register. used, and the minor talker/listener should be dis- abled. Loading an address via the Address 0/1 Regis- Register Contents Mode ter into Address Registers 0 and 1 enables the major and minor talker/listener functions respectively. 10000000 Enable talk only mode (ton) 01000000 Enable listen only mode (Ion) 11000000 The 8291 may talk to itself -In Mode 2 the 8291A recognizes two sequential 00000001 Mode 1, (Primary-Primary) .address bytes: a primary followed by a secondary. 00000010 Mode 2 (Primary-Secondary) Both address bytes must be received in order to 00000011 Mode 3 (Primary/APT-Primary/APT) enable the device to talk or listen. In this manner, Mode 2 addressing implements the extended talker and listener functions as defined in IEEE-488. The Address Status Register contains information used by the microprocessor to handle its own addressing. This information includes status bits To use Mode 2 addressing the primary address must that monitor the address state of each talker/ be loaded into the Address 0 Register, and the Sec- listener, "ton" and "Ion" flags which indicate the ondary Address is placed in the Address 1 Register. talk and listen only states, and an EOI bit which, With both primary and secondary addresses resid- when set, signifies that the END message came with ing on chip, the 8291A can handle all addressing the last data byte. LPAS and TPAS indicate that the sequences without processor intervention. listener or talker primary address has been received. The microprocessor can use these bits when the secondary address is passed through to determine -In Mode 3, the 8291A handles addressing just as it whether the 8291A is addressed to talk or listen. The does in Mode 1, except that each Major or Minor LA (listener addressed) bit will be set when the primary address must be followed by a secondary 8291A is in LACS (Listener Active State) or in LADS address. All secondary addresses must be verified (Listener Addressed State). Similarly, the TA (Talker by the microprocessor when Mode 3 is used. When Addressed bit) will be set to indicate TACS or TAOS, the 8291 A is in TPAS or LPAS (talker/listener primary but also to indicate SPAS (Serial Poll Active State). addressed state), and it does not recognize the byte The MJMN bit is used to determine whether the on the 010 lines, an APT interrupt is generated (see information in the other bits applies to the Major or section on Interrupt Registers) and the byte is avail- Minor talker/listener. It is set to "1" when the Minor able in the CPT (Command Pass-Through) Register. talker/listener is addressed. It should be noted that As part of its interrupt service routine, the micropro- only one talker/listener may be active at anyone cessor must read the CPT Register and write one of time. Thus, the MJMN bit will indicate which, if the following responses to the Auxiliary Mode either, of the talker/listeners is addressed or active. Register: The Address 0/1 Register is used for specifying the 1. 07H implies a non-valid secondary address device's addresses according to the format selected 2. OFH implies a valid secondary address in the Address Mode ReQister. Five bit addresses may be loaded into the Address 0 and Address 1 Registers by writing into the Address 0/1 Register. Setting the TO bit generates ,the local ton (talk- The ARS bit is used to select which ofthese registers only) message and sets the 8291A to a talk-only the other seven bits will be loaded into. The DT and mode. This mode allows the device to operate as a DL bits may be used to disable the talker or listener talker in an interface system without a controller. function at the address signified by the other five 6-370 AFN·OO229B intJ 8291A bits. When Mode 1 addressing is used and only one the CPT Register. In either case, the 8291A will hold- primary address is desired, both the talker and the off the handshake until the microprocessor reads listener should be disabled at the Minor address. this register and issues the VSCMD auxiliary command. As an example of how the Address 0/1 Register might be used, consider an example where two pri- The CPT and APT interrupts flag the availablility of mary addresses are needed in the device. The Major undefined commands and secondary addresses in primary address will be selectable only as a talker the CPT Register. The details of these interrupts are and the Minor primary address will be selectable explained in the section on Interrupt Registers. only as a listener. This configuration of the 8291A is formed by the following sequence of writes by the An added feature of the 8291A is its ability to handle microprocessor. undefined secondary commands following unde- fined primaries. Thus, the number of available Operation commands for future IEEE-488 definition is in- cs RD WR Dala RS2-RSo creased; one undefined primary command followed 1 Select addreSSing Mode 1 0 1 0 00000001 100 by a sequence of as many as 32 secondary com- 2. Load major address into 0 1 0 001AAAAA 110 mands can be processed. The IEEE-488 Standard Address 0 Register with listener function disabled. does not permit users to define their own com- mands, but upgrades of the standard are thus pro- 3. Load minor address Into 0 1 0 110BBBBB 110 Address 1 Register with vided for. talker function disabled The recommended use of the 8291A's undefined command capabilities is for a controller-configured At this point, the addresses AAAAA and BBBBB are Parallel Poll. The PPC message is an undefined pri- stored in the Address 0 and Address 1 Registers re- mary command typically followed by PPE, an unde- spectively, and are available to be read by the micro- fined secondary command. For details on this proce- processor. Thus, it is not necessary to store any dure, refer to the section on Parallel Poll ProtoCOl. address information elsewhere. Also, with the in- formation stored in the Address 0 and Address 1 Registers, processor intervention is not required to recognize addressing by the controller. Only in Auxiliary Mode Register Mode 3, where secondary addresses are passed through, must the processor intervene in the ~NT2\CNT1\CNTO\COM4\COM3ICOM2ICOM11 COMO I addressing sequence. AUX MODE (SW) The Address 0 Register contains a copy of bit 7 ofthe Interrupt Status 2 Register (I NT). This is to be used CNTO-2:CONTROL BITS when polling for interrupts. Software should poll COMO-4:COMMAND BITS register 6 checking for INT (bit 7) to be set. When INT is set, the Interrupt Status Register should be read to The Auxiliary Mode Register contains a three-bit determine which interrupt was received. control field and a five-bit command field. It is used for several purposes on the 8291A: Command Pass Through Register 1. To load "hidden" auxiliary registers on the 8291A. ICPT7j CPT6\CPTS\CPT4\ CPT3\ CPT2\CPT1 1CPTO I 2. To issue commands from the microprocessor to COMMAND PASS THROUGH (SR) the 8291A. 3. To preset an internal counter used to generate The Command Pass Through Register is used to T1, delay in the Source Handshake function, as transfer undefined 8-bit remote message codes defined in IEEE-488. from the GPIB to the microprocessor. When the CPT feature is enabled (bit BO in Auxiliary Register B), Table S summarizes how these tasks are performed any message not decoded by the 8291 A becomes an with the Auxiliary Mode Register. Note that the three undefined command. When' Mode 3 addressing is control bits determine how the five command bits used secondary addresses are also passed through are interpreted. 6-371 AFN·OO229B intJ '8291A Table 5 0100-Trigger: A "Group Execute Trigger" is forced by this command. It has the same effect as a GET CODE COMMAND command issued by the controller-in-charge of the CONTROL COMMAND GPIB, but does not cause a GET interrupt. BITS BITS 000 OCCCC Execute auxiliary command 0101, 1101-Clear/Set rtl: These commands corre- CCCC spond to the local rtl message as defined by the. 001 00000 Preset internal counter to match external clock IEEE-488. The 8291A will go into local mode when a frequency of DODD MHz Set rtl Auxiliary Command is received if local (DODD binary representation lockout is not in effect. The 8291A will exit local of 1 to 8 MHz) mode after receiving a Clear rtl Auxiliary Command 100 00000 Write 00000 into auxiliary if the 8291A is addressed to listen. register A 101 00000 Write 00000 into auxiliary 0110-Send EOI: The EOIline of the 8291A may be register B asserted with this command. The command causes 011 USP3P2P1 Enable/disable parallel poll EOI to go true with the next byte transmitted. The either in response to remote EOI line is then cleared upon completion of 'the messages (PPC followed by handshake for that byte. ' PPE or PPD) or as a local Ipe message. (Enable if U =0 0111, 1111-Non ValidNalid Secondary Address or disable if U = 1.) Command '(VSCMD): This command informs the 8291A that the secondary address received by the microprocessor was valid or invalid (0111 = invalid, 1111 = valid). If Mode 3 addressing is used, the processor must field each extended address and AUXILIARY COMMANDS respond to it, or the GPIB will hang up. Note that the COM3 bit is the invalid/valid flag. Auxiliary commands are executed by the 8291A The valid (1111) command is also used to tell the whenever OOOOCCCC is written into the Auxiliary 8291A to continue from the command-pass- Mode Register, where CCCC is the 4-bit command through-state, or from RFD holdoff on GET, SOC code. or DCL. 1000-pon: This command puts the 8291A ir'to the OOOO-immediate Execute pon: This command pon (power on) state and holds it there. It is similar to resets the 8291A to a power up state (local pon a Chip Reset except none of the Auxiliary Mode message as defined in IEEE-488). Registers are cleared. In this state, the 8291A does The following conditions constitute the power up not participate in any bus activity. An Immediate state: Execute pon releases the 8291A from the pon state 1. All talkers and listeners are disabled. and, permits the device to participate in the bus 2. No interrupt status bits are set. activity again. The 8291A is designed to power up in certain states as specified in the IEEE-488 state diagrams. Thus, '0001, 1001-P8rallel Poll Flag (local "ist" message): the following states are in effect in the power up This command sets (1001) or clears (0001) the paral- state: SIDS, AIDS, TIDS, LIDS, NPRS, LOCS, and lel poll flag. A "1" is sent over the assigned data line PPIS. (PRR = Parallel Poll Response true) only if the paral- The "0000" pon is an immediate execute command lel poll flag matches the sense bit from the Ipe local (a pon pulse). It is also used to release the "initialize" message (or indirectly from the PPE message). For a state generated by either an external reset pulse or more complete description of the Parallel Poll the "0010" Chip Reset command. features and procedures refer to the section on Par- allel Poll Protocol. 0010-Chip Reset (Initialize): This command has the same effect a~ a pulse applied to the Reset pin. INTERNAL COUNTER (Refer to the section on Reset Procedure.) The internal counter determines the delay time al- 0011 -Finish Handshake : This command fi nishes a lowed for the setting of datil on the 010 lines. This handshake that was stopped because of a holdoff delay time is defined as T, in IEEE-488 and appears on RFD. (Refer to Auxiliary Register A.) in the Source Handshake state diagram between the 6-372 AFN-00229B 8291A SDYS and STRS. As such, DAV is asserted T, after Auxiliary Register, it is loaded with the data the DIO lines are driven. Consequently, T, is a major A.AaA2A,Ao. Setting the respective bits to "1" factor in determining the data transfer rate of the enables the following features. 8291A over the GPIB (T, = TWRDV2-TWRD15). When open-collector transceivers are used for con- Ao- RFD Holdoff on all Data: If the 8291 A is listen- nection to the GPIB, T, is defined by IEEE-488 to be ing, RFD will not be sent true until the "finish hand- 2/Lsec. By w'riting 001 ODDDD into the Auxiliary Mode shake" auxiliary command is issued by the Register, the counter is preset to match a fc MHz microprocessor. The holdoff will be in effect for each clock input, where DDDD is the binary representa- data byte. tion of NF [1 ",;N F",;8, NF=(DDDD).l. When NF = fc, a 2/Lsec T, delay will be generated before each DAV asserted. A,-"RFD Holdoff on End: This feature enables the holdoff on EOI or EOS (if enabled). However, no T lI /Lsec) = 2fNF + t SYNC , 1",;N F",;8 holdoff will be in effect on any other data bytes. . c A 2-End on EOS Received: Whenever the byte in the tSYNC is a synchronization error, greater than zero Data In Register matches the byte in the EOS Regis- and smaller than the larger of T clock high and T ter, the END interrupt bit will be set in the Interrupt clock low. (For a 50% duty cycle clock, t SYNC is less Status 1 Register. than half the clock cycle). If it is necessary that T, be different from 2/Lsec, NF Aa-Output EOI on EOS Sent: Any occurrence of may be set to a value other than fc. In this manner, data in the Data Out Register matching the EOS data transfer rates may be programmed for a given Register causes the EOI line to be sent true along system. In small systems, for example, where trans- with the data. .fer rates exceeding GPIB specifications are re- quired, one may set NF TEST POINTS < 20 08 x= A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1" AND 0 45V FOR A LOGIC 0 ' TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 DEVICE UNDER TEST ~Cl"150PF -= AND 0 BV FOA A LOGIC 0" GPIB TIMINGS1 Symbol Parameter Max. Units Test Conditions TEOT13' EOll to TR1t 135 nsec PPSS, ATN=0.45V TEOD16 EOll to DIO Valid 155 nsec PPSS, ATN=0.45V TEOT12 EOI11toTR1~ 155 nsec PPSS, ATN=0.45V TATND4 ATNlto NDAq 155 nsec TACS, AIDS TATT14 ATNltoTR11 .155 nsec TACS, AIDS TATT24 ATNl toTR21 155 nsec TACS, AIDS TDVND3-C DAVl to NDAct 650 nsec AH,CACS TNDDV1 . NDACt to DAVt 350 nsec SH,STRS TNRDR1 NRFDt to DREQt 400 nsec SH TDVDR3 DAVl to DREQr 600 nsec AH, LACS, ATN=2.4V TDVND2-C DAVt to NDACl 350 nsec AH, LACS TDVNR1-C DAVt to NRFDr 350 nsec AH, LACS, rdy=True TRDNR3 RDl to NRFDt 500 nsec AH, LACS TWRD15 WRt to 010 Valid 280 nsec SH, TACS, RS=O.4V TWRE05 WRr to EOI Valid 350 nsec SH,TACS High Speed Transfers Enabled, TWRDV2 WRt to DAVl 830 + t SYNC nsec NF = fc, t SYNC = 1/2'fc NOTES: 1. All GPIB timings are at the pinS of the 8291A. 2. The last number In the symbol for any GPIB timlrTg parameter IS chosen according to the transition directions of the reference signals. The following table describes the numbering scheme. ito i 1 ito ~ 2 ho i 3 ho ~ 4 t!oVALID 5 t to VALID 6 6-382 8291A APPENDIX A MODIFIED STATE DIAGRAMS Convention Level Logic IEEE-488 Intel Figure A-1 presents the interface function state 0 T DAV DAV diagrams. It is derived from IEEE Std. state dia- 1 F DAV DAV grams, with the following changes: 0 T NDAC NDAC 1 F NDAC NDAC 0 T NRFD NRFD A. The 8291Asupports the complete set of IEEE-488 1 F NRFD NRFD interface functions except for the controller. These Consider the condition when the Not-Ready-For- include: SH1, AH1, T5, TE5, L3, LE3, SR1, RL 1, PP1, Data signal (pin 37) is active. Intel indicates this, DC1, DT1, and CO. active low signal with the symbol NRFD (VOUT5VOL for AH; V'N5V'L for SH). The IEEE-488-1978 Standard, in its state diagrams, indicates the active state of this B. Addressing modes included in T,L state Signal (True condition) with NRFD. diagrams. D. All remote multiline messages decoded are con- ditioned by ACDS. The multiplication by ACDS is not drawn to simplify the diagrams. Note that in Mode 3, MSA, OSA are generated only E. The symbol after secondary address validity check by the micro- processor (APT interrupt). indicates: C. In these modified state diagrams, the IEEE-488- 1978 convention of negative (low true) logic is 1. When event X occurs, the function returns to followed. This should not be confused with the Intel state S. pin- and signal-naming convention based on posi- 2. X overrides any other transition condition in tive logic. Thus, while the state diagrams below car- the function. ry low true logic, the signals described elsewhere in Statement 2 simplifies the diagram, avoiding the this data sheet are consistent with I ntel notation and explicit use of X to condition all transitions from S to are based on positive logic. other states. r~---l I I I SH I IL _ _ _ _ ...JI pon N A ATN + F1 (WITHIN t2l DAV Fl '" lACS + SPAS Figure A-1. 8291A State Diagrams (Continued next page) 6-383 AFN-002298 inter 8291 A r------, I AH I I I L ____ J *THIS TRANSITION WltL NEVER OCCUR UNDER NORMAL OPERATION pon---+I tTOELAY IS ABOUT 300 NS fOR DEBOUNCING DAV F2"'" ATN + LACS + LAOS F3=ATN+rdy T3',= T3. CPT· APT J - - -......~ END IF (EOI + EOS) RECEIVED r----, I I I TE I I I L ____ J pon---+I STB AND ROS AVAILABLE TOSH IFC (WITHIN t41 F4'" OTA + (OSA. TPAS + MSA· LPAS)· MODE 1 +MLA·MODE 1 EOI IF DAB - EOS r-----' ROS IN STB I I I SRO I I I L ____ J pon---+I pon---+I pon - - - + I ROS IN STB IFe (WITHIN t4) Figure A-1. 8291A State Diagrams (Continued next page) 6-384 AFN-00229B 8291A r-----., I LE I I r ----l 1 1 1 RL 1 1 L ____ J I' pon---+I pon--_~ IFe (WITHIN t4) ATN (WITHIN tz) F5 =0 (MLA' MODE 1 + LPAS' MSA· MODE 1) r-----, I I I PP2 I I I L _ _ _ ~J pon----I>1 *IOV = ATN EDt r----' r-----, 1 1 1 1 1 DC 1 1 DT 1 1 L ____ J 1 1 ____ ..J1 L F6'" DeL + SOC, LADS Figure A·1. 8291A State Diagrams 6·385 AFN-D02298 8291A APPENDIX B Table B-1. IEEE 488 Time Values Time Value Identifier' Function (Applies to) Description Value T1 SH Settling Time for Multiline Messages ;" 2,."S2 - t2 LC,IC,SH,AH,T,L Response to A TN :5 200ns T3 AH Interface Message Accept Time' > 04 t4 T,TE,L,LE,C,CE Response to I FC or REN False < 100,."s ts PP Response to ATN+EOI :5 200ns T6 C Parallel Poll Execution Time ;" 2,."s T7 C Controller Delay to Allow Current Talker ;" 500 ns to see A TN Message Ts C Length of IFC or REN False > 100,."s Tg C Delay for EOls ;" 1.5,."s' NOTES: 'Time values specified by a lower case t indicate the maximum time allowed to make a state transition. Time values specified by an upper case T indicate the minimum time that a function must remain in a state before exiting. 21f three-state drivers are used on the 010, DAV, and EOI lines, T, may be: 1. '" 1100 ns. 2. Or '" 700 ns If It IS known that within the controller ATN IS driven by a three-state driver. 3. Or'" 500ns for all subsequent bytes follOWing the first sent after each false transition of ATN (the first byte must be sent in accord- ance with (1) or (2). 4. Or'" 350ns for all subsequent bytes follOWing the first sent after each false transition of ATN under conditions specified In Section 52.3 and warning note. See IEEE Sta~dard 488. 'Time reqUired for Interface functions to accept, not necessarily respond to interface messages. 41mplementation dependent. SDelay required for EOI, NDAC, and NRFD signal lines to inaicate valid states. '''' 600 ns for three-state drivers. 6-386 AFN-00229B 8291A APPENDIX C THE THREE-WIRE HANDSHAKE --, TWRDI5 I ,~T1+ VALID I NOTVALID I VALID -' ... ~TNDDV1 _ _ TDVNR1-+ _TWRDV2 ~~ ~-TRDNR3_ .r ~ !-TDVND3_ ..,f- DREO(SH) E} , !-TDVDR3 DREO(AH) '- -' ... Figure C-l. 3-Wire Handshake Timing at 8291A 6-387 AFN-00229B 8292 GPIB CONTROLLER • Complete IEEE Standard 488 Controller • Complete Implementation of Transfer Function Control Protocol • Interface Clear (IFC) Sending Capability Allows Seizure of Bus Control and/or • Synchronous Control Seizure Prevents Initialization of the Bus the Destruction of Any Data Transmission in Progress • Responds to Service Requests (SRQ) • Sends Remote Enable (REN), Allowing • Connects .with the 8291 to Form a Instruments to Switch to Remote Complete IEEE Standard 488 Interface Control Talker/Listener/Controller The 8292 GPIB Controller is a microprocessor-controlled chip designed to function with the 8291 GPIB Talker/Listener to implement the full IEEE Standard 488 controller function, including transfer control protocol. The 8292 is a pre- programmed Intel® 8041A. IFCL Vee Xl COUNT X2 REN RESET OAV DREQ 8291 8292 VCC IBFI GPIB GPIB TALKERI LISTENER CONTROLLER Cs OBFI GND EOI lID SPI AO TCI WR CIC SYNC NC 00 ATNO TiAl 01 NC 02 CLTH 03 VCC 04 NC 05 SYC 06 IFC 07 ATNI Vss SRQ GENERAL PURPOSE INTERFACE BUS F=igure 1_ 8291,8292 Block Diagram Figure 2. Pin Configuration 6-388 8292 Table 1. Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name _and Function IFCL 1 I IFC Received (Latched): The 8292 Vee 5,26,40 P.S. Imllage: +5V supply input ±10%. monitors thl!' IFC Line (when not COUNT I Event Count: When enabled by the 39 system controller) through this pin. proper command the internal Xl, X2 2,3 I Crystal Inputs: Inputs for a crystal, counter will count external events LC or an external timing signal to through this pin. High to low transi- determine the internal oscillator tion will increment the internal frequency. counter by one. The pin is sampled once per three internal instruction RESET 4 I Reset: Used to initialize the chip to cycles (7.5/Lsec sample period a known state during power on. when using 5 MHz XTAL). It can be CS 6· I Chip Select Input: Used to select used for byte counting when con- the 8292 from other devices on the nected to NDAC, or for block count- common data bus. Ing when connected to the EOL RD 8 I Read Enable: Allows the master REN 38 0 Remote Enable: The Remote En- CPU to read from the 8292. able bus signal selects remote or Ao 9 I Address Line: Used to select be- local control of the device on the tween the data bus and the status bus. A GPIB bus management line, register during read operations and as defined by IEEE Std. 488-1978. to distinguish between data and DAV 37 110 Data Valid: Used during parallel commands written into the 8292 poll to force the 8291 to accept the during write operations. parallel poll status bits. It IS also WR 10 I Write Enable: Allows the master used during the tcs procedure. CPU to write to the 8292. IBFI 36 0 Input Buffer Not Full: Used to SYNC 11 0 Sync: 8041A instruction cycle syn- interrupt the central processor chronization signal; it is an output while the Input buffer of the 8292 is clock with a frequency of XTAL - empty. This feature is enabled and 15. disabled by the interrupt mask register. Do-D7 12-19 110 Data: 8 bidirectional lines used for communication between the cen- OBFI 35 0 Output Buffer Full: Used as an tral processor and the 8292's data Interrupt to the central processor bus buffers and status register. while the output buffer of the 8292 is full. The feature can be enabled and Vss 7,20 P.S. Ground: Circuit ground potential. disabled by the interrupt mask SRO 21 I Service Request: One of the IEEE register. control lines. Sampled by the 8292 34 End Or Identify: One of the GPIB E012 110 when it is controller in charge. If management lines, as defined by true, SPI interrupt to the master will IEEE Std. 488-1978. Used with ATN be generated. as Identify Message during parallel ATNI 22 I Attention In: Used by the 8292 to poll. monitor the GPIB ATN control line. It Special Interrupt: Used as an inter- SPI 33 0 is used during the transfer control rupt on events not initiated by the procedure. central processor. IFC 23 110 Interface Clear: One of the GPIB TCI 32 Task Complete Interrupt: Interrupt 0 management lines, as defined by to the control processor used to in- IEEE Std. 488-1978, places all de- dicate that the task requested was vices in a known quiescent state. completed by the 8292 and the in- SYC 24 I System Conroller: Monitors the formation requested is ready in the system controller switch. data bus buffer. CLTH 27 0 Clear Latch: Used to clear the IFCR CIC 31 0 Controller In Charge: Controls the latch after being recognized by the SIR input of the SRO bus trans- 8292. Usually low (except after ceiver. It can also be used to indi- hardware R~, it will be pulsed cate that the 8292 is In charge of the high when IFCR is recognized by GPIB bus. the 8292. ATNO 29 0 Attention Out: Controls the ATN control line of the bus through ex- ternal logic for tcs and tca proce- dures. (ATN isa GPIB control line, as defined by IEEE Std. 488-1978.) 6-389 AFN·00741D inter 8292 FUNCTIONAL DESCRIPTION Interrupt Status Register The 8292 is an Intel 8041A which has been programmed I SYC I ERR ISRO I EV x IFCR IBF OBF as a GPIB Controller interface element. It is used with DO the 8291 GPIB Talker/Listener and two 8293 GPIB Trans- ceivers to form a complete IEEE-488 Bus Interface for a The 8292 can be configured to interrupt the microproc- microprocessor. The electrical interface is performed by essor on one-of several conditions. Upon receipt of the the transceivers, data ·transfer is done by the talker/ interrupt the microprocessor must read the 8292 listener, and control of the bus is done by the 8292. ihterrupt status register to determine which event Figure 3 is a typical controller interface using Intel's caused the interrupt, and then the appropriate subrou- GPIB peripherals. tine can be performed. The interrupt status register is read with Ao high. With the exception of OBF and IBF, these interrupts are enabled or disabled by the SPI interrupt mask. OBF and IBF have their own bits in the interrupt mask (OBFI and IBFI). GPIB OBF Output Buffer Full. A byte is waiting to be read by the microprocessor. This flag is cleared when the output data bus buffer is read. IBF Input Buffer Full. The byte previously written by TO the microprocessor has not been read yet by the PROCESSOR BUS 8292. If another byte is written to the 8292 before this flag clears, data will be lost. ISF is cleared when the 8292 reads the data byte. IFCR Interface Clear Received. The GPIB system controller has set IFC. The 8292 has become idle and is no longer in charge of the bus. The flag is TO cleared when the lACK command is issued. PROCESSOR BUS EV Event Counter Interrupt. The requested number of blocks or data bytes has been transferred. The EV interrupt flag is cleared by the lACK command. SRQ Service Request. Notifies the 8292 that a service GPIB request (SRQ) message has been received. It is cleared by the lACK command. Figure 3. Talker/Listener/Controller Configuration ERR Error occurred. The type of error can be deter- mined by reading the error status register. This interrupt flag is cleared by the lACK command. The internal RAM in the 8041A is used as a special SYC System Controller Switch Change. Notifies the purpose register bank for the 8292. Most of these processor that the state of the system controller registers (except for the interrupt flag) can be accessed switch has changed. The actual state is con- through commands to the 8292. Table 2 identifies the tained in the GPIB Status Register. This flag is registers used by the 8292 and how they are accessed. cleared by the lACK command. Table 2. 8292 Registers READ FROM 8292 WRITE TO 8292 INTERRUPT STATUS AO INTERRUPT MASK AO lie ERR I SRO I EV I X IIFCR IBF OBF I I 1 SPI TCI SYC I OBFI IIBFI I 0 I SRO I 0 07 DO 07 DO ERROR FLAG ERROR MASK I X x I I Ix I USER X TOUT31 TOUT2j TOUT11 o· I I I I I 0 0 USER 0 ITOUT31 TOUT21TOUT11 CONTROLLER STATUS COMMAND FIELD I CSBS I CA I X x I SYCS I IFC REN SRO I O· I I I I I 1 1 1 OP C I I I C C C GPIB (BUS) STATUS EVENT COUNTER REN OAV I EOI X I SYC EVENT COUNTER STATUS I IFC I ANTI SRO I O· I I I I I I I I 0 D D 0 0 TIME OUT 0 0 D O· I I 0 0 I 0 I 0 I 0 I 0 I 0 D I O· I I 0 D I I I I I I 0 0 0 0 D D O· TIME OUT STATUS I D I D I D I D I D I D I D D I O· Note: These registers are accessed by a special utility command, see page 6. AFN~00741D 6-390 inter 8292 Interrupt Mask Register Event Counter Register I I SPI I TCI I SYC OBFI I IBFI SRO I ~ I ~ I ~ I ~ I ~ DO The Event Counter Register contains the initial value for The Interrupt Mask Register Is used to enable features the event counter. The counter can count pulses on pin and to mask the SPI and TCI interrupts. The flags in the 39 of the 8292 (COUNT). It can be connected to EOI or Interrupt Status Register will be active even when NDAC to count blocks or bytes respectively during masked out. The Interrupt Mask Register is written standby state. A count of zero equals 256. This register when Ao is low and reset by the RINM command. When cannot be read, and is written using the WEVC the register is read, 0 1 and 07 are undefined. An inter· command. tupt Is enabled by setting the corresponding register bit. Event Counter Status Register SRO Enable interrupts on SRQ received. IBFI Enable interrupts on input buffer empty. I ~ I ~ I ~ I ~ I ~ Do This register contains the current value in the event OBFI Enable interrupts on output buffer full. counter. The event counter counts back from the initial SYC Enable interrupts on a change in the system value stored in the Event Counter Register to zero and controller switch. then generates an Event Counter Interrupt. This register TCI Enable interrupts on the task completed. cannot be written and can be read using a REVC command. SPI Enable interrupts on special events. NOTE: The event counter is enabled by the GSEC Time Out Register command, the error interrupt is enabled by the error Do mask register, and IFC cannot be masked (it will always cause an interrupt). The Time Out Register is used to store the time used for the time out error function. See the individual timeouts Controller Status Register (TOUT1, 2, 3) to determine the units of this counter. This leSBsl CA I x I X ISYCSIIFC REN SRO Time Out Register cannot be read, and it is written with the WTOUT command. Do Time Out Status Register The Controller Status Register is used to determine the status of the controller function. This register is accessed by the RCST command. This register contains the current valu'e in the time out SRO Service Request line active (CSRS). counter. The time out counter decrements from the REN Sending Remote Enable. original value stored in the Time Out Register. When IFC Sending or receiving interface clear. zero is 'reached, the appropriate error interrupt is gen· erated. If the register is read while none of the time out SYCS System Controller Switch Status (SACS). functions are active, the register will contain the last CA Controller Active (CACS + CAWS + CSWS). value reached the last time a function was active. The Time Out Status Register cannot be written, and it is CSBS Controller Stand· by State (CSBS, CA)=(O,O) - read with the RTOUT command. Controller Idle Error Flag Register GPIB Bus Status Register I x I X ,"USER I x I x I TOUT3 I TOUT2 I TOUTl I REN I DAV I EOI I x I SYC IFC ATNI SRO ~ Do Four errors are flagged by the 8292 with a bit in the Error This register contains GPIB bus status information. It Flag Register. Each of these errors can be masked by can be used by the microprocessor to monitor and the Error Mask Register. The Error Flag Register cannot manage the bus. The GPIB Bus Register can be read be written, and it is read by the lACK command when the using the RBST command. error flag in the Interrupt Status Register is set. Each of these status bits reflect the current status of TOUT1 Time Out Error 1 occurs when the current con- the corresponding pin on the 8292. troller has not stopped sending ATN after SRQ Service Request receiving the TCT message for the time period ATNI Attention In specified by the Time Out Register. Each count in the Time Out Register is at least 1800 tCY. IFC Interface Clear After flagging the error, the 8292 will remain in a SYC System Controller Switch lOop" trying to take control until the current EOI End or Identify controller stops sending ATN or a "new com· mand is written by the microprocessor. If a new DAV Data Valid command is written, the 8292 will return to the REN Remote Enable loop after executing it. 6-391 AFN-00741D intJ 8292 TOUT2 Time Out Error 2 occurs when the transmission procedure while transferring control to another con- between the addressed talker and listener has troller. The 8292 will respond to this command only if it not started for the time period specified by the , is in the active state. ATNO will go high, and CIC will be Time Out Register. Each count in the Time Out high so that this 8292 will no longer,be driving the ATN Register is at least 45 tCY' This feature Is only line on the GPIB interface bus. TCI ,will be set upon enabled when the controller is In the CSBS completion. state. F2 - RST - Reset TOUT3 Time Out Error 3 occurs when the handshake signals are stuck and the 8292 is not succeed· This command has the same effect as asserting the ing in taking control synchronously for the time external reset on the 8292. For details, refer to the reset period specified by the Time Out Register. Each procedure described later. count in the Time Out Register is at least 1800 tCY' The 8292 will continue checking ATNI until F3 - RSTI - Reset Interrupts it becomes true or a new command is received. This command resets any pending interrupts and clears After performing the new command, the 8292 the error flags. The 8292 will not return to any loop it was will return to the ATNI checking loop. in (such as from the time out interrupts). USER User error occurs when request to assert IFC or REN was received and the 8292 was not the F4 - GSEC - Go To Standby, Enable Counting system controller. ' The function causes ATNO to go high and the counter will be enabled. If the 8292 was not the active controller, Error Mask Register this command will' exit Immediately. If the 8292 Is the USER ITOUT31 TOUT2 I TOUT, active controller, the counter will be loaded with the value stored In the Event Counter Register, and the internal interrupt will be enabled so that when the counter reaches zero, the SPI interrupt will be gener· The Error Mask Register is used to mask the Interrupt ated. SPI will be generated every 256 counts thereafter from a particular type of error. Each type of error inter· until the controller exits the standby state or the SPCNI rupt is enabled by setting the corresponding bit In the command is written. An initial count of 256 (zero in the Error Mask Register. This register can be read with the Event Counter Register) will be used If the WEVC RERM command and written with Ao low. command Is not executed. If the data transmission does not start, a TOUT2 error will be generated. Command Register F5 - EXPP - Execute Parallel Poll OP c c c c This command initiates a parailel poll by asserting EOI when ATN is already active. TCI will be set at the end of the command. The 8291 should be previously configured as a listener. Upon detection of DAV true, the 8291 enters Commands are performed by the 8292 whenever a byte ACDS and latches the parallel poll response (PPR) byte is written with Ao high. There are two categories of into its data in register. The master will be interrupted by commands distinguished by the OP bit (bit 4). The first the 8291 BI interrupt when the PPR byte is available. No category is the operation command (OP = 1). These ,interrupts except the IBFI will be generated by the 8292. commands Initiate some action on the interface bus. The 8292 will respond to this command only when it is"the The second category Is the utility commands (OP 0). = active controller. These commands are useq to aid the communication between the processor and the 8292. F6 - GTSB - Go To Standby If the 8292 is the active controller, ATNO will go high .then TCI will be generated. If the data transmission does OPERATION COMMANDS not start, a TOUT2 error will be generated. Operation commands initiate some action on the GPIB interface bus. It is using these commands that the F7 - SLOe - Set Local Mode control functions such as pOlling, taking and passing If the 8292 is the system controller, then REN will be assert- control, and system controller functions are performed. " ed false and TCI will be ,set true, If it is not the system controller, the User Error bit will be set in the Error Flag FO - SPCNI - Stop Counter Interrupts Register. This command disables the internal counter interrupt so that t~e 8292 will stop interrupting the master on event Fa - SREM - Set Interface To Remote Control counter underflows. However, the counter will continue This command will set REN true and TCI true if this 8292 is counting and its contents can stili be used. fhe system controller. If not, the User Error bit will be set in the Error Flag Register. F:I - GIDL - Go To Idle This command is used during the transfer of control 6-392 AFN-00741D 8292 F9 - ABORT - Abort All Operation, Clear Interface wait for at least 1.5 ,..sec. (T10) and then ATNO will go This command will cause IFC to be asserted true for at low. If DAV does not go low, a TOUT3 error will be least 100 ,..sec if this 8292 is the system controller. If it is generated. If the 8292 successfully takes control. it sets in CIOS, it will take control over the bus (see the TCNTR TCI true. command). FE - STCNI - Start Counter Interrupts FA - TCNTR - Take Control This command enables the internal counter interrupt. The transfer of control procedure is coordinated by the The counter is enabled by the GSEC command. master with the 8291 and 8292. When the master receives a TCT message from the 8291, it should issue the TCNTR command to the 8292. The following events occur to take control: 1. The 8292 checks to see if it is in CIOS, and if not, it UTILITY COMMANDS exits. All these commands are either Read or Write to registers 2. Then ATNI is checked until it becomes high. If the in the 8292. Note that writing to the Error Mask Register current controller does not release ATN for the time and the Interrupt Mask Register are done directly. specified by the Time Out Register, then a TOUT1 error is generated. The 8292 will return to this loop E1 - WTOUT - Write To Time Out Register after an error or any' command except the RST and The byte written to the data bus buffer (with Ao= 0) RSTI commands. following this command will determine the time used 3. After the current controller releases ATN, the 8292 for the time out function. Since this function is imple- will assert ATNO and CIC low. mented in software, this will not be an accurate time 4. Finally, the TCI interrupt Is generated to inform the measurement. This feature is enable or disable by the master that it is in control of the bus. Error Mask Register. No interrupts except for the IBFI will be generated upon completion. FC - TCASY - Take Control Asynchronously E2 - WEVC - Write To Event Counter TCAS transfers the 8292 from CSBS to CACS indepen- dent of the handshake lines. If a bus hang up is detected The byte written to the data bus buffer (with Ao= 0) (by an error flag), this command will force the 8292 to following this command will be loaded into the Event take control (asserting ATN) eveo if the AH function is Counter Register and the Event Counter Status for byte not in ANRS (Acceptor Not Ready State). This command counting or EOI counting. Only iBF'l will indicate should be used very carefully since it may cause the completion of this command. \ loss of a data byte. Normally, control should be taken synchronously. After checking the controller function E3 - REVC - Read Event Counter Status for being in the CSBS (else it will exit immediately), This command transfers the contents of the Event ATNO will go low, and a TCI interrupt will be generated. Counter into the data bus buffer. A TCI is generated when the data is available in the data bus buffer. FD - TCSY - Take Control Synchronously There are two different procedures used to transfer the E4 - RERF - Read Error Flag Register 8292 from CSBS to CACS depending on the state of the This command transfers the contents of the Error Flag 8291 in the system. If the 8291 is in "continuous AH Register into the data bus buffer. A TCI is generated cycling" mode (Aux. Reg. AO = A 1 = 1), then the when the data is available. following procedure should be followed: 1. The master microprocessor stops the continuous AH E5 - RINM - Read Interrupt Mask Register cycling mode in the 8291; This command transfers the contents of the Interrupt 2. The master reads the 8291 Interrupt Status 1 Mask Register into the data bus buffer. This register is Register; available to the processor so that it does not need to 3. If the END bit is set, the master sends the TCSY store this information elsewhere. A TCI is generated command to the 8292; when the data is available in the data bus, buffer. 4. If the END bit was not set, the master reads the 8291 Data In Register and then waits for another BI E6 - RCST - Read Controller Status Register interrupt from the 8291. When it occurs, the master This command transfers the contents of the Controller sends the 8292 the TCSY command. Status Register into the data bus buffer anda TCI inter- If the 8291 is not in AH cycling mode, then the master rupt is generated. just waits for a BI interrupt and then sends the TCSY command. After the TCSY command has been issued, E7 - RBST - Read GPIB Bus Status Register the 8292 checks for CSBS. If CSBS, then it exits the This command transfers the contents of the GPIB Bus routine. Otherwise, it then checks the DAV bit in the Status Register into the data bus buffer, and a TCI GPIB status. When DAV becomes false, the 8292 will interrupt is generated when the data is available. 6-393 AFN-007410 intJ 8292 E9 - RTOUT - Read Time Out Status Register With the first group, the TCI interrupt will be used to This command transfers the contents of the Time Out indicate that the requirEld response is ready in the data Status Register into the data bus buffer, and a TCI bus buffer and the master may continue and read it. interrupt is generated when the data is available. With the second group, the interrupt will be used to indicate completion of the required task, so that the EA - RERM - Read Error Mask Register master may send new commands. This command transfers the contents of the Error Mask The SPI should be used when immediate information or Register to the data bus buffer so that the processor special events is required (see the Interrupt Status does not need to store this information elsewhere. A TCI Register). interrupt is generated when the data is available. "POlling Status" Based Communication Interrupt Acknowledge When interrupt based communication is not desired, all interrupts can be masked by the interrupt mask register. SYC ERR SRO EV IFCR The communication with the 8292 is based upon sequential poll of the interrupt status register. By testing the OBF and IBF flags, the data bus buffer Each named bit in an Interrupt Acknowledge (lACK) status is determined while special events are deter· corresponds to a flag in the Interrupt Status Register. mined by testing the other bits. When the 8292 receives this command, it will clear the SPI and the corresponding bits in the Interrupt Status Receiving IFC Register. If not all the bits were cleared, then the SPI will The IFC pulse defined by the IEEE·488 standard\ is at be set true again. If the error flag is not acknowledged least 100 I'sec. In this time, all operation on the bus by the lACK command, then the Error Flag Register will should be aborted. Most important, the current control· be transferred to the data bus buffer, and a TCI will be ler (the one that is in charge at that time) should stop generated. sending ATN or EOt. Thus, IFC must externally gate CIC NOTE: XXXX1X11 is an undefined operation or utility (controller in charge) and ATNO to ensure that this command, so no conflict exists between the lACK occurs. operation and utility commands. Reset and Power Up Procedure After the 8292 has been reset either by the external reset pin, the device being powered on, or a RST command, SYSTEM OPERATION the following sequential events will take place: 8292 To Master Processor Interface 1. All outputs to the GPIB interface will go high (SRO, Communication between the 8292 and the Master ATNI, IFC, SYC, CLTH, ATNO, CIC, TCI, SPI, EOI, Processor can be either interrupt based communication OBFI, rEiFf, DAV, REV). or based upon polling the interrupt status register in 2. The four interrupt outputs (TCI, SPI, OBFI, IBFI) and predetermined intervals. CLTH output will go low. 3. The following registers will be cleared: Interrupt Based Communication Interrupt Status Four different interrupts are available from the 8292: Interru pt Mask OBFI Output Buffer Full Interrupt Error Flag Error Mask IBFI Input Buffer Not Full Interrupt Time Out' TCI Task Completed Interrupt Event Counter (= 256), Counter is disabled. SPI Special Interrupt 4. If the 8292 is the system controller, an ABORT Each of the interrupts is enabled or disabled by a bit in command will be executed, the 8292 will become the the interrupt mask register. Since OBFI and IBFI are controller in charge, and it will enter the CACS state. directly connected to the OBF and IBF flags, the master If it is not the system controller, it will remain in can write a new command to the input data bus buffer CIDS. as soon as the previous command has been read. The TCI interrupt is useful when the master is sending System Configuration commands to the 8292. The pending TCI will be cleared The 8291 and 8292 must be interfaced to an IEEE·488 with each new command written to the 8292. Commands bus meeting a variety of speCifications including drive sent to the 8292 can be divided into two major groups: capability and loading characteristics. To interface the 1. Commands that require response back from the 8292 8291 and the 8292 without the 8293's, several external to the master, e.g., reading register. gates are required, using a configuration similar to that 2. -Commands that initiate some action or enable used in Figure 5. features but do not require response back from the 8292, e.g., enable data bus buffer interrupts. 6-394 AFN·00741D intJ 8292 GPIB TRANSCEIVERS EOI NOTE 1 38 EOI riR2 I ATN J T··7K 3b ATN REN I NOTE2Q PROCESSOR BUS I '::' INTERRUPT WR AD RST ClK ADD D~A DMA NDAC I.. 3c NDAC Ir DRE:~1 IFC '::' ~DACK NRFD 3d NRFO Tflf, ~-~\IDATA -'" ...... ADIO ~ "" r----I!:~I RSo 45 010 ~ r----I~I RS, DAV r----I~I RS, r----I~IClOCK I----I~I RESET r----I~IAD I----I~IWR r-----1'NT Os L. 2. ATN r- I- ClTH -" DATA ATNO Ao CIC Os AD ~ WR SPI RESET EOl2 1d EOI 8292 ATNI x, aT x, IFC SYC 1a IFe ± . ~ ~ DAV REN NOTES, EA 1. CONNECT TO NDAC FOR BYTE COUNT OR TO EOI .::j,:. SRO FOR BLOCK COUNT 1c SRQ 2. GATE ENSURES OPEN COUNT T 1'7K T, COLLECTOR OPERATION 55 IFCl DURING PARALLEL POLL'. To SYSTEM CONTROllER ON~ SWITCH OFFl Figure 4. 8291 and 8292 System Configuration 6-395 AFN-007410 8292 TO MICROPROCESSOR ~ 25 ~ 00 0101* .E.. 28 0101 0101 t-E- 01 0102 2. 23 0102 0102" .1!!.. ~ 02 0103 30 10 0103 0103* .1!!.. ~ 03 0104 31 9 0104 0104" .!2... 16 04 32 8 17 0105 0105 0105* ~ TO 05 IEEE·488 33 7 18 06, 0106 0106 0106" .!2... BUS 19 34 6 07 0107 0107 0107" .1!!.. 21 8291 35 5 8293 RSO DlOa 0108 0108" .1!!.. 22 RS1 1 1 23 T/R1 TfFi1 RS2 • AD 10 DAV EOI 36 39 24 3 OAV EOI DAV· 1.:... WR 4 26 4 TO RESET ATN ATN 6 27 MICROPROCESSOR OREO SRO 7 OACK - 24 8 IFC Cs 38 3 NOAC CLOCK 37 11 NRFD INT 2 ---.!2. ATNO T/R2 OPTA E-VC GPI B TRIGGE R 5 TRIG REN ~ r- ,--3.. IFCL OPTB ~Vc OUTPUT MODE 3 ..E.. DO OAV rE- r-!-4 TiFh ~ 01 ATN ~ 02 10 NOAC NDAC ~ ~16 03 9 NFRo NRFO r!Z- 04 2 17 TlR2 05 21 8 - 18 06 SRO SRO SRO" .1!!.. TO 19 38 6 I EEE·488 07 REN REN REN" .1!!.. I • 8 AO 8292 - IFC 23 5 IFC -- 8293 IFC" E... BUS AO AfNO 29 23 ATNO ATN* .1!!.. 10 WR EOI" .1!!.. 39 3 COUNT EOI -t> 4 6 RESETtt Cs EOl2 34 7 11 EOl2 32 22 TCI ATNI ATNI TO 33 SPI MICROPROCESSOR 35 OSCILLATO R 1 36 11 SYNC OBFI IBF] OUTPU T VCC-2. SS 1 25 iFcl IFCL ~ x,t r 31 24 CIC CIC ~1 x,t CLTH 27 21 CLTH OPTA .E.... Vs 22 Uc.i 24 EA SYC SYC OPTB ~V CC \ 15.25 PF ± MODE2 ON SYSTEM CONTROLLER OFF SWITCH "= GPIB BUS TRANSCEIVER '=SEE 8041A DATA SHEET FOR ALTERNATE CRYSTAL CONFIGURATIONS tt = CAN CONNECT TO SYSTEM RESET SWITCH, SEE 8041A DATA SHEET Figure 5. 8291,8292, and 8293 System Configuration 6-396 AFN-Q07410 inter 8292 ABSOLUTE MAXIMUM RATINGS· *NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the Ambient Temperature Under Bias ......... O·C to 70·C device. This is a stress rating only and functional opera- Storage Temperature ............. -65·C to +150·C tion of the device at these or any other conditions above Voltage on Any Pin With Respect those indicated in the operational sections of this specifi- to Ground ........................... 0.5V to + 7V cation is not implied. Exposure to absolute maximum Power Dissipation ......................... 1.5 Watt rating conditions for extended periods may affect device reliability. D.C. CHARACTERISTICS (TA = o·c to 70·C, Vss = OV: 8292, Vee = ±5V ±10%) Symbol Parameter Min. Max. Unit Test Conditions VILl Input Low Voltage (All Except Xl, X2, RESET) -0.5 0.8 V VIL2 Input Low Voltage (Xl, X2, RESET) -0.5 0.6 V V IHl Input High V.oltage (All Except Xl. X2, RESET) 2.2 Vcc V VIH2 Input High Voltage (Xl. X2, RESET) 3.8 Vcc V VOL1 Output Low Voltage (00-07) 0.45 V IOL=2.0 mA VO L2 Output Low Voltage (All Other Outputs) 0.45 V 10L= 1.6 mA VOHl Output High Voltage (00-07) 2.4 V 10H= -400 "A VOH2 Output High Voltage (All Other Outputs) 2.4 V 10H= -50 "A IlL Input Leakage Current (COUNT, IFCL, RD, WR, CS, A~ ±10 ,.A Vss" VIN " Vcc loz Output Leakage Current (00-07, High Z State) ±10 ,.A Vss + 0.45" VIN" Vcc ILll Low Input Load Current (Pins 21-24, 27-38) 0.5 mA VIL =0.8V IU2 Low Input Load Current (RESET) 0.2 mA VIL =0.8V Icc Total Supply Current 125 mA Typical =65 mA IIH Input High Leakage Current (Pins 21-24, 27-38) 100 /LA "IN = Vee CIN Input Capacitance 10 pF CliO 1/0 Capacitance 20 pF A.C. CHARACTERISTICS (TA = ODC to 70DC, vss = OV: 8292, Vee = +5V ±10%) DBB READ Symbol Parameter Min. Max. Unit Test Conditions tAR CS, Ao Setup to Rm 0 ns tRA CS, Ao Hold After ROt 0 ns tRR RD Pulse Width 250 ns tAD CS, Ao to Data Out Delay 225 ns = CL 150 pF t RO RD~ to Data Out Delay 225 ns CL= 150 pF tOF 'ROt to Data Float Delay 100 ns tCY Cycle Time 2.5 15 lis DBBWRITE Symbol Parameter Min. Max. Unit Test Conditions tAW tWA CS, Ao Setup to WR~ CS, Ao Hold After WRt 0 0 ns ns . tww WR Pulse Width 250 ns tow Data Setup to WRf 150 ns two Data Hold After WR~ 0 ns 6-397 AFN·007410 intJ 8292 COMMAND TIMINGS[1 ,3] Execullon Code Name Time IBFII TCI121 SPI ATNO CIC IFC REN EOI DAV Comments El WTOUT 63 24 E2 WEVC 63 24 E3 REVC 71 24 51 E4 RERF 67 24 47 E5 RINM 69 24 49 E6 RCST 97 24 77 E7 RBST 92 24 72 E8 E9 RTOUT 69 24 49 EA RERM 69 24 49 FO SPCNI 53 24 Count Stops After 39 Fl GIOl 88 24 70 161 161 F2 RST 94 24 152 Not System Controller F2 RST 214 24 192 152 1179 1174 1101 System Controller F3 RSTI 61 24 F4 GSEC 125 24 107 198 153 155 F5 EXPP 75 24 159 157 F6 GTSB 118 24 100 191 F7 SlOC 73 24 55 146 F8 SREM 91 24 73 164 F9 ABORT 155 24 133 1120 1115 142 FA TCNTR 108 24 86 171 168 FC TCAS 92 24 67 155 FD TCSY 115 24 91 180 FE STCNI 59 24 Starts Count After 43 PIN RESET 29 - 17 17 Not System Controller X lACK 116 - 173 198 If Interrupt Pending Notes: 1. All times are multiples of ICY from the 8041A command Interrupt. 2. TCI clears after 7 tCY on all commands. 3. t indicates a level transition from low to high, ~ indicates a high to low transition. A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT 'lCL DEVICE UNDER TEST -::- A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND a 45V FOA A LOGIC 0 TIMING MEASUREMENTS ARE MADE AT 20V fiOR A LOGIC 1 AND 0 BY FOR A LOGIC 0 CL INCLUDES JIG CAPACITANC~ 6-398 AFN-007410 8292 CLOCK DRIVER CIRCUITS CRYSTAL OSCILLATOR MODE DRIVING FROM EXTERNAL SOURCE + 5V < 15 pF r-----~ : I 1·6 mHz XTAl1 4709 (INCLUDES XTAL, =*= ~ }>--+-----=-j XTAl1 SOCKET, STRAY) I I +5V ~_____ 3 XTAl2 470~} 15-25pF (INCLUDES SOCKET, STRAY) I-=- "---+--'1 XTAL2 BOTH XTAl1 AND XTAL2 SHOULD BE DRIVEN CRYSTAL SERIES RESISTANCE SHOULD BE RESISTORS TO Vee ARE NEEDED TO ENSURE VIH = 3 8V <759 AT 6 MHz, <180Q AT 3 6 MHz IF TTL CIRCUITRY IS USED LC OSCILLATOR MODE . --'=- ...f... ~;=~m' 45"H 20pF 120"H 20pF XTAL1 C'= ~~ 3Cpp riC L" 2 2 -=- C Cpp;:: 5 -10 pF PIPII TO PIN 3 XTAL2 CAPACITANCE EACH C SHOULD BE APPROXIMATEl Y 20 pF. INClUOING STRAY CAPACITANCE WAVEFORMS READ OPERATION-DATA BUS BUFFER REGISTER CS OR Ao (SYSTEM'S ADDRESS BUS) I----'oo----II----,'ov----I iffi (READ CONTROL) ~'" -~ ~r---------!-'OF-I ~~~~:~;, ----------_~~. -r~----------- _ _ _ _D_A_T_A_V_A_Ll_D_ _ _ WRITE OPERATION - DATA BUS BUFFER REGISTER CSORAO~ (SYSTEM'S ADDRESS BUS) 'r '-_ _ _ _ _ _ _ _ _ _ __ -".-~1'=___-.'W_W~.~+'WA- WR (WRITE CONTROL) 'WO -tow-- - DATA BUS DATA \J DATA VALID FJ DATA (INPUT) _ _ _...;M;;;A...;Y...;C;;,H;;,A;;,;N;;;G;;,E_ _ _..JI'l.,..._______~It\'-----M...;A...;Y...;C...;H...;A...;N;,:G;;;E_ _ _ __ 6-399 AFN-00741D 8292 APPENDIX mabie Instrumentation, IEEE Std. 488·1978. This docu· ment Is the official standard forthe GPIB bus and can be The following tables and state diagrams were taken purchased from IEEE, 345 East 47th St., New York, NY from the IEEE Standard Digital Interface for Program· 10017. C MNEMONICS Messages Interface States pon = power on CIOS = controller idle state rsc = request system control CADS = controller addressed state rpp = request parallel poll CTRS = controller transfer state gts = go to standby CACS = controller active state tca = take control asynchronously CPWS = controller parallel poll wait state tcs = take control synchronously CPPS = controller parallel poll state sic = send interface clear CSBS = controller standby state sre = send remote enable CSHS = controller standby hold state IFC = interface clear CAWS = controller active wait state ATN = attention CSWS = controller synchronous wait state TCT = take control CSRS = controller service requested state CSNS = controller service not requested state SNAS = system control not active state SACS = system control active state SRIS = system control remote enable idle state SRNS = system control remote enable not active state SRAS = system control remote enable active state SIIS = system control interface clear Idle state SINS = system control interface clear not active state SIAS ,; ~ystem control interface clear active state (ACOS) = accept data state (AH function) (ANRS) =acceptor not ready state (AH function) (SOYS) = source delay state (SH function) (STRS) =source transfer state (SH function) (TAOS) "talker addressed state (T function) ''''--''':=='--- (§ill) e CTRS ~Q O~ SRO TCTA~ A I~I ICSI\~ rppl\~A~ (So ~ ·Tl0>15Ilsec t THE MICROPROCESSOR MUST WAIT FOR THE 80 INTERRUPT BEFORE WRITING THE Gr58 OR GSEC COMMANDS TO ENSURE THAT (mtA~) IS TRUE. Figure A.1. C State Diagram 6-400 AFN-Q07410 8292 REMOTE MESSAGE CODING Bus Signal Llne(s) and Coding That Asserts the True Value of the Message C T L o 0 NN Y A I I ORO A E SIR P S o 0 AFA T o R F E Mnemonic Message Name E S 8 7 6 5 4 3 2 1 VOC N I Q C N ACG Addressed Command Group M AC Y 0 0 0 X X X X XXX x X X X ATN Attention U UC X X X X X X X X XXX 1 X X X X DAB Data Byte (Notes 1,9) M DD D D D D D D D 0 XXX 0 X X X X 876 543 2 1 DAC Data Accepted U HS X X X X X X X X XXO X X X X X DAV Data Valid U HS XXXXXXXX 1XX X X X X X DCL Device Clear M UC Y 0 0 1 0 1 0 0 XXX 1 X X X X END End U ST X X X X X X X X XXX o 1 X X X EOS , End of String (Notes 2, 9) M DO E E E E E E E E XXX o X X X X 876 5 4 3 2 1 GET Group Execute Trigger M AC Y 0 0 0 1 0 0 0 XXX X X X X GTL Go to Local M AC Y 0 0 0 0 0 0 1 XXX 1 X X X X IDY , Identify U UC X X X X X X X X XXX X 1 X X X IFC Interface Clear U UC X X X X X X X X XXX X X X 1 X LAG Listen Address Group M AD Y 0 1 X X X X X XXX 1 X X X X LLO Local Lock Out M UC Y 0 0 1 0 0 0 1 XXX X X X X MLA My Listen Address (Note 3) M AD Y 0 1 L L L L LXXX X X X X 5 4 321 MTA My Talk Address (Note 4) M AD Y 0 T T T T T XXX X X X' X 5 4 321 MSA My Secondary Address (Note 5) M SE Y S S S S S XXX X X X X 5 4 321 NUL Null Byte M DO o 0 0 0 0 0 0 0 XXX X X X X X OSA Other Secondary Address M SE (OSA = SCG 1\ MSA) OTA Other Talk Address M AD (OTA=TAG I\MTA) PCG Primary Command Group M (PCG = ACG v UCG v LAG v TAG) PPC Parallel Poll Configure M AC Y 0 0 0 0 1 0 1 XXX 1 X X X X PPE Parallel Poll Enable (Note 6) M SE Y 1 1 0 S P P P XXX 1 X X X X 321 PPD . Parallel Poll Disable (Note 7) M SE Y o 0 0 0 XXX X X X X 432 1 PPR1 Parallel Poll Response 1 u ST X X X X X X X 1 XXX X X X PPR2 Parallel Poll Response 2 U ST X X X X X X 1 X XXX X X X PPR3 Parallel Poll Response 3 U ST X X X X X 1 X X XXX X X X PPR4 Parallel Poll Response 4 (Note 10) U ST X X X X 1 X X X XXX XXX PPR5 Parallel Poll Response 5 U ST X X X 1 X X X X XXX X X X PPR6 Parallel Poll Response 6 U ST X X 1 X X X X X XXX X X X PPR7 Parallel Poll Response 7 U ST X X X X X X X XXX X X X PPR8 Parallel Poll Response 8 U ST 1 X X X X X X X XXX X X X PPU Parallel Poll Unconfigure M UC Y 0 0 1 0 1 0 1 XXX 1 X X X X REN Remote Enable U UC X X X X X X X X XXX X X X X 1 RFD Ready for Data U HS X X X X X X X X XOX X X X X X ROS Request Service (Note 9) U ST X 1 X X X X X X XXX o X X X X SCG Secondary Command Group M SE Y 1 1 X X X X X XXX 1 X X X X SDC Selected Device Clear M AC Y 0 0 0 0 1 0 0 XXX 1 X X X X SPD Serial Poll Disable M UC Y 0 0 1 1 0 0 1 XXX 1 X X X X SPE Serial Poll Enable M UC Y 0 0 1 1 0 0 0 XXX 1 X X X X SRO Service Request U ST X X X X X X X X XXX X X 1 X X STB Status Byte (Notes 8, 9) M ST S X S S S S S S XX X o X X X X 8 654321 TCT Take Control M AC Y 0 0 0 1 0 0 1 XXX X X X X TAG Talk Address Group M AD Y 1 0 X X X X X XXX X X X X UCG Universal Command Group M UC Y 0 0 1 X XX X XXX X X X X UNL Unlisten M AD Y 0 1 1 1 1 1 1 XXX X X X X UNT Untalk (Note 11) M AD Y 1 0 1 1 1 1 1 XXX X X X X The 1/0 coding on ATN when sent concurrent with multiline messages has been added to this revision for interpre- tive convenience. 6-401 AFN-00741D 8292 NOTE8: 1. 01-08 spec:;ify the device dependent data bits. 2. E1-E8 specify the device dependent code used to indicate the E08 message. 3. L1-L5 specify the device dependent bits of the device's listen address. 4. T1-T5 specify the device dependent bits of the device's talk address. 5. 81-85 specify the device dependent bits of the device's secondary address. 6. 8 specifies the sense of the PPR. Response = 8 E!:> ist P1-P3 specify the PPR message to be sent when a parallel poll is executed. P3 P2 P1 PPR Message o 0 0 PPR1 PPR8 7. 01-04 specify don't-care bits that shall not be decoded by the receiving device. It is recommended that all zeroes be sent. 8. 81-86, 88 sRecify the device dependent status. (0107 is used for the RQ8 message.) 9. The source of the message on the ATN line is always the C function, whereas the messages on the 010 and EOI lines are enabled by the T function. . 10. The source of the messages on the ATN and EOI lines is always the C function, whereas the source of the messages on the 010 lines is always the PP function. 11. This code is provided for system use, see 6.3. 6-402 AFN-00741D 8293 GPIB TRANSCEIVER • Nine Open-collector or Three-state • On-chip Decoder for Mode Line Drivers Configuration • 48 mA Sink Current Capability on • Power Up/Power Down Protection to Each Line Driver Prevent Disrupting the IEEE Bus • Nine Schmitt-type Line Receivers • Connects with the 8291A and 8292 to Form an IEEE Standard 488 Interface • High Capacitance Load Drive Talker/Listener/Controller with no Capability Additional Components • Single 5V Power Supply • Only Two 8293's Required per GPIB Interface • 28-Pin Package • Low Power HMOS Design • On-Chip IEEE-488 Bus Terminations The Intel® 8293 GPIB Transceiver is a high-current, non-inverting buffer chip designed to interface the 8291A GPIB Talker/Listener, or the 8291 A/8292 GPIB Talker/Listener/Controller combination, to th~ IEEE Standard 488-1978 Instrumen- tation Interface Bus. Each GPIB interface would contain two 8293 Bus Transceivers. In addition, the 8293 can also be used as a general-purpose bus driver. r--- I I DMA = DREO 8291A 8292 GPIB I CONTROLLER I TALKER! GPIB T/Fh vee I (OPTIONAL) I LI!;TENER CONTROLLER T/R2 OPTA L ______ I EOI T/R1 GENERAL PURPOSE INTERFACE BUS . Figure 1. 8291A, 8292, 8293 Block Diagram Figure 2. Pin Configuration 6-403 8293 Table 1. Pin Descrlptlo,n Symbol Pin No. Type Name and Function Symbol Pin No. Type Name and Function BUS1- 12,13, I/O GPIB Lines, GPIB Side: These are EOI 3 I/O End Or Identify: This pin indicates BUS9 15-19, the IEEE-488 bus interface the end of a multiple by1e transfer or, 21,22 driver/receivers, or TTL-compatible in conjunction with ATN, addresses inputs on the 8291A/8292 side, the device during a polling se- depending on the mode used. Their quence. It connects to the 8291 A and use is programmed by the two mode is switched between transmit and select pins, OPTA and OPTB. receive by T/R2. This pin is TTL com- patible. DATA1- 5-11, I/O GPIB Lines, 8291A192 Side: These DATAl 0 23-25 ATN 4 0 Attention: This pin is used by the are the pins to be connected to the 8291A to monitor the GPIBATN con- 8291 A and 8292 to interface with the trol line. It specifies how data on the GPIB. The.r use is programmed by 010 lines is to be interpreted. This the two mode select pins, OPTA and output is TTL compatible. OPTB.AII these pinsareTTL compa- tible. OPTA 27 I Mode Select: These two pins are to T/Rl 1 I transmit Receive 1: This pin con- OPTB 26 I control the function of the 8293. A trols the direction for NDAC, NRFD, truth table of how they program the DAV, and 0101-0108. Input is TTL various modes is in Table 2. compatible. Vee 28 P.S. Voltage: Positive power supply (5V ± 10%). T/R2 2 I Transmit Receive 2: This pin con- trols the direction for EOI. Input is GND 14, 20 P.S. Ground: Circuit ground. TTL compatible. -- Table 2. 8293 Mode Selection Pin Mapping IEEE Implementation Name Pin Name PinNa. Mode 0 Model Mode 2 Mode 3 oPTA 27 0 1 0 1 OPTB 26 0 0 1 1 DATAl 5 iFC DIOS IFC DIOS BUSl 12 I IFC" DIOS" IFC* DIOS" DATA2 6 REN 0107 REN 0107 BUS2 13 REN* 0107* REN* 0107* DATA3 7 NC 0106 - EOl2 0106 BUS3 15 EOI" 0106* EOI* 0106* DATA4 S SRO 0105 SRO 0105 BUS4 16 SRO* 0105* SRO* 0105" OATA5 9 NRFO 0104 NRFO 0104 BUSS 17 NRFO* 0104* NRFO* 0104* OATA6 10 NOAC 'Oi03 NOAC 0103 BUS6 lS NOAC* 0103* NOAC* 0103" DATA7 11 TlRIOl NC ATNI ATNO OATAS 23 T/R102 0102 ATNO 0102 BUS7 19 ATN* 0102* ATN* 0102* OATA9 24 GIOl OAV 'CiC OAV BUSS 21 G101* OAV* CLTH OAV* OATA10 25 GI02 0101 IFCL 0101 BUS9 22 G102* 0101* SYC 0101* T/Rl 1 T/Rl T/Rl T/Rl TlRl T/R2 2 T/R2 NC T/R2 IFCL EOI 3 EOI EOI 'EOT EOI ATN 4 AfN ATN A'iiir ATN * Note: These pins are the IEEE-488 bus non·inverting driver/receivers. They include all the bus terminations required by the Standard and may be connected directly to }he GPtB bus connector. 6-404 AFN-00825C inter 8293 GENERAL DESCRIPTION MODEO The 8293 is a bidirectional transceiver. It was designed to 27 interface the Intel 8291A GPIB Talker/Listener and the OPTA 26 Intel® 8292 GPIB Controller to the IEEE Standard 488-1978 OPTB Instrumentation Bus (also referred to as the GPIB). The THREE 24 STATE ONLY GI01 GIO,' Intel GPIB Transceiver meets or exceeds all of the elec- 21 11 trical specifications defined in the IEEE Standard 488- TIRIO, THREE 1978, Section 3.3-3.5, including the bus termination 25 STATE ONLY GI02 GI02* specifications. 23 22 TIRIO, The 8293 can be hardware programmed to one of four INPUT ONLY modes of operation. These modes allow the 8293 to be iFc IFC' 12 configured to support both a Talker/Listener/Controller environment and a Talker/Listener environment. In addi- ffi INPUT ONLY REN' tion, the 8293 can be used as a general-purpose, three- 13 state (push-pull) ot open-collector bus transceiver with INPUT ONLY nine receiver/drivers. Two modes each are used to support ill ATN' 19 a Talker/Listener (see Figure 3) and a Talker/Listener/Con- OPEN COL troller environment (see Figure 4). Mode 1 is used in OUTPUT ONLY SRo SRo' general-purpose environments. 16 THREE STATE ONLY Eoi EOI' 1S Tl1i2 9 NRFo NRFD' 17 10 NOAC NDAC· 18 Tlr" 8291A TO PROCESSOR TIC 1 =THREE STATE 0= OPEN COLLECTOR ~ =+SV BUS L-_ _-' SIR 1= SEND TO GPIB 0= RECEIVE FROM GPIB ~ =OV • = IEEE-488 BUS NON·INVERTING DRIVERIRECEIVER Figure 5. Talker/Listener Control Configuration Table 3. Mode 0 Pin Description Figure 3. Talker/Listener Configuration Pin Symbol No. Type Name and Function T/R1 1 I Transmit Receive 1 Direction control forNDACand NRFD.lfT/R1 ishigh, then NDAC' and NRFD' are receiving. Input is TIL compatible. NDAC 10 I/O Not Data Accepted: Processor GPIB bus handshake control line; used to in- dicate the condition of acceptance of data by device(s). It is TIL compatible. NDAC' 18 I/O Not Data Accepted: IEEE GPIB bus handshake control line. When an input, it is a TIL comPatible Schmitt-trigger. When an output, it is an open-collector driver with 48 rnA sinking capability. TO PROCESSOR NRFD 9 I/O' Not Ready For Data: Processor GPIB BUS handshake control line; used to indicate the condition of readiness of device(s) GPIB to accept data. This pin is TIL compati- ble. Figure 4. Talker/Listener/Controller Configuration 6-405 AFN-00825C inter 8293 Table 3. Mode 0 Pin Description (Continued) Pin Pin Symbol No. ~pe Name and Function Symbol No. ~pa Name and Function NRFD' 17 I/O Not Ready For Data: IEEE GPIB bus IFC' 12 I Interface Clear: IEEE GPIB bus control handshake control line. When an input, line. This input is a TTL compatible it is a TTL compatible Schmitt-trigger. Schmitt-trigger. When an output, it is an open-collector T/RIOl 11 I Transmit Receive General 10: Direc· driver with a 48 mA current sinking T/R102 23 I tion control for the two spare trans- capability. ceivers. These pins are TTL compatible, T/R2 2 I Transmit Raeelve 2: Direction control GIOl 24 General 10: This is the TTL side of the I/O for EOI. If T/R2 is high, EOI' is sending. GI02 25 two spare transceivers. These pi ns are I/O Input is TTL compatible. TTL compatible. EOI 3 I/O End Or Idantlfy: Processor GPIB bus General 10: These are spare three- GI01' 21 I/O control line; is used by a talker to indi- GI02' 22 I/O state (push-pull) drivers/Schmitt-trigger cate the end of a multiple byte transfer. receivers. The drivers can sink 48 rnA. This pin is TTL compatible. EOI' 15 I/O End O,r Identify: IEEE GPIB bus control line; is used by a talkeno indicate the end of a multiple byte transfer. This pin is MOOE1 a three-state (push-pull) driver capable of sinking 48 rnA and a TTL compatible receiver with hysteresis. SRO 8 I Service Request: Processor GPIB bus contrililine; used by a device to indicate 24 liAV the need for service and to request an interruption of the current sequence of T/ft1 events on the GPIB. It is a TTL compati- 22 25 0101' ble input. DIOt SRO' 18 0 Service Request: IEEE GPIB bus con- trol line; it is an open collector driver 23 11 0iQ, 0102' capable of sinking 48 rnA. REN 6 0 Remote Enable: Processor GPIB bus 10 18 control line; used by a controller (in con- mo, 0103' Junction with other messages) to select between two alternate sources of device 17 programming data (remote or local con- llm4 D104- trol). This output is TTL compatible. REN' 13 I Remote Enable: IEEE GPIB bus control mo, 16 0105' line. This input is a TTL compatible Schmitt-trigger. 15 ATN 4 0 Attention: Processor GPIB bus control DIOo 0106' line; used by the 8291 to determine how data on the 010 signal lines are to be 13 interpreted. This is a TTL compatible !iT/), 0107' output. ATN' 19 I Attention: IEEE GPIB bus control Ime; 12 mlJa 0108· this input is a TTL compatible Schmltt- trigger. m IFC 5 0 Intarface Clear: Processor GPIB bus EOi control line; used by a controller to place the interface system into a known quiescent state. It is a TTL compatible output. Figure 6. Talker/Listener Data Configuration 6-406 AFN.()()82SC inter 8293 Table 4. Mode 1 Pin Description MODE2 Pin 27 OPTA Symbol No, Type Na,"e and Function 26 OPTB T/R1 1 I Transmit Receive 1: Controls the di- 18 rection for OAV and the 010 lines. If NDAC NDAC' T/~1 is high, then all these lines are sending information to the IEEE GPIB 17 lines, This input is TTL compatible. RII1'!i NRFD" EOI 3 I End Of Sequence And Attention: Tlftl ATN 4 I Processor GPIB control lines. These 12 IFe' II"<:: two control signals are AN Oed to- gether to determine whether all the SYC transceivers in the 8293 are three- lfEfI 13 REN" state (push-pull) or open-collector. When both signals are low (true), then the controller is performing a 16 SRQ SRQ' parallel poll and the transceivers are all open-collector. These inputs are TTL compatible. nNi 19 ATN. OAV 24 1/0 Data Valid: Processor GPIB bus A'm handshake control line; used to indi- cate the condition (availability and EOi2 I. EOI' validity) of information on the 010 AfI'Ilj lines. It is TTL compatible. OAV" 21 1/0 Data Valid: IEEE GPIB bus hand- EOi shake control line. When an Input, it TIR2 is a TTL compatible Schmitt-trigger. When OAV" is an output, it can sink 48 mA. 0101- 25,23, 1/0 Data Input/Output: Processor GPIB i5i08 10, 9, bus data lines; used to carry message 8, 7, and data bytes in a bit-parallel byte- 6, 5 serial form controlled by the three NOTE. FUNCTION OF ATN TRANSCEIVER handshake signals. These lines are TTL compatible. S/R=LDW SIR=HIGtt nNi=ATN" nNi=Amll 0101"- 22,19, 1/0 Data Input/Output: IEEE GPIB bus A'm=ATN" ATN=HIGH 0108" 18,17, data lines. They are TTL compatible ATN' = INPUT ATN' =ATNO ATNO=INPUT ATNO=INPUT 16,15, Schmitt-triggers when used for In- 13,12 put and can sink 48 m'A when used for output. See ATN and EOI deSCrip- Figure 7. Talker/Listener/Controller Control tion for output mode. Configuration 6-407 AFN-00825C 8293 Table 5. Mode 2 Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. ~pe Name and Function T/R1 1 I Transmit Receive 1: Direction control CLTH 1 21 I Clear Latch: Used to clear the IFC Re- for NOAC and NRFO. If T/R11s high. then ceived latch after it has been recognized NOAC and NRFO are receiving. Input is by the 8292. Normally low (except after a TTL compatible. hardware reset). It will, be pulsed high NOAC 10 I/O Not Data Accepted: Processor GPIB when IFC Received is recognized by the bus handshake control line; used to in- 8292. This input is TTL compatible. dicate the condition of acceptance of IFCL 25 0 IFC Received Latch: The 8292 moni- data by device(s). This pin is TTL com- tors the IFC line when it is not the active patible. controller through this pin. NOAC' 18 I/O Not Data Accepted: IEEE GPIB bus SRO 8 I/O Service Request: Processor GPIB con- handshake control line. It is a TTL com- troillne; indicates the need for attention patible Schmitt-trigger when used for and requests the active controiler input and an open-collectordnverwith a to interrupt the current sequence of 48 mA current sink capability when used events on the GPIB bus. This pin is TTL for output. compatible. tmFl5 9 1/0 Not Ready For Data: Processor GPIB SRO' 16 I/O Service Request: IEEE GPIB bus con- bus handshake control line; used to in- trolline. When used as an input. this pin dicate the condition of readiness of de- is a TTL compatible Schmitt-trigger. vice(s) to accept data. This pin is TTL When used as "In output. it is an open- compatible. collector driver with a 48 mA current sinking capability. NRFO' 17 I/O Not Ready For Data: IEEE GPIB bus' handshake control line. It is a TTL com- T/R2 . 2 I Trensmlt Receive 2: Controls the di- patible Schmitt-trigger when used for rection for EOL This input is TTL com- input and an open-collector driver with a patible. 48 mA current sink capability when used ATNO 23 I Attention Out: Processor GPIB bus for output. control line; used by the 8292 for ATN SYC1 22 I System Controller: Used to monitor the control of the IEEE bus during "take system controller switch and control the control synchronously" operations. A • direction for IFC and REN. This pin is a low on this input causes ATN to be as- TTL compatible input. serted if CIC indicates that this 8292 is in charge. ATNO is a TTL compatible input. REN 6 I/O Remote Enable: Processor GPIB con- trol line; used by the active controller ATNI 11 0 Attention In: Processor GPIB bus con- (in conjunction with other messages) troillne; used by the 8292 to monitor the to select between two alternate sources ATN line. This output is TTL compatible. of device programming data (remote or ATN 4 Attention: Processor GPIB bus control 0 local contrOl). This pin is TTL com- line; used by the 8292 to monitor the ATN patible. line. This output is TTL compatible. REN' 13 I/O Remota Enable: IEEE GPIB bus control ATN' 19 Attention: IEEE GPIB bus control line; I/O line. When used as an input. this is a TTL used by a controller to specify how data compatible Schmitt-trigger. When an on the 010 signal lines are to be inter- output. it is a three-state driver with a 48 preted and which devices must respond mA current sinking capability. to data. When used as an output. this pin IFC 5 1/0 Interface Clear: Processor GPIB bus is a three-state driver capable qf sinking control line; used by the active con- 48 mA current. As an input. it is a TTL troller to place the interface system into compatible Schmitt-trigger. a known quiescent state. This pin Is TTL E0l2 7 1/0 End Or Identify 2: Processor GPIB bus compatible. control line; used in conjunction with IFC' 12 I/O Interface Clear: IEEE GPIB control ATN by the active controller (the 8292) to line. This IS a TTL compatible Schmitt- execute a polling sequence. This pin Is trigger when used for input and a three- TTL compatible. state dnver capablll of sinking 48 mA EOI 3 I/O End Or Identify: Processor GPIB bus current when used for output. control line; used by a talker to Indicate CIC 24 I Controller In Charge: Used to control the end of a multiple byte transfer se- the direction of the SRO and to indicate quence. This pin is TTL compatible. that the 8292 is in charge of the bus. CiC NOTES: is a TTL compatible input. 1. VIL3ls guaranteed atl.1V on these inputs to accommodate the high c\Jrrent-80urcing capability of these pins during a low input in Mode 2. 6-408 AFN.00B25C inter 8293 Tabl, 5. Mode 2 Pin Description (Continued) Table 6. Mode 3 Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function EOI' 15 I/O End Or Identify: IEEE GPIB bus control T/Rl 1 I Transmit Receive 1: Controls the di- line; used by a talker to indicate the end rection for DAV and the 010 lines. If of a multiple by1e transfer sequence or. TiRl is high, then all these lines are by a controller in conjunction with ATN. sending information to the IEEE GPIB to execute a polling sequence. When an lines. This input is TTL compatible. output, this pin can sink 48 mA current. EOI I 3 End Of Sequence and Attention: When an input, it is a TTL compatible ATN I 4 Processor GPIB control lines. These Schmitt-trigger. two control lines are ANDed together to determine whether all the trans- ceivers in the 8293 are push-pull or open-collector. When both signals ~ OPTA are low (true), then the controller is performing a parallel poll and the fro: OPTS transceivers are all open-collector. 21 These inputs are TTL compatible. iiAv DAV" ATNO 11 I Attention Out: Processor GPIB con- trol line; used by the 8292 during Tili1 22 "take control synchronously" opera- 0101 0101* tions. This pin is TTL compatible. IFCL 2 I Interface Clear Latched: Used to 23 19 make DAV received after the system 0102 0102" controller asserts IFC. This input is TTL compatible. 10 18 0103 0103' DAV 24 I/O Data valid: Processor GPIB hand- shake control line; used to indicate 17 the condition (availability and 0104 0104' validity) of information on the 010 signals. This pin is TTL compatible. OIOs 16 0105' DAV' 21 I/O Data Valid: IEEE GPIB handshake control line. When an Input, this pin is a TTL compatible Schmitt-trigger. 15 When DAV' is an output, it can sink 48 DIOe 0106' mAo 13 0101- 25,23, I/O Data Input/Output: Processor GPIB 0107 OIor 0108 10. 9, bus data lines; used to carry message 8, 7, and data bytes in a bit-parallel byte- 6, 5 serial from controlled by the three 12 DlOa 0108' handshake signals. These lines are TTL compatible. 0101' 22,19, I/O Data Input/Output: IEEE GPIB bus 0108' 18,17, data lines. They are TTL compatible 16,15, Schmitt-triggers when used for input Figure 8. Talker/Listener/Controller Data 13,12 and can sink 46 mA when used for Configuration . output. 6-409 AFN·Q0825C 8293 8293 0101' ~ 25 0101 23 0102 0102' ~ ~ 10 0103 0103' 0104' ~ 9 0104 TO 0105' ~ 8 0105 IEEE·488 8291A .~ DO 0101 r-!L 7 0106 0106'" ~ BUS ~ 6 ~ 01 0102 ~ 0107 0107' 0108' ~ 5 ~ 02 0103 30 0108 ~ 24 I~ 03 0104 31 OAV OAV' ~ 04 0105 32 1 T/R1 OPTA ,E... Vee ~ ~ ATN OPTB ~ GNO 33 05 0106 ~ 06 0107 34 --2... EOI ~ 07 0108 35 MOOE1 36 ..2!. RSO OAV TO 1 MICROPROCESSOR ..E.. RS1 T/R1 INTERFACE 26 ..E.. RS2 ATN 8293 .2. CS EOI 39 3 EOI EOI' ~ --.!. AD TiR2 2 ~ ATN ATN' ..!!. 38 1 ~ WR NDAC T/R1 ~ INT NRFO 37 2 T/R2 10 TO ~ CLOCK SRO 27 NOAC NOAC' J!... IEEE·488 BUS NRFO' ...!L 25 9 ---!. RESET REN NRFO SRO' ..!!.. 24 8 .2.. OREO IFC SRO 6 .1!.. .....!.. OACK REN REN' 5 .E... GPIB TRIGGER OUTPU T 2 TRIG IFC IFC' OPTA .I!... GNO OPTB .1!. GNO MOOEO '~GPIB BUS TRANSCEIVER Figure 9. 8291A and 8293 System Configuration 6-410 8293 ---TO MICROPROCESSOR ~ DO - 0101 28 25 0101 0101* ~ -.!! ~ D2 D1 - 0102 - 2. 23 10 DI02 0102* ~ Dl03> ~ 30 0103 0103 ~ D3 16 D. - 0104 31 32 • 8 0104 0104- ~ 17 0105 DI05 0105" ~ TO D5 IEEE·488 - 33 7 ~ ,. 18 D6 D7 0106 0107 3. 6 DI06 0107 DIOS* 0107" r!.3.- BUS 21 82.,A 35 5 8293 22 RSO 5108 0108 DIOS" ~ RS1 1 1 23 riRl T/A1 RS2 • R5 10 DAV 36 3. 2. 3 DAV EOI DAV· ~ WR EOI TO • 6 RESET ATN 26 27 • ATN MICROPROCESSOR DREa SRO 7 -- DACK 2' 8 IFC Cs -- 38 3 NDAC CLOCK 37 11 NRFD INT GPIB T/R2 2 ,-----'-'- ATNO QPTA rE- Vc TRIGGER 5 TRIG REN ~ ~ IFCL OPTB ~vc OUTPUT MODE 3 ...!!. DO DAV rE- --'- riAl -..!! D1 ~ D2 • 10 ATN ~I NDAC NDAC ~ D3 16 D. \ • 2 NFRD NRFO ~ ,. 17 TfR2 D5 18 - 21 8 SRO> TO D6 SRO SRO 38 6 EEE·488 • 8 10 D7 AO R5 - WR 8292 REN ATNO - IFC 23 2. 3. 5 23 3 REN IFC ATNO - 8293 REN- IFe· ATN* ~ itJ' ~ ..'2.. BUS • I EOI> ".... EOI COUNT RESETtt 3• 7 6 EOl2 EOl2 Cs 22 11 32 TCI ATNI ATNI 33 SPI TO MICROPROCESSOR 35 OBFt 36 iBFi OSCILLATOR 11 SYNC OUTPUT vcc~ SS - 1 25 - IFCl IFCL ~ X,I r - 31 2. CIC CIC .Ei2-1 27 21 X,I CLTH 'CLTH aPTA .E...Vs 2. 22 EA SYC SYC OPTB 2.'l... VC 15.25 PF ± .. = GPIB BUS TRANSCEIVER LJ.1 ON 0FF SYSTEM CONTROLLER SWITCH MODE2 t = see 8Q41A DATA SHEET FOR ALTERNATE CRYSTAL CONFIGURATIONS tt = CAN CONNECT TO SYSTEM RESET SWITCH, SEE 8041A DATA SHEET Figure 10> 8291A, 8292, and 8293 System Configuration , 6-411 AFN-00825C 8293 ABSOLUTE MAXIMUM RATINGS* This is a stress rating only and functional operation of the device at these or any other conditions above those indi- Ambient Temperature Under Bias ......... O·C to 70·C cated in the operational sections of this specification is Storage Temperature ............. - 65·C to + 150·C not implied. Exposure to absolute maximum rating condi- Voltage on any Pin with tions for extended periods may affect device reliability. Respect to Ground ................. - 1.0V to + 7V 2. All devices are guaranteed to operate within the Power Dissipation .......................... 1 Watt minimum and maximum parameter limits specified below. Typical parameters however are not tested and are not *NOTICE: guaranteed. Established statistically, they indicate the 1. Stresses above those listed under "Absolute Maximum performance level expected in a typical device at room Ratings" may cause permanent damage to the device. temperature (TA = 25·C) and Vee = 5\1. D.C. CHARACTERISTICS (TA"= O°C to 70°C, Vee = 5.0V ±10%, GND = OV) Limits Symbol Parameter Units Test Conditions Min. Typ. Max. VIl1 Input Low Voltage (GPIB Bus Pins) 0.8 V VIl2 Input LowVoltage (Option Pins) -0.1 0.1 V 1 VIL3 Input Low Voltage (All Others) 0.8 V VIH1 Input High Voltage (GPIB Bus Pins) 2.0 Vee V VIH2 Input High Voltage (Option Pins) 4.5 Vee V VIH3 Input High voltage (All Others) 2.0 Vee V V1H4 Receiver Input Hysteresis 400 mV VOl1 Output Low Voltage (GPIB Bus Pins) 0.5 V IOl = 48 mA VOL2 Output Low Voltage (All Others) 0.5 V IOl=16mA VOH1 Output High Voltage (GPIB Bus Pins) 2.4 V IOH = -5.2 mA VOH2 Output High Voltage (All Others) 2.4 V IOH = -800 /LA High to Low 0.8 VIT Receiver Input Threshold Low to High 2.0 V ILe Input Load Current (GPIB Pins) See Bus Load Line Diagram Vee = 5.0V ± 5% IlL Input Leakage Current (All Others) 10 /LA 0.45,,;; VIN ,,;; Vee Ipo Bus Power Down Leakage Current 40 /LA 0.45V ,,;; VBUS ,,;; 2.7V ICC Power Supply Current 110 175 mA NOTES: 1. VIL3 = 1.1 V max on pins 21 and 22 in Mode 2 for the 8293-10. CAPACITANCE Symbol Parameter Min. Typ. Max. Units Test Conditions CI01 I/O CapaCitance (GPIB Side) 50 80 pF VIN =Vee CI02 I/O CapaCitance (System Side) .35 50 pF VIN =Vee CITR Input CapaCitance (T/R1, T/R2) 7 10 pF VIN =Vee 6-412 AFN-00825C 8293 A.C. CHARACTERISTICS (TA = O°C to 70°C, Vee = 5.0V ±10%, GND = OV) Symbol Parameter Max. Units tp1 Transmitter Propagation Delay (All Lines) 30 ns tp2 Receiver Propagation Delay (EOI, ATN and Handshake Lines) 50 ns tp3 Receiver Propagation Delay (All Other Lines) 60 ns tpHZ1 Transmitter Disable Delay (High to 3-State) 40 ns tpZH1 Transmitter Enable Delay (3-state to High) 40 ns tpLZ1 Transmitter Disable Delay (Low to 3-Slate) 40 ns tpZl1 Transmitter Enable Delay (3-State to Low) 40 ns tpHZ2 Receiver Disable Delay (High to 3-State) 40 ns tpZH2 Receiver Enable Delay (3-State to High) 40 ns tpLZ2 Receiver Disable Delay (Low to 3-State) 40 ns tpZL2 Receiver Enable Delay (3-State to Low) 40 ns tMS Mode Switch Delay 16 /LS TYPICAL OUTPUT LOADING CIRCUITS TO SCOPE TO SCOPE (OUTPUT) " 2 3V (OUTPUT) ---s.ov 4J'" C'l"" C l INCLUDES JIG AND PROBE CAPACITANCE DATA c'l"" 240l! ~~ ~~16QUIV CL INCLUDES JIG AND PROBE CAPACITANCE Data Input to Bus Output (Driver) Bus Input to Data Output (Receiver) TO SCOPE TO SCOPE IOUTPun ~ (OUTPUT) 1 1V 5.0V"01l ' r ~ :,:~: . 1 DATA (tpLZ2,tpZL2) T!il~"""""') BUS 'm,) 1''"'" "m) C'l15" .,.48011 C'l15'F 3KO ":' ':' C L INCLUDES JIG AND PROBE CAPACITANCE Ct. INCLUDES JIG AND PROBE CAPACITANCE Send/Receive Input to Bus Output (Driver) Send/Receive Input to Data Output (Receiver) A.C. TESTING INPUT, OUTPUT WAVEFORM =X .20> INPUT/OUTPUT 24 TEST POINTS <2oX= 0.8 08 0.45 A C TESTING INPUTS ARE DRIVEN AT 2 4V FOR A LOGIC 1 AND 0 45V FOR A lOGIC 0 TIMING MEASUREMENTS ARE MADE AT 2 OV FOR A LOGIC 1 AND 0 8V FOR A LOGIC 0 6-413 AFN-00825C 8293 WAVEFORMS tRISE = tFALL ,,;: 5 ns DUTY CYCLE ~ 50% •.r_ _ _ _ _ _ _ _ _ _ _ _ _ _ _"""\ 3.0V INPUT OV----....I OUTPUT (TRANSMITTER PROP. DELAY) FIGURE 11 LOAD OUTPUT (RECEIVER PROP. DELAY) FIGURE 12 LOAD VOH OUTPUT (TRANSMITTER ENABLE DELAY WITH INPUT HIGH) FIGURE 13 LOAD Vz ~ 1.0V OUTPUT Vz "" 1.13V (TRANSMITTER ENABLE DELAY WITH INPUT LOW) FIGURE 13 LOAD VOL OUTPUT VOH (RECEIVER ENABLE DELAY WITH INPUT HIGH) FIGURE 14 LOAD OV SV OUTPUT (RECEIVER ENABLE DELAY WITH INPUT LOW) FIGURE 14 LOAD VOL 'DELAYS ARE REFERENCED AGAINST PERCENTAGE OF FINAL OUTPUT WHEREVER 3-STATE OUTPUTS ARE INVOLVED BECAUSE THE RISE AND FALL TIMES DEPEND ON THE EXTERNAL PULL-UP AND PULL-DOWN LOADS BUS LOAD LINE TYPICAL RECEIVER HYSTERESIS CHARACTERISTICS 5.0 .---r----.---r---,---,--,.---r-----. ~ 40 ~f-ycC=5.0V ~ • TA=2S"C w " 3.0 ~-+--~-+_-_+--+_-++-~~ ~ g . ... 2.0 ~-+--~-+_-_+--+_-_I_~-+_-_l "~ o 1.0 ~-+--+_-+_-_+--+_-++-+_-_l ~ o L-__-L__ __ ~ ~ ____L__ __L__ ~ ____L-~ o 0.5 1.0 1.5 2.0 VBUS. BUS VOLTAGE (VOLTS) V" INPUT VOLTAGE (VOLTS) 6-414 AFN-0082SC 8294A DATA ENCRYPTION UNIT • Standards Certified by National Bureau of • 7·Bit User Output Port • Single 5V 10% Power Supply :;t • 400 Byte/Sec Data Conversion Rate • Fully Compatible with iAPX-86,88, MCS-85™, MCS-80™, MCS-51 and • 64·Bit Key Data Encryption Using 56·Bit MCS-48™ Processors TM, • DMA Interface • Processing Implements Federal Information Data Encryption Standard • 3andInterrupt Outputs to Aid in Loading Unloading Data • Encrypt and Decrypt Modes Available The Intel® 8294A Data Encryption Unit (DEU) is a microprocessor peripheral device designed to encrypt and decrypt 64-bit blocks of data using the algorithm specified in the Federal Information Processing Data Encryption Standard. The DEU operates on 64-bit text words using a 56-bit user-specified key to produce 64-bit cipher words. The operation is reversible: if the cipher word is operated upon, the original text word is produced. The algorithm itself is permanently contained In the 8294A; however, the 56-bit key is user-defined and may be changed at any time. The 56-bit key and 64-bit message data are transferred to and from th~ 8294A in 8-bit bytes by way of the system data bus. A DMA interface and three interrupt outputs are available to minimize software overhead associated with data transfer. Also, by using the DMA interface two or more DEUs may be operated in parallel to achieve effective system conversion rates which are virtually any multiple of 400 bytes/second. The 8294A also has a 7-bit TTL compatible output port for user-specified functions. Because the 8294A implements the NBS encryption algorithm it can be used in a variety of Electronic Funds Transfer applications as well as other electronic banking and data handling applications where data must be encrypted. NC VCC DATA Xl NC BUS X2 DACK RESET OAO Vee SAO cs OAV GNO NC AD P6 AD P5 DAV WR P4 CCMP SYNC P3 DO P2 ! """~ 01 Pl SYNC D2 PO D3 VOO 04 vce ~;=-~-- TIMING 05 ceMP 06 NC +5V------- POWER---_ INTERNAL D7 NC GND--___ BUS GNO NC Figure 1. Block Diagram Figure 2. Pin Configuration Intel Corporation Assumes No Responsibllty for the Use of Any CircUItry Other Than Circuitry Embodied In an Intel Product No Other Circuit Patent licenses ale Implied © INTEL COAPORATION, 1982 6-415 ORDER NUMBE~~;,U!~5': 8294A Table 1. Pin Description Pin Pin Symbol No. Type Na!1le and Function Symbol No. Type Name and Function NC 1 No Connection. NC 39 No Connection X1 2 I Crystal: Inputs for crystal, L-C or exter- DACK 38 I DMA Acknowledge: Input signal from X2 3 nal timing signal to determine Internal the 8257 DMA Controller acknowledg- oscillator frequency Ing that the requested DMA cycle has RESET 4 I Reset: A low signal to this pin resets the been granted 8294A. DRO 37 0 DMA Request: Output signal to the Vee 5 Power: Tied high. 8257 DMA Controller requesting a DMA cycle CS 6 I Chip Select: A low signal to this pin enables reading and wntlng to th~ 8294A. SRO 36 0 Service Request: Interrupt to the CPU indicating that the 8294A is awaiting GND 7 Ground: This pin must be tied to data or commands at the input buffer. ground SRQ=1 Implies IBF=O. RD 8 I Re'ad: An active low read strobe at this OAV 35 0 Output Available: Interrupt to the CPU pin enables the CPU to read data and indicating that the 8294A has data or status from the Internal DEU registers status available in its output buffer. Ao 9 I Address: Address Input used by the OAV=1 implies OBF=1. CPU to select DEU registers dunng read NC 34 No Connection. and write operations P6 33 0 Output Port: User output port lines WR 10 I Write: An active low wnte strobe at this P5 32 Output lines available to the user via a pin enables the CPU to send data and P4 31 CPU command which can assert sel- commands to the DEU P3 30 ected port lines These lines have no- SYNC 11 0 Sync: High frequency (Clock - 15) out- P2 29 thing to do with the encryption function put Can be used as a strobe for external P1 28 At power-on, each line IS In a 1 state. CirCUitry PO 27 Do 12 I/O Data Bus: Three-state, bi-directional VDD 26 Power: + 5V power Input (+5V ±10%) D, 13 data bus lines used to transfer data be- Low power standby pin D2 14 tween the CPU and the 8294A. Vcc 25 Power: Tied high D3 15 D. 16 CCMP 24 0 Conversion Complete: Interrupt to the D5 17 CPU indicating that the encryptlon/ bs 18 decryption of an 8-byte block IS com- D7 19 plete GND 20 Ground: This pin must be tied to NC 23 No Connection. ground NC 22 No Connection. Vce 40 Power: +5 volt power Input· +5V ± NC 21 No Connection. 10%' 6-416 AFN-00230D 8294A FUNCTIONAL DESCRIPTION IBF Input Buffer Full; A write to the Data input Buffer or to the Command Input Buffer sets IBF = 1 The OPERATION DEU resets this flag when It has accepted the The data conversion sequence is as follows' Input byte Nothing should be. written when IBF= 1 1. A Set Mode command is given, enabling the desired Interrupt outputs DEC Decrypt; Indicates whether the DEU is in an en· 2. An Enter New Key command is issued, followed by 8 crypt or a decrypt mode. DEC =,1 implies the data inputs which are retained by the DEU for encryp- decrypt mode. DEC = 0 Implies' the encrypt tion/decryption. Each byte must have odd parity. mode 3. An Encrypt Data or Decrypt Data command sets the After 8294A has accepted a 'Decrypt Data' or DEU in the desired mode. 'Encrypt Data' command, 11 cycles are required to Alter this, data conversions are made by writing 8 data update the DEC bit. bytes and then reading back 8 converted data bytes. Any CF Completion Flag; This flag may be used to indi- of the above commands may be issued between data cate any or all of three events in the data transfer conversions to change the basic operation of the DEU; protocol. e.g., a Decrypt Data command could be Issued to change the DEU from encrypt mode to decrypt mode 1. It may be used In lieu of a counter in the ·wlthout changing either the key or the Interrupt outputs processor routine to flag the end of an 8- enabled. byte transfer 2. It must be used to Indicate the validity of INTERNAL DEU REGISTERS the KPE flag. Four internal registers are addressable by the master 3 It may be used In lieu of the CCMP interrupt processor: 2 for input, and 2 for output. The following to indicate the completion of a DMA oper- table describes how these registers are accessed. ation RD WR CS Ao Register KPE Key Parity Error; A Iter a new key has been entered, the DEU uses this flag in conjunction 1 0 0 0 Data input buffer With the CF flag to Indicate correct or incorrect o 1 0 0 Data output buffer parity. o 0 1 \ Command Input buffer o 1 0 1 Status output buffer COMMAND SUMMARY X X X Don't care 1 - Enter New Key ~~~~~~~~ The functions of each of these registers are described OP CODE 1011 1010101010101 MSB LSB below. ThiS command IS followed by 8 data byte Inputs which Data Input Buffer - Data written to this register IS lIiter- are retained in the key buffer (RAM) to be used in preted in one of three ways, depending on the preceding encrypting and decrypting data. These data bytes must command sequence. have odd parity represented by the LSB. 1. Part of a key. 2 - Encrypt Data 2. Data to be encrypted or decrypted. 3. A DMA block count. OP CODE 1'-0""1-0"1-11'-1-'10-fOEDlJ MSB LSB Data Output Buffer - Data read from this register is the This command puts the 8294A into the encrypt mode. output of the encryption/decryption operation. 3 - Decrypt Data Command Input Buffer - Commands to the DEU are OP CODE 1~0~10~1-1~I0-'1~oI~o'-I0"1--'01 written into this register. (See command summary MSB LSB below.) This command puts the 8294A into the decrypt mode. Status Output Buffer - DEU status is available In this 4- Set Mode register at all times. It is used by the processor for poll· driven command and data transfer operations. OP CODE 10 1010!01A !B I C I OJ LSB I: STATUS BIT' MSB FUNCTION: x x KPE CF DEC IBF where: OBF Output Buffer Full; OBF = 1 indicates that output A is the OAV (Output Available) interrupt enable from the encryption/decryption function IS B is the SRQ (Service Request) interrupt enable available in the Data Output Buffer. It is reset C is the DMA (Direct Memory Access) transfer enable when the data is read. D is the CCMP (Conversion Complete) interrupt enable 6-417 AFN-00230D 8294A This command determines which Interrupt outputs will After the Enter New Key command is issued, 8 data bytes be enabled A "1" in bits A, B, or D will enable the'OAV, representing the new key are written to the data input SRO, or CCMP Interrupts respectively A "1" in bit C will buffer (most significant byte first). After the eighth byte is allow DMA transfers. When bit C IS set the OAV and entered into the DEU, CF goes true (CF=I). The CF bit SRO Interrupts should also be enabled (bits A,B 1). = goes false again when KPE. is valid. The CPU can then Following the command In which bit C, the DMA bit, IS check the KPE flag. If KPE=I, a parity error has been set, the 8294 will expect one data byte to specify the detected and the DEU has not accepted the key. Each byte number of 8-byte blocks to be converted uSing DMA is checked for odd parity, where the parity bit is the LSB of each byte. . 5- Write to Output Port Since CF=1 only for a short period of time after the last OP CODE 11 1 P6 1 P51p.£l!~ byte is accepted, the CPU which polls the CF flag might MSB LSB miss detecting CF=1 momentarily. Thus, a counter should ThiS command causes the 7 least significant bits of the be used, as in Figure 4, to flag the end of the new key entry. command byte to be latched as output data on the 8294 Then CF is used to indicate a valid KPE flag. output port The Initial output data IS 1111111 Use of thiS port IS independent of the encryption/decryption function PROCESSOR/DEU INTERFACE PROTOCOL ENTERING A NEW KEY The timing sequence for entering a new key is shown in Figure 3 A flowchart shOWing the CPU software to accommodate thiS sequence IS given In.Flgure 4. DATA REGISTER 1 BYTE OF KEY CF~ L KPE _ _ _ _ _ _ _'N_VA_L_'D_ _ _ _ _ ~ A,JL---u--l....j ------u------- rL CHECK KPE U WR ~KEY ---lJ KEY KEY NEW KEY COMMAND DATA DATA DATA 8 Figure 3. Entering a New Key Figure 4. Flowchart for Entering a New Key 6-418 AFN-00230D intJ 8294A ENCRYPTING OR DECRYPTING DATA USING SOFTWARE COUNTER Figure 5 shows the timing sequence for encrypting or decrypting data. The CPU writes 8 data bytes to the DEU·s data Input buffer for encryption/decryption. CF then goes true (CF = 1) to Indicate that the DEU has accepted the 8-byte block Thus, the CPU may test for IBF = 0 and CF = 1 to terminate the Input mode. or It may use a software counter. When the encryption/- decryption IS complete, the CCMP and OAV Interrupts are asserted and the OBF flag is set true (OBF = 1) OAV DATA REGISTER-1 DATA BYTE and OBF are set false again after each of the converted data bytes IS read back by the CPU. The CCMP interrupt is set false, and remains false, after the first read. After 1---1+1 8 bytes have been read back by the CPU, CF goes false (CF = 0). Thus, the CPU may test for CF = 0 to terminate the read mode Also, the CCMP Interrupt may be used to initiate a service routine which performs the next senes of 8 data reads and 8 data writes. NO 1=0 ? YES CCMPi (IF ENABLED) II SR0--u-L _ (IF ENABLED) Jl IBFJLJl_Jl aAV (IF ENABLED) nJL_rr OBF nJL rr CF] I I USING CF FLAG - RD LfLJ-Lf WRlJLJ-lJ 8 DATA WRITES 20 ma - MAXIMUM 8 DATA READS IVES I DATA REGISTER-l DATA BYTE 1 NO/" CF = 1? \ Figure 5. Encrypting/Decrypting Data ( CF=O? I NO YES ?--8 Figure 6 offers two flowcharts outlining the alternative ' _ _ _ _-"N""O( OBF=P ) means of implementing the data conversion protocol. Either the CF flag or a software counter may be used to ! YES end the read and write modes I READ 1 CODED DATA BYTE I I SRQ= 1 Implies IBF=O, OAV= 1 Impll.es OBF= 1. This allows interrupt routines to do data transfers without checking status first. However, the OAV service routine must detect and flag the end of a data conversion Figure 6. Data Conversion Flowcharts 6-419 AFN-00230D 8294A USING DMA To Initiate a DMA transfer, the CPU must first initialize The timing sequence for data conversions using DMA is the two DMA channels as shown in the flowchart In shbwn In Figure 7. This sequence can be better Figure 9. It must then Issue a Set Mode command to the understood when considered In conjunction with the DEU enabling the OAV, SRO, and DMA outputs The hardware DMA Interface in Figure a Note that the use of CCMP Interrupt may be enabled or disabled, depending the DMA feature requires 3 external AND gates and 2 on whether that output is desired. Following the Set DMA channels (one for Input, one for output). Since the Mode command, there must be a data byte giving the DEU has only one DMA request pin, the SRO and OAV number of a-byte blocks of data (n<256) to be converted outputs are used in conjunction with two of the AND The DEU then generates the required number of DMA gates to create separate DMA request outputs for the 2 requests to the 2 DMA channels with no further CPU DMA channels. The third AND gate combines the two Intervention. When the requested number of blocks active-low DACK Inputs. has been converted. the DEU will set CF and assert the CCMP interrupt (if enabled). CCMP then goes false again with the next write to the DEU (command or data). __'-________________f \!FEN;;L~~~ Upon completion of the conversion, the DMA mode is disabled and the DEU returns to the encrypt/decrypt CF =rlL-_ _ _ _-----11 mode. The enabled interrupt outputs, however, will remain enabled until another Set Mode command is SRa (IF ENABLED) ~ --l ' -_ _ _ _ _ _ __ issued. OAV 11 11 (lfENABLEO) _ _ _ _ _ --------ll L_-.J L- DRQ~-1Sl __ JL DACK --U-1JU--U- USING DMA LJ--[J SET OMA MODE DMA BLOCK --.- 8 DMA READS ---- 8 DMA WRITES COUNT{n) _ _ _ _ _ _ ._ _ _ _ __ INITIALIZE OMA READ CHANNEL POINTER INITIALIZE DMA WRITE CHANNEL POINTER Figure 7. DMA Sequence DATA REGISTER ---- NUMBER OF BLOCKS TO BE CODED OO-D, ~ ~ 8257 e Figure 9. DMA Flowchart SINGLE BYTE COMMANDS Figure 10 shows the timing and protocol for single byte commands. Note that any of the commands is effective as a pacify command in that they may be entered at. any time, except during a DMA conversion. The DEU is thus set to a known state. However, if a command is issued out of sequence, an additional protocol is required RD ___________ ~~ (Figure 11). The CPU must wait until the command is WR------~~__ J accepted (ISF = 0). A data read must then be issued to clear anything the preceding command sequence may Figure 8. DMA Interface have left in the Data Output Buffer. 6-420 AFN·00230D 8294A CPUIDEU INTERFACES Figures 12 through 15 illustrate four Interface configura- tions used In the CPUIDEU data transfers In all cases SRQ will be true (If enabled) and ISF will be false when the DEU IS ready to accept data or commands (DO~~G ID7~ tWA ----_0 SAO IIF ENABLED) U INTERFACE TO 8086, 8088, ~~~~:~8~O~O::sg= AD cs ---_0 -----_0 8294A DEU IBF n Ao------ WA U CS U AO n Figure 12. Polling Interface ~ ~ IBF = O? .1 YES rINT-~·· ----·--~------l I COMMAND REGISTER -COMMAND I r~ I MASTER_ Do PROCESSOR D7 ~~ ~JI 8 Figure 10. Single Byte Commands INTERFACE Ril - - - - - c WR - - -__ c l: 8294A DEU - - - - O ' - -_ _C_CM_P-' oc PACIFY Figure 13. Single Interrupt Interface COMMAND REGISTER --- OOH 1 L:-r=::-J ~ READ DATA REGISTER 8 Figure 11. Pacify Protocol Figure 14. Dual Interrupt Interface 6-421 AFN-00230D inter 8294A OSCILLATOR MODE 8257 I__"--~~-'_-~1-2---1XTAL' I MHz , _J._ CO'T' ~ 'I----IL.---+__,,-! XTAL2 T ~ ~ C2 = CRYSTAL + STRAY +15 pF C3 = 2O-30pF CRYSTAL SERIES RESISTANCE SHOULD BE LESS THAN 75 nAT 6 MHz; LESS THAN 180 n AT 3 6 MHz, LESS THAN 70 Hat 12 MHz INf-----c TEST POINTS <:: 08 08 045 6-424 AFN-00230D inter , 8294A WAVEFORMS READ OPERATION-OUTPUT BUFFER REGISTER \i CS OR Ao - _ _ _;;r-/'J-f-_ V _ _ _ _ _ _ _ _ _ _ _ _ _ _-"r.¥\.""-_______________ (SYSTEM'S ADDRESS BUS) RD---+---·AR----=L~I-.RR~11 -,.J \. (READ CONTROL) -.RD-I ---.AD---- - ~ 'OF DATA BUS _ _ _ _ _ _ _ _ _ _ _--«~DATA V A L I D - - - = ' - > - - - - - - - - - - - - - - (OUTPUn _, _ _/ WRITE OPERATION-INPUT BUFFER REGISTER SORAo _ _ _ _- ' ~[ :x (SYSTEM'S ] ' -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ADDRESS BUS) WR • ... ~~---~_,_J-.W-A-~-W-"---------------(W-RITE CONTROL) DATA BUS DATA \J _ - DATA VALlD-_1V DATA (INPUn _ _ _ _-"M;::AC-Y-"C""HA:::N"'G::..:E'--_ _ _ J/\ ' ~"______~M:::A::;Y..:Ce!.H;::A::!NG=E=__ _ _ __ DMA AND INTERRUPT TIMING DACK----_.. " " . - 'ACC ~I ~ tCAG I I RDorWR ------+---.... "" ~~ _ _ _ _ _ _ _ _ _ _ _ _- J /V DRO-------4----+-------~ 1------- 'CRO . -- tACD~- -"--·--~-I I DATA B U S - - - - - - t - - - - - - - - - - -... VALID OAVorSRO - - - - - - + - - - - - - - - - - - - -_____-4____-". 6-425 AFN-00230D 8295 DOT MATRIX PRINTER CONTROLLER • Interfaces Dot Matrix Printers to • Programmable Print Intensity MCS·48™, MCS·8018S™, MCS·86™ Systems • Single or Double Width Printing • 40 Character Buffer On Chip • Serial or Parallel Communication with • Programmable Multiple Line Feeds Host • DMA Transfer Capability • 3 Tabulations • Programmable Character Density (10 or 12 Chararcters/lnch) • 2 General Purpose Outputs The Intel® 8295 Dot Matrix Printer Controller provides an interface for microprocessors to the LRC 7040 Series dot matrix impact printers. It may also be used as an interface to other similar printers. The chip may be used in a serial or parallel communication mode with the host processor. In parallel mode, data transfers are based on polling, interrupts, or DMA. Furthermore, it provides internal buffering of up to 40 characters and contains a 7 x 7 matrix character generator accommodating 64 ASCII characters. INTERNAL BUS Figure 1. Block Diagram Figure 2. Pin Configuration 6-426 intJ 8295 Table 1. Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function PFEED 1 I Paper Feed: Paper feed input HOME 39 I Home: Home Input switch, used by sWitch. the 8295 to detect that the print head XTAL1 2 I Crystal: Inputs for a crystal to set in- IS in the home position. XTAL2 3 ternal oscillator frequency. For DACK/SIN 38 I DMA Acknowledge/Serial Input: In proper operation use 6 MHz crystal. the parallel mode used as DMA ac- RESET 4 I Reset: Reset input, active low. After knowledgment; in the serial mode, reset the 8295 will be set for 12 char- used as input for data. acters/inch single width printing, DRO/CTS 37 0 DMA Request/Clear to Send: In the solenoid strobe at 320 msec. parallel mode used as DMA request NC 5 No Connection: No connection or output pin to indicate to the 8257 that tied high. a DMA transfer is requested; in the serial mode used as clear-to-send CS 6 I Chip Select: Chip select input used signal. to enable the RD and WR Inputs ex- cept dunng DMA. IRO/SER 36 0 Interrupt Request/Serial Mode: In parallel mode It IS an interrupt re- GND 7 Ground: This pin must be tied to quest Input to the master CPU; in ground. senal mode It should be strapped to RD 8 I Read: Read input which enables the Vss· master CPU to read data and status. MOT 35 Motor: Main motor dnve, active low 0 In the senal mode this pin must be tied to Vcc. STB 34 0 Solenoid Strobe: Solenoid strobe output. Used to determine duration of Vcc 9 Power: +5 volt power input: +5V ± solenoids activation 10% 87 33 0 Solenoid: Solenoid dnve outputs; WR 10 I Write: Write input which enables the master CPU to write data and com- So 32 active low. mands to the 8295. In the serial mode S. 31 S. 30 this pin must be tied to Vss. s;- 29 SYNC 11 0 Sync: 2.5 ILS clock output. Can be S; 28 used as a strobe for external circuitry. S, 27 Do 12 I/O Data Bus: Three-state bidirectional Voo 26 Power: +5V power input (+5V ± D, 13 data bus buffer lines used to interface 10%). Low power standby pin. D2 14 the 8295 to the host processor in the 25 Power: Tied high. Vee D3 15 parallel mode. In the serial mode D. 16 Do-D2 sets up the baud rate. GP1 24 0 General Purpose: General purpose D. 17 GP2 23 0 output pins. D6 18 TOF 22 I Top of Form: Top of form input, used D7 19 to sense top of form signal for type T GND 20 Ground: This pin must be tied to pnnter. ground. PFM 21 0 Paper Feed Motor Drive: Paper Vcc 40 Power: +5 volt power Input: +5 ± feed motor drive, active low. 10%. 6-427 AFN-00231C 8295 FUNCTIONAL DESCRIPTION Communication between the 8295 and the host proc· essor can be implemented in either a serial or parallel mode. The parallel mode allows for character transfers The 8295 ihterfaces microcomputers to the LRC 7040 into the buffer via DMA cycles. The serial mode features Series dot matrix impact printers, and to other similar selectable data rates from 110 to 4800 baud. printers. It provides internal buffering of up to 40 char- The 8295 also offers two general purpose output pins acters. Printing begins automatically when the buffer is which can be set or cleared by the host processor. They full or when a carriage return character is received. It can be used with various printers to implement such provides a modified 7x7 matrix character generator. The functions as ribbon color selection, enabling form character set includes 64 ASCII characters. release solenoid, and reverse document feed. COMMAND SUMMARY Hex Code Description Hex Code Description 00 Set GP1. This command brings the GP1 pin 09 Tab character. to. a logic high state. After power on it is OA Line feed. automatically set high. 01 Set GP2. Same as the above but for GP2. OB Multiple Line Feed; must be followed by a byte specifying the number of line feeds. 02 Clear GP1. Sets GP1 pin to logic low state, inverse of command 00. OC Top of Form. Enables the line feed output until the Top of Form input is activated. 03 Clear GP2. Same as above but for GP2. In· verse command 01. 00 Carriage Return. Signifies end of a line and 04 Software Reset: This is a pacify command. enables the printer to start printing. This command is not effective immediately OE Set Tab #1, followed by tab position byte. after commands requiring a parameter, as the Reset command will be interpreted as a OF Set Tab #2, followed by tab position byte. parameter. Should be greater than Tab #1. 05 Print 10 characters/in. density. 10 Set Tab #3, followed by tab position byte. 06 Print 12characterslin. density. Should be greater than Tab #2. 07 Print double width characters. This com· 11 Print Head Home on Right. On some mand prints characters at twice the normal printers the print head home position is on width, that is, at either 17 or 20 characters the right. This command would enable nor· per line. mal left to right printing with such printers. 08 Enable DMA mode; must be followed by 12 Set Strobe Width; must be followed by two bytes specifying the number of data strobe width selection byte. This command characters to be fetched. Least significant adjusts the duration of the strobe activa· byte accepted first. tion. PROGRAMMABLE PRINTING OPTIONS Table 2. Solenoid On-Time CHARACTER DENSITY 07-03 02 01 DO Solenoid On The character density is programmable at 10 or 12 char- (microsec) acterslinch (32 or 40 characters/line). The 8295 is auto- matically set to 12 characterstinch at power·up.lnvoking x 0 0 0 200 the Print Double-Width command halves the character x 0 0 1 240 density (5 or 6 characters/inch). The 10 chartin or 12 x 0 1 0 280 chartin command must be re·issued to cancel the x 0 1 1 320 Double·Width mode. Different character density modes x 1 0 0 360 may not be mixed within a single line of printing. x 1 0 1 400 x 1 1 0 440 PRINT INTENSITY x 1 1 1 480 The intensity of the printed characters is determined by the amount of time during which the solenoid is on. This on'time is programmable via the Set Strobe-Width com- TABULATIONS mand. A byte following this command sets the solenoid Up to three tabulation positions may be specified with on-time according to Table 2. Note that only the three the 8295. The column position of each tabulation is least significant bits of this byte are important. selected by issuing the Set Tab commands, each fol· 6-428 AFN·00231C intJ 8295 lowed by a byte specifying the column. The tab posi- the 8257 DMA controller without further CPU interven- tions will then remain valid until new Set Tab commands tion. Figure 4 shows a block diagram of the 8295 in DMA are issued. mode. Sending a tab character (09H) will automatically fill the character buffer with blanks up to the next tab position. The character sent immediately after the tab character will thus be stored and printed at that position. CPU TO 8295 INTERFACE Communication between the CPU and the 8295 may take place in either a serial or parallel mode. However, the selection of modes is inherent in the system hard- ware; it is not software programmable. Thus, the two modes cannot be mixed in a single 8295 application. PARALLEL INTERFACE Two internal registers on the 8295 are addressable by the CPU: one for input, one for output. The following table describes how these registers are accessed. DONE Register Figure 3. Host to 8295 Protocol Flowchart 1 0 o Input Data Register o 1 o Output Status Register 8257 Input Data Register-Data written to this register is DMA CONTROLLER interpreted in one of two ways, depending on how the \r-----.A DACKx data is coded. DRQx 1. A command to be executed (OXH or 1XH). OPTIONAL 2. A character to be stored in the character buffer for printing (2XH, 3XH, 4XH, or 5XH). See the character set, Table 2. Output Status Register-8295 status is available in this f - - - - - - i c s DRO register at all times. \ - - - - - I l i i i DACK \ - - - - - - - 1 WR STATUS BIT: \ - - - - - 1 RESET MOT FUNCTION: PA DE IBF 8295 PA-Parameter Required; PA = 1 indicates that a com- mand requiring a parameter has been received. After the PRII!ITEB necessary parameters have been received by the 8295, the PA flag is cleared. 1------lIRO STB DE-DMA Enabled; DE = 1 whenever the 8295 is in DMA PFEED 1--------------1 mqde. Upon completion of the required DMA transfers, HOME~----------~ the DE flag is cleared. IBF-Input Buffer Full; IBF = 1 whenever data is written Figure 4. Parallel System Interface to the Input Data Register. No data should be written to the 8295 when IBF = 1. Data transferred in the DMA mode may be either com- A flow chart describing communication with the 8295 is mands or characters or a mixture of both. The procedure shown in Figure 3. " is as follows: The interrupt request output (IRQ, Pin 36) is available on 1. Set up the 8257 DMA controller channel by sending a the 8295 for interrupt driven systems. This output is starting address and a block length. asserted true whenever the 8295 is ready to receive data. 2. Set up the 8295 by issuing the "Enable DMA" com- To improve bus efficiency and CPU overhead, data may mand (08H) followed by two bytes specifying the be transferred from main memory to the 8295 via DMA block length (least significant byte first). cycles. Sending the Enable DMA command (08H) acti- The DMA enabled flag (DE) will be true until the vates the DMA channel of the 8295. This command must assigned data transfer is completed. Upon completion be followed by two bytes specifying the length of the of the transfer: th,e flag is cleared and the interrupt re- data string to be transferred (least significant byte first). quest (IRQ) signal is asserted. The 8295 then returns t6 The 8295 wi" then assert the reqllired DMA requests to the non-DMA mode of operation. 6-429 AFN-00231C 8295. SERIAL INTERFACE +. The 8295 may be hardware progriimmed to operate in a serial mode of c.ommunicatlpn. By connecting the STB IRQ/SER pin (pin 36) to logic zero, the serial mode is enabled immediately upon power-up. The serial Baud rate is also hardware programmable; by strapping pins Sf 14,13, and 12 according to Table 3, the rate is selected. CS, RD, and WR must be strapped as shown in Figure 5. 56 56 Table 3. Serial Baud Rate TO SOLENOID 54 DRIVERS Pin 14 Pin 13 Pin 12 Baud Rate 8295 0 0 0 110 53 O. 0 1 150 52 0 1 0 300 0 1 1 600 51 1 0 0 1200 MOT 1 0 1 2400 } TO MOTOR DRIVERS 1 1 0 4800 PFM 1 1 1 4800 The serial data format is shown in Figure 5. The CPU Figur~ 6. 8295 To Printer Solenoid Interface should wait for a clear to send signal (CTS) from the 8295 before sending data. OSCILLATOR AND TIMING CIRCUITS The 8295's internal timing generation is controlled by a self-contained oscillator and timing circuit. A' 6 MHz crystal is used to derive the basic oscillator frequency. The resident timing circuit consists of an oscillator, a +5 state counter and a cycle counter as illustrated in Figure 7. The recommended crystal connection is shown in Figure 8. PRINTER PFEED I-~~~~~-I HOME I---~ CTS SER SYNC OUTPUT SERIAL (2.5 ,",sec) INPUT STOP L-__~~__~~__~~__~~~ B~ Figure 7. Oscillator Configuration Figure 5. Serial Interface to UART (8251 A) 8295 TO PRINTER INTERFACE r 1-6MHz~ XTAL1 829. The strobe output signal of t~e 8295 determines the duration of the solenoid outputs, which hold the data to I3 'XTAL2 the printer. These solenoid outputs cannot drive the 20 PF± printer solenoids directly. They should be buffered through solenoid drivers as shown in Figure 6. Recom- mended solenoid and motor driver circuits may be found in the printer manufacturer's interface gUide. Figure 8_ Recommended Crystal Connection 6-430 AFN-00231C intJ 8295 8295 CHARACTER SET Hex Code Print Char. Hex Code Print Char. Hex Code Print Char. Hex Code Print Cha~. 20 space 30 0 40 @ 50 P 21 ! 31 1 41 A 51 Q 22 32 2 42 B 52 R 23 # 33 3 43 C 53 S 24 $ 34 4 44 0 54 T 25 % 35 5 45 E 55 U 26 & 36 6 46 F 56 V 27 37 7 47 G 57 W 28 38 8 48 H 58 X 29 39 9 49 I 59 Y 2A 3A 5A J 5A Z 2B + 3B 4B K 5B [ 2C 3C < 4C L 5C \ 20 3D 40 M 50 1 2E 3E > 4E N 5E t 2F 3F ? 4F 0 5F ABSOLUTE MAXIMUM RATINGS· 'NOTICE: Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional opera- Ambient Temperature Under Bias ......... O"C to 70"C tion of the device at these or any. other conditions above Storage Temperature ............... - 65" to + 150"C those indicated in the operational sections of this specifi- Voltage on Any Pin With cation is not implied. Exposure to absolute maximum Respect to Ground .................. -0.5V to +7V rating conditions for extended periods may affect device Power Dissipation .......................... 1.5 Watt reliability. D.C. AND OPERATING CHARACTERISTICS (TA = O°C to 70°C, Vcc = Voo = +5V ± 10%, Vss = OV) Limits Symbol Parameter Unit Test Conditions Min. Typ. Max. V il Input Low Voltage (All -0.5 0.8 V Except X1, X2, RESET) V Il1 Input Low Voltage (X1o X2, -0.5 0:6 V RESET) V IH Input High Voltage (All 2.2 . Vee V Except X 1, X2, RESET) V IH1 Input High Voltage (X 1, X 2, 3.8 Vee V RESET) VOL Output Low Voltage (0 0-0 7) 0.45 V IOl=2.0mA VO L1 Output Low Voltage (All 0.45 V IOl= 1.6mA Other Outputs) V OH Output High Voltage (00-07) 2.4 V IOH= -400J.lA V OH1 Output High Voltage (All 2.4 V IOH= -50J.lA Other Outputs) III Input Leakage Current ±10 J.lA Vss " VIN" Vee (RD, WR, CS, AriJ IOFl Output Leakage Current ±10 J.lA Vss +0.45 '" Your '" Vce (0 0-07, High Z State) 100 Voo Supply Current 5 15 rnA 100+ Icc Total Supply Current 60 125 rnA III Low Input Load Current 0.5 rnA V ll =0.8V (Pins 24, 27-38) ILl1 Low Input Load Current 0.2 rnA V ll =0.8V (RESET) IIH Input High Leakage Current 100 }LA VIN = Vee (Pins 22, 38) CIN Input Capacitance 10 pF CliO I/O Capacitance 20 pF 6-431 8295 A.C. CHAR~CTERISTICS (TA = O°C to 70°C, Vcc = Voo = +5V ± 10%, VSS = OV) DBB READ Symbol Parameter Min. Max. Unit Test Conditions tAA CS, Ao Setup to RD + 0 ns tAA CS, Ao Hold After RD t 0 ns tAA RD Pulse Width 250 ns tAO CS, Ao to Data Out Delay 225 ns CL= 150 pF tAO RD +to Data Out Delay 225 ns C L = 150 pF tOF RD t to Data Float Delay 100 ns tCY Cycle Time 2.5 15 ,..s DBB WRITE Symbol Parameter Min. Max. Unit Test Conditions tAW CS, Ao Setup to WR + 0 ns tWA CS, Ao Hold After WR t 0 ns tww WR Pulse Width 250 ns tow Data Setup to WR t 150 ns two Data Hold to WR t 0 ns DMA AND INTERRUPT TIMING Symbol Parameter Min. Max. Unit Test Conditions tAcc DACK Setup to Control 0 ns tCAC DACK Hold After Control 0 ns tCAO WR to DRO Cleared 200 ns tACO DACK to Data Valid 225 ns CL = 150 pF A.C. TESTING INPUT, OUTPUT WAVEFORM A.C. TESTING LOAD CIRCUIT INPUT/OUTPUT DEVICE UNDER TEST ~C'=150PF -= 6-432 AFN-00231C inter 8295 WAVEFORMS READ OPERATION-OUTPUT BUFFER REGISTER CSOR Ao ) K (SYSTEM'S ADDRESS BUS) _IARj IRR -IRA- "\ (READ CONTROL) I---IRO I--I,OF WRITE OPERATION-INPUT BUFFER REGISTER ~ I~""~~---!\ V (SYSTEM'S ~ ~ l--IW-A-_-,-"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(WRITE CSORAo _ _ _ _ _ ADDRESS BUS) ". CONTROL) DATA BUS DATA \ ____ DATA VALID ______ ~ DATA MAY CHANGE (INPUT) MAY CHANGE /' t\ ------------~----~ ~----------------------- DMA AND INTERRUPT TIMING _IACC~ ICAC_ - 1\ ORO tCAQ } D:~~ ~-----------VA-L-ID-------------J)(~------------ _-_tACO ____________ 6-433 AFN-00231C 8295 WAVEFORMS (Continued) PRINTER INTERFACE TIMING MOTOR DRIVE \ I HOME 1/ ~ SOLENOID DATA } K - -cI--- SOs ~ MH, - SOLENOID STROBE -Po H - ~~ ~SHSI~ ~ PFEED PFM r- j I J1 Symbol Parameter Typical POH Print delay from 1.8 ms home inactive Sos Solenoid data 2510's setup time before strobe aotive SHS Solenoid 'data >1 ms hold after strobe inaotive MHA Motor hold time 3.2 ms after home aotive PSP PFEED setup time 58 ms after PFM aotive PHP PFM hold time 9.75 ms after PFEED aotive 6-434 AFN-00231C intJ 82062 WINCHESTER DISK CONTROLLeR • Controls SA1000/ST5061nterface • Multiple Sector Transfer Capabili,y , Winchester Drives • 5 MBit/Sec Transfer Rate • Implied Seek With Read/Write Commands • 128,256,512, and 1024 Byte Sector Lengths • 7 Byte Sector Length Extension For • Six High-Level Commands: Restore, Extemal Error Correction Code Seek, Read Sector, Write Sector, Scan 10, and Write Format • Single +5 Volt Power Supply The 82062 Winchester Disk Controller chip interfaces microprocessor systems to Winchester disks that use the Shugart Associates SA1000 or Seagate Technology ST506 interface. Examples include Seagate ST506 and ST512, Shugart SA1000, SA1100, and SA600, Tandon 600, Texas Instruments 506, RMS 500, and Quantum Q2000. The device translates parallel data from the microprocessor to a 5 mbit/sec, MFM-encoded serial bit stream. It provides all the drive control logic and, in additiQn, control signals which simplify the design of an exter- nal-phase locked loop and write precompensation circuitry. The 82062 is designed to interface to the host control- ler through an external sector buffer. TASK, STATUS, DATA REGISTERS BCS DATA VCC 080-7 BUS BCR ~DCLDCK BUFFER INTRQ RDGATE WRDATA NC RDDATA EARLY RESET BORQ WRITE [ill CONTROL iiii BRDY RWC Viii DRlIN RESET WR CLOCK cs Rwe AD sc INTRQ RDDATA A1 TRACK 000 AO-2 RDGATE A2 WR FAULT iiii READ CONTROL DRUN DB7 INDEX ViR DB8 DRDY cs RDCLDCK DBs STEP • DB4 DIR BRDY WR GATE DB3 WRCLDCK BCS BUFFER STEP CONTROL DB2 WRGATE BDRQ DIR DB1 EAiit'i iiCR DRIVE [ill D80 INTERFACE DRDY VCC-"""" CONTROL Vss WRDATA WR FAlILT Vss---' TRACK 000 INDEX sc Figure 1. 82062 Internal Block Diagram Figure 2. Pin Configuration Intel Corporation assumes no responSibility for use of any Circuitry other than Circuitry embodied In an Intel product No other CIrcuit patent licenses are Imp1led @INTELCORPORATION1982 ORDER NUMBER: 210 448-001 6-435 82062 FUNCTIONAL DESCRIPTION after the command register is loaded-therefore commands require only one byte from the CPU after The 82062 Winchester Oisk Controller integrates the WOC has been initialized. much of the logic needed to implement Winchester disk controller subsystems. It provides MFM-en- The 82062 adds all the required track formatting to the coded data and all the control lines required by hard data field, including two bytes of CRC. Optionally, disks using the Seagate Technology ST506 or Shu- these two bytes can be replaced by seven bytes of gart Associates SA1000 interface standard. Current- ECC information for external error correction. Iy, most 5-1/4 inch and many 8 inch Winchester drives use this interface. PROCESSOR INTERFACE Oue to the higher data rates required by these drives-1 byte every 1.6 usec-the 82062 is designed Figure 4 shows one possible hardware interface be- to interface with the host CPU or I/O controller tween the WOC and the host CPU or I/O controller. through an external buffer RAM. The 82062 WOC has For initializing the 82062, the host uses the standard four pins that minimize the logic required to design a peripheral interface lines: RO, WR, CS, and Ao_2 ' For buffer interface. read and write cycles, the host and the WOC ex- change data through an external RAM buffer. The Figure 3 shows a block diagram of an 82062 subsys- WOC has four pins, BCR, BCS, BROY, and BORQ, tem. The WOC is controlled by the host CPU through that facilitate the design of the buffer interface. six commands: The processor starts disk operations by initializing Restore the WOC. It first writes the appropriate parameters Seek into the task register file. The task information in- Read Sector cludes the drive number, cylinder, head, and sector Write Sector numbers, sector size, number of sectors to be trans- Scan 10 ferred, and the track number for write precompensa- Write Format tion to start. After the 'task information, the command These commands use information stored by six task is written to the command register. See the 82062 registers. Command execution starts immediately Register-CPU Interface section for more details. .....- - - - - - - - - - - - - I 6 0 R O RO CLOCK .....- - - - - - - - - - - - - I I N T R O ROOATA I..-------.....J EARLY, RWC I--------~ LATE 1-------.., 82062 WOC WR DATA 10MHZ I-----......jcs DRIVE CONTROL """----"=='-='-----....,/1 AO·A2 Figure 3. System Block Diagram 6-436 AFN·02214A intJ 82062 Table 1. Pin Description Symbol Pin No. Type Name and Function DB7-DBo 12-19 I/O Data Bus: Bidirectional 8-bit Data Bus RESET 5 I Reset: Initializes the controller and clears all status flags. RD 6 I/O Read: As an input, RD controls the transfer of status information from the WDC to the host. RD is an output for reading data from the sector buffer. WR 7 I/O Write: As an input, WR controls the transfer of command or task information into the WDC. WR is an output for writing data to the sector buffer. CS 8 I Chip Select: Enables RD or WRas inputs. Ao-A2 9-11 I Address: Used to select a register from the task register file. INTRQ 3 0 Interrupt Request: Interrupt generated by the WDC upon command termination. It IS reset when the status register is read. BCS 1 0 Buffer Chip Select: Output used to enable reading or writing of the external sector buffer. BCR 2 0 Buffer Counter Reset: Can be optionally used to reset the address counter of the buffer memory. Activated by Read and Write Commands. BRDY 35 I Buffer Ready: Input used by the buffer memory to signal the controller that it IS ready for reading (full) or writing (empty). BRDY is checked during Read and Write com- mands. BDRQ 36 0 Buffer Data Request: Optionally activated during Read or Write commands if BRDY is high. Can be used as a DMA Request line. WR DATA 21 0 Write Data: Open drain output that shifts out MFM data at a rate determined by the Write Clock input. LATE 22 0 Late: Open drain output used to derive a delay value for write precompensation. Valid when the WR GATE output is high. EARLY 23 0 Early: Open drain output used to derive a delay value for write precompensation. Val- id when the WR GATE output is high. WR GATE 24 0 Write Gate: High when write data is valid. WR GATE goes low if the WF input is high. This output is used by the drive to enable head write current. WR CLOCK 25 I Write Clock: Clock input used to derive the write data rate. Frequency = 5MHz for the ST500 interface, 4.34MHz for the SA 1000 interface. RWC 33 0 Reduced Write Current: Signal goes high for all cylinder numbers above the value programmed to the Write Precomp Cylinder register. It is used by the precompensa- tion logic and by the drive. DRUN 34 I Data Run: Looks for a string of zeros in the read data, indicating the beginning of an ID field. If the zeros are detected, RD GATE is brought high. RD DATA 37 I Read Data: Accepts MFM data from the drive. RD GATE 38 0 Read Gate: Output that is high for data and I D fields. RD CLOCK 39 I Read Clock: Clock input derived from the external data recovery circuits DIR 26 0 Direction: High level on this output tells the drive to move inward (increasing cylinder number). The signal is determined by the WDC commands. STEP 27 0 Step: Provides 6.4 microsecond pulses to move the drive head to another cylinder. DRDY 28 I Drive Ready: If DRDY from the drive goes low, all commands will be deactivated. INDEX 29 I Index: Signal from the drive indicating the beginning of a track. It is used by the WDC during formatting. WR FAULT 30 I Write Fault: If WR FAULT from the drive goes low, all commands will be deactivated. TRACK 000 31 I Track Zero: Used by the Restore command to verify that the head is at the outermost cylinder. SC 32 I Seek Complete: Signal from the drive indicating that reads or writes can be made. VSS 20 I Ground VCC 40 I D.C. Power: +5V 6-437 AFN-02214A 82062 t liD : AD : Wii Wii DATA DATA ~I 8 SCR 1-- ~+ I- I I RD WR I ~ CK I I I Qf- ADDR DATA I I I I I ......2~ ----q--- CS HOST I I CPU I I 82062 SYSTEM -------- I ~ BCS BROY CS 3 ADDRESS AO-A2 INTERRUPT INTRa RESET RESET L:t- 'r------t> 8205 STS DRIVE HEAD SELECT LATCH 01 Figure 4. CPU Buffer Interface For example, in the case ofa Write Sector command, Description : The step rate specified by R3 R2 Rl the processor would first read the WDC status regis- Ro is loaded into the step rate reg- ter. It would then write data to the buffer memory. ister. Stepping pulses are trans- When the buffer is full, it sets the BRDY line to the mitted with the DIR output low. WDC, which then resets (low) the buffer data request (BDRQ) output and sets (low) the buffer chip select Command Flow : 1. Abort if drive not ready or write (BCS) line. The BCS signal is used to both select the fault. buffer and to isolate the host system control lines. At 2. Wait for up to 3 index pulses this point the 82062 WR pin is an output and it reads for seek complete. the data from the buffer into the WDC where it is for- 3. If TKOOO active, then go to 6. matted and encoded and sent to the disk. When the 4. Step outwards; if number of buffer memory is empty, the BRDY line signals the steps exceeds 1024, then WDC to bring BCS high, thus allowing the host CPU to abort. write more data or give another command. 5, Wait for seek complete; go to 3. COMMAND DESCRIPTION 6. End. Command : RESTORE Command : SEEK F9rmat : 0 0 b 0 R3 R2 Rl Ro Format 6-438 AFN-02214A inter 82062 Description : Seeks the cylinder specified in cyl- 8. If M = 0, then set BORa flag, inder number register with a step activate BORa pin, wait for rate specified by R3 R2 R1 Ro. Pre- BRDY,end. sent cylinder position information 9. Decrement sector count, in- is kept for the current drive. Con- crement sector number. If troller does not wait for seek com- M = 1 and sector count = 0, plete 'at end of comand, thus then go to 10 else search for allowing overlapped seeks with next sector and go to 6. the SA 1000 drive. 10. If I = 0 then interrupt; end. Command Flpw : 1. Abort if drive not ready or write Command : WRITE SECTOR fault. Format :00110MOO 2. Wait for seek complete. 3. Calculate direction and num- Description : Seek track if necessary. Write from ber of step pulses. buffer to disk when BRDY pin acti- 4. Update internal present cylin- vated. Write total number of sec- der position number register. tors specified by sector. count 5. Send step pulses at rate speci- register if M = 1. Sectors are writ- fied by R3 R2 R1 Ro· ten in numerical order. If M = 0, 6. Wait for seek complete, verify then sector count is ignored and head and sector numbers. only one sector is written. End. Command Flow : 1. Abort if drive not ready or write Command READ SECTOR fault 2. Activate BCR: pin. Format : 0010lMOO 3. Seek track if necessary. Description : Seek track if desired cylinder dif- 4. Wait for SC pin active. ferent from present location. If 5. Activate BORa pin, set ORa M = 0, then the sector specified in flag, interrupt. Wait for BRDY sector number register is read. If active. M = 1, then multiple records are 6. Search for 10 field and write read, starting with the sector sector. specified by the sector number 7. If M = 0, then end. register and continuing in sequen- 8. Increment sector number, de- tial order until the number of sec- crement sector count. . tors specified in the sector count 9. If sector count = 0, then end. register are read. If I = 0, interrupt 10. If BRDY activated at end of at activation of BORa. If I = 1, in- sector data transfer from buff- terrupt at end of command. er memory, then go to 6. Oth- erwise go to 7. Command Flow : 1. Abort if drive not ready or write fault. Command : SCAN 10 2. Activate BeS. 3. Seek track if necessary using Format : 01000000 step rate of last Restore or Description : When the next 10 field of the pre- Seek command. sent track is encountered, cylinder 4. Wait for SC active. number, sector size, head number 5. Activate "SeA pin. Search for and sector number are loaded into head, cylinder, sector number the respective registers. and size. 6. When the proper sector 10 is Command Flow : 1. Abort if drive not ready or write found, read sector data. fault at any time. 7. If BRDY pin activated at end of 2. Search for next 10 field and sector data tram~fer to buffer read 3 10 bytes into respective memory, set ORa flag, acti- registers. vate BORa pin and interrupt if 3. Update internal present cylin- I = O. Wait for BRDY pin acti- der location number register. vation indicating empty buffer. End. 6-439 AFN-02214A intJ 82062 Command : WRITE FORMAT Table 2. Register File Format : 01010000 A2 A1 Ao Read Operation Write Operation 1 1 1 Status 'Command Description : This command formats one track 1 1 0' Sector-Drive-Head Sector-Drive-Head using parameters loaded in the 1 0 1 Cylinder Number High Cylinder Number High task register file and in buffer memory. The track format is 1 0 0 Cylinder Number Low Cylinder Number Low shown in Figure 6. 0 1 1 Sector Number Sector Number Cylinder, head, sector extension 0 1 0 Sector Count Sector Count and sector size number are taken 0 0 1 Error Flags Write Precomp from the Task Register file. Good Cylinder block/bad block marks and sector 0 0 0 Data Data numbers are taken from buffer memory. The total number of sec- 82062 REGISTER-CPU INTERFACE tors, formatted is specified by the sector count register. The lengths The 82062 communicates with the host CPU through of GAP 1 and GAP 3 are loaded a task register file of seven' registers. Table 2 illus- into the sector number register. trates these registers and the control signals to select These gaps are recorded as 4E16' them. Following is a description of each of these reg- isters: After the task register file has been Status Register loaded with the desired format pa- rameters and the command regis- Bit No. Name Symbol Description ter has been loaded with the write 08 0 Error ERR A bit in the error regis- format command, the block marks ter has been set. and sector addresses are -loaded 08 1 Command in CIP WDC is currently 'ex- into the buffer. When the BRDY pin progress ecuting a command. is activated, the specified number of sectors are written. The block 082 - - Reserved. marks and sector numbers are 083 Data Request ORa Reflects the state of read from the buffer as needed. the 8DRa pin. Indi- cates that a buffer The data field is written with E5 16• data transfer is de- CRC is automatically computed sired.ln a system, this and written. flag is typically used for programmed 1/0. CO(T1mand Flow : 1. Abort if drive not ready or write 084 Seek Complete SC Reflects the state of fault at any time. the SC input pin, The bit is latched at the 2. Activate BCR. end of a command un- Set BDRQ flag, activate til the status register BDRQ, interrupt. Wait for is read. DRDY active .•Wait for SC. 08 5 Write Fault WF Reflects the state of the WF pin. An inter- 3. Write index gap after index rupt IS generated by pulse received. the INTRa pin when this bit is set. The bit is 4. If sector count = 0, go to 7 .. latched at the end of a command until the 5. Write sector using parameters status register is read. in task register file and buffer 086 Drive Ready ORR Reflects the state of meory. the DRDY pin. How- ever, after an error in- 6. Decrement sector count regis- terrupt the state of ter; go to 4. , ORR is held until the status register is read. 7. Write 4E's until index pulse. When ORR goes low, 8. Read from buffer until empty an interrupt is gener- ated. (BRDY received). End 6-440 AfN-02214A 82062 Status Register CYLINDER NUMBER REGISTERS Bit No. Name Symbol Description Two registers hold the cylinder number that can range DB7 Busy BUSY Set by writing into the from 0 to 1023. During seek operations, an internal command register. Reset at the end of all present position register is compared to the Cylinder commands except Number register to determine the DIR output and the Read Sector. For the number of step pulses. Read Sector Com- mand, BUSY is reset SECTOR NUMBER REGISTERS after a sector of data is transferred to the This register has two multiplexed functions. For Read buffer. Sector and Write Sector Commands, this register Command Register holds on 8-bit binary value that corresponds to the sector address in the 10 field. For the Write Format Command DB7 DB6 DBs DB4 DB3 DB2 DB, DBo command, it holds an 8 bit binary value that specifies Restore 0 0 0 1 R3 R2 R, Ro the number of bytes in both Gap 1 and Gap 3. Seek 0 1 1 1 R3 R2 R, Ro Read Sector 0 0 1 0 I M 0 0 SECTOR COUNT REGISTER Write Sector 0 0 1 1 0 M 0 0 ScanlD 0 1 0 0 0 0 0 0 This register hold an 8-bit value that determines the Write Format 0 1 0 1 0 0 0 0 number of sectors for multiple sector commands I~ a INTRa goes active when BDRa goes active. (Read sector, Write Sector, or Format). A value of 1 in- ~ 1 INTRa goes active upon command terminallOn. dicates a single sector, while 0 indicates a 256 sector transfer. The value is decremented for each sector M ~ 1 Multiple sector read or write. handled during the command. R3 , R2, R" Ro ~ 0000 Step time ~ 20 usec at SMHz WR CLOCK ~ 0001 Step time ~ 0.5 msec ~ 0010 Step time ~ 1.0 msec Error Flags Register ~'0011 Step time ~ 1.5 msec Bit No. Name Symbol Description DBo AM Not Found AMNF During a read op- ~ 1111 Step time ~ 7.5 msec eration. the de- isired I D field was Sector-Drive-Head Register found, but the Bit No. Name Symbol Description data field address mark was not DBo_2 Head Number HDN Used internally for found. formatting and ID DB, TKOOO Error TKOE Track zero was field comparing. not found after DB3_4 Drive Number DRN Used internally. If 1024 steps in the the drive number is Restore com- changed between mand. commands, then an DB2 Aborted Command AC A command was automatic Read ID started and one of command is per- the following oc- formed before seek- curred: 1) Drive ing. not ready; 2) Write DBs_s Bytes per sector BPS DBs DBs fault; 3) SC input 1 1 128 byte not active within sector 16 index pulses; 0 o 256 byte or 4) an illegal sector command code 0 1 512 byte was received. sector DB3 - - Not used. 1 o 1024 byte sector DB4 ID Not Found IDNF ID field param- eters (cylinder, DB7 Sector extension SE DB7 = 1 tells the head, sector) not WDC to substitute a found within 3 in- 7-byte ECC code for dex pulses. the 2-byte CRC field. DB5 - - Not used. 6-441 AFN-02214A 82062 Error Flags Register WRITE PRECOMP CYLINDER REGISTER This register holds a value froll) 0 to 256. The reduced write current pin (RWC) is high when the Cylinder reg- Bit No. Name Symbol Description ister value is greater than or equal to four times the write Precomp Cylinder register value. . DB6 Data Field DFE An' error in the eRe Error data field was de- tected by the DRIVE INTERFACE DESCRIPTION eRe. The sector The 82062 provides the control lines to interface to may be re-read. ST506/SA 1000 interface drives. It contains a high DB7 Bad block BB A bad block ad- speed shift register, an MFM encoder/decoder, and dress mark was an address mark detector. Signals are provided to detected during a control write precompensation and write splice avoid- read or write oper- ation. An interrupt ance. External circuitry must be used for the phase is generated de- locked MFM read clock and the head/drive selection. pending upon the I Figure 5 shows a typical controller-drive interface for bit in the com- a system with two Winchester drives. Figure 6 shows mand. the track formatting used by the 82062. 2X DATA RATE ~~M"~ EARLY WRITE IATE PRECOMP WINCHESTER DRIVE 0 RWC READ DATA Lr:- 2 WRITE DATA READ DATA READ CLOCK PHASE LOCK DRIVE SEL DRUN LOOP READ GATE STEP ~ TO NEXT DRIVE DIRECTION DATA 82062 WR CLOCK f-- RATE READY WDC OSC WRITE FAULT sc A .:: TRACK 000 .:: INDEX INDEX .:: TKOOO SEEK COMPLETE .:: CRCY RWC WR FAULT 'l HEAD NUMBER DIR -t>. WRITE GATE WR GATE -[> STEP -t> DATA BUS - D 7 Q DAISY CHAIN TO NEXT DRIVE ADDRESS- (HOLDS DRIVE AND HEAD SELECTS) DATA LATCH Figure 5. Drive Interface 6-442 AFN·02214A inter 82062 r---------------REPEATEDNTIMES----,-------------, ~------~v--------- 10 FIELD I GAP --~V,...---- DATA FIELD ... I 2 WRITE GATE _ _ _ _ _....J INDEX PULSE Figure 6. Track Format 6-443 IAFN-02214A 82501 ETHERNET SERIAL INTERFACE • Compatible with the Ethernet* • Driving/Receiving Ethernet Specification Transceiver Cable • 10·Mbs Operation • Fail-Safe Watchdog Timer Circuit to Prevent Continuous Transmissions • Replaces 8 to 12 MSI Components • Diagnostics Loopback for Fault • Manchester Encoding/Decoding and Detection and Isolation Receive Clock Recovery • Directly Interfaces to the • 1O-MHz Transmit Clock Generator 82586 Controller The 82501 Ethernet Serial Interface (ESI) chip is designed to work directly with the 82586 controller in Ethernet and non-Ethernet 1Q-Mbps local-area network applications. The major functions of the 82501 are to generate the 10 MHz transmit clock for the 82586, perform Manchester encoding/decoding of transmitted/received frames, and provide the electrical interface to the Ethernet transceiver cable. Diagnostic loopback control enables the 82501 to route the signal to be transmitted from the 82586 through its Manchester encoding and decoding circuitry and back to the 82586. The combined loopback capabilities of the 82586 and 82501 result in efficient fault detection and isolation by providing sequential testing of the communications interface. An on-chip fail-safe watchdog timer circuit prevents the station from locking up in a continuous transmit mode. 'Ethernet IS a trademark of Xerox Corporation . • 2586 Vee GND TRANSCEIVER CABLE r NTERFACE INTERFACE I , -- ,,eLSN COLLISION· PRESENCE XCYRCASLE INTERFACE & ,, I , I GENERATION NOISE FILTER I I \ ,-- ! I CARRIER·PRESENCE GENERATION T /"- ...." C1 C2 VCC TRMT -1 Rev LPBK TRMT MANCHESTER XCVRCABLE DECODER AND INTERFACE AND I \ I RCV TXD RXD CLOCK NOISE FILTER \ RECOVERY RCV TXC ~ .... --,,/ CRS TEN . CoT X1 X, RXC X2 I ~ CLOCK RXD CLSN -2 COUNTER GENERATION J-¥",eRYSTAL GND CLSN --, , TRMT TXD MANCHESTER TRANSCEIVER / I ,I ENCODER I---- CABLE DRIVER \ I \ , I I '-- 1 1 WATCHDOG TIMER 1 Figure 1. 82501 Functional Block Diagram Figure 2. Pin Configuration Intel CorporatIon Assumes No Responslbilty for the Use of Any CirCUItry Other Than Circuitry EmbodIed In an Intel Product No Other CIrCUIt Patent LIcenses ale Implied. ©INTEL CORPORATION. 1982 6-444 ORDER NUMB~~~~~~:;::~ inter 82501 Table 1. Pin Description Pin Pin Symbol No. Type Name and Function Symbol No. Type Name and Function TXC 16 a Transmit Clock: A 10-MHz clock LPBK 3 I Loopback: A TTL-level control sig- output with 5 nsec rise and fall nal to enable the loopback mode. In times and MaS driving levels. This this mode, serial data on the TXD clock is provided to the 82586 for input is routed through the 82501 serial transmission. internal circuits and back to the RXD output without driving the T'EN 18 I, Transmit Enable: An active low, TRMT/TRMT output pair to the TTL-level signal synchronous to transceiver cable. When [l5Bj( is as- TXC that enables data transmission serted, the collision circuit will also to the transceiver cable. TEN can be be turned on at the end of each driven by"FiTS from the 82586. transmission to simulate the colli- TXD 17 I Transmit Data: A TTL-level input sion test. signal that IS directly connected to the serial data ouput, TXD, of the TRMT 19 a Transmit Pair: An output driver pair which generates the d ifierential sig- 82586. TRMT 18 a nal for the transmit pairofthe Ether- RXC 8 a Receive Clock: An MaS-ll(vel clock net transceiver cable. Following the output with 5 nsec rise and fall last transition, which is always posi- times and 50% duty cycle. This out- tive at TRMT, the differential voltage put is connected to the 82586 IS slowly reduced to zero volts. The receive clock input RXC. There is a output stream is Manchester maximum 1.2 ILsec discontinuity at encoded. the beginning of a frame reception RCV 4 I Receive Pair: A differentially driven when ,the phase-locked loop input pair which is tied to the switches from the on-chip oscillator RCV 5 I receive pair of the Ethernet trans- to the incoming data. During idle ceiver cable. The first transition on (no incoming frames) the clock fre- RCV will be negative-going to indi- quency will be half that of the 20 cate the beginning of a frame. The MHz crystal f~equency. last transition should be positive- CRS 6 a Carrier Sense: A TTL-level, active going, indicating the end of a frame. low output to notify the 82586 that The received bit stream IS assumed· there is activity on the coaxial cable. to be Manchester encoded. This signal IS asserted when valid CLSN 12 I Collision Pair: A differentially data or a collision signal from the driven input pair tied to the transceiver is present. It is deas- collision-presence pair of the Ether- CLSN 11 I serted at the end of a frame net transceiver cable. The collision- synchronous with RXC, or when the presence signal IS a 10 MHz ±15% end of the collision-presence signal square wave. The first transition at (CLSN and CISiii) IS detected, CLSN IS negative-going to Indicate whichever occurs later. Once deas- the beginning of the signal, the last serted, CRS will not be reasserted transition is positive-going to indi- again for a period of 5 ILsec mini- cate the end of the signal. mum, 7 ILsec maximum, regardless of any activity on the receive or C1 1 I PLL CapaCitor: Phase-locked-loop collision-presence pairs. capacitor inputs. C2 2 I RXD 9 a Receive Data: An MaS-level output tied directly to the RXD input of the X, 14 I Clock Crystal: 20-MHz crystal 82586 controller and sampled by inputs. the 82586 at the negative edge of X2 15 I RXC. The bit stream received from the transceiver cable is Manchester Vcc 20 Power: 5 ± 5% volts. decoded prior to being transferred GNO 10 Ground: Reference. to the controller. This output remains high during idle. CDT 7 a Collision Detect: A TTL, active low FUNCTIONAL DESCRIPTION signal which drives the C5T input of the 82586 controller. It is asserted as long as there IS activity on the Clock Generation ~~M~~n-presence pair (CLSN an~ A 20 MHz crystal-controlled oscillator is provided as the basic clock source. This 20 MHz signal is then 6-445 AFN-00864A 82501 divided by 2 to generate a 10 MHz ± .01 % clock as The input circuits can also be driven with ECl volt- required in the Ethernet specification. age levels. In either case, the input common mode voltage must be in the range of Vee -1.0 to Vee - 2.5 Manchester Encoder and volts to allow for a wide driver supply variation at the Transceiver Cable Driver transceiver. The input terminals have a 15-volt maxi- mum protection and additional clamping of low- The 20 MHz clock is used to Manchester encode energy, high-voltage noise signals. data on the TXD input line. The clock is also divided by 2 to produce the 10 MHz clock required by the A noise filter is provided at the RCV/RCV input pair 82586 for synchronizing its RTS and TXD signals. 'to prevent spurious signals from improperly trigger- See Figure 3. (Note that the 82586 RTS is tied to the ing the receiver circuitry. The noise filter has the 82501 TEN input as shown in Figure 4.) following characteristics: Data encoding and transmission begins with TEN going low. Since the first bit is a '1', the first transition A negative pulse which is narrower than 30 ns or is on the transmit output TRMT is always negative. less than -150 mV in amplitude is rejected during Transmission ends with the TEN going high. The last idle. transition is always positive at TRMT and may occur at the center of the bit cell (last bit = 1) or at the At the beginning of a reception, the filter is activated boundary of the bit cell (last bit = 0). A one-bit delay by the first negative pulse which is more negative is introduced by the 82501 between its TXD input and than -250 mVand is wider than 50 ns. TRMT/TRMT output as shown in Figure 3. Following the last transition, the output TRMT is slowly brought to its high state so that zero differential voltage exists As soon as the first valid negative pulse is recognized between TRMT and TRMT. This will eliminate DC by the noise filter, the CRS signal is asserted to in- currents in the primary of the transceiver's coupling form the 82586 controller of the beginning of a trans- transformer. See Figure 4. mission, and ~he RXC will be held low for 1.2 f.Lsec maximum while the internal phase-locked-loop is An internal watchdog timer is started at the begin- acquiring lock. ningof the frame. The duration of the watchdog timer is 25 msec ± 15%. If the transmission ter- The filter is deactivated if no negative transition oc- minates (by deasserting the TEN) before the timer curs within 160 ns from the last positive transi!ion. expires, the timer is reset (and ready for the next transmission). If the timer expires before the trans- mission ends, the frame is aborted. This is accom- Immediately after the end of a reception, the filter plished by disabling the output driver for the blocks-all the signals for 5 f.Lsec minimum, 7 f.Lsec TRMT/TRMT pair and deasserting CRS. RXD and maximum. This dead time is required to block-off RXC are not affected. The watchdog timer is reset spurious transitions which may occur on the coaxial only when the TEN is deasserted. cable at the end of a transmission but are not filtered out by the transceiver. The cable driver is a differential gate requiring exter- nal resistors or a current sink of 20 mA (on both terminals). In addition, high-voltage protection of 15 volts maximum for 1 second maximum is provided. MANCHESTER DECODER AND CLOCK RECOVERY Receive Section The filtered data enters the clock recovery and decoder circuits. An analog phase-locked-loop CABLE INTERFACE AND NOISE FILTER (Pll) technique is used to extract the received clock The 82501 input circuits can be driven directly from from the data, beginning from the third negative the Ethernet transceiver cable receive pair. In this transition of the incoming data. The Pll will acquire case the cable is terminated with a pair of 39-ohm lock within the first 12 bit times, as seen from the resistors in series for proper impedance matching. RCV/RCV inputs. During that period of time, the RXC The center tap of the termination is tied tQ an exter- is held low. Bit cell timing distortion which can be nal voltage reference (source impedance of 18.5 tolerated in the incoming signal is ± 15 nsec for the ohms min.) to establish the required common mode preamble and ±20 nsec for data. The voltage- voltage bias for the 82501 receive circuitry. See controlled oscillator (VCO) of the Pll corrects its Figure 4. frequency to match the incoming signal transitions. 6-446 AFN-00864A 82501 Its VCO cycle time stays within 5% of the RXD bit cell When a valid collision-presence signal is present the time regardless of the time distortion allowed at the CRS signal is asserted (along with COT). However, if RCV/RCV input. The RCV/RCV input is decoded this collision-presence signal arrives within 6.0 ± 1.0 from Manchester to NRZ and transferred p.s from the time CRS was deasserted, only COT is synchronously with the receive clock to the 82586 generated. controller. At the end of a frame, the receive clock is used to Internal Loopback detect the absence of RCV/RCV transitions and report it to the 82586 by deasserting CRS while RXD is held high. When asserted, LPBK causes the 82501 to route serial data from its TXD input, through its transmit logic (retiming and Manchester encoding), returning Collision-Presence Section it through the receive logic (Manchester decoding and receive clock generation) to RXD output. The The CLSN/CLSN input signal is a 10 MHz ±15% internal routing prevents the data from passing square wave generated by the transceiver whenever through the output drivers and onto the transmit two or more data frames are superimposed on the output pair, TRMT/TRMT. When in loopback mode, coaxial cable. The maximum asymmetry in the all of the transmit and receive circuits, including the CLSN/CLSNsignal is 60/40% for low-to-high or high- noise filter, are tested except for the transceiver to-low levels. This signal is filtered for noise rejection cable output driver and input receivers. Also, at the in the same manner as RCV/RCV. The noise filter end of each frame transmitted in loopback mode, the rejects signqls which are less negative than -150 mV 82501 generates a 1-p.sec COT signal within 1 p.sec and narrower than 15 ns during idle. It turns on at the after the end of the frame. Thus, the collision circuits, first negative pulse which is more negative than - 250 including the noise filter, are also tested in loopback mVand wider than 30 ns. After the initial turn-on, the mode. The watchdog timer remains enabled in loop- filter remains active indicating that a valid collision back mode, terminating test frames that exceed its signal is present, as long as the negative time-out period. CLSN/CLSN signal pulses are more negative than - 250 mV. The filter returns to the "off" state if the signal becomes less negative than -150 mV, or if no In the normal mode (LPBK not asserted), the 82501 negative transition occurs within 160 ns from the last operates as a full duplex device, being able to trans- positive transition. Immediately after turn-off, the mit and receive simultaneously. This is similar to the collision filter is ready to be reactivated. externalloopback mode of the 82586. Combining the internal and external loopback modes of the 82586 The common mode voltage and external termination and the internal loopback and normal modes of the are identical to the RCV/RCV input. (See Figure 4.) 82501, incremental testing of an 82586/82501-based The CLSN/CLSN input also has a 15-volt maximum interface can be performed under program control protection and additional clamping against low- for systematic fault detection and fault isolation. energy, high-voltage noise signals. A valid collision-presence signal will assert the 82501 Interface Example COT output which can be directly tied to the COT input of the 82586 controller. The 82501 is designed to work directly with the 82586 During the time thli't valid collision-presence tran- controller in Ethernet as well as non-Ethernet 10 sitions are present on the CLSN/CLSN input, invalid Mbps LAN applications. The control and data signals data transitions will be present on the receive .data connect directly between the two devices without pair due to the superposition of signals from two or the need for additional external logic. The complete more stations transmitting simultaneously. It is pos- 82586/82501 /Ethernet Transceiver cable interface is sible for RCV/RCV to lose transitions for a few bit shown in FIGURE 4. The 82501 provides the driver times due to perfect cancellation of the signals. In and receivers needed to directly connect to the any case, the invalid data will not cause any discon- transceiver cable, requiring only terminating resis- tinuity of RXC. tors on each input signal pair. 6-447 AFN-00864A 82501 20 MHi INTERNAL CLOCK (MANCHESTER-ENCODED DATA) Figure 3. Start of Transmission and Manchester Encoding ETHERNET TRANSCEIVER 5V OV CABLE , 26 16 20 TXC Vee 10 GND / TRMT !-!=---....,) r---------, (\ I ~~.~---+-~ TXC 28 15 , TRANSMIT I RTS TEN I PAIR":, ~~~~,)~-~~d-~~~~--~~ 27 17 TXD TXD TRMT ,, I' 29 Vee ') ~ l'~----I--, CTS C1 RECEIJEfl~-i Q ' 39q TO CPU 82501 BUS 82586 GND ESI 'PAIR CONTROLLER 39f~ , C2 RXC 23 RXC RCV 1-"-+-4---',) ,I , l~,4----+.-J I CRS 31 6 CRS CLSN 1=-1--+-"';',) I~\ ~c'---- CLSN ---+--1 36 -1 COT '"\1 ______________________-+__ ~ J CRS---r----------\\\\~ I NOTE 1 RXC NOTES: CRS WILL BE DEASSERTED FOR A PERIOD UP TO 7 "SEC MAXIMUM WHEN RCV/RCV OR CLSN/CLSN TERMINATES. WHICHEVER OCCURS LATER CRS WILL REMAIN ASSERTED AFTER THE CLSN/CLSN SIGNAL TERMINATES IF RCV/RCV SIGNALS CONTINUE LOOPBACK TIMING Symbol Parameter Min. Max. Unit 40 LPBK asserted before the first attempted transmission 500 ns t41 Simulated collision test delay from the end of each attempted transmisssion .5 1.0 p.,s t42 Simulated cOllision test duration .5 1.0 p.,s t43 LPBK deasserted after the last attempted transmission 5 p.,s NOTE: In Loopback mode, RXC, RXD and CRS function in the same manner as a normal Receive 6-453 AFN-00864A 82501 LOOPBACK TIMING I "1" I "0" I "1" I "0" I "0" I "1" I TXD ~ (NOTE 1) ~ \~--------~(,~~--------~I I "1" I "0" I "1" I I "1" RXD ----------....:.....--~~,....--'---- NOTE: 1 DURING LOOPBACK, THE 82501 RECEIVE CIRCUITRY USES 12 BIT TIMES WHILE THE PLL LOCKS ON THE DATA AS A RESULl: THE FIRST 12 BITS ARE LOST 6-454 AFN-00864A intJ TECHNICAL REFERENCES 6.1 The Ethernet Specification Version 1.0, August, 1980 Digital Equipment Corporation, Intel, Xerox 6.2 ISO "Reference Model for Open Systems Interconnection Architecture", ISO/TC97/SC16 N309 6.3 fntel"Local Network Architecture Proposed For Work Stations" August, 1981 Article Reprint 186 6.4 Intel iNA 950-1 Local Area Network Software Data Sheet 6.5 Intel iSBC 550 Ethernet MultiBus Controller Board Set Data Sheet 6.6 Intel "System Level Functions Ehance Controller IC", October 6,1982 Electronics 6-455 82586 LOCAL COMMUNICATIONS CONTROLLER • Fully Implements the Ethernet* and • 4 On-Chip DMA Channels for Efficient, Proposed IEEE 802 Specifications High-Speed Transfer of Data, Status • User Configurable for Non-Ethernet and Commands Applications • Complete Set of Diagnostics for - From 0 to 6 Bytes of Address Reliable Network Operation Generation/Checking • Fully Implements the CSMA/CD Access -16- or 32-Bit CRC Method Including Retries and Random Generation/Checking Backoff (Wait) Time -Optional Priority Function - Variable Preamble Length • Two Methods of Frame Delimiting: -Serial Transmission from 100 Kbps to Ethernet and HDLC Flags/Bit Stuffing 10 Mbps • Independent 8-MHz System Clock Input -8- or 16-Bit Data Bus Designed as an intelligent peripheral, the 82586 managesthe entire process of transmitting and receiving frames, thereby relieving the host processor of the tasks of managing the communications peripheral. The major functions performed by the 82586 include: -direct transfer of frames to and from external memory using four on-chip DMA channels. -executes commands from lists residing in external shared memory. -automatically reports the status of both transmitted and received frames, including error conditions. -fully integrates the CSMA/CD access method including automatic retries after collisions and random backoff (wait-time) generation. -diagnostic commands to identify and isolate faults. In order to take full advantage of the LAN concept and CSMA/CD access method, the 82586 architecture is also configurable under program control. This allows the 82586 to be "customized" for other applications requiring high-speed serial transmission including serial backplanes (serial peripheral interconnection) and low-cost, short-distance LANs. "Ethernet is a trademark of Xerox Corporation. Vee A21 A22 (AD) A17 A23 (WR) A16 SHE AD15 HOLD HLDA 41 §l (OT/A) so (DEN) READY (ALE) INT ARDY/SRDY Vee CA AD' RESET AD6 MNIMX ADS ClK AD' CRS ADa CDT AD' CTS m ADO TXD RXC fXC VSS RXD NOTe" THE SYMBOLS IN PARENTHESES CORRESPOND TO MINIMUM MODE. Figure 1. 82586 Functional Block Diagram Figure 2. 82586 Pinout Intel Corporation Assumes No Responslbllty for the Use of Any CircUitry Other Than Circuitry Embodied In an Intel Product No Other CirCUit Patent Licenses afe Implied ©INTElCORPORATION.1982 6-456 OCTOBER 1982 ORDER NUMBER: 210783-001 82586 Controlling the 82586 the list of commands to be executed by the 82586 and hold all received frames, respectively. Pointers to the From the user's point of view, the 82586 consists of CBL and RFA are in the 8CB, along with status regis- two independent, though communicating units: the ters and counters for certain tallies maintained by Command Unit (CU) and the Receive Unit (RU) as the 82586, and control commands for the 82586. The shown in Figure 3. The CU executes commands only direct control lines between the CPU and the given by the host CPU and manages frame transmis- 82586 are the interrupt to the CPU and Channel At- sions. The RU handles all activities related to frame tention to the 82586. reception such as buffer management, frame and address recognition, :and CRC checking. The two units are controlled and monitored by the host CPU 82586 Memory Structures via a shared memory structure called the 8ystem Control Block (8CB). All logical communication be- The three primary memory structures used by the tween the CPU and 82586 takes place through the host CPU and the 82586 to pass control, status and 8CB. The two other memory structures used by the data are the 8ystem Control Block (8CB), Command 82586 are the Command Block List (CBL) and Block List (CBL) and the Receive Frame Area (RFA), Receive Frame Area (RFA). These are used to hold Figure 4. 82586 RECEIVE UNIT I SERIAL DATA IN I CHANNEL ATTENTION f COMMAND I I XMIT SERIAL DATA OUT UNIT I CPU I INTERRUPT .I. \ I , MEMORY COMMAND BLOCK SYSTEM LIST CONTROL BLOCK •I RECEIVE FRAME AREA .Figure 3. System Overview 6-457 AFN-D0864A intJ 82586 INITIALIZATION , ROOT I SYSTEM CONTROL BLOCK (SCB) COMMANO BLOCK liST (C Bl) • r------------------ -------------, . r-. 82586 CONTROL I "'-8i COMMANDS CONFIGURE TRANSMIT , ---------- LIT COMMAND COMMAND STATUS ===~O~~R~ ===: ERROR TALLIES i-- I I I ! TRANSMIT I 1 I 1 -CRC I DATA BUFFER 1 -ALIGNMENT -NO RESOURCE _ DMA OVERRUN I· L _____ ~ ____________ _ _ _ _ _ _ _ _ _ _ _ --1I RECEIVE FRAME AREA (RFA) ~-- 1 r------------I 1 I 1 '~'~~~:J I I LIST (RDl) I 1 I 1 I I ,~ -' ' ' ':J I 1 I 1 '----- I IL _____________ --1I Figure 4. 82586 Memory Structures Upon initialization, the 82586 obtains the address of Both the Command Block List and the Receive its 8ystem Control Block through the Initialization Frame Area are first configured by the host CPU and Root which begins at location OFFFFF6H. The 8CB then passed to the 82586 via the 8CB. As commands contains control commands, status register, pointers are executed by the 82586, it returns status informa- to the Command Block List (CBL) and Receive Frame tion back to the CPU, which may, in turn, update the Area (RFA), and tallies for CRC, Alignment, DMA CBL with additional commands. As. frames are Overrun and No Resource errors. Through the 8CB, received by the 82586 and stored in the RFA, the the 82586 is able to provide status and error counts 82586 will return the appropriate status to the CPU. for the host CPU, execute "programs" contained in The CPU retrieves the received frames from the RFA the Command Block List (CBL) and receive incoming and returns free buffers to the Receive Descriptor frames in the Receive Frame Area (RFA). and Free Buffer lists. 6-458 AFN-OOB64A inter 82586 The 82586 has a 22-bit memory address range in One such command is the Transmit" command. A minimum mode and 24-bit memory address range in single Transmit command contains, as part of the maximum mode. All memory structures, the System command-specific parameters, the destination ad- Control Block, commands in the Command Block dress and type field for the transmitted frame along List, Receive Descriptor List, and all buffer descrip- with a pointer to a buffer area in memory containing tors (see Figure 6), must reside within one 64K-byte the data portion of the frame. The data field is con- memory segment. The Data Buffers can be located tained in a memory data structure cohsisting of a anywhere in the memory space. Buffer Descriptor (BD) and Data Buffer (or a linked list of buffer descriptors and buffers) as seen in Fig- ure 6. The BD contains a Link Field which pOints to Transmitting Frames the next BD on the list and a 24-bit address pointing to the Data Buffer itself. The length of the Data Buffer The 82586 executes commands from the Command is specified by the Actual Count field of the BD. Block List in external memory. These commands are fetched and executed in parallel with the host CPU's operation, thereby significantly improving system BUFFER DESCRIPTOR (BD) performance potential. The general format for such commands is ACTUAL COUNT LINK FIELD .Lr NEXT BUFFER DESCRIPTOR DB ADDRESS DATA (24 BITS) BUFFER (DB) COMMAND STATUS CONTROL FIELDS (DATA FIELD) COMMAND LINK FIELD (POINTER TO NEXT COMMAND) NEXT COMMAND PARAMETER FIELD (COMMAND·SPECIFIC PARAMETERS) Figure 6. Transmit Data Buffer Using the BDs and Data Buffers, multiple Data Buf- fers can be "chained" together. Thus, a frame with a long Data Field can be transmitted using multiple Figure 5. Action Command Format (shorter) Data Buffers chained together. This chain- ing technique allows the system designer to develop Via the Link Field, commands can be linked together efficient buffer management policies. to form a list of commands for execution by the 82586. When transmitting a frame as shown below: START FRAME· END FRAME DEST. SOURCE TYPE FRAME PREAMBLE ADDR. ADDR. FIELD DATA FIELD CHECK DELIMITER SEQUENCE DELIMITER Figure 7. Frame Format 6-459 AFN-00864A 82586 The 82586 automatically generates the preamble cess, reinitializing DMA pointers without CPU inter- (alternating 1s and Os) and start frame delimiter, vention. Multiple frames can be sent by linking the fetches the destination address and type field from appropriate number of Transmit commands to- the Transmit command, inserts its unique address as gether. This is particularly useful when transmitting a the source address, fetches the data field from buf- message that is larger than the maximum frame size fers pointed to by the Transmit command, and com- (1518 bytes for Ethernet). putes and appends the CRC at the end of the frame. The 82586 can be configured to generate either the Ethernet or HDLC start and end frame delimiters. In Receiving Frames the Ethernet mode, the start frame delimiter is two In order to minimize CPU overhead, the 82586 is consecutive 1 bits and the end frame delimiter indi- designed to receive frames without CPU supervision. cated by the lack of a signal after transmitting the last The host CPU first sets aside an adequate amount of bit of the frame-check sequence field. When in the receive buffer space and then enables the 82586's HDLC mode, the 82586 will generate the 01111110 Receive Unit. Once enabled, the 82586 "watches" for "flag" for the start and end frame delimiters and any of its frames which it automatically stores in the perform the standard "bit stuffing/stripping." In ad- Receive Frame Area (RFA). The RFA consists of a dition, the 82586 will optionally pad frames that are Receive Descriptor List (RDL) and a list of free buf- shorter than the specified minimum frame length by fers called the Free Buffer List (FBL) as shown in appending the appropriate number of flags to the Figure 8. The individual Receive Frame Descriptors end of the frame. that make up the RDL are used by the 82586 to store In the event of a collision (or collisions), the 82586 the destination and source address, type field and manages the entire jam, random wait and retry pro- status of each frame that is received. (Figure 9.) SYSTeM CONTROL BLOCK .1-- r----- ------------------ I I RECEIVE DESCRIPTOR LI ST(RDL) I I I I I I I I RECEive FRAME DESCRIPTOR (RFD) RFD ... -1L-__ R_FD_--, I I I I I I I FReE BUFFER LIST (FBL) I I I I I - I I BUFFER I DESCRIPTOR (BD) BD - BD I I I t t ! I I I I I I ! l I I I I I I I DATA I DB DB I BUFFeR (DB) I I I I I I I I I IL _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ReceiVER ___ FRAME __ AREA __ (RFA) ____________ ~ I Figure 8. Receive Frame Area Diagram 6-460 AFN-QOB&lA 82586 82586 Action Commands RECEIVE FRAME STATUS The 82586 executes a "program" that is made up of LINK FIELD .r-- NEXT RECEIVE FRAME DESCRIPTOR action commands in the Command Block List. As shown in Figure 5, each command contains the com- BUFFER DESCRIPTOR .1--- BUFFER DESCRIPTOR mand field, status and control fields, link to the next LINK FIELD action command in the CBL, and any command- DESTINATION ADDRESS specific parameters. The 82586 has a repertoire of 8 commands. SOURCE ADDRESS NOP TYPE FIELD Set Up Individual Address Configure Set Up Multicast Address Transmit Figure 9. Receive Frame Descriptor TOR Diagnose The 82586, once enabled, checks each passing Dump frame for an address match. The 82586 will recognize its own unique address, one or more multicast ad- dresses or the broadcast address. NOP: This command results in no action by the 82586 If a match occurs, it stores the destination and other than the normal command processing such as source address and type field in the next available fetching the command and decoding the command RFD. It then begins filling the next free Data Buffer on field. the FBL (which is pointed to by the current RFD) with the data portion of the incoming frame. As one DB is Individual Address Set Up: filled, the 82586 automatically fetches the next DB on This command is used to load the 82586's unique the FBL until the entire frame is received. This buffer address. The unique address i.s contained in the pa- chaining technique is particularly memory efficient rameter field of the command. because it allows the system designer to set aside buffers that fit a frame size that may be much shorter Configure: than the maximum allowable frame. Without buffer The Configure command is used to load the 82586 chaining, all receive data buffers would have to be as with its operating parameters. Upon reset, the 82586 long as the maximum allowable frame. initializes to the Ethernet-based parameters. If the user wishes to use any other values, the Configure Once the entire frame is received without error, the command is used. 82586 performs the following housekeeping tasks: Multicast Address Set Up: -Updates the Actual Count field of the last Buffer This command allows the programmer to set up one Descriptor used to hold the frame just received or more multicast addresses into the 82586. The mUl- with the number of bytes stored in its associated ticast addresses to be set up are located in the pa- Data Buffer. rameter field of the command. -Fetches the address of the next free Receive Frame Descriptor. Transmit: -Writes the address of the next free Buffer Descrip- One Transmit command is used to send a single tor into the next free Receive Frame Descriptor. frame. If more than one frame is to be sent, the host -Posts a "Frame Received" interrupt status bit in CPU can link multiple Transmit commands together. the SCB. . The destination address, type field and pointer to -Interrupts the CPU. buffers containing the data field are contained in the parameter field of the Transmit command. In the event of a frame error, such as a CRC error, the 82586 automatically reinitializes its DMA pointers TOR: and reclaims any data buffers containing the bad This command performs the Time Domain Reflec- frame. As long as Receive Frame Descriptors and tometry test on the coaxial cable. The TOR command data buffers are available, the 82856 will continue to is used to detect and locate cable faults caused by receive frames without further CPU help. either short or open circuits on the coaxial cable. 6-461 AFN-00864A 82586 Diagnose: stations will have better access to the cable during The Diagnose command puts the 82586 through a peak busy periods. self-test procedure and reports on the success or failure of the internal test. Diagnostics Dump: In addition to specifying network parameters, the This command causes the 82586 to dump its internal Configure command is also used to call up a power- registers into memory. The registers included are ful set of diagnostic functions through individual those loaded by the Configure and Address Set-Up fields within the command. commands, plus status and other internal working registers. Save Bad Frame: Under normal operation, the 82586 automatically dis- PROGRAMMABLE NETWORK cards frames with errors, such as a CRC error. PARAMETERS AND DIAGNOSTICS Frames can be saved for later examination by requesting it through this field. Network Parameters Address/Type Field Location: The Ethernet specification represents a complete This field informs the 82586 that the destination and description of the physical and data link layers of a source addresses and type field are the first entries local-area network. As such, items such as address in the Transmit Data Buffer ri\ther than in the param- and preamble length, maximum distance between eter field of the Transmit command (destination ad- two stations, and frame-check sequence length are dress and type field) and Individual Address register fixed to assure that stations connecting to the net- of the 82586 (source address). work are compatible. Through the Configure com- mand, the 82586 can also be tailored to achieve Loopback: maximum efficiency in other network configura- Two Loopback modes are available.on the 82586. The tions. The following parameters can be specified in Internal Loopback moves the transmitted frame from the Configure command: memory into the 82586 FIFO, through the bit trans- mitter, back into the bit receiver and back to memory PARAMETER LENGTH without going through the external serial drivers and Source/Destination Address oto 6 bytes receivers of the 82586. Note that the data moves at CRC 16 or 32 bits one-fourth the normal bit rate when the 82586 is in Preamble Length 16,32, 64,or128 Internal Loopback. bits Frame Delimiter Ethernet or HDLC External Loopback is identical to the Internal Loop- (Flags and bit back except that the frame does move out through stuffing) the serial drivers and back in through receivers of Slot Time 11 bits to specify the 82586 at the normal bit rate. This allows external number of transmit components, such as the 82501 ESI chip and Ether- clock times net transceivers, to be tested independently of the coaxial cable or remote station. The Slot time is a period slightly longer than the maximum round-trip delay time thrQugh the net- Promiscuous Receive: work, i.e., the round-trip delay between the two most The 82586 can be made to receive all good frames, distant stations. The Slot time is used in the regardless of address, using this field. This is useful CSMA/CD Backoff calculation where the random as a monitor or diagnostic mode for a station. time is defined in increments of the Slot Time. Shorter networks, such as a serial backplane within a Broadcast Disable: cabinet would have a very short Slot Time compared This field is used to disable the reception of all broad- to a 2500-meter Ethernet Network, for example. cast messages by the 82586. Priority can also be assigned via a field in the Con- Minimum Frame Length: figure command. This field specifies the amount of The 82586 automatically rejects received frames time the particular 82586 must wait after the cable which are shorter than tbe minimum frame length as has been quiet before attempting to transmit its specified in this field. This 9-bit field allows the mini- frame. By assigning lower-priority stations a longer mum frame length to range from 1 to 511 bytes. (For wait time, the high-priority (shorter wait-time) Ethernet the minimum frame is 64 bytes.) 6-462 AFN-00864A inter 82586 No CRC Insertion: -Channel busy; 82586 deferred before frame This field disables the automatic CRC insertion and transmission terminates the frame after last byte of the data field is -CTS (Clear To Send) lost transmitted. Using this option, frames with the wrong -CRS (Carrier Sense) lost CRC can be generated in order to test a receiving -Collision Test Status (Heartbeat Test) station's CRC checking circuitry. As an aid to monitoring the operation of the network System Interface and tracking its "vital signs," the 82586 also reports the following conditions after each received and The 82586 operates as a bus master. Through its transmitted frame. HOLD/HLDA signals, it is able to request bus cycles, transfer data and release the bus. Two internal 16- RECEIVED FRAME byte FIFOs are used to buffer data to and from the -No errors system bus through the four DMA channels on the -Short Frame (less than minimum frame length) 82586. Therefore, once the DMA request is granted, -DMA Overrun; FIFO overflow before DMA service the 82586 is able to transfer multiple bytes of data (to -CRC error fill or empty the FIFO) with each DMA request. -Alignment error -No resources (buffers) to store frame The 82586 system interface is a standard multiplexed bus that can be used with any of the popular 8- and TRANSMITTED FRAME 16-bit microprocessors. It is optimized for minimum- -Frame transmitted interface support logic when used with the iAPX 186 -Number of collisions encountered (Figure 10). When combined with the 82501 ESI chip, - Transmission aborted, too many collisions the Ethernet interface is complete from the CPU to -DMA underrun; FIFO empty before DMA service the transceiver cable. RElET RESETIN rol x, x, MN/MX ~ nTO SERIAL INTERFACE HOLD HOLD HLOA HLOA ClKOUT ClK IAPX 186 82586 RESETOUT RESET INTO INT PCSO '" CA so S1 BHE, A'6-A23 ADo-AD READY BHE, A16 -A23 AD o-AD15 SOS1S2 '" . III lJ l 15 READY ARDY ----:: ~ ! ;. MULTIPLEXED BUS lI J ~~ l I ~7 n , r ~. M'~ I ~ vi ~ ADDRESS DE DATA .I T DT/A: LATCHES 8282 TRANSCEIVERS,~ 8288 I- ASYNCHRONOUS RE ADY ST. 8287 Of DEN ALE I--I-~~NCHRONOUS ADY ~ '1'1 I ~ ADDRESS DATA COMMAND i SYSTEM BUS 1 Figure 10. iAPX 186/82586 System 6-463 AFN--Q0864A inter 82586 For 8086/8088-based systems, the 82285 is used as a have the same data transfer timing. A bus arbiter is clock generator for the 82586 system clock and the also needed to convert to/from the 82586 HOLD/ 8259A as an interrupt controlier. The 8288 Bus Con- HLDA from/to the 8086/8088 RQ/GT. This· config- trolier is common as both the CPU and the 82586 uration is shown in Figure 11. ~ i1' n TO SERIAL INTERFACE --- MN/MX MN/MX L.,. RESET H PIC READY 8259A ClK 82586 ARDY r1 8086 f+- RESET INTR INTR INTO INT ~ 82285 l- - f+- READY r-- HOLD a....!!.~ r--.... CLK BHE, ADo-AD,s A -A 16 19 -~Q~TOil so Sl 52 IJiITA I- r-- HlDA 50S! BHE, AD o-AD 15 A 16 -A 19 CA L- IiRO/GTO HOlD/HlOA It CONVERTER MULTIPLEXED BUS - ,J f ( 7 ~.,,- ~1 lATCHES 8282 STB ":' ~ 8287 OE DATA T/A TRANSCEIVER~ I 'i----i pattern in pa.rameter RAM bytes 8 and 9. RECTANGLE 3 A-1 B~-1 - 1 A-1 AREA FILL B-1 A A In set, reset, or complement mode, parameter RAM GRAPHIC bytes 8 and 9 act as another level of masking for line CHARACTER'" B-1 A A arc and rectangle drawing. As each 16-bit segment READ & of the line or arc is drawn, it is checked against the WRITE DATA W-1 pattern in the Parameter RAM. If the pattern RAM bit DMAW 0-1 C-1 is a one, the display RAM bit will be set, reset, or DMAR 0-1 C-1 (C-l)/U complemented per the proper modes. If the pattern • INITIAL VALUES FOR THE VARIOUS PARAMETERS ARE LOADED DURING THE HANDLING OF THE FIGS OP CODE BYTE. RAM bit is a zero, the Display RAM bit won't be .. CIRCLES ARE DRAWN WITH 8 ARCS, EACH OF WHICH SPAN 45", SO THAT SIN 4 ~ 1./-v'2 AND SIN e ~ o. modified. •.. GRAPHIC CHARACTERS ARE A SPECIAL CASE OF BIT-MAP AREA FILLING IN WHICH B AND A "8. IF A ~ 8 THERE IS NO NEED TO LOAD 0 AND 02. WHERE, When replace by pattern mode is selected, the -1 ~ ALL ONES VALUE. ALL NUMBERS ARE SHOWN IN BASE 10 FOR CONVENIENCE. THE GDC graphics character and fill commands will cause the ACCEPTS BASE 2 NUMBERS (2'S COMPLEMENT NOTATION WHERE APPROPRIATE). 8 x 8 pattern in parameter RAM bytes 8 to 15 to be - ~ NO PARAMETER BYTES SENT TO GDC FOR THIS PARAMETER. written directly into the display RAM in the appropri- AI ~ THE LARGER OF AX OR AY (DEPENDENT AXIS) AD ~ THE SMALLER OFAX OR AY. (INDEPENDENT AXIS) ate locations. r ~ RADIUS AT CURVATURE, IN PIXELS. ¢ ~ ANGLE FROM MAJOR AXIS TO END AT THE ARC. ¢ " 45'. e ~ ANGLE FROM MAJOR AXIS TO START AT THE ARC. e " 45'. t ~ ROUND UP TO THE NEXT HIGHER INTEGER. In set, reset, or complement mode, the 8 x 8 pattern in j ~ ROUND DOWN TO THE NEXT LOWER INTEGER. A ~ NUMBER OF PIXELS IN THE INITIALLY SPECIFIED DIRECTION. parameter RAM bytes 8 to 15 act as a mask pattern B ~ NUMBER OF PIXELS IN THE DIRECTION AT RIGHT ANGLES TO THE INITIALLY SPECIFIED DIRECTION. for graphics character or fill commands. If the appro- W ~ NUMBER OF WORDS TO BE ACCESSED. C ~ NUMBER OF BYTES TO BE TRANSFERRED IN THE INITIALLY priate parameter RAM bit is set, the display RAM bit SPECIFIED DIRECTION. (TWO BYTES PER WORD IF WORD will be modified. If the parameter RAM bit is zero, the TRANSFER MODE IS SELECTED.) o ~ NUMBER OF WORDS TO BE ACCESSED IN THE DIRECTION AT display RAM bit will not be modified. These modes RIGHT ANGLES TO THE INITIALLY SPECIFIED DIRECTION. DC ~ DRAWING COUNT PARAMETER WHICH IS ONE LESS THAN THE are selected by issuing a WDAT command without NUMBER OF RMW CYCLES TO BE EXECUTED. OM ~ DOTS MASKED FROM DRAWING DURING ARC DRAWING. parameters before issuing graphics commands. The ,. ~ NEEDED ONLY FOR WORD READS. pattern in the parameter RAM has no effect on WDAT, RDAT, DMAW, or DMAR operations. Figure 3. Drawing Parameter Details 6-473 AFN-01S12A 82720 The independent axis called out in the table is either In character mode, the display works almost exactly horizontal or vertical. The independent axis is as it does in graphics mode. The differences lie in the' defined as the axis of the longest component of the fact that data read from the display RAM is used to vector. The dependent axis is the axis of the shortest drive a character generator EPROM, as well as colo~, component of the vector. After the parameters have greyscale, or attribute logic if desired. In Character been set, line, arc, circle, rectangle or slanted rectan- mode, address bits 13-16 become line counter out- gle drawing operations are -initiated by the Figure puts used to select the proper line of the character Draw (FIGD) command. Character, slanted character, generator, and the address 17 output becomes the area fill and slanted area fill drawing operations are cursor output. initiated by the Graphics Character Draw (GCHRD) command. DMA transfers are initiated by the DMA Character Mode Display Timing Read or Write (DMAR or DMAW) commands. Data Read Operations are initiated by the Read Data In character mode, the display timing works as it (RDAT) Command. Data Write Operations are in- does in graphics mode. In addition, the Address 17 itiated by writing a parameter after the WDAT ouput becomes cursor output. The characteristics Of command. the cursor are defined by parameters of the cursor and Character Characteristics (CCHAR) Command. The Area Fill operation steps and repeats the B x B One bit allows the cursor output to be enabled or graphics character pattern draw operation to fill a disabled. The height of the cursor is programmable rectangular area. If the size of the rectangle is not an by selecting the top and bottom line between which integral number of B x B pixels, the GDC will auto- the cursor will appear. The blink rate is also program- matically truncate the pattern at the edges furthest mable. The parameter selects the number of frame from the starting point. times that the cursor will be inactive and active, re- sulting in a 50% dLM cycle cursor blinking at 2x the The Graphics Character Drawing capability can be rate specified by the parameter. modified by the Graphics Character Write Zoom Fac- tor (GCHR) parameter of the zoom command. The zoom write factor may be set from 1 to 16 (by using Character Mode Special Display Functions from 0 to 15 in the parameter). Each dot will be repeated in memory horizontally and vertically WINDOWING (adjusted for drawing direction) the number of times The GDC's Character Mode display can be par- specified by the zoom factor. titioned into one to four windows on the screen. The windows are defined by parameters written into the Arcs which do not start on an octant boundary can GDC's Parameter RAM. Each window is specified be drawn with 2 commands. One which draws from by a starting address and a window length in the octant boundary to the end of the arc followed by characters. a command which erases the arc from the arc from the octant boundary to the beginning of the arc. If windowing is not required, the first window length should be specified to be the same as the active The WDAT Command can be used to rapidly fill large display size. areas in memory with the same value. In the graphics mode, the LS Bit of the Parameter is used as the ZOOMING AND PANNING pattern for the R/M/W operations. In character mode, zooming and pan handling com- mands function the same way as in Graphics Mode. Character Mode Memory Organization Character Mode Drawing and Writing In character mode, the Display memory is organized into up to BK characters of up to 13 'bits each. The GDC can read or write characters of up to 13 bits into or out of the Display RAM. The display memory can be larger than the display itself. The display width (in characters) is a parameter All reading and writing functions take place at the of the reset command. The display memory width (in display RAM Location specified by the cursor. The characters) is a parameter of the Pitch Command. cursor location can be read by issuing the CURD The height of the display (in lines) is a parameter of Command. The cursor can be moved anywhere the Reset Command. The display memory height is within the display memory by the CURS command. determined by dividing the number of display The cursor location is also modified by the execution memory words by the pitch. of character read or write commands. 6-474 AFN.()1512A 82720 Each character is written or read via a Read/ Modify/ an active high line counter reset signal which can be Write cycle. Which bit(s) in the character to be modi- latched on the trailing edge of the horizontal sync fied is determined by the mask register. The mask pulse. During the active display line time, A16 pro- register can be used to change character codes with- vides blink timing for external attribute circuitry. This out modifying attribute bits or vice-versa. The signal blinks at 1/2 the blink rate of the cursor with a Replace with pattern, Set, Reset and Complement 75% on, 25% off duty cycle. A17 provides a signal modes work exactly as they do in graphics mode, which selects between graphics or character display, with the exception that the parameter RAM Pattern is which can be latched on the trailing edge of the not used. The pattern used is a parameter of the horizontal sync pulse. During the active display time, WDAT Command. <1\17 provides the cursor signal. The cursor timing and characteristics are defined in exactly the same The Figure Specify (FIGS) command must be set to way as in pure character mode. Character Display mode, as well as specify the direc- tion the cursor will be moved by read or write data commands. Mixed Mode Special Display Functions In character mode, the FIGD and GCHRD commands WINDOWING are not used. The GDC supports from one to four display windows in mixed mode. They can independently be program- Mixed Mode Memory Organization med into either graphics or character mode deter- mined by the state of two bits in the parameter RAM. In mixed mode, the display memory is organized into The window location in display memory and size also up to 64K words of 16 bits. determined by parameters in the parameter RAM. The display height and width are programmable by ZOOMING AND PANNING the same reset command parameters as in the graph- In mixed mode, zooming and panning commands ics and character modes. The display memory width function the same as in graphics and character (in words) is a parameter of the Pitch Command and mode. the height of the display memory is determined by dividing the number of display memory words by the pitch. Mixed Mode Drawing and Writing An image mode signal is used to switch the external In mixed mode, the GDC can write or draw in exactly circuitry between graphics and character modes in the same ways as in both graphics 'and character two display windows. moqes. In addition, the FIGS command has a param- eter GO (Graphics Drawing Flag) which sets the im- In a graphics window, the GDC works as it does in age mode signal to the proper state for External pure graphics mode, but on a smaller total memory Graphics or Character Circuitry. space (64K words vs 512K words). In a character window, the GDC works as it does in DEVICE PROGRAMMING pure character mode, but the line counter must be implemented externally. The counter is clocked by The GDC occupies two addresses on the system mi- the horizontal sync pulse and reset by a signal sup- croprocessor bus through which the GDC's status plied by the GOC. register and FIFO are accessed, Commands and pa- rameters are written into the GDC FIFO and are dif- In mixed mode, the GOO provides both a cursor and ferentiated on address bit AD. The status register or an attribute blink timing signal. AO READ WRITE Mixed Mode Display Timing STATUS REGISTER PARAMETER INTO FIFO 0 I I I I I I I I I I I i I I I I I I In mixed mode, the display timing works exactly as it FIFO READ COMMAND INTO FIFO does in graphics mode. 1 I I I I I I I I I I I I I I I I I I In addition, A16_becomes a Multiplexed Attribute and Clear Line Counter signal and A17 becomes a multi- Figure 4. GDC Microprocessor Bus Interface plexed cursor and image mode signal. A16 provides Registers 6-475 AFN-01512A 82720 the FIFO can be read as selected by the address line. SR-6: Horizontal Blanking Active: A 1 value for Commands to the GDC take the form of a command this flag signifies that horizontal retrace blanking is byte followed by a series of parameter bytes as currently underway. needed for specifying the details of the command. The command processor decodes the commands, SR-5: Vertical Sync: Vertical retrace sync occurs unpacks the parameters, loads them into the appro- while this flag is a 1. The vertical sync flag coor- priate registers within the GDC and initiates the re- dinates display format modifying commands to the quired operations. blanked interval surrounding vertical sync. This eliminates display disturbances. The commands available in the GDC can be organ- ized into five categories as described in figure 5. SR-4: DMA Execute: This bit is a 1 during DMA data transfers. VIDEO CONTROL COMMANDS SR·3: Drawing in Progress: While the GDC is draw- 1. RESET: RESETS THE GDC TO ITS IDLE STATE. ing a graphics figure, this status bit is a 1. 2. SYNC: SPECIFIES THE VIDEO DISPLAY FORMAT. 3. VSYNC: SELECTS MASTER OR SLAVE VIDEO SYNCHRONIZATION MODE 4. CCHAR: SPECIFIES THE CURSOR AND CHARACTER ROW SR·2: FIFO Empty: This bit and the FIFO Full flag HEIGHTS. DISPLAY CONTROL COMMANDS coordinate system microprocessor accesses with 1. START: ENDS IDLE MODE AND UNBLANKS THE DISPLAY. 2. BCTRL: CONTROLS THE BLANKING AND UNBLANKING OF the GDC FIFO. When it is 1, the Empty flag ensures THE DISPLAY. that all the commands and parameters previously 3. ZOOM: SPECIFIES ZOOM FACTORS FOR THE DISPLAY AND GRAPHICS CHARACTERS WRITING. sent to the GDC have been processed. 4. CURS: SETS THE POSITION OF THE CURSOR IN DISPLAY MEMORY. 5. PRAM: DEFINES STARTING ADDRESSES AND LENGTHS OF THE DISPLAY AREAS AND SPECIFIES THE EIGHT SR·1: FIFO Full: A 1 at this flag indicates a full FIFO BYTES FOR THE GRAPHICS CHARA~ER. 6. PITCH: SPECIFIES THE WIDTH OF THE X DIMENSION OF in the GDC. A 0 ensures that there is room for at least DISPLAY MEMORY. DRAWING CONTROL COMMANDS one byte. This flag needs to be checked before each 1. WDAT: WRITES DATA WORDS OR BYTES INTO DISPLAY write into the GDC. MEMORY. 2. MASK: SETS THE MASK REGISTER CONTENTS. 3. FIGS: SPECIFIES THE PARAMETERS FOR THE DRAWING PROCESSOR. SR·O: Data Ready: When this flag is a 1, it indicates , 4. FIGD: DRAWS THE FIGURE AS SPECIFIED ABOVE. 5. GCHRD: DRAWS THE GRAPHICS CHARACTER INTO DISPLAY that a byte is available to be read by the system MEMORY. DATA READ COMMANDS microprocessor. This bit must be tested before each 1. RDAT: READS DATA WORDS OR BYTES FROM DISPLAY MEMORY. read operation. It drops to a 0 while the data is trans- 2. CURD: READS THE CURSOR POSITION. ferred from the FIFO into the microprocessor inter- 3. LPRD: READS THE LIGHT PEN ADDRESS. DMA CONTROL COMMANDS face data register. 1. DMAR: REQUESTS A DMA READ TRANSFER. 2. DMAW: REQUESTS A DMA WRITE TRANSFER. FIFO Operation & Command Protocol Figure 5. GDC Command Summary The first-in, first-out buffer (FIFO) in the GDC handles the command dialogue with the system mi- croprocessor. This flow of information uses a half- o I 1t t duplex technique, in which the single 16-location LDATAREADY FIFO FULL FIFO is used for both directions of data movement, 1111 FifO EMPTY L..-----DRAWING IN PROGRESS DMAEXECUTE one direction at a time. The FIFO's direction is con- trolled by the system microprocessor thorugh the VERTICAL SYNC ACTIVE GDC's command set. The microprocessor coor- ~:';"':~A;E~~~K ACTIVE dinates these transfers by checking the appropriate status register bits. Figure 6. Status Register (SR) The command protocol used by the GDC requires the differentiation of the first byte of a command Status Register Flags sequence from the succeeding bytes. This first byte contains the operation code and the remaining bytes SR-7: Light Pen Detect: When this bit is set to 1, the carry parameters. Writing into the GDC causes the light pen address (LAD) register contains a de- FIFO to store a flag value alongside the data byte to glitched value that the system microprocessor may signify whether the byte was written into the com- read.IThis flag is reset after the 3-byte LAD is moved mand or the parameter addr,ess. The command pro- into the FIFO in response to the light pen read cessor in the GDC tests this bit as it interprets the command. entries in the FIFO. ' 6-476 AFN·01512A intJ 82720 The receipt of a command byte by the command moved to identify the pixel's location within the word. processor marks the end of any previous operation. The Execution word address pointer register, EAD, is The number of parameter bytes supplied with a com- also adjusted as required to address the word con- mandis cut short by the receipt of the next command taining the next pixel. byte. A read operation from the GOC to the micropro- cessor can be terminated at any time by the next In character mode, all of the bits in the Pattern regis- command. ter are used in parallel to form the respective bits of the modify data word. Since the bits of the character The FIFO changes direction under tne control of the code word are used in parallel, unlike the one-bit-at- system microprocessor. Commands written into the a-time graphics drawing process, this facility allows GDC always put th~ FIFO into write'mode if it wasn't any or all of the bits in a memory word to be modified in it already. If it was in read mode, any re~d data in in one RMW memory cycle. The Mask register must the FIFO at the time of the turnaround is lost.. Com- be loaded with 1s in the positions where modification mands which require a GOC response, such as RDAT. is to be permitted. CURD and LPRD, put the FIFO into read mode after the command is interpreted by the GDC's command The Mask register can be loaded in either of two processor. Any commands and parameters behind ways. In graphics mode, the CURS command con- the read-evoking command are discarded when the tains a four-bit dAD field to specify the dot address. FIFO direction is reversed. The command processor converts this par~meter into the one-of-16 format used in the Mask register for figure drawing. A full 16 bits can be loaded into _, Read-Modlfy-Wrlte Cycle the Mask register uSing the MASK command. In addi- tion to the charact!lr mode use mentioned above, the Data transfers between the GOC and the display 16-bit MASK load is convenient in graphics mode memory are accorpplished using a read-modify-write when all of the pixels of a word are to be set to the (RMW) memory cycle. The four clock period timing of same value. the .RMW cycle is 4sed to: 1) output the address, 2) read data from the memory, 3) mo~ify the data, and 4) The Logic Unit combines the data read from display write the modified data back into the initially se- memory, the Pattern Register, and the Mask register lected memory address. This type of memory cycle is. to generate the data to be written bac~ into display used for all interactions with display memory includ- memory. Anyone of four operations can be selected: ing DMA transfers, except for the two clock period REPLACE, COMPLEMENT. CLEAR or SET. In each display and RAM refresh cyc!es. case, if the respective Mask bit is 0, that particular bit of the read data is returned to memory unmodified. If The operations performed during the modify portion the Mask bit is 1, the modification is enabled. With of the RMW cycle merit additional explanation. The the REPLACE operation, the modify data simply circuitry in the GDC uses t~ree main elements: the takes the place of the read data for modification Pattern register, 'the Mask register, and the i6-bit enabled bits. For the other three operations, a 0 in Logic Unit. The Pattern register holds the data pat- the modify data allows the read data bit to be re- tern to be moved into memory. It is loaded by the turned to memory. A 1 value causes the specified WDATcommand or, during drawing, from the param- operation to be performed in the bit positions with eter RAM. The Mask r!lgister qOQtents determine set Mask bits. which bits of the read data will be modified. Based on the contents of these registers, t~e Logic Unit per- forms the selected operations of REPLACE, COM- Figure Drawing PLEMENT. SET. or CLEAR of' the data read from display memory. The GDC draws graphics figures at the rate of one pixel per read-modify-write (RMW) display memory The Pattern register contents are ANDed with the cycle. These cycles take four clock periods to com- Mask register contents to enable the actual modifica- plete. At a clOCk frequency of 5 MHz, this is equal to tion of the memory read data, on a bit-by-bit basis. SOO ns. During the RMW cycle the GDC simulta- For graphics drawing, one bit at a time from the neously calculates the address and position of the Pattern register is coml;>ined with the Mask. When next pixel tq be drawn. , ANDed with the bit set to a 1 in the Mask register, the proper single pixel is modified by the Logic Unit For The graphics figure drawing process depends on the the next pixel in the figure, the next bit in the Pattern display memory addressing structure. Groups of 16 register is selected and the Mask register bit is horizontally adjacent pixels form the 16-bit words 6-477 AFN.()1512A I"nf:_1" ••.:e--': 82720 which are handled by the GOC. Display memory is Figure' 8 summarizes these operations for each organized, as a linearly addressed space' of these direction. words. Addressing of individual pixels is handled' by the GDC's internal RMW logic. Whole word drawing is useful for filling areas in During the drawing process, the GDC finds the next memory with a single value. By setting the Mask pixel of the figure which is one of the eight nearest register to all 1s with the MASK command, both the neighbors of the last pixel drawn. The GDC 'assigns LSB and MSB of the dAD will always be 1, so that the each of these eight directions a nLlmber from 0 to 7, EAD value will be incremented or decremented for starting with straight down and proceeding each cycle regardless of direction. One RMW cycle counterclockwise. will be able to effect all 16 bits of the word for any drawing type. One bit in the Pattern register is used per RMW cycle to-write all the bits of the word to the same value. The next Pattern bit is used for the word"etc. -~------------------- ---- DIR ADDRESS OPERATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- ODD CAD ~ CAD + P 001 CAD ~ CAD + P IF dAD (LSI) ~ 1 THEN CAD ~ CAD + 1 dAD ~ RR( dAD) 010 IF dAD (LSI) ~ 1 THEN CAD ~ CAD +1 dAD ~ RR( dAD) ------~---- ~-~------------- --- 'CAD ~ CAD - P 011 Figure 7. Drawing Directions IF dAD (LSI) 'F 1 THEN CAD ~ CAD,+l _ _ _ _d_AD, ~ RR(:_d_AD_)'--~_ _ _ _ _ _ _ _ _ _ _ _ ' Figure drawing requires the proper manipulation of 100 CAD ~ CAD - P the address and the pixel bit position according to 101 CAD ~ CAD - P the drawing direction to determine the next pixel of IF dAD (MSI) ~ 1 THEN CAD ~ CAD - 1 dAD ~ LR( dAD) , the figure. To move to the word above or below the -~-----~~-----.--------- - -- current one, it is necessary to subtract or add the 110 IF dAD (MSI) ~ 1 THEN CAD ~ CAD - 1 ____ -"~_~_L_R_(~AD )_ _ _ _ _ _ _ _ _ _ _ _ _ __ number of words per line in display memory. This 111 CAD ~ CAD + P parameter is called the pitch. To move to the word to IF dAD (MSB) ~ 1 THEN CAD ~ CAD - 1 either side, the Execute word address cursor, EAD, dAD ~ LR( dAD) must be incremented or decremented as the dot ad- ---------~------------ WHERE dress pointer bit reaches the LSB or the MSB of the ~ PITCH, LR ~ LEFT ROTATE, RR ~ RIGHT ROTATE Mask register. To move to a pixel within the same CAD~CURSOR ADDRESS dAD~ DOT ADDRESS word, it is necessary to rotate the dot address pointer LSI~LEAST SIGNIFICANT lIT MSI~MOST SIGNIFICANT lIT register to the right or left. Figure 8. Address Calculation Details 6-478 AFN-01512A intJ 82720 For the various figures"the effect,of the initial direc- arc as drawing proceeds. An arc may be up to 45 tion upon the resulting drawing is shown below: degrees in length. DMA transfers are done on word boundaries only, and follow the arrows indicated in the table to find successive word addresses. The Note that during line drawing, the angle of the line slanted paths for DMA transfers indicate the GDC may be anywhere within the shaded octant defined changing boh the X and Y components of the word by the DIR value. Arc drawing starts in the direction address when moving to the next word. It does not initially specified by the DIR value and veers into an follow a 45 degree diagonal path by pixels. DIR 000 ~ LINE ~~/~ ARC , CHARACTER • SLANT CHAR RECTANGLE D DMA t\~' ,i 001 ~ . ,,/~ ~ ~ 0 y ... J / ~ 010 ,41$; to,U ~ ff 0 I , Z V C~~ ~ <> ~ , 011 100 ~ ~/~~ rmnn D f\.~ /" 101 ~ ~ ~ <> / ~ I ~ 110 7fT n ~ ff D ~ ' '~ I ~ 111 A ~'~J ~ ~ ,<> ~ -# Figure 9. Effect of the Direction Parameter 6-479 AFN-01512A 82720 Drawinq Parameters For an 8·by-8 graphics character, the first pixel drawn uses the LSB of RA-15, the second pixel uses bit 1, of In preparation for graphics figure drawing, the GDC's RA-15, and so on, until the MSB of RA-15 is reached. Drawing Processor needs the figure type, direction and drawing parameters, the starting pixel address, The GDC jumps to the corresponding bit in RA-14 to and the pattern from the microprocessor. Once these continue the drawing. The progression then advan- are in place within the GDC, the Figure Draw com" ces toward the LSB of RA-14. This snaking sequE!nce mand, FIGO, initiates the drawing operation. From is continued for the other 6 PRAM bytes. This pro- that pOint on, the system microprocessor is not in- gression matches the sequence of display memory volved in the drawing process. The GDC Drawing addresses calculated by the drawing processor. If the Processor coordinates the RMW circuitry and ad- area is narrower than 8 pixels wide, the snaking will dress registers to draw the specified figure pixel by advance to the next PRAM byte before the MSB is pixel. reached. If the area is less than 8 lines high, fewer bytes in the parameter RAM will be scanned. If the The algorithms used by the processor for figure area is larger than 8 by 8, the GDC will repeat the drawing are designed to optimize its drawing speed. eon tents of the parameter RAM in two dimensions, To this end, the specific details about the figure to be as required to' fill the area with the 8-by-8 mosaic. drawn are reduced by the microprocessor to a form (Fractions of the 8-by-8 pattern will be ,used to fill conducive to high-speed address calculations within areas which are not multiples of 8 by 8.) the GOC. In this way the repetitive, pixel-by-pixel calculations can be done quickly, thereby minimizing the overall figure drawing time. Figure 10 sum- marizes the parameters. DRAWING TYPE DC D D2 D1 DM INITiAL VALUE' -1 -1 LINE 1611 21 6D I-1 61 1 2(IADI-IAII) 21ADI Graphics Character Drawing ARC" , .'n