© 1982 Fairchild 3420 Central Expressway I=AIRCHILD Santa Clara CA 95051 A 5chlumberger Company The Advance Product Information designation on a Fairchild publication indicates that the product described is not characterized. The specifications presented are based on design goals or preliminary part evaluation and, as they are subject to change, are not guaranteed. Fairchild Microprocessor Division should be contacted for current information on these products. The information furnished in this publication is believed to be accurate and reliable. However, Fairchild cannot assume responsibility for its use, or for use of any circuitry describ- ed, other than circuitry entirely embodied in a Fairchild pro- duct. No license is granted or implied under any Fairchild patents, patents, or trademarks. Fairchild reserves the right to make changes in the circuitry or specifications presented in this publication at any time and without notice. iii iv Table of Contents Section 1 Introduction General. ..................................................................................... 1-3 Product Line ................................................................................. 1-3 Data Book ................................................................................... 1-3 Section 2 Ordering and Package Information General. .................................................................................. , .. 2-3 Temperature Range ............................................................... : .......... 2-3 Package Types and Outlines .................................................................. 2-3 Section 3 F8 Microcomputer Family General. ..................................................................................... 3-3 Memory Interface Devices .................................................................... 3-3 Input/Output Devices ......................................................................... 3-3 Bus Structure ................................................................................ 3-3 Instruction Set. .............................................................................. 3-3 F3850 Central Processing Unit. ............................................................... 3-7 F3851/F3856 Program Storage Unit .......................................................... 3-31 F3852 Dynamic Memory Interface/F3853 Static Memory Interface .............................. 3-55 F3854 Direct Memory Access Controller...................................................... 3-77 F38T56 Program Storage Unit. ..................•............................................ 3-87 F3861 Peripheral Input/Output. .............................................................. 3-97 F3871 Peripheral Input/Output. ............................................................. 3-109 Section 4 Controller Family F387X Family ................................................................................ 4-3 F3870X Family ............................................................................... 4-3 Part Numbers ................................................................................ 4-4 Descriptions ................................................................................. 4-4 F3870 Single-Chip Microcomputer. ........................................................... 4-5 F3870A/F3870B High-Speed Single-Chip Microcomputer...................................... 4-27 F38C70 Single-Chip Microcomputer.......................................................... 4-29 F38E70 Single-Chip Microcomputer.......................................................... 4-47 F3872/F38L72 Single-Chip Microcomputer. ................................................... 4-67 F38700 Central Processing Unit. ............................................................. 4-91 F38701 Single-Chip Microcomputer.......................................................... 4-95 F38752 Analog Interface Unit. ............................................................... 4-99 F38753 Power Control Unit. ................................................................ 4-103 F38754 Peripheral Input/Output. ............................................................ 4-105 v Table of Contents Section 5 F6800 Microprocessor Family General. ...................................................................................... 5-3 Instruction Set. ............................................................................... 5-3 .F6800/F68BOO B-Bit Microprocessing Unit. ...................................................... 5-11 F6801/F6803 Single-Chip Microcomputer....................................................... 5-51 F6802/F68821F6808MicroprocessorWith Clock and RAM ......................................... 5-57 F6809 Central Processing Unit. ................................................................ 5-81 F6810/F68A10/F68B10 128 x B-Bit Static RAM .................................................. 5-83 F6820 Peripheral Interface Adaptor............................................................. 5-89 F68211F68A211F68B21 Peripheral Interface Adaptor............................................. 5-103 F6840/F68A40/F68B40 Programmable Timer................................................... 5-115 F6844 Direct Memory Access Controller....................................................... 5-131 F6845/F6845A CRT Controller................................................................. 5-151 F6846 ROM-1I0-Timer........................................................................ 5-175 F6847 Video Display Generator............................................................... 5-195 F6850/F68A50/F68B50 Asynchronous Communications Interface Adaptor........................ 5-207 F68521F68A521F68B52 Synchronous Serial Data Adaptor........................................ 5-219 F6854/F68A54/F68B54 Advanced Data Link Controller........................................... 5-239 F3846/F6856 Synchronous Protocol Communications Controller................................. 5-263 F38456/F68456 Multiple Protocol Communications Controller.................................... 5-293. F68488 General Purpose Interface Adaptor.............................................. , ...... 5-297 Section 6 16·Blt 13L Bipolar Microprocessor Family General. ....................................................................................... 6-3 Instruction Set. ............................................................................... 6-3 F9443 Floating Point Processor....................................................... , ........ 6-13 F9444 Memory Management and Protection Unit. ............................................... 6-15 F9445 16-Bit Bipolar Microprocessor........................................................... 6-17 F9446 Dynamic Memory Controller............................................................. 6-45 F9447 110 Bus Controller...................................................................... 6-47 F9448 Programmable Multiport Interface........................................................ 6-55 F9449 Multiple Data Channel Controller.......................... ;., .. -' ......... , ...... ; ........ 6-61 F9450 Single-Chip Microprocessor............................................................. 6-75 F9451 Memory Management Unit. ............................................................. 6-77 F9452 Block Protect RAM ..................................................................... 6-79 F9470 Console Controller..................................................................... 6-81 vi Table of Contents Section 7 F16000 Microprocessor Family General. ...................................................................................... 7-3 Addressing ................. _................................................................. 7-3 Virtual Memory.......................................................................... '" ... 7-3 Symmetry ..................................................................................... 7-3 High-Level Language Support ................................................................... 7-4 Modularity .................................................................................... 7-4 Slave Processors .............................................................................. 7-4 System Protection ............................................................................. 7-4 Future Expansion .............................................................................. 7-4 F16032 High Performance Central Processing Unit. ............................................... 7-7 F16081 Floating Point Unit. ................................................................... 7-13 F16082 Memory Management Unit. ............................................................ 7-15 F16105 Very Intelligent Peripheral Controller.................................................... 7-17 F16201 Timing Control Unit. ................................................................... 7-19 F16202 Interrupt Control Unit. ................................................................. 7-21 F16203 Channel Controller.................................................................... 7-23 F16204 Bus Arbiter........................................................................... 7-25 F16413 CRT Controller........................................................................ 7-27 F16425 Packet Switching Frame Level Controller................................................ 7-31 F16456 Multiple Protocol Communications Controller............................................ 7-35 F16457 Data Encryption Circuit. ............................................................... 7-39 F16488 GPIB Controller....................................................................... 7-41 Section 8 F3532/F68332/F3533 32K ROM .................................................................. 8-5 F3564 64K ROM .............................................................................. 8-11 F3565 64K ROM .............................................................................. 8-13 F3566 64K ROM .............................................................................. 8-15 F3568 64K ROM .............................................................................. 8-17 F3569 64K ROM .............................................................................. 8-19 F3570 64K ROM .............................................................................. 8-21 F35316/F68316 16K ROM ...................................................................... 8-23 Section 9 Development Systems and Software EMUTRAC .................................................................................... 9-5 Formulator.................................................................................... 9-9 FS-1 ......................................................................................... 9-11 PEP-45 ...................................................................................... 9-15 PEP-68 ...................................................................................... 9-17 PEP-387X .................................................................................... 9-25 Software ..................................................................................... 9-27 vii Table of Contents Section 10 Applications Matrix Printer................................................................................ 10·5 PLL System ................................................................................. 10·19 Solar Controller............................................................................. 10·31 Section 11 Resource and Training Centers Section 12 Sales Offices viii INTRODUCTION 1tlI2 IORDERING AND PACKAGE ~ INFORMATION 1C!JIF8 MICROCOMPUTER FAMILY 1 0 1 CONTROLLER FAMILY ~ IF6800 MICROPROCESSOR FAMILY 1 101F16000 MICROPROCESSOR FAMILY ~ IROM PRODUCTS 1 InIg I DEVELOPMENT SYSTEMS AND L!J SOFTWARE [!QJ 1 I APPLICATIONS IITDIRESOURCE AND TRAINING CENTERSI I~ISALES OFFICES Section 1 Introduction General A microprocessor is essentially an integrated circuit logic capabilities by interconnection with external devices. The Fairchild Microprocessor Division product line encom- II replacement device that performs the functions of the cen- passes microprocessors and their support devices, single- tral processing unit (CPU) of a computer system. The and multi-chip microcomputers, and systems to emulate overall task of the microprocessor is to receive digital data and develop hardware and software. and store it for later processing, to perform arithmetic and logic operations on the data in accordance with instruc- tions contained in a stored program, and to present the Product Line results of these operations to the user through some form of output mechanism. The Microprocessor Division product line includes a wide range of devices to meet the specific needs of four broad The program is a definable and non-varying specification for application areas: any given application. It normally resides in a read only memory (ROM) or program storage unit (PSU). Variable data 1. a-bit microprocessors that is to be operated upon by the microprocessor is nor- mally stored in a random access memory (RAM) or other 2. a-bit single-chip microcomputers transient data storage element. 3. 16-bit microprocessors Although architectural details vary depending upon manufacturer and technology, a typical microprocessor 4. Development aids comprises the following functional areas: Within these areas, the Division offers a blend of in- 1. Instruction decoding to interpret program novative, state-of-the-art devices and proven, well- instructions. established devices. For example, the members of the F6800 family, and of the F8 family, can be configured to 2. An arithmetic and logic unit (ALU) to perform binary create a variety of 8-bit computer systems that have a wide addition, subtraction, etc., and Boolean logic range of capabilities. Similarly, the F9445 family com- operations. ponents can create extremely fast 16-bit computer systems that are exceptionally resistant to harsh environments, and 3. Registers to temporarily store frequently manipulated the F16000 family members can be used in configurations data. that are ideally suited to communications applications. (The F16000 has a 16-bit 1/0 structure and a 32-bit 4. Address buffers to provide the next program internal architecture.) instruction address. To the user, the Microprocessor Division line represents a 5. Input/output (1/0) buffers to read information into single source of cost-effective solutions to the full or write information out of the microprocessor. spectrum of application problems. Microprocessors are generally used in conjunction with Data Book support devices that perform timing, program and transient data memory, 110 signal interface, and other functions. A This data book presents a complete technical description wide range of configurations is possible with a of the Fairchild Microprocessor Division product line. microprocessor and its related devices; each configuration Where devices have been characterized, specific informa- represents a full microcomputer system. tion is presented in the form of data sheets. Information on partially characterized devices, and on devices currently A single-chip microcomputer incorporates CPU, memory, under development, is in the form of advance product infor- 1/0, control, and other functions into one integrated circuit. mation sheets. More complete data can be obtained from Typically, such devices have facilities for enhancement of the Product Marketing Department. 1-3 Introduction 1-4 I [!J IINTRODUCTION ICTIIF8 MICROCOMPUTER FAMILY 101CONTROLLER FAMILY 1~IF6800 MICROPROCESSOR FAMILY 101F16000 MICROPROCESSOR FAMILY I w I ROM PRODUCTS Inlg I DEVELOPMENT SYSTEMS AND L!J SOFTWARE I ~ I APPLICATIONS I[I!JIRESOURCE AND TRAINING CENTERSI I ~ I SALES OFFICES Section 2 Ordering and Packaging Information General Package Types and Outlines Specific ordering codes, as well as the temperature ranges The basic package type of a device, such as dual·in·line and package types available, are included in each data sheet of sections 3 through 8. Temperature Range plastic or dual·in-line ceramic, is indicated by the ordering code for that device. To accommodate various die sizes and pin numbers, different package forms exist within each package type. II The basic temperature ranges typically available are: The package forms indicated by device ordering codes are illustrated in the following detailed outline drawings. C Commercial (O°C to 75°C) L Automotive (- 40°C to 85°C) M Military (- 55°C to 125°C) 24·Pin Ceramic Dual·ln·Line T- t= 1.290 (32.7661_------' 1.235(31.369) -I I 12 I .030 (0.762) R .570 (14.478) .020 (05081 .515 (13.081) L~~~~~ _~ 1_," .100 (2 540) .040 (1 ,Q16l .190 (4.826) .140 (3.556) ,063 (1.544) I ~.'.{D'6131 +=, , f'II L ' .200 (5,0801-1 '--.L SEATING I , I I .037 {D,9401 IL·020 (05081 PLANE (190~1_ i I .750 .100 (2540) ,r-- 1-.027 (0.686)-11- .016 (O.40B) r---MAX -j .110 (2.794) STANDOFF .090 (2.286) WIDTH TYP NOTES: All dimensions are in inches bold and millimeters (parentheses). Pin material is nickel gold-plated kovar. Cap is kovar. Base is ceramic. Package weight is 6.5 grams. 2-3 Ordering and Packaging Information 24-Pin Plastic DIP 1.260 (320041 ---'.240 (314961 f .050 R (1271 I .560 (142241 .035 (8891 .540 (13.716) .090 (22861 .065 (16511 II Jmmmm ;~~~~NG .160(4.06) .045 NOM (1.14) --- - .145 (136831 .020 (5081 ~MIN .130(3301 I, (2i~9041 ·1 .037(9401 ~: .020 (5081 I .115(2.9211 -'1 ~ .090 -j 1-.027(.6861 +i~-.016(4061 I- (22861 STANDOFF WIDTH NOTES: All dimensions are in inches bold and millimeters (parentheses). Pins are tin·plated kovar. Package material is plastic. 28·Pin Ceramic Dual·ln·Line r - - - - - - 1 . 4 7 0 (37.34)~ I 1\ 1\1\ I 1.450 (36.a3) 1\ 1\ 1\ 1\ 1\ I -r-14 1 .030 (0.76) .020 (0.51) RADIUS .570 (14.48) '5~~n-~~~~~~rTrTrn-n,T~ .190 (4.83) .~~~~;;~~:;~~~;;~~ \(-~~~'" .037 (0.94) ____ .027 , WRITE) Every F8 configuration must contain an F3850 CPU, at least one F3851 Program Storage Unit (PSU) or memory interface 4. Three interrupt lines (PRI IN, PRI OUT, INT REO) device, and standard ROM or PROM (see figure 3-1). The memory·oriented devices may be used singly or together in Instruction Set the same system; when necessary, multiple units of the same type may be used. For example, an F3850 and two The instruction set of a microprocessor or microcomputer F3851s may comprise a system requiring 2K words of ROM, is the software tool used to shape the device or system for 64 bytes of RAM, and six I/O ports. a particular application. The F8 instruction set is divided into four functional groups: Memory Interface Devices 1. Input/Output When required by the application, the F3851 PSU may be replaced by an F3852 Dynamic Memory Interface (DMI) or 2. Arithmetic/Logical F3853 Static Memory Interface (SMI). Both of these devices interpret control Signals output by the F3850 and generate 3. Address Register Control the standard address and control Signals required by off·the-shelf dynamic and static memory devices. 4. Indirect Scratchpad Address Register (ISAR) and Status Control The F3854 Direct Memory Interface (OMA) device is used in The F8 instruction set is presented in table 3·1. 3·3 Fa Microcomputer Family Table 3-1 F8 Instruction Set Instruction Description Instruction Description ADC Add Accumulator to Data Counter Add Immediate to Accumulator JMP Branch Immediate AI AM Add (Binary) Memory to Accumulator LI Load Immediate AMD Add (Decimal) Memory to Accumulator LIS Load Immediate Short AS Add (Binary) Scratchpad Memory LlSL Load Lower Octal Digit of ISAR to Accumulator LlSU Load Upper Octal Digit of ISAR ASD Add (Decimal) Scratchpad Memory LM Load Accumulator'trom Memory to Accumulator LNK Link Carry to Accumulator BC Branch on Carry LR Load Register BF Branch on false BM Branch on Negative NI AND Immediate BNC Branch if No Carry NM Logical AND from Memory BNO Branch if No Overflow NOP No Operation BNZ Branch if Not Zero NS Logical AND from Scratchpad Memory BP Branch if Positive BR Unconditional Sninch 01 OR Immediate BR7 Branch on ISAR OM Logical OR from Memory BT Branch on True OUT Output Long Address BZ Branch on Zero OUTS Output Short Address CI Compare Immediate PI Call to Subroutine Immediate CLR Clear Accumulator PK Call to Subroutine Direct and Return from Subroutine Direct COM Complement POP Return from Subroutine DCI Load Data Counter Immediate SL Shift Left 01 Disable Interrupt SR Shift Right OS Dessement Scratch pad Memory Content ST Store to Memory EI Enable Interrupt XDC Exchange Data Counters XI Ekxclusive-OR Immediate IN Input Long Address XM Exclusive-OR from Memory INC Increment Accumulator XS Exclusive-OR from Scratch pad Memory INS Input Short Address 3-4 Fa Microcomputer Family Descriptions Following is data that describes the members of the F8 microcomputer system family. F8 FAMILY ORGANIZATION F3850 CENTRAL PROCESSING UNIT II F3851 PROGRAM STORAGE UNIT F3852 DYNAMIC MEMORY INTERFACE F3853 STATIC MEMORY INTERFACE F3854 DIRECT MEMORY ACCESS CONTROLLER F3856 PROGRAM STORAGE UNIT F38T56 PROGRAM STORAGE UNIT F3861 PERIPHERAL INPUT/OUTPUT F3871 PERIPHERAL INPUT/OUTPUT 3-5 Fa Microcomputer Family 3-6 F3850 Central Processing Unit (CPU) Microprocessor Product Description The Fairchild F3850 is the Central Processing Unit (CPU) for • 8-Blt Arithmetic and Logic Unit, Supporting Both Binary and the F8 8-Bit Microprocessor family. The F3850 contains more Decimal Arithmetic than 70 instructions in its instruction set and operates on 8-bit • Interrupt Control LogiC II units of information. • Power-on Reset Logic • Clock Generation Logic Within the CPU Chip, With Crystal • N-channellsoplanar MOS Technology and External Clock Generation • 2 p's Cycle Time • More Than 70 Instructions • 64-Byte Scratchpad on the CPU Chip • +5 V and +12 V Power Supplies • lINo Bidirectional, 8-Bit 1/0 Ports, with Output Latches • Low Power Dissipation (Typically Less Than 330 mW) Signal Functions Connection Diagram ---- ¢ INTREQ XTLZ - - } INTERRUPT WRITE ICB --+- LINES WRITE XTLZ CLOCK LINES XTLX ROMeo Voo XTLY XTLY XTLZ ROMe l ROMe 2 -- CONTROL LINES EXT RES ---- 1/000 1/0 01 ROMe 3 -- ----- EXT RES RESET 1/002 ------ 1/003 DB, 1/004 DB, 1/0 05 DB, --- DB, --- 110 liDos 1/0 16 DB, DATA PORT BUS LINES 1/007 ilo 17 ------ DB, LINES 1/010 DB, DB, DBs 1/0 11 1/0 00 1/007 --- DB, 1/0 12 -- DB, ROMeo Vss 1/013 1/0 14 -- )~. ----- Vss 1/°15 Voo -- 1/0 16 (Top View) Voo 1/0 17 3-7 F3850 Device Organization The contents of the instruction register are decoded by control unit logic, which generates signals to enable specific sequences The logical organization and pins for the F3850 CPU are of logic operations within the CPU chip. In response to the con- illustrated in Figure 1. tents of the instruction register, the control unit also generates five signals, ROMCothrough ROMC4 , that control operations Arithmetic and Logic Unit throughout the microprocessor system. The arithmetic and logic unit (ALU) provides all data manipulating logic for the F3850. It contains logic that operates on a single 8-bit Accumulator source data word or combines two 8-bit words of source data to The accumulator is a general-purpose 8-bit data register. generate a single 8-bit result. Additional information is reported in which is the most common data source and results destination status flags, where appropriate. fortheALU. Operations performed on two units of source data include addition, Scratchpad and ISAR compare, and the Boolean operations (AND, OR, Exclusive-OR). The scratchpad provides 64 8-bit registers that may be used The two sources are input to the ALU through the left and right as general-purpose RAM memory (see Figure 2). multiplexer buses; the result is placed on the result bus. Operations performed on a single 8-bit unit of source data include Figure 2 F8 Programming Model complement, increment, decrement, shift right, shift left, and clear. - . . . - BIT NO. The source is input to the ALU through either the left or right multi- plexer bus; the result is placed on the result bus. Instruction Register The CPU contains registers for storing various types of data. HI LO The instruction register holds an 8-bit code, which defines the operations to be performed by the CPU. NOT INCREMENTED OR DECREMENTED ~ • L INCREMENTED AND DECREMENTED Figure 1 F38S0 CPU Logical Organization RESULTS BUS l ,..... - _I ACCUMULATOR I- r---~ I- -' :> :I! ALU -- . -- U> :> 64 x8~BIT SCRATCHPAD REGISTERS I- -I STATUS(W) I-§ a: w >< w ;r r'" ..... >= -' :> :I! l- J: I INSTRUCTION I--- a:" - I ISAR 1--.... L- l L t- - - INTERNAL OAT A BUS CONTROL POWER 1 t 1I 1 I UNIT LOGIC INTERRUPT LOGIC ON DETECT CLOCK CIRCUITS 111 I I I 1/0 PORTA IIOPORTB DATA BUFFER t t -t t t t Voo VGG Vss 11007 1I0os - DB. DB, ~ ROMeo ROMC4 ~ 1 ~ ~ xL! lv 1JTE INT I CB EXT RES REO XTLX 3·8 F3850 The indirect scratchpad address register (ISAR) is a 6-bit register i.e .• the ISAR is assumed to hold the address of the scratch pad used to address the 64 scratchpad registers. byte that is to be referenced. The first 16 scratch pad bytes can be identified either by instruc- The ISAR may be visualized as holding two octal digits. HI and LO. tions without using the ISAR or referenced through the ISAR. as illustrated in Figure 3. This division of the ISAR is important. The remaining scratchpad bytes are referenced through the ISAR; since a number of instructions increment or decrement the con- Figure 3 tSAR Register ACCUMULATOR 0 LR r, A II r---~~----~~ CPU GENERAL REGISTERS ISAR 11~2 REGISTER ADDRESS POINTER LRJ,W J LRW,J A H 10 B H 11 C K 12 ZERO - - - - - - ' D K 13 POP CARRY - - - - - - 0 14 SIGN - - - - - - - 0 15 15 LRP,K 10 16 STACK POINTER LRK,P 15 DATA COUNTER LRDC,H LRH,DC LRDC.O LR O. DC MEMORY ADDRESS POINTER 3F 63 3-9 F3850 tents of the ISAR, when referencing scratchpad bytes through the and program memory address registers that are maintained on ISAR. This makes it easy to reference a buffer consisting of con- the F3851, F3852, and F3853 Chips. Figure 4 identifies the data tiguous scratchpad bytes. However, only the low-order octal digit transfers that can be implemented by executing a single F8 (LO) Is incremented or decremented; thus ISAR is incremented instruction. For example, the illustration: from 0'27'* to 0'20', not to 0'30'. Similarly, ISAR is decremented from 0'20' to 0'27', not to 0'17'. This feature of the ISAR is very W register of F3850 CPU - J useful in that it greatly simplifies many program sequences. means that a single instruction can move the contents of the W Selected scratchpad registers are reserved for direct communi- (or status) register to scratch pad register 9 (J register). Another cation with other registers within the F8 system, as illustrated in single instruction can move data in the opposite direction. Figure 4. Status Registers Scratchpad register 9 (0'11 ') is used as temporary storage for The status (W) register holds five status flags. Table 1 summarizes the CPU stetus register (W register). Scratchpad registers 10 the way each flag is used. Note that status flags are selectively through 15 (0'12' through 0'17') communicate directly with data modified following execution of different instructions. See the "Instruction Execution" section for a discussion of the way 'The notation O'nn' represents an octal number. individual F8 instructions modify status flags. Figure 4 F3850 CPU Scretchpad Registers SCRATCHPAD BYTE ADDRESS SCRATCHPAD DECIMAL OCTAL § W REGISTER OF F3850 CPU _ _ J 11 10 12 OC REGISTER OF F3851 PSU.( H ( HU F3852 DMI AND F3853 SMI - ( HL 13 11 L~l KU 12 14 PCOORPC1(STACK)REGISTEROFF3851 PSU F3852 DMI AND F3853 SMI \ t KL H 15 14 16 DC OR PCO REGISTER OF F3851} (QU PSU F3852 DMI AND F3853 SMI -iQL 15 17 16 20 56 72 59 73 60 74 61 75 62 76 63 77 3-10 F3850 -+-- BIT NO. Overflow (0 Blt)-When the results of an ALU operation are I C B o Z I I I C STATUS REGISTER (W) being interpreted as a signed binary number, since the high-order bit (bit 7) represents the sign of the number, some method must be provided for indicating a carry out of the highest numeric bit LSIGN ~ (bit 6). This is done using the 0 bit. After arithmetic operations, II the 0 bit is set to the Exclusive-OR of a carry out of bits 6 and 7. L CARRY The simplification of signed binary arithmetic is described in the F8 and F3870 Guide to Programming; examples are presented below: ZERO 7 654 3 2 1 0 - Bit Number OVERFLOW Accumulator contents: 10110011 INTERRUPT MASTER Value added: 01110001 ENABLE Sum: 11100100 Sign (S Blt)-When the results of an ALU operation are being There is a carry out of bit 6 and a carry out of bit 7, so the 0 bit is interpreted as a signed binary number, the high-order bit (bit 7) reset to 0 (1 $1 = 0). The C bit is set to 1. represents the sign of the number. At the conclusion of instruc- tions that may modify the accumulator bit 7, the S bit is set to 76543210 - Bit Number the complement of the accumulator bit 7. Accumulator contents: 01100111 Value added: 00100100 Sum: 1 a aa 1 a 1 1 Table 1 Summary of Status Bits There is a carry out of bit 6, but no carry out of bit 7; the 0 bit is set to 1 (1 $ a= 1). The C bit is reset to O. OVERFLOW = CARRY? + CARRY6 ZERO = ALU? ALU6 ALU 5 ALU4 ALU3 ALU2 ALU 1 ALUo Interrupts (ICB Blt)-External logic can alter program execution CARRY = CARRY? sequence within the CPU by interrupting ongoing operations. SIGN = ALU? However, interrupts are allowed only when the ICB is set to 1; interrupts are disallowed when the ICB is reset to O. Control Unit Carry (C Blt)-The C bit may be visualized as an extension of an The control unit decodes the contents of the instruction register a-bit data unit; i.e., the ninth of a 9-bit data unit. When two bytes and generates two sets of control signals. These Signals are are added, and the sum is greater than 255, then the carry out of transparent to the user. the high-order bit appears in the C bit; e.g.: Five control signals (ROMCo through ROMC4) are output by C 765 43 21 a - Bit Number the control unit to identify operations that other chips of the Fa Accumulator contents: 01100101 family must perform. These signals are described in the "ROMC Value added: 01110110 Signals" section. Sum: a 1 1 a 1 1 01 1 Interrupt Logic There is no carry, so C is reset to O. This logic handles the interrupt requests. For a complete C 7 65 43 21a - Bit Number description refer to the "Interrupt" discussion within the Accumulator contents: 1 aa 111 1 a "Instruction Execution" section. Value added: 1101000 1 a Sum: 1 110 1.110 Power on Detect rhere is a carry, so C is set to 1. When the External Reset (EXT RES) signal is pulled low and then returned high, or when power is turned on, the power on detect Zero (Z blt)-The Z bit is set whenever an arithmetic or logical logic sets the PC registers to 0, causing a program originating at operation generates a zero result. The Z bit is reset to when ana a memory location to be executed. Also, the interrupt control arithmetic or logical operation could have generated a zero result status bit is set low, inhibiting interrupt acknowledgement. The but did not. system is locked in an idle state while EXT RES is held low. 3-11 F3850 Signal Descriptions The F3850 input and output signals are described in Table 2. Table 2 F3850 Signal DeliCriptions Mnemonic Pin No. Name Description Clock

output should be approximately 15 pF. The characteristics of the crystal drive the slave XTLY input. Figure 5 Crystal Mode Clock Generation Figure 6 External Mode Clock Generation Vss Vss XTLZ ~ C, XTLY F3850 CPU XTLY F3850 CPU T XTtX XTLX 1 c, T Vss EXTERNAL CLOCK 3-13 F3850 Figure 7 illustrates the timing characteristics of the clock ROMe Signals· signal needed for external mode clock generation and the The CPU logic uses the five ROMC signals to identify operations timing c~aracterlstlcs of the q, and WRITE signals generated that devices must perform during any instruction cycle. The 32 by the CPu. possible ROMC states are described in the "ROMC Signal Functions" section. The state of the ROMC signals and the Timing Signal Outputs operation they identify last through one instruction cycle. In response to the three clock mode inputs, the F3850 CPU outputs two timing signals: clock signal", and instruction cycle The general distribution of logic among devices of the F8 family control signal WRITE. As shown in Figure 7, q, is the signal used and general data movements associated with instruction execution to synchronize the entire microprocessor system. The WRITE are given in the F8 and F3870 Guide to Programming. signal defines the duration of each machine cycle. Refer to the "Instruction Execution" section. Parameters and specifications for Memory addressing logic is located on the F3851 Program the timing signals are detailed in the "Timing Characteristics" Storage Unit (PSU), the F3852 Dynamic Memory Interface section. (DMI), and the F3853 Static Memory Interface (SMI) devices. Each of these devices contains registers to address programs Instruction Execution (PCO and PC1) or data (DCO or DC1). The F3851 PSU does not have a DC1 register. The F3850 CPU logic oontrols instruction execution through the q, and WRITE timing signals, plus the five ROMC control Unlike other microprocessors, the F385D CPU does not output lines. Devices external to the F3850 CPU must respond directly addresses at the start of memory access sequences; a simple to these signals. command to access the memory location addressed by PCO or DCO is sufficient, since the device receiving the memory access Instruction Cycle command contains PCO and DCD registers. (The PC1 and DC1 All instructions are executed in cycles that are timed by the trailing are buffer registers for PCO and DCO.) edge of WRITE. Moving memory addressing logic from the CPU to memory There are two types of instruction cycle: the short cycle, which is (and memory interface) devices simplifies CPU logic; however, it four q, periods long, and the long cycle, which is sixq, periods long. creates the potential for devices to compete when responding to The long cycle Is sometimes referred to as 1.5 cycles. Figure 7 memory access commands. illustrates the short cycle (PoNs) and the long cycle (PWd. Note that WRITE high appears only at the end of an instruction cycle. There will be as many PCO and DCO registers in a microcomputer system as there are PSU, DMI, and SMI devices; the ambiguity The simplest instructions of the F8 instruction set execute in one of which unit will respond to a memory read or write command is short cycle. The most complex instruction (PI)"requires two short resolved by ensuring that all PCD and OCD registers contain the CYCles plus three long cycles. same information at all times. Every PSU, OMI, and SMI device Figure 7 . Clock Generation Timing Signals ~ -r- ~-==t .I+F- td N~ _ _ _--iL __ - ~-----..JL --- ~""-.- - '- - - - pw. ------0-1 WRITE ---If ~~.~I~.~-.. ----------__----__------PWL------~+-----------------~·I 3-14 F3850 has a unique address space, i.e., a unique block of memory As referenced in the "ROMC Signal Functions" section, each addresses within which it responds to memory access ROMC state is identified by individual signal line states (1 for commands. high, 0 for low), and by a two-digit hexadecimal code. The hexadecimal code is used to identify ROMC states throughout For example, an F3851 PSU may have an address space of this data sheet. Also given in the "ROMC Signal Functions" section H'OOOO' through H'03FF'; an F3852 DMI may have an address is the instruction cycle length (short or long) implied by each code, space of H'0400' through H'07FF'. If a microcomputer system has plus the way in which codes must be interpreted by the other these two memory devices and no others, then the F3851 PSU II F8devices. will respond to memory access commands when the PCO or DCO registers (whichever are identified as the address source) contain Instruction Execution Sequence a value between H'OOOO' and H'03FF'; the F3852 DMI will Every instruction execution sequence ends with an instruction respond to addresses in the range H'0400' through H'07FF'. No code being fetched from memory to identify the next instruction device will respond to addresses beyond H'07FF', even though cycle. The instruction code is loaded into the CPU instruction such addresses may exist in PCO and/or DCO. register, out of which it is decoded by the CPU control unit logic. An instruction fetch is executed during the last instruction cycle Each device compares its address space with the contents of PCO of the previous instruction, as illustrated in Figure 9. and DCO, whichever is identified as the address source, and only responds to a memory access command if the contents of PCO or There is a group of F8 instructions that cause operations to occur DCO is within the device's address space. entirely within the F3850 CPU. These instructions do not use the data bus, therefore can execute in one cycle. Since one-cycle in- If all memory address registers (PCO, PC1, DCO, and DC1) are to structions do not use the data bus, no ROMC state needs to be contain the same information, then ROMC states that require any generated for the one-cycle instruction being executed; therefore, of these registers' contents to be modified must be acted upon by as illustrated in Figure 9, ROMC state 0 is specified, causing the all devices containing any of these four registers. If devices are instruction fetch of the next instruction. not to compete when an ROMC state specifies that a memory access must be performed, then only a device whose address Multi-cycle instructions must end with a cycle that does not use space includes the identified memory address must respond to the data bus; ROMC state 0 is specified at the beginning of this the ROMC state. last instruction cycle, causing the next instruction to be fetched. As illustrated in Figure 8, the five ROMC signals that define the Following an instruction fetch, CPU logic decodes the fetched ROMC state are output early in the instruction cycle and are main- instruction code and executes the specified instruction. There tained stable for the duration of the instruction cycle; i.e., only one are Five types of instruction cycles that can follow. ROMC state can be specified per instruction cycle. Therefore, devices can only be called upon to perform one instruction execu- 1. Operations may all be internal to the CPU. This will be the last tion related operation per one instruction cycle. or the only cycle for an instruction, and will specify ROMC state 0, as illustrated in Figure 9. Figure 8 ROMC Timing Signals Output by F3850 CPU 1_ td, WRITE \ ~____________~L ___ ~___~/r---, _____\~ 1...-- ---'1 Id3 LONG CYCLE ROMe ________________J)(r---------------S-T-A-Bl-E--------------- 3-15 F3850 Figure 9A Short Cycle Instruction Felch XTLY td, -r- p~-::::I 1- ld, WRITE _--J~I-PW'--I-' N1----'-------------J  ~_ __ -----PWL--,--.,.---------+lrl - - -_ _ _ _ _; . . . 1_ - - , . I I ROMC 1 ){~'___________________T_R_U_E_RO_M_C_S_TA_T_E_D__________________~I~I------- --------------------------~i- l_ld3~ II I ~-~I I ____________________________________________________- J ONE CYCLE OF THE SINGLE, LONG X I OP CODE FOR NEXT 1 INSTRUCTIOIII IIIEXT CYCLE OS IIliSTRUCTION (DECREMENT SCRATCHPAD) I INSTRUC!'ON Figure 9B Long Cycle Instruction Felch (During DS Only) XTLY ld,~P~-j 11-.:....-:-:-ld,----PWs-----.1 WRITE _~AI N------~I NII...-_ __ _PW'-!I II I II ROMC ----------------------;..1----""'""x TRUE ROMC STATED I :' I-- !do --I II' I 1- tdb, ----! 1 DATA ______________________ ~-----------------------------------J){'-----O-P-C-OD-E-F-O-R-NE-X-T-IN-ST-R-U-CT-IO-N------ BUS ONE CYCLE OF A SIIliGLE CYCLE IIIEXT INSTRUCTIOI>j, OR ,LAST CYCLE OF A I,NSTRUCTION MULTICYCLE INSTRUCTION 3-16 F3850 2. Data may be transferred between the F38S0 CPU and Refer to the "Instruction Cycle Execution and Timing" section for memory devices. See the "Referencing Memory" section. a list of the instruction cycles and their associated ROMC state. 3. Data may be transferred from one memory device to all memory devices. The CPU is not the transmitter or the Referencing Memory receiver of data in this transfer. See the "Memory-to-Memory Memory may be referenced during an instruction cycle either to Data Transfers" section. transfer the data from the CPU to a memory word or to transfer 4. Data may be transferred to or from an I/O port, as described data from a memory word to the CPU. A memory reference in the "Input/Output Interfacing" section. occurs as shown in Figure 10. • 5. An interrupt may be acknowledged, as described in the "Interrupts" section. If data is being output by the CPU, then the delay before data out- put is stable will be tdb 1 when data comes from the accumulator; Every F8 instruction is executed as one, or a sequence of, the instruction cycle will be long. The delay before data output is standard instruction cycles. Timing for the standard instruction stable will be tdb2 when data comes from the.scratchpad; the cycles is illustrated in Figures 9, 10, 11 and 12 instruction cycle in this case will also be long. Figure 10 Memory Reference Timing PWL 1_:- - - - - P W s - - - - - - - - I -I (WRITE) J,.---~~------------------.JI1 N 1 I L 1 ~I-~----------------~bl----------------~ '1 1 1 DATA BUS (1) I X 1 1._--- ~D - - - - - -•• 1 (HIGH IMPEDANCE) 1 1 I DATA BUS (1) X1 ~I-~---------~~-----------.·1 STABLE I DATA BUS XI- tdb4 -I I- tdbs ·1 DATA BUS X DATA STABLE 1 l- td"" '1 DATA BUS X DATA STABLE (1) liming for CPU outputting data onto the data bus. (2) There are four possible cases when inpulling data to the CPU. via the data bus lines which depend on the data path and the destination in the CPU, as follows: Delay tdb, is the delay when data is coming from the accumulator. tdb3: Destination -IR (instruction Fetch) Delay tdb 2 is the delay when data is coming from the scratch pad (or from a tdb,: Destination - Accumulator (with ALU operation - AM) memory device). tdbs: Destination - Scratchpad (LR K,P etc.) tdb6 : Destination - Accumulator (no ALU operation - LM) Delay tdbo is the delay for the CPU to stop driving the data bus. In each case a stable data hold time of 50 ns from the WRITE reference point is required. 3·17 F3850 Figure 11 Timing for Data Input or Output at 1/0 Port Pini PWs (WRITE)...! XI" I X -rll- Ih I I I I" I,u ~ II I 1/0(1) I DATA MAY CHANGE STABLE I DATA MAY CHANGE I I" I. ·1 ~~--------------------------J){~-------N-EW--D-A-T-A------~~------------------------- 1/0(2) ______________ I DATA FROM OLD OUTS (1) This represents the timing for data at the 1/0 pin during the execution of the (2) This represents the timing for data being output by the CPU at the 110 pin. INS instruction, i.e., the CPU is inputting. Figure 12 Interrupt Signals TIming PWs I" ·1 WRITE-'! j'iI. I N / '-- "",,- PW2 I PWL ·1 ~~~J ROMC TRUE ICB(1) I I X I ~Ids:j I I INT REQ (2) i' X I I I I" Id. -I I I INTREQ(2) I I I Is, ·1 ," I " EXT RES (1) The ICB signal will go from a 1 to a 0 following the execution of the E1 instruc- (2) This is an input to the CPU chip and is generated by a PSU or F3853 M1 chip tion and will go from a 0 to a 1 following either the execution of the 01 instruc- The open drain outputs of these chips are all wire-AN Oed together on this tion or the CPU's acknowledqement of an interrupt. line with the pull-up being located on the CPU chip. For a 0 to 1 transition the delay is measured to 2.0 V. . . 3-18 F3850 If data is being input to the CPU, then the delay before incoming 1/0 port pin is a ''wire-AND'' structure between an internal latch data must be stable depends on the destination of the data, as and an external signal, if any. The latch is always loaded directly illustrated in Figure 10. frorn the accumulator. The type of data transfer is identified by the ROMC state that is Each F8 1/0 pin can be set high or low under program control. output at the beginning of the instruction cycle. If a 1 (high) is presented at the latch, then gate (b) turns on and gate (a) turns off, so that P is at Vss (low). If a a (low) is presented The instruction fetch may also be viewed as a memory reference at the latch, then gate (a) turns on and gate (b) turns off, so that P • operation where the destination is the instruction register. Timing is at VDD (high). for this case is illustrated in Figure 9. When outputting data through an 1/0 port, the pin can be Memory-to-Memory Data Transfers connected directly to a TTL gate input ("TTL Device Input" In response to appropriate ROMC states, data can be trans- in Figure 13). Data is input to the pin from a "TTL Device ferred from one memory device to all memory devices during Output" in Figure 13. one instruction cycle. For example, data can be transferred from a memory byte within (or controlled by) one memory In normal operation, high or low levels at P drive the external device, to one byte of an address register (PCa or DCa) within TTL device input transistor (d). If a low level is set at P, transistor all memory devices. (d) conducts current through the path J, 1, P, and FET(b). This is transferred as a low level to the rest of the circuits in the TTL Three ROMC states (C, E, and 11) specify operations of this type, device and results in a high or low level at the output of the and Figure 10 illustrates timing for the data transfer. device, depending on its characteristics. If the level at P is set In Figure to, tdb2 is the delay until data from memory or a high, transistor (d) does not conduct current, and a high level is memory address register is stable on the data bus. transferred by (d). InputlOutput Interfacing When data is input to the 1/0 pin, high or low levels at a drive the Programmed I/O in the F8 microcomputer system is influenced hysteresis circuit in the port and result in logic ones or zeros being by the design of the 1/0 port pins. As illustrated in Figure 13, each transferred to the accumulator. Figure 13 F8 1/0 Port Bit 1------ Voo -----------1 I Voo I I I I II I1- _ _ _ _ _ _ TTL DEVICE INPUT LATCH Vss [0------ L -_ _ _ _ _- , I I HYSTERESIS CIRCUIT I I L _____ _ TTL DEVICE OUTPUT (OPEN-COLLECTOR) 3-19 F3850 Since the I/O pin and the TTL device output at 0 are wire-ANDed, nothing happens until the next interruptable instruction comes to it is possible for the state of one to affect the transfer of data out the end of execution. In the case of the EXT RES signal, from the I/O pin or in from the TTL device output. For example, if execution of the interrupt routine begins in the machine cycle the latch in the I/O port is set so that the pin is clamped low by immediately following that in which the signal goes low, pro- (b), then the level at 0 cannot pull P high. Conversely, if P is vided that the setup time specified in Figure 12 has been met. The clamped to a low level by (c), setting the latch for a high level EXT RES signal response logic ignores the ICB signal. has no effect. - In response to the INT REO signal being low, when the CPU - All I/O port bits should be set for a high level, before data input; to acknowledges the interrupt, itforces thelCB signal high and - prevent incoming logic zeros from being "masked" by logic ones initiates instruction cycles with ROMC states 1C, OF, 13, and 00, in present at the port from previous outputs. In some instances, the that order. This causes program execution to branch to the inter- ability to mask bits of a port to logic 1 is useful. (Note that logic 1 rupting device's address vector. becomes a 0 V electrical level at the I/O pin; logic 0 corresponds to a high electrical level.) In response to the EXT RES signal being low, when the CPU acknowledges the interrupt, it forces the ICB signal high, then The F8 CPU can execute two types of programmed I/O initiates Instruction cycles with ROMC states 1C, 08, and 00, in operation: that order. This causes program execution to branch to memory locationO. 1) I/O ilia the two CPU ports (0 and 1) 2) I/O via ports on the other deviCes The Ice signal is pulled low by the E1 instruction and is returned high by the 01 instruction. InpuVOutput operations that use the two CPU I/O ports execute in two instruction cycles. During the first cycle, the fetched Instruction Set Summary instruction is decoded; the data bus is unused. In this cycle data is either sent from the accumulator-to the I/O latch or enabled The F3850 CPU instruction set is summarized in Table 3. This sec- from the I/O pin to theaecumulator, depending on whether the tion does not attempt to give complete directions for programming instruction is an output or an input. At the falling edge of the the F8 microcomputer system; it explains signals and timing WRITE signal (marking the end of the first cycle and beginning of associated with the execution of every instruction. Refer to F8 the second cycle), the data is strobed into either the latch (OUTS) and F387D Guide to Programming for programming details. or the accumulator (INS), respectively. The second cycle is then The columns used in Table 3 are described below. used by the CPU for its next instruction fetch. Figure 11 illustrates I/O timing. Op Code-The Op Code is the instruction mnemonic that appears in the mnemonic field of an assembly language Note that for the data input (INS) the setup and hold times instruction and identifies the instruction. specified are with respect to the WRITE pulse occurring at the end of the first cycle in the two-cycle instruction. For output data Operand (8)-lf the instruction contains any information in the (OUTS) the delay is specified with respect to the falling edge operand field of the assembly language source code, the infor- of the WRITE signal marking the beginning of the second cycle in mation is shown in this column. Arrows identify the portion of the two-cycle instruction. object code that represents the operand field. Any portion of object code that doeSnot"representthe operand fieid must InpuVOutput instructions that address I/O ports with an I/O port represent the mnemonic field. Table 4 eXplains symbology used address greater than H'OF' occupy two bytes; the first byte in the operand field. specifies an IN or OUT instruction, while the second byte provides the I/O port address. Required timing at I/O port pins is Object CocIe-This is the hexadecimal representation of the given in the section of this data sheet that describes the device instruction's object code. The first byte of object code, or in containing the addressed I/O port. some cases the first hexadecimal digit of object code, represents the Op Code. The operand is represented by the second and third Interrupts bytes of object code, if present, or in some cases by the second There are three CPU signals with interrupt processing; timing hexadecimal digit of the first object code byte. Refer to Table 4 for for all signals is illustrated in Figure 12. symbology used in the object code field. An interrupt sequence is initiated by pulling either the INT REO Cycle-This column identifies each instruction cycle for every signal or the EXT RES signal low, In the case of the INT REO instruction. Every cycle is listed on a separate horizontal line and signal nothing happens unless the ICB signal is low. Also, is identified by the letter S for a short (four clock period) cycle or 3·20 F3850 the letter L for a long (six clock period) cycle. Thus, the entry Cycle Represents S o Figure 8 1 tdb 1 in Figure 10 represents an instruction that executes in one short cycle. The 2 tdb 2 in Figure 10 entry 3S tdb3 in Figure 9A 3L tdb3 in Figure 98 S 4 tdb4 in Figure 10 L S represents an instruction that executes in three cycles: the first is 5 6 tdb s in Figure 10 tdbs in Figure 10 Status Flags-Status flags are identified as follows: II a short cycle; the second is a long cycle; the third (and last) is a O-Overflow short cycle. Z-Zero G-Carry ROMC State-This is the state, as identified in the "ROMC Signal S-8ign Functions" section, that is output by the F3850 CPU in the early Within each column, symbology is used as follows: stages of the instruction cycle. Status not affected Timing-Timing for all instructions, except INS and OUTS o Status set to 0 accessing 1/0 ports 0 and 1, can be created out of Figures 9 and 1/0 Status set to either 1 or O,depending on the results 10. For the exceptions, Figure 11 is required. of the instruction'S execution The ROMC lines are always set after a delay of td3, as shown in Interrupt-An "x" in this column identifies an instruction that Figure 9. The only timing variations for each instruction cycle are disallows interrupts at the end of the instruction's execution. A data bus timing variations. Therefore, data bus timing is defined "y" identifies cycles in which the ICB is reset to 0 (cleared). using the delays tdb 1 through tdbs. With the exception of tdb3, these time delays are unambiguous in that they are keyed to Function-The effect of each instruction cycle is described in either the leading edge or the trailing edge of the WRITE signal this column using symbology given in Table 4. high, for a long or short instruction cycle, as illustrated in Figure 10. There are two cases for tdb3, however, as illustrated in Figure Instruction Cycle Execution and Timing 9. These are identified in Table 4 as 3S for Figure 9A and 3L for Figure 98; tdb 1 through tdbs are otherwise identified by the Table 3 lists the instruction cycles, plus the ROMC state numbers 1 through 6. associated with each cycle, for every F8 instruction. Note that instructions are described in the table by order of ascending Cycles that do not use the data bus are identified by 0 in the instruction (first byte) object code. Table 4 lists the symbology timing column; Figure 8 illustrates timing in this case. used in Table 3. Table 3 Instruction Cycle Execution and Timing Status Flags Op Object ROMC Code Operand(s) Code Cycle State Timing 0 Z C S Interrupt Function LR A,KU 00 S 0 3S - - - - A - (r12) LR A,KL 01 S 0 3S - - - - A - (r13) LR A,QU 02 S 0 3S - - - - A - (r14) LR A,QL 03 S 0 3S - - - - A - (r15) LR KU,A 04 S 0 3S - - - - r12 - (A) LR KL,A 05 S 0 3S - - - - r13 - (A) LR QU,A 06 S 0 3S -. - - - r14 - (A) LR QL,A 07 S 0 3S - - - - r15 - (A) 3·21 F3850 Table 3 Instruction Cycle Execution and TIming (Continued) Status Flags Op Object ROMC Code Operand(s) Code Cycle State Timing 0 Z C S Interrupt Function lR K,P 08 l 7 5 - - - - r12 - (PC1U) l B 5 - - - - r13 - (PC1l) S 0 3S - - - - lR P,K 09 l 15 2 - - - - PC1U - (r12) l 18 2 - - - - PC1l- (r13) S 0 3S - - - - lR A,IS OA S 0 3S - - - - A- (ISAR) lR IS, A OB S 0 3S - - ~ - ISAR- (A) PK OC l 12 2 - - - - PC1 - (PCO); l 14 2 - - - - PCOl - (r13) S 0 3S - - - - PCOU - (r12) lR PO,a 00 l 17 2 - - - - x l 14 2 - - - - PCOl- (r15) S 0 3S - - - - PCOU - (r14) lR a,oc OE l 6 3 - - - - r14- (OCOU) l 9 5 - - - - r15 - (OCOl) S 0 3S - - - - lR oC,a OF l 16 2 - - - - OCOU - (r14) l 19 2 - - - - OCOl - (r15) S 0 3S - - - - lR OC,H 10 l 16 2 - - - - OCOU - (r10) l 19 2 - - - - OCOl - (r1l) S 0 3S - - - - lR H,OC 11 l 6 5 - - - - r1O- (OCOU) l 9 5 - - - - r11 - (OCOl) S 0 3S - - - - SR 1 12 S 0 3S 0 1/0 0 1 Shift (A) right one bit position (zero fill) Sl 1 13 S 0 3S 0 1/0 0 1/0 Shift (A) left one bit position (zero fill) SR 4 14 S 0 3S 0 1/0 0 1 Shift (A) right four bit positions (zero fill) Sl 4 15 S 0 3S 0 1/0 0 1/0 Shift (A) left four bit positions (zero fil!) . lM 16 l 2 6 - - - - A - «OCO» S 0 3S - - - - ST 17 l 5 1 - - - - (OC)-(A) S 0 3S - - - - COM 18 S 0 3S 0 1/0 0 1/0 A - (A) Ee H'FF' Complement accumulator lNK 19 S 0 3S 1/0 1/0 1/0 1/0 A- (A) + (C) 01 1A S 1C 0 - - - - y Clear ICB S 0 3S - - - - EI 1B S 1C 0 - - - - Set ICB S 0 3S - - - - x POP 1C S 4 0 - - - - PCO- (PC1) S 0 3S - - -' - x 3-22 F3850 'nIble 3 InslNctlon Cycle Execution and nmlng (Continued) Status Flags Op Object ROMC Code Operand(s) Code Cycle Slate Timing 0 Z C S InlerNpt FuncUon LR W,J 10 8 1C 0 110 110 110 110 W- (r9) - - • 8 0 38 - - x LR J,W 1E 8 0 38 - - - - r9- (W) INC 1F 8 0 38 110 110 110 110 A- (A) + 1 LI aa 20 L 3 6 - - - - A- H'aa' L aa 8 0 38 - - - - NI ar 21 L 3 4 0 110 0 110 A - (A) v H'aa' aa 8 0 38 - - - - 01 ala 22 L 3 4 0 110 0 110 A - (A) v H'aa' aa 8 0 38 - - - - XI ala 23 L 3 4 0 110 0 110 A - (A) EEl H'aa' aa 8 0 38 - - - - AI ala 24 L 3 4 1/0 110 110 110 A - (A) + H'aa' aa 8 0 38 - - - - CI ala 25 L 3 4 - - - - Perform H'aa' + (A) aa 8 0 3S 110 110 110 110 + 1. Do not save result, but modify status flags to reflect result. IN PP 26 L 3 2 - - - - OB- PP PP L 1B 6 0 110 0 110 A - (1/0 Port PP) 8 0 38 - - - - OUT PP 27 L 3 2 - - - - OB-PP PP L 1A 1 - - - - 1/0 Port PP - (A) 8 0 38 - - - - x PI jijj 28 L 3 6 - - - - A-H'ii' ii 8 0 0 - - - - PC1 - (PCO) + 1 I jj L C 2 - - - - PCOL- H'jj' L 14 1 - - - - PCOU - (A) 8 0 38 - - - - x JMP jijj 29 L 3 6 - - - - A-H'ii' I ii L C 2 - - - - PCOL- H'jj' ii L 14 1 - - - - PCOU - (A) 8 0 3S - - - - x OCI pii 2A L 11 2 - - - - OCOU- ii ii 8 3 0 (increment PCO) I ii L E 2 - - - - OCOL- jj 8 3 0 (increment PCO) 8 0 38 - - - - Nap 2B 8 0 0 - - - - XOC 2C 8 10 0 - - - - OCo:= OC1 8 0 0 - - - - 08 ~ 3 t L 0 3L 110 110 1/0 110 r - (r) + H'FF' Decrement scratchpad byte LR A'r y 8 0 38 - - - - A- (r) LR f,A 5f 8 0 3S - - - - r- (A) Ll8U sr 8 0 38 - - - - ISARU -O'e' ~ 3·23 F3850 'nIbIe 3 InstNCllon Cycle ExecuUon and Timing (Continued) Op Object Status Flags ROMe Code Operand(s) Code Cycle Slate nmlng 0 Z C S Interrupt Function LlSL LIS BT , ? 68+? M 7f S S S 0 0 1C 3S 3S 0 - - - - - - - - - - - - ISARL- O'e' A- H'oa' Test e A W register e'li ii S 3 0 - - - - Res = Oso PCO = (PCO) + 2 S 0 3S S 1C 0 - - - - L 1 2 - - - - Test e A W register - - - - Res ~ 0 so PCO = (PCO) S 0 3S + H'ii' + 1 AM 88 L 2 4 - - - - 1/0 1/0 1/0 1/0 A - (A) + ((OCO)) Binary, S 0 3S OCO- (DC) + 1 AMO 89 L 2 4 - - - - 1/0 1/0 1/0 1/0 A - (A) + ((OCO)) Decimal, OCO - (OCO) + 1 S 0 3S - - - - NM 8A L 2 4 0 110 0 1/0 A - (A) A ((OCO)); S 0 3S - - - - OCO - (OCO) + 1 OM 8B L 2 4 0 1/0 0 110 A - (A) A ((OCO)); S 0 3S - - - - OCO - (OCO) + 1 XM 8C L 2 4 0 1/0 0 110 A - (A) EB ((OCO)); S 0 3S - - - - OCO - (OCO) + 1 CM 80 L 2 4 110 1/0 1/0 1/0 Set status flags on basis S 0 3S - - - - of ((DC)) + (A) + 1; - - - - OCO - (OCO) + 1 AOC 8E L A 1 - - - - DC - (~C) + (A) S 0 3S - - - - BR7 il 8F S 3 0 - - - - PCO - (PCO) + 2 ii S 0 3S - - - - because (ISARL) = 7 L 1 2 - - - - PCO - (PCO) + H'ii' + 1 l,II. S 0 3S - - - - because (ISARL) ~ 7 BF gj. S 1C 0 - - - - Test tAW. register ii L 1 2 - - - - Res = 0 so PCO = (PCO) S 0 3S - - - - + H'ii' + 1 S 1C 0 - - - - Test tAW. register S 3 0 - - - - Res ~ Oso PCO = (PCO) + 2 S 0 3S - - - - INS 00r1 AO,A1 S 1C 0 0 110 0 1/0 A - (I/O PortOor1) S 0 3S - - - - INS 4 A4 L 1C 0 0 1/0 0 110 DB - Port address (4 thru 15) thru thru L 1B 6 - - - - 15 AF S 0 3S - - - - A - (Port 4 thru 15) OUTS 00r1 BO,B1 S 1C 0 - - - - I/O Port 0 or 1 - (A) S 0 3S - - - - OUTS 4 B4 L 1C 0 - - - - DB - Port address (4 thru 15) thru thru L 1A 1 - - - - 15 BF S 0 3S - - - - x Port (4 thru 15) (A) 3·24 F3850 Table 3 Instruction Cycle Execution and Timing (Continued) Status Flags Op Object ROMC Code Operand(s) Code Cycle State Timing 0 Z C S Interrupt Function AS r Cr S 0 3S 1/0 110 1/0 1/0 A - (A) + (r) Binary • ASD r Dr S 1C 0 1/0 1/0 110 1/0 A - (A) + (r) Decimal S 0 3S - - - - XS r Er S 0 3S 0 1/0 0 1/0 A- (A) ED (r) NS r Fr S 0 3S 0 1/0 0 110 A - (A) v (r) INTRPT xx L 1C 0 - - - - IDLE l OF 2 - - - - PCOl - In!. address (lower byte); PC1 - PCO l 13 2 - - - - y PCOU - In!. address (upper byte) S 0 3S - - - - x RESET xx S 1C 0 - - - - IDLE l B 1 - - - - y PCO - 0, PC1 - PCO S 0 3S - - - - x Table 4 Instruction Execution and Timing Symbology Symbol Interpretation Symbol Interpretation A The accumulator ISAR The 6-bit scratchpad address register (A) The complement of accumulator contents ISARL The low order three bits of ISAR a A single hexadecimal digit being interpreted as ISARU The high order three bits of ISAR data J Scratchpad byte 9 aa Two hexadecimal digits being interpreted as a jj Two hexadecimal digits being interpreted as the single byte of data or as the high order byte of 16 low order byte ola 16-bit address bits of data K Scratchpad bytes 12 and 13 bb Two hexadecimal digits being interpreted as the Kl Scratchpad byte 13 low order byte of 16 bits of data KU Scratchpad byte 12 Binary Binary arithmetic specified o The overflow status flag C The carry status flag P A single hexadecimal digit being interpreted as an DB FB system data bus I/O port address (O-15) DCO The primary data counter register PP Two hexadecimal digits being interpreted as an I/O DCOl The low order byte of the primary data counter port address (0-255) register PCO The program counter register DCOU The high order byte of the primary data counter PCOl The low order byte of the program counter register register PCOU The high order byte of the program counter DC1 The secondary data counter register register Decimal Decimal arithmetic specified PC1 The stack register e A single octal digit being interpreted as data PC1l The low order byte of the stack register H Scratchpad bytes 10 and 11 PC1U The high order byte of the stack register Two hexadecimal digits being interpreted as the Q Scratchpad bytes 14 and 15 high order byte of a 16-bit address oras a simple Ql Scratchpad byte 15 byte address displacement QU Scratchpad byte 14 3·25 F3850 Table 4 Instruction Execution and Timing Symbology (Continued) Symbol Interpretation Symbol Interpretation Single hexadecimal digit interpreted as scratch pad Z The zero status flag address: 1\ The logical OR of a-bit quantities on each side of 4 = 0 through B for locations 0 through B in this symbol is specified scratchpad v The logical AND of a-bit quantities on each side of r = C for ISAR as address source with no change. this symbol is specified after access Ea The logical Exclusive-OR of a-bit quantities on = r D for ISAR as address source with each side of this symbol is specified ISARL = ISARL + 1 after access The value to the right of this symbol is to be loaded r = E for ISAR as address source with into the location specified on the left of this symbol ISARL = ISARL-1 after access 0 The contents of the location within the brackets is r = F is not allowed specified S The sign status flag (() The contents of the memory word addressed by A single hexadecimal digit identifying a status the contents of the location within the double condition that is tested by a Branch on brackets is specified Condition instruction + The binary address of a-bit quantities on each side W The status register of this symbol is specified ROMC SIgnal Functions Table 5 describes the ROMC signals and their functions. Table 5 ROMC Signal Functions ROMe Cycle 4 3 2 1 0 HEX Length Function o0 0 0 0 00 S,L Instruction Fetch. The device whose address space includes the contents of the PCO register must place on the data bus the op code addressed by PCO; then all devices increment the contents of PCO. o 0 001 01 i.. The device whose address space includes the cOntents of the PCO register must place on the data bus the contents of the memory location addressed by PCO; then all devices add the a-bit value on the data bus, as a signed binary number, to PCO. 00010 02 L The device whose DCO addresses a memory word within the address space of that device must p1ace-on tlTe-uata- bus the contents of the memory location addressed 'by DCO;then-all-devices increment DCO. o0 0 1 1 03 L,S Similar to 00, except that it is used for Immediate Operand fetches (using PCO) instead of instruction fetches. . 00 1 00 04 S Copy the - to - Delay 2S0 ns CL=100pF Extended Temp. Range SOO ns tx2 Ext. to c/> + to + Delay 2S0 ns CL =100pF Extended Temp. Range SOO ns Pc/> c/>Period ·O.S 1.0 p's PVV1 c/> Pulse Width 180 Pc/> -180 ns t r, tf=SO ns; CL = 100 pF td 1 c/> to WRITE + Delay lS0 2S0 ns CL =100pF Extended Tem"p. Range 400 ns td2 c/> to WRITE - Delay lS0 2S0 ns CL=100pF Extended Temp. Range 400 ns PVV2 WRITE Pulse Width Pc/>" 100 Pc/> ns t~ tfSO nstyp; C L= 100 pF PVVs WRITE Period; Short 4Pc/> PVVL WRITE Period; Long 6Pc/> td3 WRITE to ROMC Delay. 80 300 SSO ns CL =100pF td4' WRITE to ICB Delay 3S0 ns CL=SOpF tds WRITEtolNT REQDelay 430 ns CL-100pF tsx' EXT RES Setup Time 1.0 p's CL -20 pF tau '* I/O Setup Time 300 ns thO I/O Hold Time SO ns. t,: 1/0 Output pelay 2.S p.S CL=SOpF .. ... tdb 1' WRITE to Data Bus Stable 0.6 1.3 p's CL=100pF tdb2 WRITE to Data Bus Stable 2Pc/> 2Pc/>+1.0 P.s CL=100pF tdb3' Data Bus Setup 200 ns tdb/ Data Bus Setup SOO ns tdbs Data Bus Setup SOO ns tdbs' Data Bus Setup SOO ns 1. Symbols marked with an asterisk (') refer to parameters that are moslfrequently 2. Input and output capacitance is 3 to 5 pF typical on all pins except VDO, VGG, of importance when Interfacing to an Fa system. They encompass I/O timing, andVss· external timing generation, and possible external RAM timing. The remaining 3. If ~ REO is being supplied asynchronously, it can be pulled down at any parameters are typically those that are only relevant between Fa devices, and time except during a fetch cycle that has been preceded by a non-privileged not normally of concern to the user. instruction.lnthatcaselNT REO must go down according to the requiremenll Oflds· 3·28 F3850 DC Ch.acterlstlcs The OC characteristics of the F3850 are provided in Table Z Voo=+5V±5%, VGG=+12V±5%, Vss= OV, T A =O·Cto+7O"C Table 7 F3850 CPU Signal DC Characteristics • Signal Symbol Characteristic Min Max Unit Test Conditions "',WRITE VOH Output High Voltage 4.4 Voo V IOH = -50 !-IA VOL Output Low Voltage Vss 0.4 V IOL =1.6mA VOH Output High Voltage 2.9 V IOH=-100!-IA XTLY VIH Input High Voltage 4.5 VGG V VIL Input Low Voltage Vss 0.8 V IIH Input High Current 5 50 !-IA ViN=VOO IlL Input Low Current -10 -120 !-IA VIN=VSS ROMC().4 VOH Output High Voltage 3.9 Voo V IOH=-100!-IA VOL Output Low Voltage Vss 0.4 V IOL=1.6mA OB0-7 VIH Input High Voltage 2.9 Voo V V IL Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 Voo V IOH = -100!-IA VOL Output Low Voltage Vss 0.4 V IOL =1.6mA IIH Input High Current 3 !-IA V IN = 7 V 3-State mode IlL Input Low Current -3 !-IA V IN = Vss 3-Stilte mode 1/00-17 VOH Output High Voltage 3.9 Voo V IOH=-3O I'A VOH Output High Voltage 2.9 Voo V IOH = -150!-IA VOL Output Low Voltage Vss 0.4 V IOL =1.6mA VIH Input High Voltage(1) 2.9 Voo V Internal pull-up to Voo VIL Input Low Voltage Vss 0.8 V III Input Low Current -1.6(4) rnA VIN = 0.4 V(2) EXT 'RES" VIH Input High Voltage 3.5 Voo V Internal pull-up to Voo V IL Input Low Voltage Vss 0.8 V IlL Input Low Current -0.1 -1.0 rnA VIN=VSS INT REO VIH Input High Voltage 3.5 Voo V Internal pull-up to Voo VIL Input Low Voltage Vss 0.8 V IlL Input Low Current -0.1 -1.0 rnA VIN=VSS VOH Output High Voltage 3.9 Voo V IOH=-1O I'A ICB VOH Output High Voltage 2.9 Voo V IOH =-100!-IA VOL Output Low Voltage Vss 0.4 V IOL = 100!-IA 1. Hys1eresis Input circuit provides additional 0.3 V noise immunity while intemal 4. -1.S V max. for extended temperature range. pull-up provides TTL compatibility. 5. Positive current is defined as conventional current flowing into the pin 2. Measured while FS port is outputting a high level. referenced. 3. Guaranteed but not tested. 3·29 F3850 SUpply CumKIla Absolute Maximum Ratings Test VGG -0.3 V,+15V Symbol Parameter Min Typ Max Un" Conditions Voo -0.3 V,+7V f=2MHz, XTLX, XTLY, and XTLZ -0.3 V,+15V 100 VooCurrent 45 75 rnA Outputs All other inputs -0.3 V,+7V Unloaded Storage temperature -55°C, +150°C Operating temperature 0° C,+70°C f=2MHz, I I" IGG VGGCurrent 12 30 rnA Outputs Unloaded These are stress ratings only, and functional operation at these ratings, or under any conditions above those indicated in this data sheet, is not implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may Recommended Operating Ranges cause permanent damage to the device. The recommended operating ranges of the F3850 are shown below. Supply Voltage (Voo) Supply Voltage (VGeV Part Number Min Typ Max Min Typ Max Vss F3850 +4.75 V +5 V +5.25 V +11.4 V +12V +12.6V OV Ordering Information Order Code Package Temperature Range F3850DC Ceramic O°Cto+70°C F=3850DL Ceramic -40°Cto+85°C F3850DM Ceramic -55°C to+125°C F3850PC Plastic. O°Cto+70°C F3850PL Plastic -400Cto+85°C F3850PM Plastic -55°Cto+125°C 3-30 F3851/F3856 Program Storage Unit Microprocessor Product Description • 102412048 Bytes of Program Storage • Internal Memory Addressing logic The Fairchild F3851 and F3856 are the principal program • 18 Bidirectional, Individually Controlled 110 storage devices for the F8 microcomputer system. The Lines, Organized as Two 80BIt Ports F3851 provides 1024 bytes of ROM; the F3856 provides 2048 • Programmable Timer (F3858)- Preset, Start, Stop, bytes. The program storage unit (PSU) Is customized with and Read-Back Ability; Four Selectable Timer programs and permanent data tables, which are specified Count Rates, and Pulse Width Measurement as ROM masks. • Full Interrupt Level- Dalsy-Chaln Expandable, Independent Interrupt Address Vectors The PSU devices have two 8-bit, bidirectional I/O ports, for Timer and External Interrupt interrupt logic, a programmable timer, and a pulse width • 2 MHz Operation measurement circuit. They also contain memory addressing • TTL and LSTTL Compatible logic with data counters and program counters. The inter· • Low Power DiSSipation, Typically Less Than 275 mW rupt logic responds to requests from an extemal device and • +5 V and +12 V Power Supplies internally from the timer. The pulse width measurement clr· cuit (F3856) is a combination of these two capabilities. The PSU devices are manufactured using N-channel, iso- planar MOS technology; therefore, power dissipation Is very low, typl.cally less than 275 mW. Connection Diagram Signal Functions 1/0 ii7 DB, 1/0 A; Oils VGG 1I0B. Voo 1/0 A;; DATA BUS miNT 1/0 A;; PRiOul' iTciiiS WRITE DB, ~ 0114 ROMCO - - } INT REO I/Os.; ROMC, ROMC, CONTROL PRiiN 1/0 A< ROMC. DaDR 1/0 A; ROMC. STROBE/NC" I/OB, EXTINT } ROMC. DB. INT REO INTERRUPT ROMC. DB, ROMC, iTciB, ROMC, UoAi ROMCo 110 A, Vss 1/0 a, i7DAci DB, Uoiii DBo "Ne for F3851 only. 3-31 .---~-~----.- ._---- - - F3851 Device Organization System Clock Timing The PSU is more than a read-only memory unit: every mem- All timing within the F3851/F3856 PSU is controlled by the ory device within the F8 system contains its own memory +and WRITE signals, which are generated from the F3850 addressing logic along with associated address registers. CPU. Refer to the F3850 data sheet for Ii description of Refer to figure 1 for a simplified block diagram of the PSU. these clock signals, The WRITE clock refreshes and up- A single 8-bit data bus provides all necessary communica- dates PSU address registers, which are dynamic. The + tion between a PSU (or any other memory device) and an clock drives sequencing logic to precharge the ROM matrix; F3850CPU. it also drives the programmable timer. The PSU has an elementary arithmetic unit that can Incre- 110 Ports ment and add 16-bit data units; for memory addressing logic, these two operations are sufficient. The PSU is func- The unit contains four preassigned 110 port addresses: the tionally illustrated in figure 2. These devices also contain a two lowest are assigned to 110 ports A and B and are used control unit that decodes the five read-only memory control to transfer data to and from external devices. The other two (ROMC) lines, generated by the CPU, as though they were a 110 addresses are assigned to the programmable timer and 5-bit instruction code. Similar to the CPU, the PSU gener- the interrupt control register and are treated as 110 ports. ates Internal signals to control data flow and arithmetic Associated with the 110 ports is an 110 port address select logic within itself. One control output, data bus drive register (ASR). This is a 6-blt register for the F3851 and a (DBDR), is generated to coincide with data being output 5-blt register for the F3856. The contents are a mask option, by the PSU. which must be specified at the time the PSU is created. The ports are addressed as follows: XXXXXXOO 110 port A XXXXXX01 110 port B XXXXXX10 Interrupt control register XXXXXX11 Programmable timer Figure 1 PSU Simplified Block Diagram F3856 OUTPUT 1/0 PORT A STROBE 1/0 PORT B DATA BUS PROGRAM DBDR COUNTERS ROM DATA CONTROL ROM COUNTERS LINES EXTERNAL INTERRUPT PROGRAMMABLE TIMER • PRIORITY IN PRIORITY OUT INTERRUPT LOGIC INTERRUPT REQUEST t t VGG VDD GND ..' WRITE 3·32 F3851 For example, if the six binary digits are 000010, the four 1/0 ROM Addressing port addresses are H'08~H'09~ H'OA', and H'OB'. The F3851 8K PSU has 1024 bytes of read-only memory; the When a logic 1 is output to 1/0 port A or B, it places a 0 V F3856 16K PSU has 2048 bytes. This ROM array may con· level on the output pin. This same inverted logic applies to tain object program code and lor tables of nonvarying data. input. Every PSU is implemented using a custom mask that speci· fies the state of every ROM bit and certain address mask The F3851 1/0 ports, timer, and interrupt control register are options that are external to the ROM array. not initialized during the power-on reset cycle. The F3856 1/0 ports and interrupt control register are initialized during both the power-on or external reset cycle; the timer register is not initialized during power-on or external reset cycles. Figure 2 PSU Functional Diagram r------------------------------------i I I I I --- F3856 I P.W. PRE LOGIC' Vss VGG I r-- Voo r---- I --- PRI OUT-+- 6 I INTERRUPT PRIIN - + - 10 ::J ~ LOGIC r--- I I ...... UPPER BYTE TIMER - I I LOWER BYTE I ADDRESS DE- MULTIPLEXER \- l-l INTERRUPT ADDRESS t-;-- \ .- - VECTOR CONTROL .- I -...... UNIT LOGIC I • I UPPER BYTE . I~ ...... INCREMENTER I -........ ADDER LOWER BYTE DBa I ..... LOGIC DB, +22 r- DB2 -,-27 I .. t .. :0 ~ DATA BUFFER ...... DB3 DB, - t - 28 -,-33 I 10111 LOW I ..z a: DB5 - t - 34 I ......- w ORDER I ~ ....... It "- DB6 -,-39 ADDRESS BITS DB7 - t - 40 8- 1024 x 8·BIT I ... DATA • -- COUNTER DC, ROM STORAGE a: I I ~~",. U I w a: t ... • ~ -,-19 - t - 24 ~ .. -,-25 :~\ :0 I DATA COUNTER DCa - t - 30 -,-31 w I a: - t - 36 I :!! ..c c J +~7 I ..!: 5/16 HIGH ORDER ......\ 1/0 PORT IL STROBE~ ~\ ~* I ADDRESS BITS ADDRESS SELECT STACK -+- 8~ PAGE SELECT I REGISTER PC, L So I ~ +~! I t ~ +~: ~J-\ ~.- :aB7 +~: PROGRAM I COUNTER PCa - Tl I L ________________ _ -¢ ~ WRITE :F 8 7 ---------------- 3·33 F3851 The ROM addressing logic consists of 16-blt registers: pro- If the high-order bits of the address coincide exactly with gram counter PCo, stack register PC1, and data counter DCo. the page select mask, an enable signal is generated, caus- Data counter DC1 is provided on the. F3856 as an additional ing the PSU logic to respond to a memory access request. If buffer for DCo. the high-order bits of the address do not coincide exactly With the page select, no enabling signal Is generated and A 6-bit page select register and.10-bit address select regis- the PSU does not respond to memory access requests. ter provide decode logic for the F3851. The F3856 uses a 5-bit page select register and an 11-blt address select The page select register Identifies the memory addreSSing register. space of the individual PSU device. Each of the 32 (or 64) page select options allowed by the 5-bit (or 6-blt) page Program Counter, Data Counter, and Stack Registers select register identifies a single address space consisting Program counter PCo always addresses the memory loca- of 2048 (or 1024) contlnguous memory addresses. tion out of which the next program instruction byte is read. If the Instruction requires data (i.e., an operand) to be Incrementer Adder logic accessed, data counter DCa must address memory for this There are only two arithmetic operations that memory purpose; PCo cannot be used to address data, since it is devices need to perform on the contents of memory address saving the address of the next instruction code. By using registers: the exchange DC instruction in the F3856 program, the two data counter contents of DCo and DC1 can be exchanged. 1. Increment by 1 the 16-bit value stored in address PCo or DCo· The provision of two address registers, PCo and DCo, is a convenience to the F3850 CPU and is not a necessary part 2. Add an 8-bit value, treated as a signed binary number of the memory addressing logic sequence within a PSU. (subject to twos complement arithmetic) to the 16-bit Address decoding is identical, whether originating in PCo or value stored in an address register. If the 8-bit value is DCo· being treated as a signed binary number, the high-order bit of the 8-blt value Is the sign bit; the sign bit must be The PCo, PC1, and DCo are loaded from two consecutive propagated through the missing high-order eight bits. single-byte inputs on the data bus; PC1 and DCo are trans- mitted as two single-byte outputs on the data bus. The con- The PSU control unit implements the incrementer adder tents of DCa and DC1 of F3856 can be exchangec;l in One logic through control Signals internal to PSU device logic. instruction. Addressing Consistency in Multiple Stack register PC1 is a buffer for program counter PCo; the Memory Devices contents of PC1 are never used directly to address memory. When an ROMC state specifies a memory access, only one When an interrupt is acknowledged, the contents of PCa are memory device responds to the memory access operation saved in PC1. Itself. However, every memory device responds to ROMC states that call for modifying the contents of a program Page Select and Address Select Registers counter or data counter register. Providing every memory All memory addresses are 16 bits wide, whether originating device that is connected to the 8-bit data bus of an F3850 in the program counter or in the data counter. Address CPU-Is also connected to the:ROMC control lines of the . decode logic within the PSU separates the 16-bit address same CPU, address contentions cannot arise. Every memory into two portions: the low order addresses the ROM storage device simultaneously receives the same ROMe state sig- bytes; the high order addresses the page. nals from the CPU; every memory device responds to ROMC states by identically modifying the contents of memory address registers, if such modifications are specified. High-Order Low-Order Therefore, every PCo register on every memory device Byte Address Page Address always contains identical information; the same is true for F3851 1024 Byte Select 64 Page Options DCo and PC1 registers. 6 Bits 10 Bits Only one memory device (the one whose address space F3856 2048 Byte Select 32 Page Options Includes the specified memory address) actually responds 5 Bits 11 Bits to any memory access request. To avoid addressing con- flicts, It is only necessary to ensure that the following conditions exist: 3-34 F3851 Signal Descriptions The PSU input and output signals are described in table 1. Table 1 PSU Signal Descriptions Mnemonic Pin No. Name Description Clock + WRITE 8 7 Clock The two clock input signals that originate at the F3850 CPU. I10 Ports -1- /0 Ao-I/O A7 19,24,25, I/O Ports A Bidirectional ports through which the PIO 30,31,36, communicates with logic external to the 37,2 microprocessor system. -1- /0 Bo-I/O B7 20,23,26, I/O Ports B 29,31,35, 38,1 Control ROMCo-ROMC 4 17,16,15, Read-Only Input signals that originate at the F3850 CPU 14, 13 Memory Control control internal functions of the PSU. Data Bus oSo-OB7 21,22,27, Data Bus Bidirectional 3-state lines that link the PSU to all 28,33,34, other devices within the microprocessor system. 39,40 -0 - BOR 11 Data Bus Drive A low output, open-drain signal that indicates the data bus currently contains data flowing from the PSU. strobe STROBE 12 Strobe This output Signal provides a positive pulse whenllO port A is being read by an input instruc- tion or is being updated by an output instruction (F3856). InterWJ¥ EXTIN 5 External Interrupt A high-to-Iow transition on this input signal is interpreted as an interrupt request from an external device. NT REO 9 Interrupt Request This output Signal is the iNT REO input to the F3850 CPU; it must be out[1ut IQYI to interrupt the CPU, which occurs only if PRI IN is low and PSU interrupt control logic is requesting an interrupt. RI iN 10 Priority In Unless this ~t signal is low, the PSU does not set the INT E signal low in response to an interrupt. RIOUT 6 Priority Out This output signal becomes the PRI iN signal to the next device in the interrupt-pripJ¥ daisy chain; it is output high unless the rnsignal is entering the PSU low and the PSU is not requesting an interrupt Power VDO 4 Power Supply +5 V ±5% GG 3 Power Supply +12V ±5% 'V." ss 18 Ground System ground - 0 V; Voo and VGG are referenced to Vss. 3-35 F3851 1. All memory devices must receive the same ROMC state ROMe States signals from one CPU and must contain identical Table 2 lists the data bus contents as a function of ROMC information. states. 2. Page select masks must not be duplicated - more than Instruction Execution one memory device cannot have the same memory space. The PSU responds to signals that are output by the F3850 CPU in the course of implementing instruction cycles. Refer 3. The memory address contained in the specified register to table 2 for a summary of the data bus response to the (PCo or DCa) must be within the memory space of at ROMC states generated by the CPU. least one memory device. Data Output by the PSU Figure 3 provides timing when the PSU outputs data on the Figure 3 Data Bus Timing WRITE - -- - Id, td, ~ \ / ,---, -'. --- ",--pw2--.1 LONG CYCLE _ld3-1~ ROMC STABLE . Id, ~ DATA BUS OUTPUT X STABLE DB DR (START OF DATA OUT) "- ---Ida-I DBDR (END OF DATA OUT .I . ~SUBSEQUENTCYCL~~~~~~~~~~~~~~~~~~~~~~~~~~;I~~~~~~~~~~~~~_ Id4 ~ DATA BUS INPUT ---------------------------------->k STABLE 3·36 F3851 data bus. This timing applies whenever a PSU is the data worst case, in time for the setup required by any F3850 CPU source. The PSU places data on the data bus, even in the destination (refer to the F3850 CPU data sheet). Table 2 Data Bus Contents as a Function of the ROMC State • ROMC State If F38511F3856 PSU is the Source' If F3850 CPU is the Source (Hex) Description of Data Address" Description of Data 00 Instruction PCo 01 Offset for branch PCo 02 Operand DCa 03 Operand PCo 04 05 Byte to be stored 06 Upper byte, DCo 07 Upper byte, PC, 08 =00 for PCo 09 Lower byte, DCo OA Offset for DCo OB Lower byte, PC, OC Byte for PCo, lower PCo 00 OE Byte for DCo, lower PCo OF Lower byte of interrupt vector if it is source of the interrupt 10 11 Byte for DCo, upper PCo 12 Byte for PCo, lower 13 Upper byte of interrupt vector if it is source of the interrupt 14 Byte for PCo, upper 15 Byte for PC" upper 16 Byte for DCo, upper 17 Byte for PCo, lower 18 Byte for PC" lower 19 Byte for DCo, lower 1A Byte for selected I/O port 1B Byte from I/O register, if selected 1C (Note 1) 10 1E Lower byte, PCo 1F Upper byte, PCo 'Only drives the data bus within the segment of address space that belongs to the PSU. '* '* An entry in this column specifies the register from which a memory address was obtained. Note 1 During INS or OUTS instruction for port 0 or': 110 byte During INS or OUTS instruction for port 4·F: 110 address During all other instructions, F3850 does not drive. 3·37 F3851 The data bus drive signal (DBDR) is low, while data output Each 110 port pin is a wire-AND structure between an inter- by the PSU is stable on the data bus. Thus, a·l5lIDRlow nal.latch. and an external signal, if any. The latch is always signal Indicates that the data bus currently contains data loaded directly from the accumulator. Each 110 pin is set flowing from a PSU. For systems with more than one PSU, high or low under program control. If a 1 (high) Is presented the DBDR outputs can be wlre-ORed and the result used as at the latch, gate (b) turns on and gate (a) turns off, so that a bus data flow direction indicator. The i5iIDR signal P is at Vss (low). If a 0 Qow) is presented at the latch, gate (a) remains low until timing delay tds into the instruction cycle turns on and gate (b) turns off, so that P is at Voo (high). following the one in which DBDR" was set low. When data is output through an 110 port, the pin Is connect· Data Input to the PSU ed directly to a standard TTL gate input. Data is input to the When the PSU receives data off the data bus, in the worst pin from a TTL output. In normal operation, high or low case, the data must be added to a 16-blt number within the levels at P drive the external TTL device input transistor PSU adder/incrementer. This worst case corresponds to (d). If a low level is set at P, transistor (d) conducts current data coming from the accumulator of the CPU for an ADC through the path J, I, P, and FET (b). This is transferred as instruction or from a memory device for a BR Instruction. a low level to the rest of the circuits In the TTL device and For this worst case, arriving data must allow sufficient time results in a high or low level at the output of the device, for 16-bit adder logic (time delay td4 in figure 3 identifies this depending on its characteristics. If the level at P is set high, worst-case timing). transistor (d) cuts off and a high level is transferred by (d). When data is input to the 110 pin, a high or lowsignal at the PSU InputlOutput Interfacing pin transfers a logic 1 or 0 to the accumulator. The 110 ports with addresses XXXXXXOO and XXXXXX01 (XXXXXX is the 6-bit 110 port address select) are used to Since the 110 pin and the TTL device output at 0 are wlre- transmit data between the PSU and external devices. The IN ANDed, it is possible for the state of one to affect the trans· and INS instructions cause data at the 110 ports to be trans- fer of data out from the 110 pin or in from the TTL device milled to the CPU; the OUT and OUTS Instructions cause output. For example, If the latch in the 110 port is set so that data in the CPU accumulator to be loaded into an 110 port. the pin is clamped 'low by (b), the level at 0 cannot pull P Each 110 pin has an output latch that holds the pin DC data. high. Conversely, if P is clamped to a low level by (c), setting the latch for a high level has no effect. Input and output operations using the two PSU 110 ports execute In three instruction cycles. During the first cycle, Open-Drain Configuration (Figure 5)- When the 110 port is the port address Is transmitted to the data bus. During the configured as shown in figure 5, the drain connection of second cycle, data is either sent from the accumulator to FET (a) is open, i.e., not connected to Voo through a pull-up the 110 latch or enabled from the 110 pin to the accumulator, transistor. This option Is most useful in applications where depending on whether the instruction is an output or an several signals (possibly several 110 port lines) are to be Input. At the falling edge of the WRITE signal (marking the wire-ORed together. A common external pull-up, RL, is used end of the second cycle and beginning of the third cycle), to establish the logic 1 levels. Another advantage of this the data Is strobed into either the latch (OUTS) or the option is that the output (point Y) can be tied through a pull- accumulator (INS), respectively. The third cycle is then used up resistor to a voltage higher than Voo (clear up to VGG) for by the CPU for its next instruction fetch. interfacing to external circuits requiring a higher logiC 1 level than Voo provides. -,... . 1/0 Port Options Data bus timing associated with the execution of 110 If a high level Is present at point X (coming from the port Instructions does not differ from data bus timing associated latch), FET (a) will conduct and pull point Y to a low level by' with any other data transfer to or from the PSU. However, current flow through RL. This low level at Y causes transis- timing at the 110 port Itself depends on which port option is. to((b) to turn on and present a low level to the input TTL being used. Figures 4, 5, and 6 illustrate the three port circuit. options; figure 7 Illustrates timing for the three cases. If a low level Is present at X, FET (a) turns off and pOint Y is Standard Pull-Up Configuration (Figure 4)-AIlII0 port bits pulled toward Voo by RL. This causes transistor (b) to turn should be set for a high level, before data input, to prevent off and present a high 'Ievel to the internal TTL circuits. incoming logic Os from being masked by logic 1s preset at the port from previous outputs. In some instances, the abil- When data is input, a high level at the base of transistor (c) ity to mask bits of a port to logic 1 is useful. (Note that logic causes (c) to conduct and pull point Y low, with current flow 1 becomes a 0 V electrical level at the 110 pin; logiC 0 cor- through TL. This transfers a high level to the internal 110 port responds to a high electrical level.) logic through inverting action by the hysteresis circuit. If a 3-38 F3851 Figure 4 Standard Pull-Up Configuration ----------------1 ,I -Voo- - - - - - - - - I I OUTPUT I I STROBE I I • I I I I I HYSTERESIS CIRCUIT I I I I TTL ~EYICE OUTPUT IL..:.(OPEN-COLLECTOR) _________ _ ----------------~ Figure 5 Open-Drain Configuration - - - - - - - - - - - - - - - 1 YDD , -VOO- - - - - - - - - - 1 1/0 PORT I RL I I I -----<> I I I L __________ _ I I 1----------- -= I (e) I I I I I I -= I ILTTL __________ OUTPUT _ ---------------~ Figure 6 Driver Pull-Up Configuration low level is present at the base of (c), conduction stops and -----------, point Y is pulled toward Voo by RL. This is then transferred 1/0 PORT YDD as a low level to internal 1/0 port logic through the hystere- sis circuit. LED Driver Pull-Up Configuration (Figure 6)- Figure 6 shows the (e) 1/0 port driver pull-up option used to drive an LED indicator. I This application is typical of a front-panel address or data (b) I display, where a row of LED indicators shows the logic I state at each pin of an 1/0 port. -= I A high level at X turnsFET (b) on and (a) off, providing a -----------~ path for current through resistor R from the base of transis- tor (c). This stops (c) from conducting and the LED does not light. If a low level is present at X, (b) turns off and (a) turns 3-39 F3851 on, providing a path for current from Voo through (a) to R. During input instrucions, the trailing edge of the STROBE· This current through R turns on (c), which causes the LED to signal is used to indicate to the external device that the conduct and be lighted. current data on the 110 port is read and new data can be changed. For example, If a shift register is connected to the The three options for 110 port output configurations describ- 110 port, the trailing edge of the STROBE signal is used to ed above are provided to aid the designer in optimizing advance the shift register. (minimizing) the system hardware for a particular applica- tion. The choice in configuration is specified as a mask During output Instruction, the trailing edge of this STROBE option by the designer. Signal indicates that the new data on the 110 port latches is being changed. The output on the latches becomes true after typically 500 ns of the trailing edge of this signal. figure 7 PSU 1/0 Port Timing Refer to the "Timing Characteristics" section for all signal characteristics. I-~"-{ \ )_lh_1 WRITE I INPUT ") DATA MAY CHANGE X DATA STABLE X DATA MAY CHANGE . . - - - tsp------.. OUTPUT") (STANDARD PULLUP) y 1012.9 V STABLE -4--tod----" OUTPUT") (OPEN DRAIN) ~ 2.9 V STABLE "\~l ..--tdp~ OUTPUT") _ _ _ _ _ _ _ _ _ _ _ (DRIVER PULLUP) X 2.9V STABLE F3856 1/0 Strobe F3851 Programmable Timer An additional output strobe signal is provided on the F3856 to Indicate the execution of an Input or output instruction The F3851 PSU has an 8-bit shift register, addressable as for the low address 110 port on the PSU circui~. (ThIs Is. port 110 port XXXXXX11, that can be used asa programmable 40f the PSU .clrcuit with1he 4-7 address.) A pulse of the timer (XXXXXX is the 8-bit IIO-port address select, a PSU duration of the WRITE clock on the STROBE pin is provided mask option). Figure 9 illustrates the shift register logic and at the end of the second cycle of the 110 Instruction for this the excluslve-OR feedback path. port. Figure 8 shows the timing relationship of this output Based·on the logic Illustrated In figure 9, binary values in with respect to the execution being performed. the range 0 through 254, when loaded Into the timer, are Although this pulse appears for both input and output converted into "timer counts." As shown in table 3, "timer instructions for this port, two different signals for input only contents" is the actual binary value loaded into a timer, and are derived from the external gating of the STROBE and "timer counts" Is the corresponding number of time inter- ROMCo signals, as shown below.· vals the timer takes to time out. Data cannot be read out of . .~ C:L6-==' the programmable timer 110 port. STROBE -----"""""1FD-o,-- As described in the Guide to Programming the F8 Micro- computer, an assembly-language program specifies timer counts, and the assembler converts timer counts Into the binary value that must be loaded into the programmable timer. This is the value given under "Contents" in table 3. To 3-40 F3851 Figure 8 1/0 Instruction Fetch and Strobe Timing 1....- - - - - - - - - - - - 1 / 0 INSTRUCTION------------~~ 1 ~~ __________ ~n~ __________ ~n~: __ ~n~ ___ I..f------:=-:::-:-=-:-::cc:::----~~ I.....1-----=:-:------=-='"'=-=-'--)----c:,..,~~::_NEXT_I PORT ADDRESS CPU DB (OUTPUT n I I FETCH INST. FETCH -14 ON DATA BUS S T R O B E - - - - - - - - - - - - - - - - -_ _ _ _ _ _ _ _ _ _~. PSU - DB (INPUT) • INST II - - - - - - - - - Figure 9 F3851 Timer Block Diagram PRESET TO GIVE TIMER ClK AFTER TWO ADDITIONAL ¢ PERIODS JAM 8 BITS PARAllEL WHENEVER TIMER IS lOADED IF lOADED DECODETIMER STATE 'FE' AS TIME·OUT > o o Q T2 o Q T3 o Q T4 o Q T5 o Q T6 o Q T7 C C lSB MSB T3 ~~~--_rlr~------(]~~----~ 1L.....--_T4_<:;,~T5 ___ T7 use a programmable timer, bypassing assembly·language All timers run continuously, unless they have been stopped programming, load the programmable timer with the value by loading H'FF' into the timer. Upon timing out, the timer given under "Contents" in table 3 to time out after the num· transmits an interrupt request to the interrupt logic. If ber of intervals given under "Counts." proper interrupt logic conditions exist, the timer interrupt request is passed on to the CPU through the jjij'f REQ it is also possible to write small subroutines that calculate signal. time values one count faster or slower than a given value, Such subroutines would be used if programmed delays are After a programmable timer has timed out, it again times required. out after 255 timer counts; therefore, if the programmable + timer is left running, it times out every 7905 clock periods, The OUT or OUTS instruction is used to load timer counts or every 3.953 ms for a 500 ns clock. into the programmable timer, The contents of the program· mabie timer cannot be read using an IN or INS instruction. If the timer is actually loaded with a zero value, it times out The timer times out after a time interval given by the prod· in 24 counts, whereas, once it has timed out, it next times + uct (period of clock x (timer counts) x 31). For example, a out in 255 counts; I.e., a time-out is not the same thing as value of 200 (11001000, or H'C8110aded into the program· counting down to zero. mabie timer becomes 215 timer counts. The timer, therefore, times out in 3.33 ms, if the period of clock signal is 500 ns. + When the timer and timer interrupt are being set to time a new interval, the timer is always loaded before enabling the A value of 255 (H'FF110aded into a programmable timer timer interrupt. Loading the timer clears any pending timer stops the timer. interrupts. When the timer interrupt is enabled, any pending 3·41 F3851 timer interrupt is acknowledged and forwarded to the CPU. F3851 Interrupt Control Register Since the timer runs continuously, unless stopped under program control, enabling the timer before loading a time The interrupt control register (lCR) has the 110 port address count can cause errors. Prior time-outs of the timer are XXXXXX10 (where XXXXXX is the 6-bit 110 port address latched in the interrupt logic of the PSU, even while timer select). Data is loaded into this register (110 port) using an interrupts are disabled. When the timer is enabled, an OUT or OUTS instruction. Data cannot be read out of this immediate interrupt acknowledge occurs if, by chance, the register. The contents of the ICR are interpreted as follows: continuous-running timer happens to time out while timer interrupts are disabled. Contents of 110 Port Interpretation If the timer is loaded just before enabling timer interrupts, B'XXXXXXOO' Disable all interrupts loading the timer clears pending timer interrupts. Now a spurious interrupt request does not exist when the timer B'XXXXXX01' Enable external interrupt, interrupt is enabled. disable timer interrupt B'XXXXXX10' Disable all interrupts Figure 10 illustrates a possible signal sequence for a timer B'XXXXXX11 ' Disable external Interrupt, that is initially loaded with 200, then allowed to run con- enable timer interrupt tinuously. Figure 10 Time-Out and Interrupt Request Timing 1---3.3 m s - *__-3.953 ms,-_~--3.953 ms _ _ A - 200 LOADED INTO TIMER B - FIRST TIME OUT C - SECOND AND SUBSEQUENT TlME·OUTS D - INTERRUPT SERVICE ROUTINES BEING ENTERED BY CPU 1,.12,13 -INTERVALS BETWEEN TIME·OUT INTERRUPT REQUEST REACHING INTERRUPT LOGIC AND SERVICE ROUTINES BEING ENTERED BY CPU Table 3 F3851 Timer Counts Contents Counts Contents Counts Contents Counts Contents Counts of to of to of to of to Counter Interrupt Counter Interrupt Counter Interrupt Counter Interrupt FE 254 40 189 02 124 9F 59 FO 253 9A 188 A5 123 3D 58 F8 252 34 187 48 122 7C 57 F7 251 69 186 96 121 F8 56 EE 250 03 185 20 120 F1 55 DC 249 A7 184 58 119 E2 54 B8 248 4F 183 87 118 C5 53 71 247 9E 182 6E 117 SA 52 E3 246 3C 181 DO 116 15 51 C7 245 78 180 8A 115 2A 50 3·42 F3851 Table 3 F3851 Timer Counts 8E 244 FO 179 75 114 55 49 10 243 EO 178 EB 113 AA 48 3B 242 C1 177 06 112 54 47 76 241 82 176 AD 111 A8 46 ED 240 04 175 5A 110 50 45 • OA 239 06 174 85 109 AO 44 B4 238 12 173 6A 108 41 . 43 68 237 24 172 05 107 83 42 01 238 48 171 AB 106 06 41 A3 235 90 170 56 105 00 40 47 234 21 169 AC 104 1A 39 8F 233 42 168 58 103 35 38 1F 232 84 167 B1 102 6B 37 3F 231 'A 168 62 101 07 38 7E 230 14 165 C4 100 AF 35 FC 229 28 164 88 99 5E 34 F9 . 228 51 163 11 98 BO 33 F3 227 A2 162 22 97 7B 32 E6 226 45 161 44 96 F6 31 CD 225 8B 160 89 95 EC 30 9B 224 17 159 13 94 08 29 36 223 2E 158 26 93 BO 28 60 222 50 157 4C 92 60 27 DB 221 BB 156 98 91 CO 26 B6 220 77 155 30 90 80 25 6C 219 EF 154 61 89 00 24 09 218 DE 153 C2 88 01 23 B2 217 BC 152 84 87 03 22 64 216 79 151 03 86 07 21 C8 215 F2 150 10 85 OF 20 91 214 E4 149 20 84 1E 19 23 213 C9 148 40 63 3D 18 46 212 93 147 81 82 7A 17 80 211 27 146 02 81 F4 16 1B 210 4E 145 05 80 E8 15 37 209 9C 144 OB 79 DO 14 6F 208 38 143 16 78 A1 13 OF 207 70 142 2C 77 43 12 BE 206 E1 141 59 76 87 11 70 205 C3 140 B3 75 OE 10 FA 204 86 139 86 74 1C 9 F5 203 OC 138 CC 73 39 8 EA 202 18 137 99 72 72 7 04 201 31 136 32 71 E5 6 A9 200 63 135 65 70 CB 5 52 199 C6 134 CA 69 97 4 A4 198 8C 133 95 68 2F 3 49 197 19 132 2B 67 5F 2 92 196 33 131 57 86 BF 1 25 195 67 130 AE 65 7F 0 4A 194 CE 129 5C 64 FE 254 94 193 90 128 B9 63 29 192 3A 127 73 62 53 191 74 126 E7 61 A6 190 E9 125 CF 60 3·43 F3851 In these I/O port contents definitions, X represents "don't The flip-flop is not cleared by a loading of ICR. While count- care" binary digits. ing, the timer jumps from all-zero value to all-one value and, depending on prescaler values, provides an interrupt period F3856 Timer and Interrupt Control Registers + of every 512, 2048, 8192, or 32768 clocks. The F3856 logic responds to an interrupt request that can If the timer is in the run mode and the ICR is set for a originate internally from the timer logic or from input by an prescaler value of 2 at the time a value of 2 or 1 is loaded external device, or from the pulse width measurement cir· into the TR, the next transition from a one-count to a zero- cuits. Interrupt functions present in the F3856 include the count is not detected. ability to program the active transition of the external inter· rupt, the ability to have both the timer and the external F3856 Interrupt Control Register Configuration interrupts active at the same time, and the ability to mea- The ICR is a 7-bit register used to define various modes of sure pulse width of an external signal. interrupt, the value of the prescaler, and external pulse width measurement. This register is loaded by output in- The timer is an 8-bit binary count·down register that is used structions; no provision is made to read the contents of this in conjunction with interrupt logic to generate real-time register. The ICR, along with the I/O ports on the F3856, is intervals, to measure elapsed time between two events, or reset to zero during the reset sequence. to measure a pulse width appearing on the EXT iNf signal. The timer is selected to run in one of four values provided The configuration of this register is shown in figure 11. by the prescaler and can be made to start counting or stop counting under program control. Also, the timer contents can be read back under program control. Figure 11 F3856 ICR Configuration A zero·detect circuit in the timer detects transitions from a one-count to a zero-count and provides a signal to the inter· II l rupt circuits. If all other conditions are satisfied, interrupt circuits, after receiving this signal, request an interrupt service from the CPU. ~~AL INTERRUPT CONTROL BITS LPRES CALER CONTROL BITS START/STOP BIT An external interrupt can be selected under program control EDGE DETECT BIT to detect the falling or rising edge of the signal. The active EXTERNAL PULSE WIDTH MODE edge is determined by the contents in a bit in the interrupt control reg ister. Both interrupts can be enabled at the same time. When Local Interrupt Control (Bits 0-1)- These modes define both interrupts are enabled, they are serviced on a first· the interrupt state of the timer and external interrupts come, first-served basis. For example, if the timer interrupt (see table 4). arrives later than the unserviced external interrupt, the external interrupt is serviced first, and the timer interrupt Table 4 F3856 Timer and External Interrupt Modes remains stored until it is serviced or cleared. If both interrupts arrive at the same cycle, the timer interrupt is Bit 1 Bit 0 Function handled first. o o No Interrupt The internal timer register (TR) and interrupt control register o 1 Enable External Interrupt Only (lCR) are associated with the two high address ports. The o Enable Both External and Timer TR, depending on various functions, is in one of two modes: Interrupts stationary or run. In the stationary mode, the contents of the Enable Timer Interrupt Only TRremain unaffected. In the run mode, the TR is a binary count.cJown register, which decrements every 2, 8, 32, or 128 Prescaler Control (Bits 2-3)- These bits define one of the + clock time, depending on the value of the two prescaler four different prescalers for the timer (refer to table 5). bits on the ICR. A circuit detects the one-count-to-zero-count transition of the register and stores it in a flip-flop for interrupt purposes. This flip-flop is cleared any time a new value is loaded into TR. 3·44 F3851 Table 5 F3856 Timer Prescaler Modes 2. Load TR with an initial value. Timer Timer 3. As soon as the pulse arrives, the timer starts counting Prescaler Resolution Period and provides the timer interrupts at zero crossing. Bit 3 Bit 2 Value at 2 MHz at 2 MHz 4. At the end of the pulse, the timer stops counting and 1 1 2 1115 2561ls provides an external interrupt, indicating the end of the 1 0 8 4115 1.024 ms pulse. The timer contents can now be read under pro- • 0 0 32 161lS 4.095 ms gram control for calculating the pulse width. 0 1 128 641ls 16.384 ms In this procedure, both interrupts are enabled. It is possible Start·Stop Timer (Bit 4)- This bit controls the TR. When at to disable one or both interrupts. If the external interrupt is 0, the TR is in the run mode; when at 1, the TR is in the sta- not enabled, the timer stops at the end of the pulse. How- tionary mode. ever, some means of indication are necessary to detect the end of the pulse to the main program. If the timer interrupt Edge Detect Con!!E.!. (Bit 5)- This bit defines the active is not enabled, the timer zero crossing is not detected. If the edge of the EXT INT input signal as the source during pulse duration is always short, such that the timer is external interrupts. When this bit is at 0, the falling edge is stopped before reaching zero, it is not necessary to enable active; when it is at 1, the rising edge is active. the timer interrupt. External Pulse Width Mode (Bit 6)-When this bit is at 0, no When the timer is loaded with a zero count, the timer inter- special function is performed and the interrupts and timer rupt does not occur immediately, although the timer is a circuits are controlled by bits 0 through 5 of the ICR. How- zero-count. The timer interrupt occurs only after the one-to- ever, when this bit is at 1, the special function of pulse zero transition during the countdown. Hence, when the width measurement is performed. timer is loaded with a zero count, the timer interrupt occurs after 256 timer counts. Pulse Width Measurement The following procedure is used to measure pulse width for This feature of being able to load a zero count in the timer the F3856 PSU (refer to figure 12). without getting interrupted allows the programmer to have complete control over the timer count and is also useful 1. Before the pulse arrives, set the ICR as follows: during the pulse width measurement mode. a. Set the external pulse width mode bit to 1. During reset procedures, the ICR is loaded with zero, which disables the local interrupt controls and establishes the b. Set the edge detect bit to 1 for a negative pulse or trailing edge of the 00 REO input signal as the active edge to 0 for a positive pulse. for the external interrupt. The active edge of the external signal can be changed by bit 5 of the ICA. However, when c. Set the startlstop bit to 1 (stop mode). this bit is changed, and the level appearing on the. external signals is of the same level as the one obtained after the d. Set the prescaler bits to the value of prescaler new active edge, an external interrupt is generated. For desired. example, when changing the active edge of the external sig- nal from trailing edge to riSing edge under program control, e. Set the interrupt bits to turn on both interrupts. if the external signal is already at a high level, an interrupt is generated. Figure 12 F3856 Pulse Width Measurement EXTERNAL SETUP REGISTERS TIMER STARTS TIMER INTERRUPT INTERRUPT EDGE DETECT BIT = 1 EXTINT--~--------------------,~ I/"-. I EDGE DETECT BIT ~ 0 ~------~----r---~ 1/ "",I > TIMER STOPS EXTINT--~--------------------~ 3-45 F3851 If such interrupts are undesirable, an additional step is nec- The service request flip·flop cannot become set if another essary to disable the local external interrupt control during interrupt request is being acknowledged anywhere in the the change of ICR bit 5. For example, when loading the ICR system. Rather, if an interrupt request has been latched into for the change of direction, the external interrupt control the timer interrupt flip-flop or the external interrupt flip-flop, can be disabled with the same instruction, and the next the PSU logic waits until after the process of acknowledg- instruction can then enable it. ing the other interrupt has been completed before setting the service request. This precaution is necessary to ensure Note that the feature of generating an interrupt by changing that the priority chain is not altered during acknowledge- bit 5 of the ICR can be used for software (program-gener· ment; an error would occur if one half of the interrupt vector ated) interrupts. came from one device and the second half from some other device. PSU Interrupt Handling The service request flip-flop is cleared after an interrupt A typical F8 system interrupt interconnection is shown in from the PSU has been acknowledged. It is also cleared figure 13. Each PSU and PIO has a PRi iN and a PRI OUT whenever the interrupt control register for the PSU is line so that they can be daisy-chained together in any order accessed by an output instruction. to form a priority level of interrupts. Depending on the con- tents of the ICR, the interrupt control logic can be accepting The conditions for setting the timer interrupt flip-flop and timer interrupts or external interrupts, or neither, but never the external interrupt flip-flop differ slightly. External inter- both. rupts must be enabled before the external interrupt flip·flop can be set by a negative-going transition of the EXf iN'i' sig- Figure 14 is a diagram of the PSU interrupt logic. Between nal. However, the timer interrupt flip-flop is set by a timer the EXT iNT input signal or the time-out input and the iNf time-out independent of the timer interrupt enable bit. This REO output Signal, there are three flip-flops. The EXT INT means that the PSU can detect a time-out interrupt that is re- signal and the time-out interrupt input each have a synchro- quested while the PSU was checking for external interrupts. nizing flip-flop and edge detect logic. The timer interrupt flip-flop is cleared whenever the PSU Each edge detect clock is followed by its own interrupt flip- device timer is loaded or when its timer interrupt has been flop that latches the true condition. acknowledged. The external interrupt flip-flop is cleared whenever the device interrupt control register is accessed The outputs of the timer interrupt flip-flop and the external by an output instruction or when its external interrupt has interrupt flip-flop are ORed to set the service request flip- been acknowledged. flop, providing that an interrupt from some other PSU is not being acknowledged. Interrupt Acknowledge Sequence Upon receiving an interrupt request, whether from an exter- The iNT REO signal is the NAND of priority input and serv- nal source through the 00 INT signal or from the internal ice request. This is an open-drain signal. The iN'f R§:i sig- timer, the PSU and CPU go through an interrupt sequence nal of several PSUs can be tied together so that anyone that ultimately results in the execution of an interrupt can force the line to 0 V if it is requesting interrupt service; service routine located at the memory address indicated by a pull-up to Voo is provided by the F3850 CPU to the iNf the interrupt address vector. Figures 15 and 16 illustrate the REO input pin. interrupt sequences for the two cases. Events occurring in these sequences are labeled A through H. The PRI iN Signal is part of the interrupt priority chain. The ch~ ~gins by a strap to V~ ~ device in the chain has Event A - The initial interrupt request arrives. The falling a PRIIN input signal and a PRI OUT output signal. The PRI edge of the EXT INT pin identifies an external interrupt. The 5DT signal of the PSU is active (0 V) only if the PRi iN rising edge of the interval timer output indicates a time-out. signal is active (0 V) and service request is inactive This means that the PRI OUT and iN'f REc5 Signals are ~~s at Event 8- The synchronizing flip-flop in the PSU control opposite levels. The PRI OUT Signal becomes the PRIIN sig- logic changes state. nal for the next device in the interrupt priority daisy chain, if there is one. The function of the priority daisy chain is to Event C- The timer or external interrupt flip-flop goes true, ensure that just one device at a time is requesting interrupt indicating the local interrupt logic acknowledgement of the service. interrupt. The timer interrupt flip·flop always responds and saves the time-out occurrence, whereas the external inter- 3·46 F3851 Figure 13 F8 System Interrupt Interconnection . -__________~C~O~N~T,ROLrL~IN~E~S~----------_, CPU PSU/PIO PSU/PIO PIO SMI 2 (n) ICB '---------------------EXTERNAL INTERRUPT LINES ---------~ • Figure 14 Conceptual Illustration of F3851 PSU Interrupt Laaic Note: Ail FFs are clocked by the WRITE signal. INTERRUPT CONTROL REGISTER H'I'J' TIME-OUT D a SYNC SYNC FF FF FROZEN o DURING EVENT G (INTERRUPT SERVICE), 1 OTHERWISE PRI iN ---D>o---......+---., ·"OPEN COLLECTOR" GATE 3-47 F3851 rupt flip-flop is set at this time only if the external interrupt 3. The current instruction fetch is not protected. mode is enabled within the local control logic. Event F- The CPU generates the interrupt acknowledge Event 0- The INT REO line is pulled low by the PSU, sequence of ROMC states. passing the request for servicing on to the CPU. The follow- ing conditions must be present for this to occur: Event G-At this point, the CPU begins fetching the first instruction of the interrupt service routine. In the PSU inter- 1. The PRI IN pin must be low. rupt logic, the service request flip-flop and the appropriate interrupt request flip-flop have been cleared. 2. The proper enable state must exist in the local con- trol logic for the type of interrupt (timer or external). Event H- The CPU begins executing the first instruction of the interrupt service routine. 3. The system is not already into Event F because of servicing some other interrupt. Interrupt Address Vector During the interrupt acknowledge, the interrupting PSU pro- Event E- The CPU now begins its response to the INT vides a 16-bit interrupt address vector (refer to figure 17). REO line by transmitting the unique ROMC state H'10~ The CPU causes this vector to be loaded into PCa so that program execution can branch to the routine that handles This occurs only when the following conditions are this particular Interrupt. Fifteen bits of the interrupt vector satisfied: are specified as a mask option. Bit 7 cannot be masked; it is set by the interrupt control logic to 0 if the timer interrupt 1. The CPU is executing the last cycle of an instruction is enabled or to 1 if the external interrupt is enabled. (beginning an instruction fetch). 2. The ICB is enabled (ICB =0). Figure 15 Timer Interrupt Sequence EVENTS WRITE CLOCK TIME-OUT~ SYNC FF -----' TIMER INT FF ~----~ff~------------------~ iNr REO (TO CPU) ~5~-------------' ROMC STATE (FROM CPU) 10 1C OF 13 00 (US) _ LONG OR SHORT CYCLE (L) _ LONG CYCLE (5) _ SHORT CYCLE 3·48 F3851 Figure 16 External Interrupt Sequence EVENTS WRITE CLOCK TIME·OUT ~=I.-____ II SYNC FF _ _ _ _ _..1 TIMER INT FF ~------~H~------------------~ ~J~------------~ INT REa (TO CPU) ROMC STATE (FROM CPU) 10 1C OF 13 00 (US) ___ LONG OR SHORT CYCLE (L) ___ LONG CYCLE (5) _ _ SHORT CYCLE Figure 17 Interrupt Address Vector ~.~-------------------INTERRUPTAOORESSVECTOR------------------~.~ 15 .. MASK PROGRAMMABLE t I~-----~P~RO~G~M_R:-~~:~A-B-L-E~----"'· L 0 FOR TIMER INTERRUPT 1 FOR EXTERNAL INTERRUPT 3·49 F3851 Interrupt Signal Timing Timing for signals associated with the PSU interrupt logic is shown in figure 18. All signal characteristics are given in the timing characteristics section of this data sheet. Note: Timing measurements are made at valid logic level to valid logic level of the signals referenced unless otherwise noted. Figure 18 PSU Interrupt Timing ,---, \ " WRITE / \ -1<1:3-1 LONG CYCLE ROMC STABLE _I"-zl .. I" ~I 2V ~tPd3·-----"1 - - IPd 4 - ' - 1 /" ~ " Ipr1 -- / ~tpr2~ 2V _IPdl~ ~tPd2-"! / .1-1.,- ~ .. 1181 ~ STROBE ... tSB2 . 3-50 F3851 Timing Characteristics The timing characteristics of the PSU devices are described in table S. The ac characteristics are Vss = 0 V, Voo = +5.0 V ±5%, VGG= +12 V±5%, TA=O·C to +70·C, unless other- wise specified. II Table 6 PSU Signal Timing Characteristics Symbol Parameter Min. Typ. Max. Units Test Conditions P+ + Period 0.5 10 ,",S PW1 + Pulse Width 180 P+-180 ns t r, tf = 50 ns typo td 1, td2 + to Write + Delay 250 ns CL =100 pF td 4 WRITE to DB Input Delay 2P++1.0 ,",s PW2 WRITE Pulse Width P+-100 P+ ns t r, tf = 50 ns typo PWs WRITE Period; Short 4P+ PWL WRITE Period; Long ns td 3 WRITE to ROMC Delay 550 ns td 7 WRITE to DB Output Delay 2P++100- td2 2PH200 2P+ +850-td2 ns C I =100 pF WRITE to DB DR - Delay tds WRITE to DB DR + Delay 200 ns Open drain tr 1 WRITE to !!::!!. REa - Delay 430 ns CL = 100 pF(1) tr2 WRITE to INT REa + Delay 430 ns CI =100 pF(3) tprl PAl iN to INT REa - Delay 200 ns C L =100pF(2) tpd 1, PRi iN to PRI OUT Delay 800 ns CL=50 pF tpd2 tpd3, WRITE to PRi OUT Delay 600 ns C L =50 pF tpd 4 tsp WRITE to Output Stable 1.0 !lS CL = 50 pF, standard pull-up(3 tad WRITE to Output Stable 2.5 ,",S C L = 50 pF, RL = 12.5 kQ, open drain(5) tdp WRITE to Output Stable 200 400 ns CL = 50 pF, driver pull-up tsu 1/0 Set-up Time 1.3 ,",S th 1/0 Hold Time 0 ns tex EXT INT Set-up Time 400 ns tsBl WRITE to STROBE + Delay 5P++300 ns CL=50pF tsB2 WRITE to STROBE - Delay SP++410 ns C L =50pF Notes = 1. Assume priority in was enabled (PAl iN 0) in the previous FS cycle, before the interrupt Is detected in the PSU. 2. The PSU has an inte.!!!!p~nding before priority in is enabled. 3. Assume pin tied to INT REO input of the F3850 CPU. 4. Input and output capacitance is 3 to 5 pF, typical, on all pins except Voo, VGG, and Vss. DC Characteristics The dc characteristics of the PSU devices are provided in tables 7 and 8. Supply Currents Vss =0 V, Voo = +5 V ±5%,VGG = +12 V ±5%, TA=O·C, +70·C Symbol Parameter Min. Typ. Max. Units Test Conditions Voo Current 28 60 mA f = 2 MHz, outputs unloaded VGG Current 10 30 rnA f =2 MHz, outputs unloaded 3-51 F3851 Table 7 F3851 PSU DC Characteristics Symbol Parameter Signal Min. Max. Units Test Conditions VIH Input High Voltage Data Bus (DBo -DB7) 2.9 Voo V VIL Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 Voo V 10H = -100 /'A VOL Output Low Voltage Vss 0.4 V IOL=1.6 mA IIH Input High Current 1.0 /'A VIN = Voo, 3-state mode 10L Input Low Current -1.0 /'A VIN = Vss , 3·state mode VIH Input High Voltage Clock Lines (+, WRITE) 4.0 Voo V VIL Input Low Voltage Vss 0.8 V IL Leakage Current 3.0 /'A VIN=VOO VIH Input High Voltage PrioritY...!!!.l!!!d Control 3.5 Voo V VIL Input Low Voltage Lines (PRI IN, ROMCo - Vss 0.8 V IL Leakage Current ROMC4) 3.0 /'A VIN =Voo VOH Output High Voltage Priority out (PRI OUT) 3.9 Voo V 10H = -100 /'A VOL Output Low Voltage Vss 0.4 V 10L = 100 /'A VOH Output High Voltage 1~~Request V Open·drain output(1) VOL Output Low Voltage (INT REO) Vss 0.4 V 10L =1 mA IL Leakage Current 3.0 /'A VIN =Voo VOH Output High Voltage Data Bus Drive (DBDR) External pull·up VOL Output Low Voltage Vss 0.4 V IOL=2 mA IL Leakage Current 3.0 /'A VIN=VOO VIH Input High Voltage Exter~ Interrupt 3.5 V VIL Input Low Voltage (EXT INT) 0.8 V VIC Input Clamp Voltage 15 V IIH = 185 /'A IIH Input High Current 10 /'A VIN=VOO IlL Input Low Current -225 /'A VIN =2V IlL Input Low Current -150 -500 /'A VIN=VSS VOH Output High Voltage I/O Port Option A 3.9(5) Voo V 10H = -30 /'A VOH Output High Voltage (Standard Pull·up) 2.9 Voo V 10H = -150 /'A VOL Output Low Voltage Vss 0.4 V IOL=1.6 mA VIH Input High Voltage 2.9(3) Voo V Internal pull·up to VOO(3) VIL Input Low Voltage Vss 0.8 V IL Leakage Current 1.0 /'A VIN =Voo IlL Input Low Current -1.6 mA Y,N = 0.4 V(4) VOH Output High Voltage I/O Port Option B External pull·up VOL Output Low Voltage (Open Drain) Vss 0.4 V IOL=2 mA V,H Input High Voltage 2.9(3) Voo V (3) V,L Input Low Voltage Vss 0.8 V I,L Leakage Current 2.0 /'A Y,N = +12 V VOH Output High Voltage I/O Port Option C 3.75 Voo V 10H= -1 mA VOL Output Low Voltage (Driver Pull·up) Vss 0.4 V IOL=1.6 mA Nolas 1. Pull-up resislor to VDD on CPU. 2. Positive current is defined as conventional current flowing into the pin referenced. 3. Hysteresis input circuit provides additional 0.3 V nOise immunity while Internal/external pull-up provides TTL compatibility. 4. Measured while I/O port is outputting a high level. 5. Guaranteed but not tested. 3-52 F3851 Table 8 F3856 PSU DC Characteristics Symbol Parameter Signal Min. Max. Units Test Conditions VIH Input High Voltage Data Bus (DBo -DB7) 2.9 Voo V VIL Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 Voo V 10H= -100~ VOL Output Low Voltage Vss 0.4 V IOL=1.6 mA IIH 10L VIH VIL Input High Current Input Low Current Input High Voltage Input Low Voltage Clock Lines (+, WRITE) 4.0 Vss 3.0 -3.0 Voo 0.8 jJA jJA V V VIN = Voo, 3·state mode VIN = Vss , 3·state mode II IL Leakage Current 3.0 ~ VIN=VOO VIH Input High Voltage Priority In and Control 3.5 Voo V VIL Input Low Voltage Lines (PRI IN, ROMCo - Vss 0.8 V IL Leakage Current ROMC4) 3.0 ~ VIN =Voo VOH Output High Voltage Priority out (PRI OUn 3.9 Voo V 10H = -100 jJA VOL Output Low Voltage Vss 0.4 V 10L =100 jJA VOH Output High Voltage Interrupt Request V Open The timer therefore times out in 3.33 milliseconds, if the clock periods, or every 3.953 milliseconds for a 500 period of clock signal cI> is 500 nanoseconds. nanosecond clock. A value of 255 (H'FF') loaded into a programmable timer If the timer is actually loaded with a zero value, it times stops the timer. out in 24 counts, whereas once it has timed out it next times out in 255 counts (I.e., a time·out is not the same All timers run continuously, unless they have been as counting down to zero). stopped by loading H'FF' into the timer. Upon timing out, 3·60 F3852/F3853 Fig. 5 Memory Refresh and DMA Timing During Long·Cycle Memory Read, with Address Out of Data Counter 3.0 tis -I WRITE \ l--450ns 1.251'5 1.021ls 1;::600 n o _ ADDRESS LINES FOR REFRESH CPU AD DR REFRESH ADDR ADDRESS LINES FOR DMA 1.2Sp.s CPUADDR - _400n'~DMAADDR_ 200ns ~. I 530 ns HIGH IMPEDANCE II 300 ns DATA BUS DATA STABLE FROM RAM 2.05 {tS 1.25/-1s CPU READ V CPU SLOT - _450no'-.1 170 ns [..- \ !~SOi~ ~ 2.27 ItS - MEMIDLE ~ 200 ns 2.2Sp.s ~ MEMIDLE FOR DMA 3.25 1l5 \- 750 ns -I - CYCLE REO 250 ns I~ 1.0/ls -I '600 ns for DUDM. Fig. 6 Timer Block Diagram PRESET TO GIVE TIMER CLK AFTER TWO ADDITIONAL'" PERIODS JAM 8 BITS PARALLEL WHENEVER TIMER IS LOADED IF LOADED DECODE TIMER STATE 'FE' AS TIME-OUT> ____~ T3 ~~-n~~~~-_a_~_4~G~T5=~ T7 3-61 F3852/F3853 When the timer and timer interrupt are being set to time Depending on the contents of the interrupt control a new interval, the timer must always be loaded before register, the SMI interrupt control logic can be accepting enabling the timer interrupt; loading the timer clears any timer interrupts or external interrupts, or neither, but pending timer interrupts. When the timer interrupt is never both. enabled, any pending timer interrupt is acknowledged and forwarded to the CPU. Since the timer runs The OC and 00 I/O ports are used for the interrupt continuously, unless stopped under program control, address vector upper and lower bytes, respectively. They enabling the timer before loading a time count can can be written into and read from using the I/O cause errors. instructions. Figure 7 illustrates a possible signal sequence for a Since only three device pins are available for use by timer that is initially loaded with 200, then allowed to interrupt logic, there is no priority out signal. This means run continuously. that if an SMI is in an interrupt priority daisy chain, it must be the last device in the chain or external logic must generate a PRI OUT signal as shown in Figure 8. Fig. 7 Time·Out and Interrupt Request Timing The SMI interrupt address vector consists of two programmable I/O ports. The interrupt address vector is f.--3.3 ms -*0---3.953 ms-_-t---3.953 ms _ _ set under program control, rather than being a mask option (as with the F385l PSU). Even though the SMI -·r ~"l -'r interrupt address vector is programmable, bit 7 is still set to 0 for a timer interrupt, or to 1 for an external interrupt. A Address Contentions When a OMlor SMI is present in an F8 system that includes a PSU, address contentions occur while using the XDC instruction. D D D A - 200 LOADeD INTO TIMER B - FIRST TIME OUT The XDC instruction (ROMC state TO) causes the C - SECOND AND SUBSEQUENT TlME·OUTS contents of data counters DCO and DCl to be D - INTERRUPT SERVICE ROUTINES BEING ENTERED BY CPU 1,.12,13 - INTERVALS BETWEEN TIME·OUT INTERRUPT REQUEST REACHING exchanged; having no DCl register, the PSU does not INTERRUPT LOGIC AND SERVICE ROUTINES BEING ENTERED BY CPU respond to this instruction. Therefore, the PSU and memory interface devices can have different values in their DCO registers, and each value can be within the Interrupt Logic different address spaces of the two memory devices. An instruction that requires data to be output from the DCO The interrupt control register or I/O port (OE) can be used register may then cause two devices to simultaneously to enable or disable interrupts. Data is loaded into the place different data on the data bus. register or placed at the OE port using an OUT or OUTS instruction; data cannot be read out of the register or port. Fig. 8 PRI OUT Signal GeneTation The data at the 1/0 port is interpreted as follows: 8'XXXXXXOO' Disable all interrupts 8'XXXXXX01' Enable external interrupt, disable timer interrupt The contents of the interrupt control register are interpreted as: 10K 8'XXXXXX10' Disable all interrupts Vcc---~A-----~~--~ 8'XXXXXX11' Disable external interrupt, enable timer interrupt In the above, "X" represents "don't care" binary digits. 3-62 F3852/F3853 Signal Descriptions The SMI and DMI signals are described in Table 2. Table 2 SMI/DMI Signal Descriptions Mnemonic Pin No. Name Description Clock cf> WRITE 2 3 Clock Clock Clock inputs from the F3B50 CPU. II Address ADDR o-ADDR 15 15-B, Address Sixteen outputs through which an address is transmitted 25-32 to dynamic RAM. The address may come from the PCO or DCO registers. Data Bus DBo-DB? 16-19, Data Bus Eight bidirectional lines that link the DMI/SMI with all other 21-24 devices in the FB system. Only data moving to or from the address registers and 1/0 ports uses the data bus pins. Timing CPU READ 34 CPU Read An output signal that, when high, specifies that data is to be read out of a RAM location. When low, the signal is off; this does not specify a write operation (the write operation is specified by a RAM WRITE low signal). CPU SLOT 5 CPU Slot A DMI bidirectional signal that, when high, identifies portions of an instruction execution cycle during which the F3B50 CPU is reading out of or writing into RAM. When 0 is loaded into port D and the CPU SLOT signal is held low by external logic, the address line drivers and RAM WRITE driver go to a high- impedance state. CYCLE REO 7 Cycle Request An output signal that identifies each memory access period within an instruction cycle by making a high-to-Iow transition at the start of the memory access period. Does not identify events that are to occur during the memory access period. The CYCLE REO signal is a divide-by-2 of cf> during all ROMC states except ROMC state 05 (store-in-memory); it can be used to generate the clock signals required by many dynamic RAMs. MEMIDLE 4 Memory Idle A DMI output that identifies portions of an instruction execution cycle during which the FB system is not accessing memory to read, write, or refresh. The MEMIDLE signal therefore identifies the portion of an instruction cycle that is available for DMA operations. The DMI can inhibit DMA by holding MEMIDLE constantly low. The address drivers and RAM WRITE driver are always in a high-impedance state when MEMIDLE is high, so that a DMA device may drive the address lines at this time. 3-63 F3852/F3853 Table 2 SMI/DMI Signal Descriptions (Cont.) Mnemonic Pin No. Name Description Interrupt EXT iN 7 External An SMI input signal; a high·to-Iow transition is interpreted as Interrupt an interrupt request from an external device. INT REO 4 Interrupt An SMI output signal that becomes the INT REO input to the Request F3850 CPU. Must be output low to interrupt the CPU; this only occurs if PRI iN is low and SMI interrupt control logic is requesting an interrupt. PRI iN 5 Priority In Line An SMI input signal that, when low, sets the INT REO output low in response to an interrupt. Control ROMC o-ROMC 4 35-39 Read Only Five input lines that are the control signals output by the Memory Control F3850 CPU. Write RAM WRITE 6 Random Access An output signal that, when low, specifies data is to be written Memory Write into a RAM location. When high, the signal is off; this does not necessarily specify a read operation. Register REGOR 33 Register Orive A bidirectional line that, when used as an input, can be clamped low by an external open-collector gate to prevent the OMlor SMI from placing a byte from its PC1 or OCO register onto the data bus. The OMI supplies an internal pull-up resistor. When used as an output, REGOR can control data bus buffers. The OMI internally clamps REGOR low except during those ROMC states in which the OMI is required to place a byte out of the PC1 or OCO registers, or either of its two control registers (110 ports), onto the data bus. Power Voo 40 Power Supply Nominal + 5 Vdc VGG 1 Power Supply Nominal + 12 Vdc Vss 20 Ground Common power and signal return DMIISMI Signal Timing The OMI and SMI receive timing signals from the F3850 Within an instruction cycle, there may be either two or CPU, then output timing signals used by the dynamic three memory access periods, depending on whether the RAM and an F3854 OMA device, if present. Figures 9 instruction cycle is long or short. A memory access and 10 illustrate the timing signals for the OMI and period is equivalent to two clock periods, and is SMI, respectively. identified by a CYCLE REO Signal, which is a divide-by-2 of . Whether the instruction cycle is short or long Timing of the F3853SMI INT REO, PRI IN, and EXT iN depends on the source and destination of the data being interrupt Signals is identical to that of the F3851 PSU; transmitted during instruction execution. the remaining Signals have the same timing as the OMI, except for the address lines. 3-64 F3852/F3853 Fig. 9 F3852 OMI Timing Signals WRITE ~f----------- A03----------~ f.o-f---------IA02-----------'l~ IA01~ I ADDL~~~~ X I y;;-r--'\.)(~~--R-EF-·--I------,.~ REF. :~==-==-==-~~=_IAO,_ ----;::'-"1 IA05 lADs r- .1 • ,~,~o E:?"'~ ~------I4-------------------- CPUSLOT *ICS1 t----------,., ~r;~~~~I-M1~-~--IM~-S3~~~~~~~~~~1~·~----- MEMIDLE _ J '\,f------- ~\ l---I::-\.~tC_Y-2=-~/.14-IM3-ICY3=_IM, -=--~-----~1-:~~ . ~I CYCLE REO j-1 tCY1 ~-----c- r ,- '\ ---- - I }:_ !:= r-----~:-ICY'-----------IIWR1 :.- --IWR,--------.J.! t IWR3]~ t== 1--<_-----------------tWA2 "'" -- t - -~=:1'---IRG2-=-~~__J1- ------------------ r: tD, ., DATA BUS -----------------------------~X'------------- ----ID'----1 INPUT ~--------------------------------------------~ '-"14 DATA BUS -----------------------~ ~~----------------- OUTPUT ------------------------------------~ During the first memory access period, the device If the assumed logic proves to be correct, or if no outputs the contents of pca onto the address lines memory access is to occur, the second access period (ADDR o-ADDR 15)· can be used for memory refresh or DMA. In effect, the logic begins by assuming that a memory If the instruction decoded by the CPU specifies a read is to occur, with the memory address provided memory read with another memory address, the DMI by pca. wastes the first access period; in this case, the instruction cycle is always long. The required memory While the pca contents are being. output on the address access is performed during the second access and lines, the control unit (in parallel) decodes the ROMC memory refresh occurs, or DMA is implemented, in the state that has been received from the CPU. third access period. 3·65 F3852/F3853 Fig. 10 F3853 SMI Timing Signals \. ~--, WRITE 1'-_______________-L/____...l\......____LI-.,..___\~_ j.-- t AD1 :=::J ADDRESS vr----------~f LINES ~ -1i-".:-=--=--=--=--=--=--=--=--=--:---IAD4-------. . .:~ 1.-------------------- I CPU READ I:==tCR'~ tCR2 tWR, jr----------------------- RAM WRITE :~: _ _ _ tWR2___,__~~t====tWR~':J REGDR 1:==._-=-=-:tRG,~=_=.~~~! ___________________ _ DATA BUS _1~+--:~~~~~~t~RG~2~~~~tD~4~~~~-~~~~~~~X---.--------------____ INPUT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _...J ~1·-------tD7 ~ DATA BUS - - - - - - - - - - - - - - - - - - - - - ------------------ OUTPUT _ _ _ _ -----------------...J.. I-tR;=iI..-_ _ _~_ _ _ _~I·_-_-_t_R2-=-~--+ix ~.":~ {:,..J _ _~~-------------------~~--------'~ _ _ _----'lir-. tEX--l EXTINT '--- 3·66 F3852/F3853 If a memory write instruction is decoded, no access The implications of this relaxed data bus timing periods are available for memory refresh or DMA. parameter are that slower static memories may be used with the SMI; on the other hand, memory controlled by Four variations of the instruction cycle result. The timing an SMI cannot be accessed by an F3854 DMA. Another diagrams (Figures 11-18) illustrating the four variations implication is that a latching type buffer is not needed represent worst cases and assume td 2 = 150 ns. The four between memory and the data bus. variations are: Instruction Execution ~ 1. The instruction fetch. The memory address originates in program counter pca, and the instruction cycle is The DMI and SMI respond to signals that are output by . . . short. (Timing is shown in Figures 11 and 12.) the F385a CPU in the course of implementing instruction cycles. The actions taken by the DMI and SMI during 2. An immediate operand fetch. The memory address instruction execution are a function of the ROMC state. originates in program counter pca, and the instruction cycle is long. (Timing is shown in Figures 13 and 14.) Data Output by RAM Figures 11 through 16 illustrate the worst-case timing 3. A data fetch. A data bYle is output from an address when RAM, controlled by the DMI, outputs data onto the register, or the memory address originates in data data bus. (In these figures, it is assumed that the CPU counter DCO; therefore, the instruction cycle is long. SLOT Signal is used to strobe the RAM data into the data (Timing is shown in Figures 15 and 16.) bus latches.) 4. A memory write. Data is written into the RAM location The CPU READ signal is output high by the SMIIDMI to addressed by DCO. (Timing is shown in Figures 17 enable transfer of data from the data bus buffers to the and 18.) . data bus. Dynamic RAM has its own connection to the data bus through buffer/latches; data is not transferred The CPU SLOT and MEMIDLE signals identify the way a through the DMI/SMI. (A CPU READ high signal is active memory access period is being used. When the F3850 when its respective data bus drivers are turned on.) CPU is accessing memory, the CPU SLOT signal is high; RAM WRITE and the address lines are driven at this time. Data Output by the DMI/SMI The REGDR signal defines the address space of the When memory is available for DMA access, the CPU address registers. If an ROMC state received by the SLOT Signal is low and the MEMIDLE signal is high. DMI/SMI requires data to be output from an address When the DMI is refreshing dynamic memory, the CPU register, the device becomes the selected data source if SLOT and MEMIDLE signals are both low. the REGDR signal is allowed to go high. The DMI logic is able to achieve two memory accesses Data Input to RAM within one instruction cycle. Figures 15 and 1-6 illustrate timing when data is written into RAM. Data is transferred through 3-state buffers on Buffer/latches are placed on the F8 data bus I.ines the data bus and into. RAM. The RAM WRITE signal is between the RAM and the F8 system to hold the data pulsed low by the DMI/SMI to enable the transfer of data fetched· during the first access. off the data bus into RAM. The 3-state buffers or multiplexers between the data bus and RAM WRITE data The SMI, without memory refresh and DMA capabilities, lines are necessary if DMA sources are also allowed to does not generate three timing signals (CPU SLOT, write into RAM. CYCLE REO, and MEMIDLE). These device pins are instead used by interrupt logic. Data Input to the DMI/SMI Address contention is created by having duplicate Since the DMI does not access memory within a Single address registers. One method for resolving the memory access period, as identified by the CPU SLOT contention is to force every memory device to read data signal, data bus timing is relaxed when using the SMI as into its address registers whenever an ROMC state compared to the DMI. Worst-case timing for the four specifies any such operation. Address space concepts possible machine cycles is explained in the "DMI/SMI therefore do not apply when data is read into the Signal Timing" section. address registers. .& 3-67 F38521F3853 Fig. 11 DMI Timing Signals Output During Short·Cycle Memory Read, with Address from Program Counter JI+--r--2.0".----+i~ WRITE -if~:----~~~___________________________JI'~------\k~--------------___ 1-450 .0---1-500 ..--I ADDRESS LINES )(It'--------------ST-A-B-LE-------------- f.---770 .1'" 100 .I--.j DATA BUS ___ ~--------------J)(~-------D-A-TA-S-T-A-BL-E-F-RO-M-RA-M------- ~1.------1.__25__"·===~~~"1 F~····~. CPU READ 11.~27~"!·::::::::::~·~1 CPU SLOT r -1170:.1- \~. _-----Jf ~"=tlr-"I -~\1"- ___f~-"""'\'________ MEMIDLE CYCLE REQ U..r '600 nsfor DUDM. Fig. 12 SMI Timing Signals Output During Short·Cycle Memory Read, with Address from Program Counter .~~~---------------------~o".----------------------:l~ WRITE - ' " 1\ _ _ _----J1'~-----.1~:_ _ ....!::;,::-~.. -~---------------ST-A-B-LE--------------- DATA , BUS __ ~ ----~-1~-~- -~- - - - - - - - - -1.-3-".~ ~- _-_-_-_-_-_-_-_~ j~JI\J __ __ .• _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_--_ DATA STABLE FROM RAM CPU READ ~:.--\-~1.25~".;-_-_~}-------------------- 1----- .I'-+! 450 '600 ns for DUDM. 3·68 F3852/F3853 Fig. 13 DMI Timing Signals Output During Long·Cycle Memory Read, with Address Out of Program Counter WRITE r x_"_ _ _ 3'0_".- _- _- ---J-;----.J'l ~450n.~~~on8~~------------------------------------------------------------ • ~ -J ADDRESS LINES STABLE , ~-77-0-n-.~-1-00-n-·-----'-----I------------------------------------------ DATA BUS ____ ~---------------------------I)(~---------------D-AT-A-S-T-AB-L-E-F-RO-M--RA_M ______________ CPU READ ~I_- __ .~-::"~_~ CPU SLOT ~170[ \ _ _----11 MEMIDLE \ oon8~50n.~F CYCLE REO n _1250 n. ~ ~. 1.0 ".----. .-:------.....J 1 \'---_ __ '600 ns for DUDM. Fig. 14 SMI Timing Signals Output During Long-Cycle Memory Read, with Address Out of Program Counter w"'~ - { \I-~~_-_-_ _-----JI -_3'_0"8 '-- ~"'~ ",: ..-+=-·y_____________________________ ST_A_B_LE_____________________________ DATA BUS ~I~._.~_~~~~~~~~~~~_1._65_"_.~~~~~~~~~~~j~J ________________ ~... ___ -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ STABLE DATA FROM RAM ~1.~--------_-_1_.2_5"_.__________:Jr--------------------------------------- ~450ns'} CPU READ '600 ns for DUDM. 3·69 F3852/F3853 Fig. 15 DMI Timing Signals Output During Long·Cycle Memory Read, with Address Out of Data Counter -t= i l 3.0/As WRITE 450 ns ~I: / ~ 1.25/A s ADDRESS LINES STABLE ~ L... 900 ns DATA BUS DATA STABLE FROM RAM 2.151015 1= 1.25 JJS ~I ~170n,r- f CPU READ CPU SLOT ....) 170 nSl I- I" .2.27/As ~} I MEMIDLE ~ 200 ns -J" I-- 750n0=1- CYCLEREQ ) / \ / j 250no\ 1.0"0 WRITE Jt Fig. 16 SMI Timing Signals Output During Long·Cycle Memory Read, with Address Out of Data Counter JI4---I;" - - 3 . 0 " S - - /------.j~ 450_n_s~:J:I:"':~ :~-_:~-_:~-_:~ -:'~ -1~.2~5~"0~ -=-~ - ~ - ~ - :~-_:..t-I_-...- - - - - - - - - - - - - - - _-_-_STABLE ADDRESS LINES -_-_-_-_-_~-_-_-_~_______ -==]~~~~~::;~;;:==~~~1'"""';;;;;;~9~00~n~S;;;;=-=-:W~1 DATA BUS _ I: 2.15"s DATA STABLE FROM RAM CPU READ ~~~ ,a. } 3-70 F3852/F3853 Fig. 17 DMI Timing Signals Output During a Write·to·Memory ~; l 3.01'5 WRITE - { 450 ns 1.251'5 / ADDRESS LINES X STABLE DATA BUS I· 1.3 fls X DATA STABLE FROM CPU II 200 ns f-- I" Cj l-----'! -----1 1.85/-15 MIN RAM WRITE CPU READ I- 2.31-15 MAX • ~450ns} MEMIDLE ~170~_ CYCLE REa ~ 750ns==t 200ns~ ~ / \.. J 250n\ 1.0"S Fig. 18 SMI Timing Signals Output During a Write·to·Memory \L 3.0 ).Is WRITE ~L \1" / -I" l 450 ns 1.25 f.ls ADDRESS LINES STABLE I- 1.3 j.ls DATA BUS RAM WRITE J .. 1.85/-15 MIN *t 3~~~S1 DATA STABLE FROM CPU }--_.../ ~200ns~ MIN I- 2.3 j.ls MAX • ~450ns) CPU READ 3-71 F3852/F3853 Timing Characteristics The timing characteristics of the DMI and SMI are described in Tab/es 3 and 4, respectively. Table 3 DMI Output Signals Timing Characteristics Vss=OV, Voo= +5V ±5%, VGG= +12V ±5%, T A = O·Cto +70·C. Symbol Characteristic Min Typ Max U~1t Notes Pt/> t/> Clock Period 0.5 10 P.s tad 1 Address Delay if PCO 50 300 500 ns 3 tad 2 Address Delay to High Z (Short Cycle With DMAOn) tcs2+ 50 tcs2+ 200 ns 3 tad 3 Address Delay to Refresh (Short Cycle With REF On) tcs2+ 50 tCS2+ 400 ns 3 tad 4 Address Delay if DC 2Pt/>+50- td 2 2Pt/> + 400 - td 2 ns 3 tad s Address Delay to High Z (Long Cycle With DMA On) tcs3+50 tCS3+ 200 ns 3 tad 6 Address Delay to Refresh (Long Cycle With REF On) tcs3+50 tcs3+400 ns 3 tcrl CPU READ - Delay 50 250 450 ns 1,7 tcr2 CPU READ + Delay 2Pt/>+50-td 2 2Pt/> + 400 - td 2 ns 1 tcs; CPU SLOT + Delay 80- td 2 320- td 2 ns 1 tCS2 CPU SLOT - Delay (PCO Access) 2Pt/>+60- td 2 2Pt/> + 420 - td 2 ns 1 tcs3 CPU SLOT - Delay (DC Access) 4Pt/>+60- td 2 2Pt/> + 420 - td 2 ns 1 tml MEMIDLE+ Delay (PCO Access) 2Pt/>+50- td 2 4Pt/> + 400 - td 2 ns 1 tm2 MEMIDLE- Delay (PCO Access) 4Pt/>+50- td 2 4Pt/> + 350 - td 2 ns 1 tm3 MEMIDLE+ Delay (DC Access) 4Pt/>+50-td 2 4Pt/> + 400 - td 2 ns 1 tm4 MEMIDLE- Delay (DC Access) . 6Pt/>+50- td 2 6Pt/> + 350 - td 2 ns 1 tcy, WRITE to CYCLE REO - Delay 80- td 2 400- td 2 ns 1,4 tCY2 WRITE to CYCLE REO + Delay Pt/>+80- td 2 Pt/>+400-td 2 ns 1,4 tCY3 CYCLE REO + to + Edge Delay 2Pt/> 1,4 tCY4 CYCLE REO- to- Edge Delay 2Pt/> 1,4 twrl RAM WRITE - Delay 4Pt/>+50- td 2 4Pt/> + 450 - td 2 ns 3 twr2 RAM WRITE + Delay 5Pt/>+50- td 2 5Pt/> + 300 - td 2 ns 3 twr3 RAM WRITE Pulse Width 350 Pt/> ns 3 twr4 RAM WRITE to High-Z Delay tcs2+ 40 tcs2+ 200 ns 3 trgl REGDR - Delay 70 300 500 ns 1 trg2 REGDR + Delay 2Pt/>+80-td 2 2P+ 1000 ns td 7 WRITE to Data Bus Output Delay 2Pt/> + 100- td 2 2Pt/> + 850 - td 2 ns 2 Nole. 1. CL =50 pF 2. CL=l00pF 3. C L =500 pF 4. CYCLE REO Is a dlvlde-by·2 01 eI> Clock Period 0.5 10 p's tad, Address Delay if PCO 50 300 500 ns 3 tad 4 Address Delay if DCO 2PeI>+50-td 2 2PeI> + 400 - td 2 ns 3 CPU READ - Delay • tcr, 50 250 450 ns 1,8 tcr2 CPU READ + Delay 2PeI>+50-td 2 2PeI>+400-td 2 ns 1 twr, RAM WRITE - Delay 4 Pel> + 50- td 2 4 Pel> + 450 - td 2 ns 3 twr2 RAM iiVRiiE + Delay 5PeI>+50-td 2 5PeI>+ 300- td 2 ns 3 twr3 RAM WRITE Pulse 350 Pel> ns 3 trg, REGDR - Delay 70 300 500 ns 1 trg2 REGDR + Delay 2PeI>+80-td2 2 Pel> + 500 - td 2 ns 1 td 4 WRITE to Data Bus Input Delay 2PeI>+ 1000 ns td 7 WRITE to Data Bus Output Delay 2PeI>+ 100-td2 2 Pel> + 850 - td 2 ns 2 tr, WRITE to INT REO- Delay 430 ns 2,6 tpr, PRI TN to INT REO - Delay 200 240 ns 2, 7 tex EXT INT Setup Time 400 ns Not•• ,. CL =50 pF 5. Input and output capacitance is 3 pF to 5 pF, typical, on all pins 2. CL='OOpF except Vee, vGG, and Vss. 3. CL =500 pF 6. Assume Priority In was enabled (PRI IN = 0) In previous F8 cycle before interrupt is detected in the PSU. 4. On a given chip, the timing for all signals tends to track. For example, if CPU SLOT for a particular chip is fairly slow and its timing fails near 7. The PSU has interrupt pending bsfore Priority In is enabled. the Max delay value specified, the timing for all signals on that chip 8. 600 ns max for OUOM. tends to be near the Max delay values. This is a result of processing parameters (which affect device speed), which are quite uniform over small physical areas on the surface of a wafer. OMI System RAM Characteristics The ac characteristics of static and dynamic RAMs requirements, with resulting recommended RAM suitable for use with the DMI can be derived from the characteristics as follows: worst-case timing waveforms presented in Figures 3, 4, Access Time 550ns max 5, 11, 13, 15, and 17. Three distinct cases arise. Address/Data Stable Time" 580 ns max 1. Static RAM with no DMA or refresh. The timing SMI System RAM Characteristics characteristics recommended are Identical for the DMI The following RAM characteristics are recommended for and SMI. use with the SMI, based on the waveforms sllown In Figures 12, 14, 16, and 18, 2. The DMI used with dynamic RAM and no DMA. The recommended RAM characteristics are as follows: Access Time 900 ns max Address Setup Time to Write 600 ns max Access Time 500 ns max Data Setup Time to Write 550ns max Address SetLip Time to Write 600 ns max Write Pulse Width 350 ns max Data Setup Time to Write 550 ns max Data and Address Hold Times 200 ns max Write Pulse Width 350 ns max Data and Address Hold Times 200 ns max The above times must also allow for any buffer delays Read Cycle Time 900 ns max that may be present on the data bus. Write Cycle Time 3 P.s max 3. A system using either static or dynamic RAM with a "In most memory specifications this is the cycle enable width during DMI and DMA. The DMA access dominates the timing Read or Write. 3-73 F3852/F3853 DC Characteristics Absolute Maximum Ratings The de characteristics of theF3852 OMI and F3853 SMI These are stress ratings only, and functional operation at are provided In Table 5. these ratings, or under any conditions above those indicated in this data sheet, Is not implied. Exposure to Supply Currents the absolute maximum rating conditions for extended periods of time may affect device reliability, and Test exposure to stresses greater than those listed may cause Symbol Characteristic Min Typ Max Unit Conditions permanent damage to the device. 100 Voo Current 35 70 mA f=2MHz, Outputs VGG -0.3V, +15V Unloaded Voo -0.3 V, +7 V IGG VGG Current 13 30 mA f=2 MHz, All Other Inputs and Outputs -0.3 V, + 7 V Outputs Storage Temperature - 55·C, + 150·C Unloaded Operating Temperature O·C, + 70·C Not. All voltages with respect to vss. Recommended Operating Ranges Part Supply Voltage (VDD) VGG Number Min I Typ I Max Min I Typ I Max Vss F38521F3853 + 4.75 V I +5V I +5.25V + 11.4 V I + 12V I + 12.6V OV Ordering Information Order Code Package Temp. Range- F3852PC Plastic C F3852PL Plastic L F38520C Ceramic C F38520L Ceramic L F38520M Ceramic M F3853PC Plastic C F3853PL Plastic;: ,L F38530C Ceramic C F38530L Ceramic L ,,' F38530M Ceramic M 'C= Commercial Temperature Range O'C to + 70'C L= Limited Temperature Renge - 4O'C to + SS'C M = Military Temperature Range - SS'C to +,125'C ' ' 3·74 F3852/F3853 Table 5 OMI and SMI DC Characteristics Vss= 0 V, Voo= + 5 V ± 5%, VGG= + 12 V ± 5%, T A = O·C to + 70·C, unless otherwise noted. Signal Symbol Characteristic Min Max Unit Test Conditions Data Bus (DBo-DB7) VIH Input High Voltage 2.9 Voo V VIL Input Low Voltage Vss 0.8 V • VO H Output High Voltage 3.9 Voo V IOH= -100 /LA VOL Output Low Voltage Vss 0.4 V IOL= 1.6 mA IIH Input High Current 3 p.A V IN = Voo, 3-State Mode IlL Input Low Current -3 /LA V IN = Vss, 3-State Mode Address Lines (ADDR o-ADDR 1sl VO H Output High Voltage 4.0 Voo V IOH= -1 mA and RAM WRITE Output Low Voltage 0.4 V IOL=3.2 mA VOL Vss IL Leakage Current 3 /LA VIN = Voo, 3-State Mode IL Leakage Current -3 /LA VIN = Vss, 3-State Mode Clock (rI>, WRITE) VIH Input High Voltage 4.0 Voo V V IL Input Low Voltage Vss 0.8 V IL Leakage Current 3 p.A VIN=VOO MEMIDLE, CYCLE REO, CPU READ VOH Output High Voltage 3.9 Voo V IOH= -1 mA VOL Output Low Voltage Vss 0.4 V IOL=2 mA Control Lines (ROMC o-ROMC 4 ), VIH Input High Voltage 3.5 Voo V PRI iN VIL Input Low Voltage 0.8 V Vss IL Leakage Current 3 /LA VIN=6 V REG DR, CPU SLOT VOH Output High Voltage 3.9 Voo V IOH= - 3OO /LA VOL Output Low Voltage Vss 0.4 V IOL=2 mA VIH Input High Voltage 3.5 Voo V Internal Pull-Up V IL Input Low Voltage Vss 0.8 V IlL Input Low Current -3.5 -14.0 mA V IN = 0.4 V & Device (REGDR) Outputting a Logic "1" IL Leakage Current 3 /LA V IN =6 V Interrupt Request (INT REO) VOH Output High Voltage V Open-Drain Output [1] VOL Output Low Voltage Vss 0.4 V IOL= 1 mA IL Leakage Current 3 /LA VIN=VOO External Interrupt (EXT INn VIH Input High Voltage 3.5 V VIL Input Low Voltage 0.8 V VIC Input Clamp Voltage 15 V IIH= 185 /LA IIH Input High Current 10 /LA VIN=VOO IlL Input Low Current -255 /LA VIN=2 V IlL Input LoiN Current -150 -500 /LA VIN=VSS [1] Notes 1. The values are -100 ~A and -750 ~A for OUOM extended temperature ratings. 2. Positive current is defined as conventional current flowing into the pin referenced. 3-75 F38521F3853 3·76 F3854 Direct Memory Access Controller Microprocessor Product Description Connection Diagram The Fairchild F3854 Direct Memory Access Controller 40-Pln DIP (DMAC) interprets timing signals. generated by the F3852 Direct Memory Interface (OM I) to control the flow of data DIRECTION DWS between memory and devices' external to an F8 ENABLE STROBE microcomputer-based system. The direct memory XFER LOAD REG access (DMA) transfers occur in parallel with other operations, so that there is no reduction in program XFER REO MEM IDLE execution speed. VDD V.. Fabricated using n-channel, isoplanar MOS technology, the F3854 has very low power dissipation (typically ADDR. ADDRD less than 280 mW). A + 5 V and a + 12 V po~er supply ADDR. ADDR, are required. ADDR. ADDR'D ADDRll ADDR, • Generates Data Transfer Control Signals • Outputs Address of Memory Location to be Accessed ADDR,. ADDR. • Four.8-Bit Registers Addressed as 1/0 Ports ADDR13 ADDRs • Parallel Data Transfer ADDR,. ADDRo • Transfer Rate Controlled by External Device or CPU • 8-Blt Bidirectional Data Bus ADDR15 ADDR, • Up to Four Controllers In an F8 System PI READ RECl • + 5 V and + 12 V Power Supplies P2 WRITE Signal Functions DB, DBD DB. DB, ~ ADDRo DB. DB. WRITE ADDR, PI ADDR. DB4 ....._ _ _...r- 083 P2 ADDR. DMAC CONTROL LOAD REG ADDR. READ REG ADDRs MEM IDLE ADDRo XFEii REO ADDR, ADDRESS BUS ADDRo DBD ADDR. DB, ADDR'D DB. ADDRll DATA DB. ADDR,. BUS DB. ADDR,. I DBs ADDR,. DB. ADDR15 DB, ~u~ DIRECTION STROBE CONTROL OUTPUTS DWS XFER 3-77 F3854 Device Organization instruction and state 1B creating a LOAD REG The F3854 DMAC, functionally illustrated in Figure 1, instruction (see Figure 3); makes use of time slots during which the F3850 CPU is not accessing memory. During these slots, the F3854 The DMAC registers are loaded and read when the CPU generates data transfer control signals that enable data executes 110 instructions that access them. The 110 to be read from or written to a read/write memory. A instructions use the data bus to transmit the 110 address MEM IDLE signal gen~ated by the F3852 DMI (see in one direction and to transfer data during the following Figure 2) identifies time slots available for the instruction cycle. A DMAC register is loaded during a DMA operation. cycle in which a high LOAD REG signal is present and the 110 address on the data bus matches a DMAC port In addition to generating appropriate control signals, the address. Similarly, the contents of a register are read out DMAC outputs the address of the memory location to onto the data bus when a high READ REG signal is be accessed. present and an 110 address match has occurred during the previous cycle. The F3854 DMAC responds only to ROMC states 1A and 1B ("write to 110 port" and "read from 110 port," Signal Functions respectively). All other states constitute "no operation" conditions. External logic is used to decode these two The F3854 DMAC signal functions are described in ROMC states, with state 1A creating a READ REG Tab/e 1. Table 1 Signal Functions Mnemonic Pin No. Name Description DMAC Control 36 Clock Clock input from F3850 CPU that is used only in the generation of the STROBE signal. LOAD REG 38 Load Register Input control signal that is used in place of five ROMC state signals to enable loading address data into the addressed DMAC register. MEM IDLE 37 Memory Idle Input timing signal from F3852 DMI that identifies time slots available for DMA. P1, P2 15,16 Port Address Select Input signals that define selected port address. Must be externally strapped to determine DMAC 110 port address. READ REG 26 Read Register Input control signal .that is used in place of five ROMC state signals to enable reading the contents of the addressed DMAC register. WRITE 25 Write Clock input from F3850 CPU that is used only for 110 port loading and data bus monitoring. XFER REO 4 Transfer Request Input control signal that is supplied by an external device that is controlling the DMA transfer rate. When low, causes a byte of data to be transferred to or from memory during the next available DMA time slot. Data Bus DBo-DB? 17·24 Data Bus Bidirectional signal lines that link the F3850 CPU, F3854 DMAC, and all other devices within an F8 system. 3·78 F3854 Table 1 Signal Functions (Cont.) Mnemonic Pin No. Name Description Address Bus ADDR o-ADDR 15 7·14,27·34 Address Bus Three·state output signal lines that contain the address of the memory location to be accessed. These lines are in a high·impedance state when no DMA operation is occurring. Control Outputs DIRECTION 1 Direction Output control signal that reflects the contents of 1/0 port 3 bit 6. When high, data is being written into the memory; when low, data is being read from the memory. DWS 40 DMA Write Slot Output control signal that identifies a time slot during which DMA data transfer to memory is occurring. ENABLE 2 Enable Output control signal that reflects the contents of 1/0 port 3 bit 7. When high, DMA data transfers may occur. STROBE 39 Strobe Output strobe signal that is used for strobing data and for generating the RAM WRITE signal. XFER 3 Transfer Output control signal that identifies the time slot during which a DMA data transfer is occurring. Power Voo 6 Power + 5 V power input VGG 5 Power + 12 V power input Vss 35 Ground Power and signal ground Buses Before a DMA operation commences, the beginning The address bus of the F3854 DMAC (ADDR o-ADDR 15) is address of the memory buffer from which data is to be used to output the address of the memory location to be read, or to which data is to be written, is loaded into 1/0 accessed during the next DMA operation. The F3854 data ports 0 and 1. Information on length of memory buffer to bus (DBo-DB7) is used only to transfer data between the be addressed, plus DMA option and control data, is DMAC 1/0 ports and the CPU; it is not used to transfer loaded into 1/0 ports 2 and 3, as shown in Figure 5. data bytes to or from memory during a DMA operation. The eight bits of 1/0 port 2 and the first four bits of 1/0 1/0 Ports port 3 are reserved to· define the length, or byte count, of The F3854 DMAC contains four 8·bit registers that are the memory buffer to be accessed. Memory buffers of up functionally addressed as 1/0 ports. The 1/0 port involved to 4096 bytes in length can be written into or read from in a particular DMA operation is defined by port address by a DMA operation. A byte count of 01 transfers one select (P1 and P2) input signals, which become bits 2 byte; a count of 00 transfers 409.6 bytes. and 3 of the 1/0 port address (see Figure 4). Table 2 lists Bit 4 of 1/0 port 3 determines the rate of DMA data the DMAC 1/0 port addresses in an F8 system using transfer. If this bit is a 0, the external device controls four F3854s. transfer rate by providing a transfer request (XFER REO) signal when it is ready for a DMA data transfer; the The four 1/0 ports of a DMAC are loaded with data actual transfer then occurs during the next available time controlling the DMA operation. They are loaded-or slot identified by a high MEM IDLE input. If bit 4 of 1/0 written into-using OUT instructions and may be read at port 3 is a 1, the F3854 assumes that external logic is any time using IN instructions. ready for a DMA transfer when a high MEM IDLE input identifies a DMA slot. • 3·79 F3854 Fig. 1 F3854 Logic Organization 16·BIT ADDRESS BUS ADDRo_,....--..J ADDR, .......'--_ _ _ _..... P2------------, SELECT STRA'PS Pl-'- - - - - - - - - - - - . , READREG- LOADREG- MEM IbLE XFER REO ENABLE DIRECTION ---- ------- BIT7 BITe DWS BITS4ANDS XFER STROBE DBo_-.--------_,......, DB7 ...-'--~----"'1 VOD--' VSS- VGG~ 4>----':" WRITE _ _ Table 2 Addresses of DMAC 1/0 Ports Function of First Second Third Fourth 1/0 Port F3854 F3854 F3854 F3854 Address, L.O. Byte FO F4 F8 FC (Port 0) Address, H.O. Byte F1 F5 F9 FD (Port 1) Count, L.O. Byte F2 F6 FA FE (Port 2) Count, H.O. Four Bits, and Control F3 F7 FB FF (Port 3) , 3·80 F3854 Fig. 2 Typical DMAC Configuration DATA BUS F3850 CPU CONTROL • DMA CHANNEL F3854 DMA XFER. DIRECTION. ENABLE. STROBE Fig. 3 DMAC ROMC State Response Fig. 4 DMAC I/O Port Address ROMCo 76543210 ROMC, ROMC, LOAD REG 11 11 11 11 1 1 Ix 1 x1 ROMC, tt P2 P1 LTHESE TWO ADDRESS BITS ARE VARIABLE AND DEFINE ROMC2----~ ONE OF FOUR UO PORTS: READ REG 00 SPECIFIES UO PORT 0 ROMCO----r><>--==L~ 01 SPECIFIES 110 PORT 1 10 SPECIFIES UO PORT 2 11 SPECIFIES UO PORT 3 3-81 F3854 Fig. 5 1/0 Port 2 and 1/0 Port 3 Organization I/O PORT 3 1/0 PORT 2 78543210 78543210 . __ I I I I I I I I I I I I I I I I I I l[-~,::=:'_~ un 1 - A BYTE OF DATA IS TRANSFERRED EVERY AVAILABLE DMA SLOT 0 - DATA TRANSFER HALTS WHEN THE BYTE COUNT REGISTER DECREMENTS TOO 1- DATA TRANSFER CONTINUES UNTIL BIT 7 IS RESET TO 0 UNDER PROGRAM CONTROL ~---O - DATA IS TRANSFERRED FROM MEMORY TO AN EXTERNAL DEVICE 1- DATA IS TRANSFERRED FROM AN EXTERNAL DEVICE TO MEMORY '------0 - HALT DMA OPERATION 1- ENABLE DMA OPERATION Bit 5 of 1/0 port 3 provides the option of halting data read from memory by the external device; if bit 6 is a 1, transfer on byte count decrementing or allowing transfer the external device writes data into memory. to continue. Each time a DMA data transfer occurs, logic Bit 7 of I/O port 3 may be used at any time to start or ° within the DMAC increments the memory address in I/O ports and 1 and decrements the byte count in ports 2 and 3. If I/O port 3 bit 5 is a 0, DMA transfer stop DMA operations. During normal initialization, this bit is a 0, while I/O ports 0,1, and 2 are loaded with data. automatically halts. and bit 7 (the enable bit) is cleared as During DMA operation initialization, I/O port 3 is loaded soon as the buffer length count decrements to 0. If bit 5 with a data byte that includes a 1 in bit 7. is a 1, the buffer length count is ignored and DMA transfer continues until an OUT instruction sets bit 7 to Timing Characteristics a 0. The timing characteristics of the DMAC are described in Bit 6 of I/O port 3 determines the direction of data Table 3 and illustrated in Figure 6. transfer during a DMA operation. If this bit is a 0, data is 3-82 F3854 Table 3 F3854 DMAC Timing Characteristics Symbol Characteristic Min Typ Max Unit Test Conditions 1 P Clock Period 0.5 10 ",5 Note 2 PW 1 Pulse Width 180 P·180 ns t r, tf = 50 ns typo tdl to WRITE + Delay 60 300 ns Note 2 td2 to WRITE - Delay 60 250 ns Note 2 PW2 WRITE Pulse Width P·100 P ns t r, tf = 50 ns typo td3 WRITE to READ/LOAD REG 600 ns Delay td4 DB Input Set-up Time 300 ns td6 XFER REO to MEM IDLE Setup 200 ns td7 MEM IDLE to ADDR True 50 200 500 ns C L =500 pF td7' MEM IDLE to ADDR 3-State 30 250 ns C L =500 pF td8 READ REG to DB Output 40 300 ns CL= 100pF t d9 WRITE to ENABLE & 450 ns C L = 50 pF DIRECTION + Delay t da , MEM IDLE to ENABLE- Delay 400 ns C L =50 pF tdl0 MEM IDLE to XFER & DWS 300 ns C L = 50 pF + Delay tdl0' MEM IDLE to XFER & DWS 300 ns C L =50 pF - Delay tdll to STROBE + Delay 30 200 ns CL=50 pF t d11 · to STROBE - Delay 30 200 ns C L =50 pF Notes 1. Input and output capacitance is 3 to 5 pF, typical, on all pins except V DO, V GG. and V 55· 2. These specifications are those of '" and WRITE as supplied by the F3850 CPU. 3·83 .. F3854 Fig. 6 F3854 DMAC Timing Characteristics _ _ _---if.. ___ nn}'--_L.-[_---_-~___+- --"'-------_F,d4:=:::j" '..1.-' DATA BUS (INPUT) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _...J ENABLE· DIRECTION .~,,~ XFEiiREQ------------......,.....r~ 4 /,-------......:.i------- I ~:..-...--- ADDRESS 3-STATE ~ld7~L. _x_ ____ ADDR TRUE I--_ _ Id7_'_ ---1_ __ 3-STATE LINES I--ldl0) R XFER·DWS -:+It"l1 , 1cI11~ _____________________________________J ~___________________ STROBE DC Characteristics The dc characteristics of the F3854 are described in These are stress ratings only, and functional operation at Table 4. these ratings, or under any conditions above those indicated in this data sheet, is not implied. Exposure to Absolute Maximum Ratings the absolute maximum rating conditions for extended -Vee -0.3V, +7 V periods of time may affect device reliability, and VaG -0.3V, + 15 V exposure to stresses greater than those listed may cause All Other Inputs and Outputs -0.3V, +7 V permanent damage to the device. Storage Temperature - 55· e, + 150·e Operating Temperature O· e, + 70·e Not. All voltages are with reference to vss. 3-84 F3854 Table 4 DC Characteristics Vss= 0 V, Voo= + 5 V ± 5%, VGG= + 12 V ± 5%, TA = O·C to + 70·C Signal Symbol Characteristic Min Typ Max Unit Test Conditions 100 Voo Current 20 40 mA 1=2 MHz, Outputs Unloaded IGG VGG Current 15 28 mA 1= 2 MHz, Outputs Unloaded Data Bus VIH Input High Voltage 3.5 Voo V • (DB()"DB7) V IL Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 Voo V IOH= -100/LA VOL Output Low Voltage Vss 0.4 V IOL= 1.6 mA IIH Input High Current 1 /LA V IN = 6 V, 3·State Mode IlL Input Low Current -1 /LA V IN = Vss, 3·State Mode Address Lines VOH Output High Voltage 4.0 Voo V 10H= -1 mA (ADDR o·ADDR ,5) Output Low Voltage 0.4 V IOL=3.2 mA VOL Vss IL Leakage Current 1 ~ V IN = 6 V, 3·State Mode ENABLE, DIRECTION, VOH Output High Voltage 3.9 Voo V IOH= -100 /LA DWS, XFER, STROBE VOL Output Low Voltage 0.4 V IOL=2 mA Vss IL Leakage Current 1 /LA V IN =6 V MEM IDLE, XFER V IH Input High Voltage 3.5 Voo V REQ V IL Input Low Voltage 0.8 V Vss IL Leakage Current 1 /LA VIN=6 V LOAD REG, READ VIH Input High Voltage 3.5 Voo V REG, P1, P2 VIL Input Low Voltage 0.8 V Vss IL Leakage Current 0 1 /LA V IN =6 V WRITE, q, V IH Input High Voltage 4.0 Voo V V IL Input Low Voltage Vss 0.8 V IL Leakage Current 0 1 /LA V IN =6 V Ordering Information Order Code Package Temp. Range' F3852PC Plastic C F3852PL Plastic L F3852DC Ceramic C F3852DL Ceramic L F3852DM Ceramic M F3853PC Plastic C F3853PL Plastic L F3853DC Ceramic C F3853DL Ceramic L F3853DM Ceramic M ·c= Commercial Temperature RangeO°Cto + 70°C L= Limited Temperature Range - 40·C to + 85·C M = Military Temperature Range - 55·C to + 1;'·C 3·85 F3854 3-86 F38T56 Program Storage Unit Microprocessor Product Description Connection Diagram The Fairchild F38T56 is a program storage device for the F8 I/O B7 OB7 microcomputer system. It performs basically the same functions as does the Fairchild F38511F3856 storage unit, 110M DB, except for its timer. For a complete description of the Voo IIOB, • F38T56 features, functions, and operation, refer to the VDD 4 110 As F3851/F3856 Program Storage Unit (PSU) data sheet. ExTiNT 110 As 'Piii'OuT II0Bs WRITE DB. clock and by the division value selected for the prescaler. If ICP bit 5 is A special situation exists when reading the interrupt control set and bits 6 and 7 are cleared, the prescaler divides by port (with an IN or INS instruction). The accumulator is not two. Likewise, is bit 6 or 7 is individually set, the prescaler loaded with the contents of the ICP. Rather, accumulator divides by 5 or 20, respectively. Combinations of bits 5, 6, bits 0 through 6 are loaded with O's, while Bit 7 is loaded and 7 may also be selected. For example, if bits 5 and 7 are with the logic level being applied to the EXT INT pin, thus set while 6 is cleared. the prescaler will divide by 40. Thus. 3 allowing the status of 00 INT to be determined without possible prescaler values are.,. 2, .,. 5, .,. 10, .,. 20, .,. 40, needing to service an external interrupt request. This .,. 100, and.,. 200. capability is useful in establishing a high-speed polled handshake procedure or for using EXT INT as an extra in- Any of three conditions, causes the prescaler to be reset: put pin if external interrupts are not required and the timer is used only in the interval timer mode. However, to read 1. When the timer is stopped by clearing ICP bit 3. the content of the ICP, one of the 64 scratch pad registers can be used to save ,a copy of whatever is 2. When an output instruction to the timer (port XXXXXX11) written to the ICP. is executed. Figure 2 F38T56 Block Diagram ~-------------~--- --------- - --- -.=.- ~s-·- +18 I ...- == ~~~ =+! - I t-- PRIOUT--+- 6 I INTERRUPT, PULSE WIDTH, PRE-SCALE PRIIN --+- 10 -1 I- I-- INT REa--+- 9 I - LOGIC TIMER I EXT INT --+- 5 ..- UPPER BYTE I ADDRESS DE· 1_ I~ -- I I LOWER BYTE MULTIPLEXER INTERRUPT ADDRESS ] I-- - VECTOR CONTROL I UNIT LOGIC I t --- UPPER BYTE I INC~~~i~TER I I --- DBo I 1 LOGIC LOWER BYTe DB. =+21 22 --- r-- DB2 =+27 I "' t • • DATA BUFFER DB3 28 " ------ -" 1 COUNTER DCl I ROM STORAGE "'"'w l ~ . . - Ai =+=" I 1-- 24 I a: '"" " • ~ =+= ~ Ai ;~I A3 25 - ~I II " I 5 HIGH ORDER ~r 110 PORT STROBE--+- 12 STACK ADDRESS BITS I ADDRESS SELECT El PAGE SELECT REGISTER PCl So I I --+- 20 I t ~ =+= ~~ I ~ =+= ~~ ~ "-~I ~ =+=~: PROGRAM I COUNTER pea I L.- ______________== '- e; ~RI~ ~ ~ " 3-89 F38T56 Signal Descriptions The PSU input and output signals are described in Table 1. Table 1 PSU Signal Descriptions Mnemonic Pin No. Name Description Clock ell 8 Clock The two clock Input signals originate at the F3850 CPU. 110 Ports I/0Ao - 19,24 1/0 Ports A Bidirectional ports through which the PSU communicates 25,30 with logic external to the microprocessor system. I/OA7 31,36 37,2 1/0 Ba- 20,23, I/O Ports B 26,29 1/0 ~31, 35 38,1 Control ROMCo - 17,16 Read Only Input signals that originate at the F3850 CPU and control 15, 14 Memory internal functions of the PSU ROMC4 13 Control Data Bus DBa - 21,22, Data Bus Bidirectional three·state lines that link the PSU to all other 27,28, devices within the microprocessor system. D~ 33,34, 39,40, DBDR 11 Data Bus A low output, open drain signal that indicates the data bus Drive currently contains data flowing from the PSU. Strobe STROBE 12 Strobe This output signal provides a positive pulse when I/O port is .. being read by an input instruction or is being updated by an 'output instruction (F38T56). Interrupt EXTINT 5 External A high·to-Iow transition on this Input signal is interpreted as Interrupt an interrupt request from an external device. INT REO 9 Interrupt This output signal is the INT REO Input to the F3850 CPU; it Request must be output low to Interrupt the CPU, which occurs only if PRI IN is low and PSU Interrupt control logic is requesting an Interrupt. PAliN 10 Priority In Unless this input is low, the PSU will not set thelNT REO signal low In response to an interrupt. PRIOUT 6 Priority This output signal becomes the PRI IN signal to the next Out device In the interrupt.prlo~ity daisy chain; it is output high unless the PRI IN signal is entering the PSU low and the PSU Is not requesting an interrupt. Power Voo 4 Power Supply +5V(± 5%) VGG 3 Power Supply +12V(± 5%) Vss 18 Ground System ground - 0 V; Voo and V~G are referenced to Vss' .3-90 F38T56 3. Or the trailing edge transition of the EXT INT pin when 1. When the timer interrupt request is acknowledged by in the pulse width measurement mode is executed. the CPU. Conditions 2 and 3 are explained in more detail. 2. When a new load of the modulo-N register is performed. An OUT or OUTS instruction to the timer loads the con- The interrupt priority sequence is discussed in a tents of the accumulator to both the timer and the 8-bit separate section. modulo-N register, reset the prescaler, and clears any previously stored timer interrupt request. As previously Consider an example in which the modulo-N register is • noted, the timer is an 8-bit down counter clocked by the loaded with H'64 (decimal 100). The timer interrupt request prescaler the interval timer mode and in the pulse width latch is set at the 100th count following the timer start, and measurement mode. The prescaler is not used in the event the timer interrupt request latch is repeatedly set on counter mode. The modulo-N register is a buffer for saving precise 100 count intervals. If the prescaler is set at .;- 40, the value most recently outputted to Port XXXXXX11. The the timer interrupt request latch is set every 4000 clock modulo-N register is used in all three timer modes. periods. For a 2-MHz clock, this setting produces 2-ms intervals. Interval Timer Mode The range of possible intervals is from 2 to 51,200 clock When ICP bit 4 is. cleared (logic 0) and at least one prescale periods (1 lAs to 25.6 ms for a 2 MHz clock). However, ap- bit is set, the timer operates in the interval timer mode. proximately 50 clock periods is a practical minimum, When bit 3 of the ICP is set, the timer starts counting down because the time between setting the interrupt request from the modulo-N value. After counting down to H'01', the latch and the execution of the first instruction of the inter- timer returns to the modulo-N value at the next count. On rupt service routine is at least 29 periods (the response the transition from H'01' to H'N', the timer sets a timer in- time is dependent upon how many privileged instructions terrupt request latch. Note that the interrupt request latch are encountered when the request occurs). Establishing is set by the transition of H'N' in the timer, thus allowing a time intervals greater than 51,200 clock periods is a sim- full 256 counts if the modulo-N register is preset to H'OO'. If ple matter of using the timer interrupt service routine to bit 1 of the ICP is set and PRI IN is low, the interrupt re- count the number of interrupts and saving the result in one quest is passed to the F3850 CPU. However, if bit 1 of the or more of the scratchpad registers until the desired inter- ICP is a logic 0, the interrupt request is not passed on to val is achieved. With this technique, virtually any time the CPU. If bit 1 is subsequently set, the interrupt request interval or several time intervals can be generated. is then passed. Only two events can reset the timer interrupt request latch. Fig. 3 Timer and Interrupt Control Port Block Diagram PRESCALER CLOCK -;-2. 5, 10, 20, 40, 100. or 200 INTERRUPT CONTROL PORT (PORT XXXXXX10) 4~3 2[1L~ L~X:~TR::~ INTERRUPT ENABLE EVENT COUNTER MODE ~ 2 PRE SCALE - 5 PRESCALE -..-- ...- L TIMER INTERRUPT ENABLE ~ 10 PRESCALE ............. - 20 PRESCAlE .......- EXT INT ACTIVE LEVEL - 40 PRESCALE 4- -'- 100 ,PRESCALE 4----- I .. START/STOP TIMER 200 PRE SCALE ____ PULSE WIDTH/INTERVAL TIMER 3-91 F38T56 The timer can be read at any time and in any mode using modulo-N value are easily measured by using the timer in· an input instruction (IN or INS) and can take place "on the terrupt service routine to store the number of timer inter- fly" without interfering with normal timer operation. Also, rupts in one or more scratch pad registers. the timer can be stopped at any time by clearing bit 3 of the ICP. The timer holds its current contents indefinitely As for accuracy, the actual pulse duration is typically slight· and resumes counting when bit 3 is again set. Recall, Iy longer than the measured value, because the status of however, that the prescaler is reset whenever the ti mer is the prescaler is not readable and is reset when the timer is stopped; thus, a series of starting and stopping results in a stopped. Thus, for maximum accuracy, it is advisable to use cumulative truncation error. a small division setting for the prescaler. A summary of other timer errors is given in the timing sec- Event Counter Mode tion of this specification. For a free-running timer in the in- terval timer mode, the time interval between any two inter- When ICP bit 4 is cleared and all prescale bits (ICP bits 5, rupt requests can be in error by plus or minus six clock 6, and 7) are cleared, the timer operates in the event periods, although the cumulative error over many intervals counter mode, used for counting pulses applied to the EXT is zero. The prescaler and timer generate preCise intervals INT pin. If ICP bit 3 is set, the timer decrements on each for setting the timer interrupt request latch, but the time transition from the inactive level to the active level of the out can occur at any time within a machine cycle. (The EXT INT pin. Although the prescaler is not used in this timer has two types of machine cycles; short cycles con· mode as in the other two timer modes, the timer can be sisting of four clock periods and long cycles consisting read at any time and stopped at any time by clearing ICP of six clock periods.) The write clock corresponds to a bit 3, ICP bit 1 functions as previously described, and the machine cycle. Interrupt requests are synchronized with the timer interrupt request latch is set on the timer's transition write.clock, thus giving rise to the possible plus or minus from H '01' to H'N'. six error. Additional errors may arise due to the interrupt request occurring while a privileged instruction or multicy- Normally ICP bit 0 should be kept cleared in the event cle instruction is being executed. Nevertheless, for most counter mode; otherwise, external interrupts are generated applications, all the above errors are negligible, especially if on the transition from the inactive level to the active level the desired time interval is greater than one ms. of the EXT INT pin. Pulse Width Measurement Mode For the event counter mode, the minimum pulse width reo quired on EXT INT is two clock periods, and the minimum When ICP bit 4 is set (logic 1) and at least one prescale bit inactive time is two clock periods, therefore, the max· is set, the timer operates in the pulse width measurement imum repetition rate is 500 Hz. mode. This mode is used to accurately measure the dura· tion of a pulse applied to the EXT INT pin. The timer is External Interrupts stopped and the prescaler is reset whenever rn INT is at its inactive level. The active level of EXT INT is defined by When the timer is in the interval timer mode, the EXT INT ICP bit 2: if cleared, EXT INT is active low; if set,rn INT is pin is available for non-timer related interrupts. If ICP bit 0 active high. If ICP bit 3 is set, the prescaler and timer start is set, an external interrupt request latch is set when there counting when EXT INT transitions to the active level. is a transition from the inactive level to the active level of When EXT INT returns to the inactive level, the timer stops, EXT INT. (EXT INT is an edge-triggered input.) The interrupt the prescaler resets, and, if ICP bit 0 is set, an external in- request is latched until either acknowledged by the CPU or terrupt request latch is set. (Unlike timer interrupts, external until ICP bit 0 is cleared (unlike timer interrupt requests, interrupts are not latched if the ICP interrupt enable is which remain latched even when ICP bit 1 is cleared). not set). External interrupts are handled in the same fashion when the timer is in the pulse width measurement mode or in the As in the interval timer mode, the timer can be read at any event counter mode, except that only in the pulse width time and stopped at any time by clearing ICP bit 3, the measurement mode the external interrupt request latch is prescaler and ICP bit 1 function as previously described set on the trailing edge of EXT INT (that is, on the and the timer still functions as an 8-bit binary down counter transition from the active level to the inactive level). with the timer interrupt request latch being set on the timer's transition from H'01' to H'N'. Note that the EXT INT Interrupt Handling pin has nothing to do with loading the timer; automatically starts and stops the timer and generates external inter- Figure 4 is a block diagram of the interrupt interconnection rupts. Pulse widths longer than the prescale value times the for a typical F8 system. Each PSU and each PIO has a PRI 3-92 F38T56 IN and a PRI 0iJi line so that they can be daisy chained the five control lines. The requesting local Interrupt circuit together in any order to form a priority level of interrupts. sends a 16-bit interrupt address vector (from the interrupt address generator) onto the data bus in two consecutive When a PIO receives an interrupt (either timer or external), bytes. The address is made available to the program it pulls its PRI OUT output high, signaling all lower priority counter via the address demultiplexer circuits. The address peripherals that it has a higher .priority interrupt request is simultaneously made available to all other devices con- pending on the CPU. Also, when the PIO's PRI iN input is nected to the data bus. It is the address of the next instruc- pulled high by a higher priority peripheral, signaling the PIO tion to be executed. The program counter (PO) of each that there is a still higher priority interrupt request, it memory device is set with this new address, while the passes that signal along by pulling its PRI OUT high. When stack register (P) is loaded with the previous contents of the CPU processes an interrupt request it commands the the program counter. The information in P is lost, and the interrupting device to place its interrupt vector address on next instruction to be executed is thus determi ned by the the data bus. Only that device whose PRI iN is low and that value of the interrupt address vector. has an interrupt request pending responds. Should there be another lower priority device with a pending request, it does The interrupt control bit (ICB) of the CPU )Ioaded in the W not respond at that time because its PRI iN input is high. register) allows interrupts to be recognized. Clearing the ICB prevents acknowledgement of interrupts. The ICB is If there is both a timer interrupt request and an external in- cleared during power on and external reset and after an in- terrupt request when the CPU starts to process the terrupt is acknowledged. The interrupt status of the PSU, requests, the timer interrupt is handled first. PIO, or MI devices is not affected by the execution of the disable interrupt (01) instruction. At the conclusion of most Within each local interrupt control circuit is a 16·bit inter- instructions, the fetch logic checks the state of the inter· rupt address vector. This vector is the address to which the rupt request line. If an interrupt occurs the next instruction program counter is set after an interrupt is acknowledged fetch cycle is suspended and the system is forced into an and hence is the address of the first executable instruction interrupt sequence. of the interrupt routine. The F38T56 has an interrupt ad· dress that is particular to the version of the F38T56 Mask Option Formats selected by the user. Mask options must be submitted to Fairchild Fifteen bits are fixed: bits 0 through 6 and 8 through 15. Bit Microprocessor Division before device manufacture. The 7 is dependent upon the type of interrupt. This bit is a 0 data to be stored in permanent memory may be submitted for internal timer generated interrupts and a 1 for external in the form of an EPROM or HP2644/Hp2645 cartridge (For- interrupts. When the interrupt logic sends an interrupt re- mulator format only). Other options must be specified on quest signal and the CPU is enabled to service it, the nor· the Fairchild ROM Code Entry Form, available from a mal state sequence of the CPU is interrupted at the end of Fairchild representative. an instruction. The CPU signals the interrupt circuits via Fig. 4 F8 Interrupt Interconnection CONTROL LINES r---------, ...--------, CPU PSU/PIO PSu/PIO PIO SMI 1 2 (n) PRIORITY PRIORITY ICB L - - - - - - - - - E X T E R N A L INTERRUPT LINES--------~ 3·93 F38T56 Table 2 PSU DC Characteristics Symbol Parameter Signal Min Max Units Test Conditions V IH Input High Voltage Data Bus (DBo-DB7) 2.9 Voo V Vil Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 Voo V 10H = -100,..A VOL Output Low Voltage Vss 0.4 V 10l = 1.6 mA IIH Input High Current F3851 1.0 3.0 ,..A VIN = Voo , 3-State Mode 10l Input Low Current -3.0 ,..A VIN = Vss' 3-State Mode VIH Input High Voltage Clock Lines (" WRITE) 4.0 Voo V Vil Input Low Voltage Vss 0.8 V Il Leakage Current 3.0 ,..A VIN = Voo VIH Input High Voltage Priority In and Control 3.5 Voo V Vil Input Low Voltage Lines (PRI iN, ROMC o- Vss 0.8 V Il Leakage Current ROMC4 ) 3.0 ,..A VIN = Voo VOH Output High Voltage Priority Out (PRI OUT) 3.9 Voo V 10H = - 100 ,..A VOL Output Low Voltage Vss 0.4 V 10l = 1oo,..A VOH Output High Voltage Interrupt (INT REO) V Open Drain Output Note 1 VOL Output Low Voltage Vss 0.4 V 10l = 1.0 mA Il Leakage Current 3.0 ,..A VIN = Voo VOH Output High Voltage Data Bus Drive (DBDR) External Pull-up VOL Output Low Voltage Vss 0.4 V = 10l 2.0 mA Il Leakage Current 3.0 ,..A = VIN Voo VOH Input High Voltage STROBE 3.9 Voo V 10H = 1.0 mA VOL Output Low Voltage Vss 0.4 V 10l = 2.0 mA VIH Input High Voltage External Interrupt 2.9 Voo V liN = -130,..A Vil Input Low Voltage (EXT INT) Vss 0.8 V (Internal Pull-up) Vil Input Low Current -1.6 mA VIN = 0.4 V VOH Output High Voltage I/O Port Option A 3.9 Voo V 10H = - 30 ,..A, Note 5 VOH Output High Voltage (Standard Pull-Up) 2.9 Voo V 10H = -150,..A VOL Output Low Voltage Vss 0.4 V 10l = 1.6 mA VIH Input High Voltage 2.9 Voo V Internal Pull-up to Voo, Vil Input Low Voltage Vss 0.8 V Note 3 III Input Low Current -1.6 mA VIN = 0.4 V, Note 4 VOH Output High Voltage I/O Port Option B External Pull-up VOL Output Low Voltage (Open Drain) Vss 0.4 V 10l = 2.0 mA, Note 3 VIH Input High Voltage 2.9 Voo V Vil Input Low Voltage Vss 0.8 V VOH Output High Voltage I/O Port Option C 4.0 Voo V 10H = -1.0 mA VOL Output Low Voltage (Driver Pull-Up) Vss 0.4 V 10l = 2.0 mA Notes: 1. Pull-up resister to Voo on CPU. 2. Positive current Is defined as conventional current flowing into the pin referenced. 3. Hysteresis input circuit provides additional 0.3 V noise immunity, while internal/external pull-up provides TIL compatibility. 4. Measured while I/O port is outpulling a high level. 5. Guaranteed, but not tested. 3-94 F38T56 DC Characteristics The dc characteristics of the PSU device are given in table 2. Supply Currents • Symbol Parameter Min Typ Max Units Test Conditions VSS = 0 V 100 VooCurrent 28 60 mA f = 2 MHz, Outputs VOO = +5V ±5% Unloaded VGG = +12V ±5% IGG VGGCurrent 10 30 mA f = 2 MHz, Outputs TA = O·C to + 70·C Unloaded Absolute Maximum Ratings These are stress ratings only, and functional operation at these ratings or under any conditions above those indicated in this data sheet is not im- plied. Exposure to the absolute max· imum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. Supply voltage VGG -0.3 V, +15V Supply voltage Voo -0.3 V, +7V 1/0 port open drain option -0.3 V, + 15 V Other 110 port options -0.3 V, +7 V All inputs and outputs -0.3 V, +7 V Storage temperature - 55·C, + 150·C Ambient temperature, under bias O·C, + 70·C Thermal resistance values: Plastic: BJA (Junction to ambient) = 60·CN'J (Still Air) 9Jc(Junction to case) = 42·CN'J Ceramic: 9JA (Junction to ambient) = 48·CN'J (Still Air) BJC (Junction to case) = 33·CN'J 3·95 F38T56 Recommended Operating Ranges The recommended operating ranges of the PSU devices are shown below. Supply Voltage (VDD) Supply Voltage VCG Part Number MIN TYP MAX MIN TYP MAX Vss F38T56 +4.75 V +5V + 5.25 V + 11.4 V +12 V +12.6 V OV Ordering Information Part Number Package Temperature· F38T56 DC Ceramic C F38T56 DL Ceramic L F38T56 OM Ceramic M F38T56 PC Plastic C F38T56 PL Plastic L F38T56 PM Plastic M C = Commercial Temperature Range O·C to + 70·C L = Limited Temperature Range - 40·C to + 85°C M = Military Temperature Range - 55·C to + 125°C 3·96 F3861 Peripheral Input/Output Microprocessor Product Description Connection Diagram The Fairchild F3861 Peripheral Input/Output (PIO) device I/O 87 DB? provides two B-bit I/O ports, external interrupt, and a pro- i7OA7 DBs grammable timer. An 8-bit wide bidirectional data bus transfers I/O data bytes between the F3870 Central VGG 1/0 B6 • Processing Unit (CPU) and the PIO. VDD EXT INT The PIO is used in systems that require the I/O capability and interrupt functions of the F3851 PSU but do not need PiiiOUT the read-only memory (ROM) storage of the PSU. The PIO is WRITE DBs pin-compatible with the PSU. lI ROMC o ROMC, } INTERRUPT } POWER 3-97 F3861 Device Organization System Clock Timing The peripheral input/output device includes 1/0 logic, timer All timing within th!il F3861.PI0 is controlled by.the ell and iogic, interrupt logic, data bus logic and control logic, as WRITE signals, which .areinput from the F3850 CPU. Refer illustrated in figure 1. to the F3850 data sheet ·for a,description of these clock signals. The WRITE clock. refreshes and updates PIO The interrupt logic responds to an interrupt request signal registers, which are dynamic. The ell clock also drives the originating from internal timer logic or an external device. programmable timer. Based on priority considerations, tlie interrupt request is passed on to the F3850 CPU. The programmable timer uses 1/0 Ports a polynomial shift register in conjunction with interrupt logic to generate real-time intervals. The PIO has two bidirectional 8-bit 1/0 ports used to transmit data between itself and external devices. In binary The 8-bit data bus in the PIO is the main path for transfer notation, the address for port A is XXXXXXOO and for port B of information between the F3850 CPU and other devices in is XXXXXX01, where the X binary digits are the unique 1/0 the Fa microprocessor system. The device contains four port select code for the PIO (see table 2). For example, if preassigned 1/0 port addresses: the two lowest are assign- the port select code is 000001, port A may be called port 4 ed to the two 1/0 ports (A and B) and are used to tranfer and port B· may be called port 5. (The PIO port select. code data to and from external devices. The other two 1/0 ad- is never designated as all Os, since ports 0 and 1 are reserv- dresses are assigned to two internal registers of the PIO ed for the F3850 CPU.) In addition, the interrupt control Port that control interrupt logic and are treated as I/O ports. (ICP) is addressed as port XX> 8 Clock The two clock input signals originate at the F3850 CPU. WRITE 7 1/0 Ports I/OAg- 1/0 A7 - - 1/0 Bo - 1/0 B7 19,24, 25, 30 31,36 37, 2 20,23, 226,29, 31,35, 1/0 Ports A 1/0 Ports B Bidirectional ports through which the PIO communicates with logic external to the microprocessor system. • 38, 1 Control ROMCo 17,16, Read Only Input signals that originate at the F3850 CPU and control ROMC4 15,14, Memory internal functions of the PIO. 13 Control Data Bus DBa - 21,22, Data Bus Bidirectional three·state lines that link the PIO to all other DB7 27,28, devices within the microprocessor system. 33,34, 39,40 DBDR 11 Data Bus A low output, open drain signal that indicates the data bus Drive currently contains data flowing from the PIO. !!!!!rrupt EXT INT 5 External A high·to·low transition on this input signal is interpreted as Interrupt an interrupt request from an external device. --- INT REO 9 Interrupt This output signal is the INT REO input to the F3850 CPU; it Request must be output low to interrupt the CPU, which occurs only if PRI IN is low and PIO interrupt control logic is requesting an interrupt. PRiiN 10 Priority Unless this input signal is low, the PIO does not set the INT In REO Signal low in response to an interrupt. PRIOUT 6 Priority This output signal becomes the PRI IN signal to the next Out device in the interrupt·priority daisy chain; it is output high unless the PRI IN signal is entering the PIO low and the PIO is not requesting an interrupt. Power VDD 4 Power 5V(± 5%) Supply VGG 3 Power +12V(± 5%) Supply Vss 18 Ground System ground-O V; VDD and VGG are referenced to Vss. 3-99 F3861 Port Pin Description When outputting data through an 1/0 port, the pin can be An output instruction (OUT or OUTS) causes the contents connected directly to a TTL gate input; data is input to the of the CPU accumulator (ACC) to be latched into the ad· pin from a TTL device output. Since the 1/0 pin and the TTL dressed port. An input instruction (IN or INS) transfers the device output are wire-ANDed, it Is possible for the state of contents of the port to the ACC (port S is an exception that one to affect the transfer of data out from the 1/0 pin or in is described later). The 1/0 pins on the PIO are logically from the TTL device output. In most cases, therefore, 1/0 inverted; the schematic of an 1/0 pin and available output port bits should be set for a high level (logic 0) before data drive options are shown in figure 2. Each output pin has an input to prevent Incoming logic zeros from being masked output latch that holds the data last output to that pin. The by logic ones present at the port from previous outputs. 1/0 ports of the PIO are configured in the standard However, the ability to mask bits of a port to logic 1 is pull·up option. useful during some input functions. Programmable Timer Figure 2 110 Pin Diagram with Output Buffer Options The 8·bit shift register, addressable as an 1/0 port, functions as a polynomial timer. This timer is loaded with a value of delay; it counts down this value of delay and, after the programmed interval, generates an interrupt through the z0 interrupt logic of the PIO. . ;: a: TIL The OUT or OUTS instruction is used to load the interval ::> H>....,.-I~T " a: a: Ii: t- t- value into the programmable timer; the port number is Z 0 u a: .. ... 0 Q 0 0 PIN H'OT, H'OS', H'23', or H'2T, as appropriate. The timer times out after a time interval given by the product ~ w a: g i (period of CIl clock) x (timer counts) x 31 I; The timer continues to run after a time-out; subsequent time-outs occur at intervals of 7905 CIl clock periods. The timer does not run if it is loaded with the value H'FF'. Interrupt Logic The interrupt logic block is programmed by output instruc· tions to the interrupt control port (port H'06', H'OA', H'22', or H'2S', as appropriate). Only the least significant two bits are used; their interpretation is as follows. Contents of ICP Interpretation STANDARD OPEN DRAIN DIRECT DRIVE OUTPUT OUTPUT OUTPUT' S'XXXXXXOO' Disable all interrupts S'XXXXXX01' Enable external interrupt, disable timer interrupt Each 1/0 port pin is a wire-AND structure between an inter· nal output data latch and the external signal. The latch is S'XXXXXX10' Disable all interrupts loaded from the data bus. The output latches are not S'XXXXXX11' Disable external interrupt, enable initialized by the system reset sequence. timer interrupt Note: The X designation represents "don't care" binary digits. 3·100 F3861 Figure 3 PIO Data Bus Timing --I td, I-- I I --I td2 r- _---Jt-~-~\I------....JI.. ____ _ WRITE PW2 \I...-_. . . .,r_-_-_-_""'\L-- ~td3-----1 LONG CYCLE II ROMC STABLE td7 -I DATA BUS OUTPUT X STABLE td4 ~I DATA BUS INPUT STABLE td7 -I DBDR (START OF \ DATA OUT) DBDR (END OF DATA OUT IN SUBSEQUENT CYCLE) ___________________ - ~f~-------------------------------------------------- tda Instruction Execution The PIO device executes the OUT instruction in the same manner as the OUTS instruction; the same is true for the IN The PIO responds to signals that are output by the F3850 and INS instructions. The difference between the long- and CPU in the course of implementing instruction cycles. short-form instructions is only in the source of the Figure 3 illustrates timing during PIO data output to the 1/0 address. data bus. This timing applies whenever a PIO is the data source. The PIO places data on the data bus, even in the The F8 inputloutput instructions place the 1/0 port address worst case, in time for the setup required by any F3850 on the data bus during one instruction cycle and then use CPU destination. The PIO receives a byte input from the the data bus in the following instruction cycle to do the data bus when commanded by an output instruction to load actual 1/0 data movement. The read only memory control one of its two 1/0 ports or internal registers. Data bus tim- (ROMC) lines coming from the F3850 CPU signal the PIO ing requirements for input to the PIO are also shown in that an 1/0 data movement is occurring during the current figure 3; signal characteristics are given in the "Timing instruction cycle. Therefore, the PIO needs to recognize Characteristics" section. The data bus drive (DB DR) signal whether the contents of the data bus during the instruction is low while data output by the PIO is stable on the data cycle just prior matched any of its four aSSigned 1/0 ad- bus. Thus, a DB5R low signal indicates that the data bus dresses, wherever the ROMC lines indicate an 1/0 transfer. currently contains data flowing from a PIO. For systems The address select logic constantly monitors the data bus with more than one program storage unit (PSU) or PIO, the for a match to any of the four addresses and holds the DBDR output signals may be wire-ORed and the result used information of a match through the following cycle. as a bus data flow direction indicator. The i5Bi5R signal may remain low until timing interval td of the next Input instructions that select a port cause the contents of instruction cycle following the one in which DBDR was the selected port to be placed on the data bus during the set low. input cycle. Only the two 1/0 ports (lowest two addresses) 3-101 F3861 respond to input instructions. Output instructions that The interrupt address is unique to the version of the PIO select a port transfer the contents of the data bus to that device selected by the user. Fifteen bits are fixed: bits a port. Outputs of the latches change at the end of the 110 through 6 and bits 8 through 15. Bit 7 (2') is dependent on transfer cycle. the type of interrupt. This bit is a a for internal timer- generated interrupts and a 1 for external interrupts. When Interrupt Handling the interrupt logic sends an interrupt request signal and the CPU is enabled to service it, the normal state sequence of A typical F8 system interrupt interconnection is shown in the CPU is interrupted at the end of an instruction. The figure 4. Each PSU and PIO has a PRI iN and PRI OUT line CPU signals the interrupt circuits through the five ROMC so that they can be daisy-chained together in any order to lines. The requesting local interrupt circuit sends a 16-bit form a priority level of interrupts. When a PIO receives an interrupt address vector (from the interrypt address interrupt (either timer or external), it pulls its Pm OUT out· generator) onto the data bus in two consecutive bytes. The put signal high, signaling all lower priority peipherals that it address is made available to the program counter through has a higher priority interrupt request pending on the CPU. the address demultiplexer circuits. It is simultaneously Also, when the PIO device PRI iN input signal is pulled high made available to all other devices connected to the data by a higher priority peripheral, signaling the PIO that there bus and is the address of the next instruction to be ex· is a still higher priorfty interrupt request, it passes that ecuted. The program counter of each memory device is set signal along by pulling its Pm OUT signal high. When the with this new address while the stack register is loaded CPU processes an interrupt request, it commands the inter· with the previous contents of the program counter. The in- rupting device to place its interrupt vector address on the formation i.n the program counter is lost. Thus, the next in- data bus. Only the device with a PRI iN signal low and an struction to be executed is determined by the value of the interrupt request pending responds. Should there be interrupt address vector. another lower priority device with a pending request, it does not respond at that time because its PRI iN input signal is The interrupt control bit (ICB) of the CPU (loaded in the W high. register) allows interrupts to be recognized. Clearing the ICB prevents acknowledgement of interrupts. The ICB is If there are both a timer interrupt request and an external cleared during power-on, during external reset, and after an interrupt request when the CPU starts to process the re- interrupt is acknowledged. The interrupt status of the PSU, quests, the timer interrupt is handled first. PIO, or memory interface (MI) device is not affected byex· ecution of the disable interrupt (01) instruction from the Within each local interrupt control circuit is a 16-bit inter- CPU. At the conclusion of most instructions, the fetch logic rupt address vector. This vector is the address to which the checks the state of the intern,lpt request line. If an inter· program counter is set after an interrupt is acknowledged rupt, occurs the next instruction fetch cycle is suspended and is therefore the address of the first executable instruc- and the system is forced into an interrupt sequence. tion of the interrupt routine. Figure 4 Fa System Interrupt Interconnection r -_________C~O~N~TROL-~L~IN~E~S--------~ CPU PSU/PIO PSu/PIO PIO SMI 1 2 (n) ICB L-_-'--________ EXTERNAL INTERRUPT L l N E S - - - - - - - - - . - - l 3-102 F3861 Interrupt Sequence In figure 5, the dashed lines on the EXT INT (EI) timing il- lustrate the last opportunity for the EXT INT Signal to cause Figure 5 details the interrupt sequence that occurs, whether the last cycle of a non protected instruction to become a the interrupt request is from an external source through the freeze cycle. The freeze cycle is a short cycle (four CII clock 00 iNf pin or from the PIO device internal timer. Events periods) in all cases except where B is the decrement are labeled A through G. scratchpad instruction, in which case the freeze cycle is a II long cycle (six CII clock periods). Event A An interrupt request must satisfy a set-up time requirement. The INT REa Signal goes low on the next negative edge of If not satisfied, the INT REO signal delays gOing low until the WRITE signal if both the PRI iN signal is low and the the next negative edge of the WRITE clock. appropriate interrupt enable bit of the ICP Is set. Event B Event C Event B represents the instruction being executed when the This is a no-operation (NO-OP) long cycle, allowing time for interrupt occurs. The last cycle of B Is normally the instruc- the PRI IN/PRI OUT chain to settle. At a 2-Mhz CII clock rate, tion fetch for the next cycle. However, if B is not a privileg- a total of seven PIO, PSU, or MI devices can be daisy- ed instruction and the CPU interrupt control bit is set, the chained without the need for look-ah.ead logic. last cycle becomes a freeze cycle raher than a fetch. At the end of the freeze cycle the interrupt request latches are in- Event D hibited from altering the interrupt daisy chain so that In PSU circuits, the program counter (PO) is pushed to the sufficient time is allowed for the daisy chain to settle. stack register (P) to save the return address. The interrup- ting PIO places the lower eight bits of the interrupt vector If B is a privileged instruction, the instruction fetch is not address onto the data bus. This is always a long cycle. replaced by a freeze cycle; instead, the fetch is performed and the next Instruction is executed. Although unlikely to Event E be encountered, a series of privileged instructions would be In this long cycle, the PIO places the upper eight bits of the executed sequentially. One more instruction (a protected in- interrupt vector address onto the data bus. . struction) is executed after the last privileged instruction. The last cycle of the protected instruction then performs the freeze. Figure 5 Interrupt Sequence FREEZE CYCLE WRITE EXT INT OR TIMER INTERRUPT 1 1 1-1 -- A 1 --';'1- - - -i-1I'I 4---; ~: I PRIOUT _ - - - : - - ' ____ ..J III I PRI OUT OF NEXTPIO _ _ _ _ _ _ _ .I. .rl_ -I-J I 3-103 F3861 Event F Table 4 PIO Functions Versus ROMC States In this short cycle, the PIO interrupting interrupt request latch is cleared. Also,the CPU interrupt control bit is ROMC State cleared, thus disabling interrupts until an EI instruction is Binary Hex PIO Functions performed. Additionally, during Event F, fhe PAlIN/PRI OUT daisy-chain freeze is removed, since the interrupt vector 01111 OF If this circuit is Interrupting and is address has been passed to the CPU. Another action is the highest in the priority chain, move fetch of the instruction from the interrupt address. lower half of interrupt vector into the data bus. Event G This event starts executing the first instruction of the 10000 10 Place interrupt circuitry in an in- interrupt service routine. hibit state that prevents altering the interrupt priority chain. Summary of Interrupt Sequence 10011 13 If the contents of the data bus in For the PIO, the interrupt response time is defined as the time elapsed between the occurrence of the m iNT signal the prior cycle was an address of 110 ports on this device, move the going active (or the timer transition to H'N') and the begin- current contents of the data bus ning of execution of the first instruction of the interrupt into the appropriate port (110 A, I/O service routine. The interrupt response time is a variable B, timer or control). dependent on what the microprocessor is doing when the Interrupt request occurs. 11011 1B If the contents of the data bus in the prior cycle was an address of As shown in figure 5, the minimum interrupt response time 110 ports on this device, move the is three long cycles plus two short cycles plus one write contents of the appropriate I/O clock pulse width plus a set-up time of an EXT INT signal port onto the data bus (110 A prior to the leading edge of the write pulse, a total of 27+ or I/O B). clock periods plus the set-up time. At 2 MHz, this is 14.25 /AS. Although the maximum could theoretically be infinite, a practical maximum is 35 ,..s (based on the interrupt request occurring near the beginning of a PI and LR K, P sequence). Timing Charscteristlcs ROMC States Timing signals are Illustrated in figures 3, 6, and 7; the Table 4 shows the function performed by the PIO device for signal timing characteristics are presented in table 5. each ROMC command. Each function is performed entirely within one machine cycle (one cycle of ~he WRITE clock). All other ROMC states are decoded as NO-OP: Figure 6 F3861 Input/Output TI"1jng WRITEJ \----~Jrf--------~j ~tsu--1 \!'----- I---- -----J th INPUT (1) ------~--~------------- DATA MAY CHANGE DATA STABLE ir------ DATA MAY CHANGE \-00--- tsP--+j OUTPUT (2) ~--------------------------- (STANDARD PULL.UP) _ _ _ _ _ _ _ _ _ _ _ _ _ ~ 2.9 V STABLE 3-104 F3861 Figure 7 F3861 Interrupt Logic Timing _______-J/ ,I I LONG CYCLE \, II ROMC STABLE t------tr2-----+j ~-------------------------+------t-Pd--4~ PAliN tpr~ ~tex EXT iNr -----------------------~\ ~-------------------------------- Note: Timing measurements are made at valid logic level to valid logic level of the signals references, unless otherwise noted. 3·105 F3861 Table 5 F3861 Timing Characteristics The ac characteristics are VSS = OV, VCC = + 5V( ± 5%), TA = 0 C to + 70·C. Symbol Parameter Min Typ Max Units Test Conditions P Period 0.5 10 51-'s PW1 Pulse Width 180 P-180 ns t r,t f = ns typo td 1 to WRITE + Delay 60 250 ns CL = 100 pF td 2 to WRITE - Delay 60 225 ns ct. = 100 pF td4 WRITE to DB Input Delay 2P+ 1.0 I-'s PW2 WRITE Pulse Width P-1OO P ns tro t f = 50 ns typo PWs WRITE Period; Short 4P PW L WRITE Period; Long 6P td 3 WRITE to ROMC Delay 550 ns WRITE to DB Output Delay td 7 WRITE to DBDR - Delay 2P + 100 - td 2 2P+ 200 2P+850-t~ ns CL = 100 pF tda WRITE to DBDR + Delay 200 ns Open Drain tr1 WRITE to ltfl: REO - Delay 430 ns CL = 100 pF(1) tr2 WRITE to INT REO + Delay 430 ns CL = 100 pF (3) tpr1 PRI IN to INT REO - Delay 240 ns CL = 100 pF (2) tpr2 PRIIN to INT REO + Delay 240 ns CL = 100 pF tpd 1 PRI IN to PRI OUT - Delay tpd2 PRI IN to PRI OUT + Delay 365 ns CL = 50 pF tpd 3 WRITE to PRI OUT + Delay 700 ns CL = 50 pF tpd 4 WRITE to PRI OUT - Delay 640 ns C L = 50 pF 'tsp WRITE to Output Stable 2.5 I-'s CL =50 pF Standard Pull-up 't su I/O Setup Time 1.3 I-'s 'th I/O Hold Time 0 ns *tex EXT INT Setup Time 400 ns Notes: 1. Assume Priority In was enabled (PRI iN = 0) in the previous F8 cycle before the interrupt is detected in the PIO. 2. The PSU has an interrupt pending before priority in is enabled. 3. Assume the pin is tied to the INT REQ input of the F3850 CPU. 4. The starred * parameters in the table represent those most frequently of importance when interfacing to an F8 system. Other parameters are typically those that are relevant between Fa chips and are not normally of concern to the user. 5. Input and output capacitance is 3 to 5 pF typical on all pins except VOO ' VGG , and VSS' 3-106 F3861 DC Characteristics The dc characteristics of the F3861 PIO are supplied in tableS. Table 6 F3861 PIO DC Characteristics Symbol Parameter Signal Min Max Units Test Conditions VIH Vil VOH VOL Input High Voltage Input Low Voltage Output High Voltage Output Low Voltage Data Bus (DBO-DB7) 3.5 Vss 3.9 Vss Voo 0.8 Voo 0.4 V V V V 10H = - 100 p.A 10l = 1.S mA II IIH Input High Current 1 p.A VIN = SV, 3-State mode 10l Input Low Current -1 p.A VIN = Vss,3-State mode VIH Input High Voltage Clock Lines 4.0 Voo V Vil Input Low Voltage ( Part Number Min Typ Max Min Typ Max Vss F3861 +4.75 V +5V + 5.25 V +11.4 V +12 V + 12.6 V OV Ordering Information Part Number Package Temperature Range F3861 Ceramic C F38610L Ceramic L F38610M Ceramic M C = Commericial Temperature Range O· to + 70·C *F3861 PC Plastic C L = Limited Temperature Range - 40·C to + 85·C F3861 PL Plastic L M = Military Temperature Range - 55·C to + 125·C F3831 PM Plastic M * Version A, B, C, 0, and E are stocked items. 3·108 F3871 Peripherallnput/Output Microprocessor Product Description Connection Diagram The Fairchild F3871 Peripheral InputlOutput (PIO) device provides two 8-bit 110 ports, external interrupt, and a pro- I/O i7 DB, grammable timeL An 8-bit-wide bidirectional data bus trans- liD 7fi DB. fers 110 data bytes between the F3870 Central Processing Unit (CPU) and the PIO. VGG liD ii6 The PIO is used in systems that require the 110 capability and interrupt functions of the F3851 PSU, but do not need the read-only memory (ROM) storage of the PSU. The PIO is pin-compatible with the PSU. miNT Voo PRIOUT" 110 A;; liD A6 iiOBs II WRITE DBs ¢ DB. The F3871 has the same improved timer and ready strobe output as the F3870 CPU; therefore, for software compatibil- INT REO I/OB. ity with the F3870, the F3871 PIO should be used in the F8 PiiiiN 10 iiOA:; multichip configurations. Diiffii 11 I/0Al The F3871 is manufactured using isoplanar N-channel STROBE 12 1/083 silicon-gate technology; therefore, power dissipation is very ROMe, 13 DB, low (less than 200 mW)- ROMe, 14 DB, ROMe, 15 liD ii2 . • 16 Bidirectional, Individually Controlled I/O Lines Organized as Two B-Bit Ports .110 Strobe • Programmable Timer - Preset, Start, Stop, and Read- ROMe, ROMeo Vss 16 17 18 110 A> I/O A, liDS, " Back Ability: Selectable Timer Count Rates I/OAO 19 DB, • Full Interrupt Level- Daisy-Chain Expandable, Independent Interrupt Address Vectors lor Timer and liD So 20 DBa Extemal Interrupt • Pulse Width Measurement Capability • +5 V and +12 V Power Supplies • 2 M Hz Operation • TTL and LSTTL Compatible • Low Power Dissipation, Typically Less Than 200 mW 3-109 F3871 Signal Functions 110 PORTS STROBE Figure 1 F3871 Block Diagram 1/0 PORTA 110 PORT B DATA 110 PORT A 110 PORT B BUS DBDR INTERRUPT PROGRAMMABLE VECTOR ADDRESS TIMER ROM CONTROL LINES EXTERNAL INTERRUPT PRIORITY IN INTERRUPT INTERRUPT CONTROL LOGIC PRIORITY OUT INTERRUPT REQUEST VGG VDD GND ... WRITE 3-110 F3871 Table 1 F3871 Signal Descriptions Mnemonic Pin No. Name Description Clock + WRITE 8 7 Clock The two clock input signals that originate at the F3850 CPU. 110 Ports 110 Ao-I/O A7 19,24,25, 30,31,36, 37,2 110 Ports A Bidirectional ports through which the PIO communicates with logic external to the microprocessor system. II 110 Bo-IIO B7 20,23,26, 110 Ports B 29,31,35, 38,1 Control ROMCo-ROMC4 17,16,15, Read·Only Input signals that originate at the F3850 CPU 14, 13 Memory Control control internal functions of the PIO. Data Bus DBo-D~ 21,22,27, Data Bus Bidirectional 3-state lines that link the PIO to all 28,33,34, other devices within the microprocessor system. 39,40 DBDR 11 Data Bus Drive A low output, open drain signal that indicates the data bus currently contains data flowing from the PIO. Strobe STROBE 12 Strobe Provides a sin~ow~tput pulse after valid data is present on 110 Ao-IIO A7 during an output instruction. Interrupt EXTINT 5 External Interrupt A high·to·low transition on this input signal is interpreted as an interrupt request from an external device. INTREO 9 Interrupt Request This output signal is the INT REQ input to the F3850 CPU; it must be out))ut low to interrupt the CPU, which occurs only if PRI IN is low and PIO interrupt control logic is requesting an interrupt. PRIIN 10 Priority In Unl~input signal is low, the PIO will not set the INT REO signal low in response to an interrupt. PRIOUT 6 Priority Out This output signal becomes the PRIIN signal to the next device in the interrupt'priority daisy ch",in; it is output high unless the PRI IN signal is entering the PIO low and the PIO is not requesting an interrupt. Power Voo 4 Power Supply +5 V (±5%) VGG 3 Power Supply +12V(±5%) Vss 18 Ground System ground - 0 V; Voo and VGG are referenced to Vss. 3·111 F3871 DevIce Organization Table 2 F3871 PIO Port Addresses The peripheral input/output device Includes 1/0 logic, timer Address Assl nedTo logic, Interrupt logic, data bus logic, and control logic, as XXXXXXOO 1/0 Port A Illustrated, ill figure 1. ' XXXXXX01 1/0 Port B XXXXXX10 Interrupt Control Register The interrupt logic responds to an Interrupt request signal XXXXXX11 Programmable Timer originating from internal timer logic or an external device. Based on priority conSiderations, the interrupt request is passed on to the F3850 CPU._ The port and interrupt address vector aSSignments for the F3871 are given in table 3. The programmable timer uses a polynomial shift register in conjunction with interrupt logic to generate real·time Table 3 F3871 Port and Address Assignments (HEX) intervals. Interrupt The 8-bit data bus in the PIO Is the main path for transfer of Address Ve<:t()f Port Port information between the F3850 CPU and other devices in Version Addresses -Output Type TImer External the Fa microprocessor system. The device has four pre- 3871E 4-7 Standard 0020 ooAO assigned 1/0 port addresses: the lowest two are assigned to 3871F 4-7 Direct Drive 0020 OOAO the two 1/0 ports, A and B, and are used to transfer data to 3871G 4-7 Open Drain 0020 OOAO and from external devices. The other two 1/0 addresses are 3871H 8-B Standard 4420 44AO assigned to two internal registers of the PIO that control interrupt logiC and are treated as 1/0 ports. Port Pin Description 'An output instruction (OUT or OUTS) causes the contents of Signal Descriptions. the CPU accumulator (ACC) to be latched into the address- ed port. An input instruction (IN or INS) transfers the con- The F3871 input and output signals are described in table 1. tents of the port to the ACC (port 6 is an exception that is described in the "Timer and Interrupt Control Port" section). System Clock TIming The 110 pins on the PIO are logically inverted; the schematic of an 110 pin and available output drive options are shown + All timing within the PIO is controlled by the and WRIl:E in figure 2. Each output pin has an output latch that holds signals input from the F3850 CPU. (Refer to the F3850data the data last output to that pin. The 110 ports of the PIO are sheet for a description of these clock signals.) The WRITE configured in the standard pull-up option. clock refreshes and updates PIO registers, which are + dynamiC. The clock drives sequencing logic to precharge The ~ output is always configured in a manner simi- + Interrupt logic. The clock also drives the progralTlmable lar to a standard output, except that it is capable of driving timer. three TTL loads. 1/0 POrtss Each 110 port pin is a wire-AND structure between an inter- The PIOhas two-bidirectional 8-bit 1/0 ports used to trans· nal output data latch and the exterhal signal. The latch is mit data between it and external devices. In binary notation, loaded from the data bus. The output latches are not initial- the address for port A is XXXXXXOO and for port B is XXXX· ized by the system reset sequence. XX01, where the, X binary digits are the unique 110 port select code for the PIO (see table 2). For example, if the port When transmitting data through an 1/0 port, the pin can be select code is 000001, port A can be clliled port 4 and port B connected directly to a TTL gate input; data is input to the can be called port 5. (The PIO port select code Is never pin from a TTL device output. Since the 110 pin and the TTL deSignated as all "O"s, since ports 0 and 1 are reserved for device output are wire-ANDed, it is possible for the state of the F3850 CPU.) In addition, the interrupt control port (ICP) one to affect the transfer of data out frOm the I/O pin or in is addressed as port XXXXXX10 and the binary timer is from the TTL device output. In 'most cases, 110 port bits addressed as port XXXXXX11, which become ports 6 and 7, should, therefore, be set for a high level (logic 0), before respectively, for the port select code example just given. data input; to prevent Incoming logic "O"s from being masked by logic "1"s present at the port from previous outputs. However, the ability to mask bits of a port to logic 1 is useful during some input functions. 3-112 F3871 Rgure 2 F3871 1/0 Pin Diagram with Output Buffer Options z0 ~ • TTL a: 110 :::l PORT " a: a: ii: .. l- I- PIN Z 0 0 0 u a: ...0! .. .. Q w 0 a: -' Q !. Ii STANDARD OPEN DRAIN DIRECT DRIVE OUTPUT OUTPUT OUTPUT Figure 3 F3871 11mer and Interrupt Control Port Block Diagram PRESCALER ';-2, 5, 10, 20, 40, 100, or 200 INTER~UPT CONTROL PORT (PORT XXXXXX10) EVENT COUNTER MODE_ .;- 2 PRESCALE _ 4~ug3. 2~i L L~X:~TR::~ INTERRUPT ENABLE TIMER INTERRUPT ENABLE -7 5 PRESCALE -4-- .;- 10 PRESCALE _ .;- 20 PRESCALE _ EXT INT ACTIVE LEVEL .;- 40 PRESCALE _ .;- 100 PRESCALE _ . START/STOP TIMER .;- 200 PRESCALE _ PULSE WIDTH/INTERVAL TIMER 3-113 F3871 Strobe 3. On the trailing edge transition of the EXT INT pin, An output ready strobe is associated with port A. This flag when In the pulse width measurement mode. is used to signal a peripheral device that the F3871 has just completed an output of new data to port A. Since the strobe An OUT or OUTS Instruction to the timer loads the contents provides a single low pulse shortly after the output opera- of the accumulator (the Interval value) to both the timer and tion is completed, either edge can be used to signal the the 8-bit modulo·N register, resets the prescaler, and clears peripheral. The STROBE signal Is also used as an input any previously stored timer interrupt request. The timer Is strobe by performing a dummy output of Hoo'to port A clocked by the prescaler In the interval timer mode and in after completing the input operation. the pulse width modulator mode; the prescaler Is not used in the event counter mode. The modulo·N register is a buffer Timer and Interrupt Control Port that saves the value most recently output to port XXXXXX11 The timer is software·programmable to operate in one of and is used in all three timer modes. three modes: the interval timer mode, the pulse width measurement mode, and the event counter mode. As shown Interval Timer Mode in figure 3, an 8-bit register (interrupt control port), a pro- When ICP bit 4 is cleared (logic 0) and at least one prescale grammable prescaler, and an 8-bit modulo·N register are bit is set, the timer operates In the interval timer mode. associated with the timer. When bit 3 of the ICP Is set, the timer starts counting down from the modulo-N value. After counting down to H'01~ the The desired timer mode, prescale value, timer start and timer returns to the modulo·N value at the next count. On stop, active level of the external interrupt pin, and local the transltron from H'01' to H'N~ the timer sets a timer Inter· interrupt enable or disable are selected by the proper bit rupt request latch. Note that the interrupt request latch Is configuration output from the accumulator to the interrupt set by the transition of H'N' in the timer, thus allowing a full control port (port XXXXXX10),with an OUT or OUTS 256 counts If the modulo·N register is preset to Hoo~ instruction. If bit 1 of the ICP is set and the PRiTN signal is low, the Interrupt Control Port interrupt request is passed to the F3850 CPU. However, if bit A special situation exists when reading the ICP with an IN or 1 of the ICP is a logic 0, the interrupt request is not passed INS instruction. The accumulator is not loaded with the con- on to the CPU. If bit 1 is subsequently set, the Interrupt tents of the ICP; instead, accumulator bits 0 through 6 are request is. then passed to the CPU. Only two events reset the loaded with "O"s, while bit 7 is loaded with the logic level be· timer Interrupt request latch: ing applied to the EXT INT pin, thus determining the status 1. Acknowledgement by the CPU of the timer interrupt of the EXT INT signal without servicing an external interrupt request. request. This capability Is useful in two ways: establishing a high·speed polled handshake procedure and using the EXT 2. Performance of a new load operation of the modulo-N INT pin as an extra input pin if external interrupts are not register. required and if the timer is used only in the interval timer mode. However, if it Is desirable to read the contents of the (The interrupt priority sequence is discussed in the ICP, one of the 64scratchpad registers is used to save a "Interrupt Sequence" section.) copy of material written to the ICP. For example, if the modulo-N register is loaded with H'64' The timer clock rate in the interval timer mode is determined (decimal 100), the timer interrupt request latch is set at the by the frequency of the + clock and by the division value 100th count following the timer start, and the timer interrupt selected for the prescaler. If ICP bit 5 is set and bits 6 and 7 request latch is repeatedly set on precise 1QO.count inter- are cleared, the prescaler divides + by two. If bit 6 or 7 is vals. If the prescaler Is set at + 40, the timer Interrupt individually set, the prescaler divides + by five or twenty, request latch is set every 4000 + clock periods. For a 2 MHz 4 respectively. Combinations of bits 5,"6; and 7 can also be clock, this setting produces 2 ms Intervals. selected. For example, if bits 5 and 7 are set while 6 Is cleared, the prescaler divides by 40. Thus, possible prescaler The range of possible intervals is from 2 to 51,200 + clock values are +2, +5, +10, +20, +40, +100, and +200. + periods (1 lAs to 25.6 ms for a 2 MHz ~Iock). However, approximately 50+ clock periods I.s a practical minimum, Any of three conditions causes the prescaler to reset: because the time between setting the Interrupt request latch 1. When the timer is stopped by clearing ICP bit 3. and the execution of the first instruction of the Interrupt + service routine Is at least 29 clock periods (the response 2. When an output instruction to the timer (port XXXXXX11) time is dependent on how many privileged Instructions are Is executed. encountered when the request occurs). To establish time 3·114 2 F3871 + intervals greater than 51,200 clock periods, use the timer As in the interval timer mode, the timer C!ln be read at any interrupt service routine to count the number of interrupts, time and can be stopped at any time by clearing ICP bit 3, saving the result in one or more of the scratchpad registers the prescaler, and ICP bit 1 functions as previously des- until the desired interval is achieved. With this technique, cribed. The timer still functions as an 8-bit binary down virtually any time interval, or several time intervals, can counter with the timer interrupt request latch set on the be generated. timer's transition from H2'01'to H'N'. Note that the EXT INT pin is not involved with loading the timer; its action Is that The F3871 timer can be read at any time and in any mode, of automatically starting and stopping the timer and·of gen- 3 using an input instruction (IN or INS), and can take place erating external Interrupts. Pulse widths longer than the pre- "on-the-fly" without interfering with nOrmal timer operation. scale value times the mod.ulo-N value are easily measured The timer can be stopped at any time by clearing bit 3 of the by using the timer interrupt service routine to store the num- ICP. The timer holds its current contents indefinitely and ber of timer interrupts in one or more scatchpad registers. resumes counting when bit 3 is set again. The prescaler is reset whenever the timer is stopped; thus, a series of start- The actual pulse duration is typically slightly longer than ing and stopping results In a cumulative truncation error. the measured value, because the status of the prescaler is not readable and is reset when the timer is stopped. Thus, For a free-running timer in the interval timer mode, the time for maximum accuracy, using a small division setting for interval between any two interrupt requests can be in error the prescaler Is advisable. + by plus or minus six clock periods, although the cumula- tive error over many intervals Is zero. The prescaler and timer Event Counter Mode generate precise intervals for setting the timer interrupt When ICP bit 4 is cleared and all prescale bits (ICP bits 5, 6, request latch, but the time-out can occur at any. time within and 7) are cleared, the timer operates in the event counter a machine cycle. (There are two types of machine cycles: mode. This mode is used for counting pulses applied to the + short cycles that consist of four clock periods and long EXT INT pin. If ICP bit 3 is set, the timer decrements on + cycles that consist of six clock periods.) The write clock each transition from the inactive level to .the active level of corresponds to a machine cycle. Interrupt requests are syn- the EXT INT pin. The prescaler is not used in this mode. As chronized with the write clock, thus creating the possible in the other two timer modes, the timer can be read at any + plus or minus six error. Additional errors can arise if the time and can be stopped at any time by clearing ICP bit 3. interrupt request occurs while a privileged instruction or ICP bit 1 functions as previously described, and the timer multicycle instruction is being executed. However, for most interrupt request latch is set on the timer's transition from applications, all of the above errors are negligible, espeCially H'01' to H'N~ If the desired time interval is greater than one ms. Other timer errors are summarized in the "Timing Characteristics" Normally, ICP bit 0 is kept cleared In the event counter section. mode; otherwise, external interrupts are generated on the transition from the inactive level to the active level of the Pulse Width Measurement Mode EXT INTpin. When ICP bit 4 Is set (logic 1) and at least one prescale bit is set, the timer operates in the pulse width measurement For the event counter mode, the minimum pulse width mode. This mode Is used to accurately measure a pulse + required on EXT INT is two clock periods, and the mini- duration applied to the EXT INT pin. The tinier is stopped + mum Inactive time is two clock periods; the maximum and the prescaler is reset whenelierthe EXT INTpin is at its repetition rate Is 500 Hz. inactive level. The active level of the EXT INT pin is defined by ICP bit 2: if cleared, the EXT INT pin is active low; if set, External Interrupts ~ the EXT INT pin is active high. If ICP bit 3 Is set, the pre- When the timer Is in the interval timer mode, the EXT INT scaler and timer start counting when the EXT INT signal pin is available for non-tlmer-related interrupts. If ICP bit 0 is goes through a transition to the active level. set, an external Interrupt request latch is set when there Is a transition from the Inactive level to the active level of the When the EXT INT pin returns to the inactive level, the timer EXT INT pin. (The EXT INT pin Is an edge-triggered input.) stops, the prescaler resets, and, if ICP bit 0 is set, an exter- The .interrupt request Is latched either until acknowledged nal Interrupt request latch Is set. (Unlike timer interrupts, by the CPU or until ICP bit 0 is cleared (unlike timer Inter- external interrupts are not latched if the ICP interrupt rupt requests that remain latched even when ICP bit 1 Is enable Is not set.) cleared). 3·115 F3871 External interrupts are handled In the same manner when input cycle. Only the two I/O ports Oowest two addresses) the timer Is in the pulse width measurement mode or in the respond to input instructions. Output instructions that event counter mode, except that in the pulse width mea- select a port transfer the contents of the data bus to that surement mode only, the external Interrupt request latch is port. Outputs of the latches change at the end of the I/O set on the trailing edge of the EXT INT signal (I.e_, on the transfer cycle. transition from the active level to the inactive level)_ Interrupt Handling Instruction execution A typical F8 system interrupt interconnection is shown in The PIO responds to signals that are output by the F3850 figure 4. Each PSU and PIO has a PRI IN and a PRI OUT line CPU in the course of implementing instruction cycles_ The so that they can be daisy-chained together in any order to PIO places data on the data bus, even In the worse case, in form a priority level of interrupts. When a PIO receives an time for the setup required by any F3850 CPU destination. Interrupt (either timer or external), it pulls its PRI OUT output The PIO receives a byte input from the data bus when com- Signal high, Signaling all lower priority peripherals that it manded by an output instruction to load one of its two 1/0 has a higher priority interrupt request pending on the CPU. ports or Internal registers. When the PIO device's PRI IN input signal is pulled high by a higher priority peripheral, Signaling the PIO that there is a The data bus drive signal (DBDR) is low while data output still higher priority interrupt request pending, It passes that by the PIO is stable on the data bus. Thus, a DBDR low sig- Signal along by pulling its PRI OUT signal high. When the nal indicates that the data bus currently contains data flow- CPU processes an interrupt request, it commands the inter- ing from a PIO. For systems with more than one program rupting device to place its interrupt vector address on the storage unit (PSU) or PIO, the DBDR output signal can be data bus. Only the device with a PRIIN signal low and an wire.QRed and the result used as a bus data flow direction Interrupt request pending responds. Should there be another indicator. The DBDR signal can remain low until timing lower priority device with a pending request, it does not Interval t~6~he next Instruction cycle following the one respond at that time because Its PRI IN input Signal is high. in which was set low. If there' is both a timer interrupt request and an external The PIO device executes the OUT instruction in the same interrupt request when the CPU starts to process the manner as it does the OUTS instruction; the same is true requests, the timer Interrupt is handled first. for the IN and INS instructions. The difference between the long- and short-form instructions is found only in the source Within each local interrupt control circuit is a 16-bit interrupt of the I/O address. address vector. This vector is the address to which the pro- gr.am counter is set after an interrupt is acknowledged and The F8 inputloutput instructioris piacethe 1/0 port address is, therefore, the address of the first executable instruction on the data bus during one instruction cycle and then use of the interrupt routine. the data bus in the following instruction cycle to do the actual 1/0 data movement. The Read-Only Memory Control The interrupt address is unique to the version of the PIO (ROMC) lines coming from the F3850 CPU signal the PIO dev.ice selected by the user. Fifteen bits are fixed: bits 0 that an I/O data movement is occurring during the current through 6 and bits 8 through 15. Bit 7 (21) is dependent instruction cycle. Therefore, the PIO needs to recognize on the type of interrupt. This bit is a 0 for internal timer- whether the contents of the data bus during the instruction generated interrupts and a 1 for external interrupts. cycles just prior matches any of its four assigned I/O addresses wherever the ROMC lines Indicate an I/O trans- When the interrupt logiC sends an interrupt request signal fer. The address select logic constantly monitors the data and the CPU is enabled to service it, the normal state se- bus for a match to any of the four addresses and holds the quence of the CPU is interrupted at the end of an instruc- information of a match through the following cycle. tion. The CPU signals the interrupt circuits through the five ROMC lines. The requesting local interrupt circuit sends a Input instructions that select a port cause the contents of 16-bit interrupt address vector (from the interrupt address the selected port to be placed on the data bus during the generator) onto the data bus in two consecutive bytes. 3·116 F3871 The address is made available to the program counter The CPU allows interrupts after all F8 instructions except through the address demultiplexer circuits. It is simultane- the following: ously made available to all other devices connected to the (PK) PUSH K data bus. It is the address of the next instruction to be exe- (PI) PUSH IMMEDIATE cuted. The program counter of each memory device is set (POp) POP with this new address while the stack register is loaded (JMp) JUMP • with the previous contents of the program counter. The (OUTS) OUTPUT SHORT information in the program counter is lost. Thus, the next (Excluding OUTS 00 and 01) instruction to be executed is determined by the value of (OUT) OUTPUT the interrupt address vector. (EI) SETICB (LRW,J) LOAD THE STATUS REGISTER The interrupt control bit (ICB) of the CPU (loaded in the W FROM SCRATCH PAD register) allows interrupts to be recognized. Clearing the ICB POWER ON prevents acknowledgement of interrupts. The ICB is cleared during power-on and external reset, and after an interrupt is acknowledged. The interrupt status of the PSU, PIO, or As a result, it is possible to perform one more instruction memory interface (MI) devices is not affected by execution after each of the above CPU instructions without being of the disable interrupt (01) Instruction. At the conclusion of interrupted. most instructions, the fetch logic checks the state of the interrupt request line. If there is an interrupt, the next instruction fetch cycle is suspended and the system is forced into an interrupt sequence. Figure 4 Fa System Interrupt Interconnection ~_________C~O~N~TROLrL~IN_E~S________~ CPU PSU/PIO PSU/PIO PIO SMI 1 2 (n) PRIORITY PRIORITY ICB L -_______________ EXTERNAL INTERRUPT L I N E S - - - - - - - - - - - - - - - ' 3-117 F3871 Interrupt Sequence encountered, a series of priviledged instructions would be Figure 5 details the interrupt sequence that occurs whether executed sequentially. One more instruction (a protected the interrupt request is from an external source through the instruction) is executed after the last priviledged instruction. EXT INT pin or from the PIO device's internal timer. The The last cycle of the protected instruction then performs events in the sequence are labeled A through G. the freeze. Event A The dashed lines on the EXT INT timing in figure 5, illustrate An interrupt request must satisfy a set-up time requirement. the last opportunity for the EXT INT signal to cause the last If not satisfied, the INT REO signal delays going low until cycle of a nonprotected instruction to become a freeze the next negative edge of the write clock. + cycle. The freeze cycle is a short cycle (four clock periods) in all cases except where B is the decrement scratch pad Event B instruction, in which case the freeze cycle is a long cycle Event B represents the instruction being executed when the + (six clock periods). interrupt occurs. The last cycle of B is normally the instruc- tion fetch for the next cycle. However, if B is not a privileged The INT REO signal goes low on the next negative edge of instruction and the CPU interrupt control bit is set, the last WRITE if both the PRIIN signal is low and the appropriate cycle becomes a freeze cycle rather than a fetch. At the end interrupt enable bit of the ICP is set. of the freeze cycle, the interrupt request latches are inhib- ited from altering the interrupt daisy chain so that sufficient Event C time is allowed for the daisy chain to settle. This is a nooOperation (NO-OP) long cycle, allowing time for If B is a privileged instruction, the instruction fetch is not + the PRIIN/PRI OUT chain to settle. At a 2MHz clock rate, a total of seven PIO, PSU, or MI devices can be daisy-chained replaced by a freeze cycle; instead, the fetch is performed without the need for look-ahead logic. and the next instruction is executed. Although unlikely to be Figure 5 F3871 Interrupt Sequence FREEZE CYCLE WRITE 1 1-1 __ A 1 EXTINTOR TIMER INTERRUPT I - -"1 --II--l --';'1--- 1111 4--- i r-i<1 II 1 PRIOUT _ _ _ _ _:.....I _ _ _ _ .J I • PRIOUTOFNEXTPIO _ _ _ _ _ _ _ .I. .r"_ -I-J 3-118 F3871 Event 0 Summary of Intenupt Sequence In PSU circuits, the program counter (PO) is pushed to the For the PIO, the interrupt response time is defined as the stack register (P) to save the return address. The interrupting time elapsed between the occurrence of the EXT INT signal PIO places the lower eight bits of the interrupt vector going active (or the timer transition to H'N? and the begin- address onto the data bus. This is always a long cycle. ning of execution of the first instruction of the interrupt service routine. The interrupt response time is a variable • Event E dependent on what the microprocessor is doing when the In this long cycle, the PIO places the upper eight bits of the interrupt request occurs. interrupt vector address onto the data bus. As shown in figure 5, the minimum interrupt response time Event F is three long cycles plus two short cycles plus one WRITE In this short cycle, the PIO interrupting interrupt request clock pulse width plus a setup time of an EXT INT signal latch is cleared. Also, the CPU interrupt control bit is before the leading edge of the WRITE pulse-a total of 27 + cleared, thus disabling interrupts until an EXT INT Instruc- clock periods plus the setup time. At 2 MHz, this is 14.25 f.ls. tion is performed. Additionally, during Event F, the PRI Although the maximum could theoretically be infinite, a IN/PRI OUT daisy-chaln freeze is removed, since the inter- practical maximum is 35 f.ls (based on the interrupt request rupt vector address has been passed to the CPU. Another occurring near the beginning of a PI and LR K, P sequence). action is the fetch of the instruction from the interrupt address. ROMCStates Table 4 shows the function performed by the PIO device for Event G each ROMC command. Each function is performed entirely This event starts executing the first instruction of the within one machine cycle (one cycle of the write clock). All interrupt service routine. other ROMC states are decoded as NO-oP. Table 4 PIO Functions Versus ROMC States ROMC State Binary Hex PIO Functions 01000 08 Reset command. Load port A, port B, timer, and interrupt control port with H'OO'. 01111 OF If this circuit is interrupting and is highest in the priority chain, move lower half of interrupt vector into the data bus. 10000 10 Place interrupt circuitry in an inhibit state that prevents altering the interrupt priority chain. 10011 13 If this circuit is interrupting and is highest in the priority chain, move upper half of interrupt vector into the data bus and reset the interrupt circuit. 11010 1A If the contents of the data bus in the prior cycle was an address of 110 ports on this d.evice, move the current contents of the data bus into the appropriate port (110 A, 110 B, timer, or control). 11011 1B If the contents of the data bus in the prior cycle was an address of 110 ports on this device, move the contents of the appropriate 110 port onto the data bus (110 A or 110 B). 3·119 F3871 Timing Characteristics Load timer to read timer error (Notes 1,2) ....................... -5t+ to -(Ipse +18t+) Timing signals are illustrated in figures 6 through 10, and Load timer to interrupt request error the signal characteristics are presented in tables 5 through (Notes 1,3) .................•............ -2t+to -9t+ 9. Definitions for the timing characteristics are as follows: Pulse Width Measurement Mode Error = Indicated Time Value - Actual Time Value Measurement accuracy (Note 4). . . . . . .. +t+ to - (tpsc + 2t+) Minimum pulse width of EXT INipln .................. 2t+ tpse = t+ x Prescale Value Event Counter Mode Interval Timer Mode Minimum active time of the EXT INT pin ............... 2 t+ Single interval error, free running (Note 3) ............ ±6t+ Minimum Inactive time of the EXT INT pin ............. 2t+ Cumulative interval error, free running (Note 3) ........... 0 NOTES Error between two timer reads (Note 2) .......... ±(tpse + t+) 1. All times that entail loading, starting, or stopping the timer are referenced Start timer to slop timer error from the end of the last machine cycle of the OUT or OUTS Instruction. (Notes 1,4). . . . . . . . . . . . . . . . . . . . . . . . .. + t+ to -(t pse + t+) 2. All times that entail reading the timer are referenced from the end of the Start timer to read timer error last machine cycle of the IN or INS Instruction. 3. All times that entail the generation of an Interrupt request are referenced (Notes 1,2) ........................ -5t+to -(t pse + 71+) from the start of the machine cycle In which the appropriate Interrupt Slart timer to Interrupt request error request latch is set. Additional time elapses if the Interrupt request occurs (Notes1,3) ............................. -2t+to -8t+ during a privileged or multlcycle instruction. Load timer 10 stop timer error (Note 1) .... +t+ to -(t pse +2t+) 4. Error can be cumulative if operation is repetitively performed. Agure 6 F3871 Clock Timing CLOCK TIMING -J-~-f-~1~----,Ir--~ WRITE -----J -..J "i'~- ~ }i \.- r I.. I.. . PWl PW'------_- l TIMING ALL TIMING SPECIFIED AT Vss = 0 V, Voo = + 5 V ± 5%, Voo = + 12 V ± 5% 3-120 F3871 Figure 7 F3871 Strobe TIming WRITE -1~-I/0r- 1/0 PORT OUTPUT __---J~,...i- - II STROBE (PORT A ONLYI ----,.1,1-:- -ISL---V-- Figure 8 F3871 Input TIming WRITEJ\ -.! tSA2 r- --iIHRlj- ROMe X ISD4- ~tHD3 DATA BUS -------- I -------- ..... _r-- .... t- _____ 181102_ IHU02 IHlPORT8 =======x x:=. 3-121 F3871 Figure 9 F3871 Output TIming ) OUTPUT TIMING WRffE J \~--:-----;-I~/ \~____ _ ------b:I.:.-:y 1~-10:,~----~-- ,.-_~ ____ _ \L ________ .I \. ___ _ C /' ,/ D8DR _ _ _ _ _ _ _ _ _ IdDR., .. 11--I.D2~ I-IoHD' DATA ~ VAUD )()-----~(\,._ _ __ ... tct03 .. I Figure 10 F3871 Interrupt TIming INTERRUPT TIMING / WRITE ACTIVE LOW 1+-"'£11 EXT INT ACTIVE HIGH '---_____XI === ~I~I\I . _IdPO'_1 II - -I 1~'R2 .v.---- 1- IdPO, PRIO~ ~r-------~u-----~--~\ _~__- - - - - - - II ':-_ " IdPO'~ -./ 1d~021- PRI O~ OF NEXT PIO IN CHAIN 8tl¥ (PAl iN TO Piil DELAY) / II \L ? , 3-122 F3871 Table 5 F3871 Clock Timing Characteristics Symbol Parameter Min. Typ, Max. Units Conditions P+ Clock Period 0.5 10 ,..5 Po Low time 180 ns P1 High time 180 ns II PW WRITE Clock Period 4P+ Short cycle PWo WRITE Clock Period 6P+ Long cycle PW1 WRITE Pulse Width P+-100 P+ t dw1 + - to WRITE + delay 250 ns tdwO + - to WRITE - delay 225 ns Table 6 F3871 Strobe Timing Characteristics Symbol Parameter Min. Max. Units Comments tIlO-S Port Output to STROBE delay 3t+-1000 3t++250 ns Note 1 tSL STROBE Pulse Width, Low 8t+ -250 12t++250 ns tw-IIO WRITE to I/O Port Output Valid 1000 ns Note 2 NOTES 1. Load is 50 pF plus 3 standard TTL inputs. 2. Load is 50 pF plus 1 standard TTL input. Table 7F3871 Input Timing Characteristics Symbol Parameter Min. Typ. Max. Units Conditions tSR2 ROMC Valid Measured from Fall of WRITE 550 ns tHR1 ROMC Required HOld After Fall of WRITE 20 ns tSD4 Data Bus Setup Time ns tHD3 Data Input Hold Time 20 ns tSl/02 I/O Input Setup Time 1.3 ns t HI/02 I/O Input Hold Time 20 ns 3-123 F3871 Table 8 F3871 Output Timing Characteristics Symbol Parameter Min. Typ. Max. Units Conditions tlDRl WRITE to DBDR Floating 400 ns tdDRl +to DBDR 1-0 200 625 ns CL = 100 pF; RL = 12.5 kQ tdDR2 WRITE to DBDR 1-0 2PH ns CL =1oo pF; RL=12.5 kQ 625- tdwO ns CL =1oo pF tdD3 WRITE to Data Valid 2P+- 2P+- 2P++ ns CL =1oopF tdWO 400 700- tdwO tOHD2 Guaranteed Data Hold Time After 30 ns Fall of WRITE Table 9 F3871 Interrupt Timing Characteristics Symbol Parameter Min. Typ. ! Max. Units Conditions tSEll EXT INT Setup Time 750 ns tHEI EXT INT Hold Time 30 ns ", tdlR2 WRITE to INT REO Delay 430 ns CL =1OO"pF tPOl WRITE to PRI OUT Delay 640 ns CL =50pF tdP02 PRIIN to PRI OUT Delay 350 ns CL =50 pF tliRl WRITE to INT REO Float by PIO 640 ns Open Drain Output DC Characteristics The DC characteristics of the F3871 PIO are supplied in table 10. Table 10 F3871 DC Characteristics , Symbol Parameter Signal Min. Max. Units Test Conditions V1H Input High Voltage Data Bus (DBo -DBr) 2.0 VDD V V1L Input Low Voltage Vss 0.8 V VOH Output High Voltage 3.9 VDD V IOH = -1oo,..A VOH Output High Voltage 2.4 V IOH =1oo,..A, VGG=5V±5% VOL Output Low Voltage 0.4 V IOL=1.6mA IIH Input High Current 1.0 ,..A V1N = 6 V, 3-state mode IOL Input Low Current -1.0 ",.A V1N = Vss, 3-state mode C1 Input Capacitance 10 pF 3-state mode 3·124 F3871 Table 10 F3871 DC Characteristics Symbol Parameter Signal Min. Max. Units Test Conditions VIH Input High Voltage Clock Lines (+, WRITE) 2.0 Voo V VIL Input Low Voltage Vcc 0.8 V IL Leakage Current ±1.0 ~ VIN = Vss to +6 V • CI Input Capacitance 10 pF VIH Input High Voltage Priority In and Control 3.5 Voo V VIL Input Low Voltage Lines (PRI IN, ROMCo - Vcc 0.8 V IL Leakage Current ROMC4) 1.0 ~ VIN =Vss to +6 V CI Input Capacitance 10 pF VOH Output High Voltage Priority out (PRI OUT) 3.9 Voo V 10H= -1M~ VOL Output Low Voltage Vss 0.4 V 10L= -1.8 rnA VOH Output High Voltage Interrupt Request V Open Drain Output' VOL Output Low Voltage (lNT REO) Vss 0.4 V 10L =0.8 rnA IL Leakage Current 1.0 ~ VIN = 6 V. Output Device Off CI Input Capacitance 10 pF Output Device Off VOH Output High Voltage Data Bus Drive (DBDR) External Pull·up VOL Output Low Voltage Vss 0.4 V IOL=1.8rnA IL Leakage Current 1.0 ,..A VIN = 6 V. Output Device Off CI Input Capacitance 10 pF Output Device Off VIH Input High Voltage External Interrupt 2.0 V External Pull·ups Exist VIL Input Low Voltage (EXT INT) 0.8 V Internal IIH Input High Current -1.6 ,..A VIN =0.4 V IlL Input Low Current 100 ~ VIN =2.4 V CI Input Capacitance 10 pF VOH Output High Voltage Strobe (STROBE) 2.4 Voo V 10H= -300~ VOL Output Low Voltage Vss 0.4 V IOL=5.0rnA VOH Output High Voltage I/O Port Option A 2.4 Voo V 10H = -100,..A VOL Output Low Voltage (Standard Pull·up) Vss 0.4 V 10L =1.8 rnA VIH Input High Voltage 2.0 Voo V Internal Pull'up to Voo VIL Input Low Voltage Vss 0.8 V IlL Input Low Current 1.0 rnA VIN =O.4 V2 CI Input Capacitance 10 pF VOH Output High Voltage I/O Port Option B External Pull·up VOL Output Low Voltage (Open Drain) Vss 0.4 V IOL=1.8rnA VIH Input High Voltage 2.0 6.0 V VIL Input Low Voltage Vss 0.8 V IL Leakage Current 1.0 ~ VIN = 6 V. Output Device Off CI Input CapaCitance 10 pF VOH Output High Voltage I/O Port Option C 1.5 Voo V 10H= -1.5 rnA VOL Output Low Voltage (Driver Pu lI·up) Vss 0.4 V IOL=1.8rnA Output High Current -1.5 -9.0 ~ rnA VOH =0.7 V to 1.5 V 10H NOTES 1. Pull·up resistor to Voo on CPU. 2. Measured with a high·level I/O port output. 3. Positive current is defined as ccnventlonal current flowing into the pin referenced. 4. Vss=O V. Voo= +5 V ±5%. VGG= +12 V ±5%. TA=O'C to +70'C unless otherwise noted. 3·125 F3871 The supply currents are given in table 11. Table 11 Supply Currents Symbol Parameter Min. Typ. Max. Units Conditions 100 Voo Current 30 70 mA f =2 MHz, Outputs Unloaded IGG VGG Current 10 18 mA f = 2 MHz, Outputs Unloaded Absolute Maximum Ratings Ordering Information These are stress ratings only, and functional operation at Temperature these ratings, or under any conditions above those indi- Part Number Package Range cated in this data sheet, is not implied. Exposure to the F3871 DC Ceramic C absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to F3871DL Ceramic L stresses greater than those listed may cause permanent F3871DM Ceramic M damage to the device. 'F3871PC Plastic C F3871PL Plastic L VGG +15V, -0.3V F3871 PM Plastic M Voo +7V, -0.3V External Interrupt Input - 600 lolA, + 225 lolA C = Commercial Temperature Range 0' to +70'C L = Limited Temperature Range -40'C to +85'C All Other Inputs and Outputs +7V, -0.3V M = Military Temperature Range -55'C to +125'C Storage Temperature -55·C, +150·C ·Versions E, F, ,G, and H are stocked items. Operating Temperature O·C, +70·C NOTE: All voltages are with respect to Vss. Recommended Operating Ranges The recommended operating ranges of the PIO devices are shown below. Symbol Parameter Min. Typ. Max. Voo Supply Voltage +4.75 V +SV +5.25 V VGG +11.4 V +12V +12.6 V Vss OV 3-126 CD 1 IINTPlOI!)UCTION r;;-l2 IOPlDERING AND PACKAGE .1~ .INFOPIMATION IwIF8 MICROCOMPUTER FAMILY 4 CONTROLLER FAMILY 1[!]IF880EI MICROPPIOCUSOR FAMILY L!J IMICROPROCESSOR r=l. t8oI11 13 L IIPOLItA FAMILY 1[1]IF180oo MICFlOPFtOCIBSORFAM+LY I w 1 IftOM PRODUCTS 1 Iwl:~~r:-Nt fitfIMS AtiB 1 11101lAPPLICATIONS IITIIIREsOURCE ANt) TRA~ING CEN~ERSI G!J 1 ISAL!S OFFICES ;; 'I , ...'.'.. '';1'' Section 4 Controller Family F387X Family , function (see figure 4-2), allowing semi-custom design of microcomputers for specific market applications. The Fairchild F387X family of devices represents a line of complete, 8-bit microcomputers on single MOS integrated circuits (see figure 4-1)_ Fabricated using Fairchild double- Figure 4-2 F38701 Functional Diagram lon-Implanted, N-channel silicon-gate technology and ad- vanced circuit design techniques, the F387X family offers maximum cost-effectiveness in a variety of logic replacement and control applications. Figure 4-1 F387X Family Organization F3870 SINGLE·CHIP MICROCOMPUTER F3870AIF3870B HIGH·SPEED SINGLE·CHIP MICROCOMPUTER F38C70 SINGLE·CHIP M'ICROCOMPUTER AID DIA • F38E70 SINGLE·CHIP MICROCOMPUTER C o N F38721F38L72 SINGLE·CHIP MICROCOMPUTER V E R T E All F387X family microcomputers execute the Fa instruc- R tion set of more than 70 commands. They are available with a wide range of memory types and sizes, allowing the designer to select the best combination of RAM and ROM DIGITAL for a particular application. The F387X devices are also 110 available with special types of 1/0. The F387X family devices are all pin-compatible, permitting ADVANCED CONTROLLER easy system upgrading by replacement of one device in an APPLICATIONS application with another family member having greater quantities of RAM or ROM, special 1/0 functions, or all three. Because of this simple upgrading, an F387X-based microcomputer can be enhanced or expanded in many dif- The first single-chip microcomputer designed using the ferent ways without affecting system printed circuit board, modular concept Is the F38701, in which a core CPU, RAM, enclosure, or power supply requirements. ROM, analog Interface unit, power control unit, and digital 110 module are all integrated on the device_ As the library of The Fairchild F387X single-chip microcomputer family is modules grows, the customer will be able to specify the recognized as an industry standard in logic replacement types of modules needed in a particular microcomputer. and control. The devices have been designed into, and suc- cessfully used in, a wide range of applications requiring A series of design modules, the F387XX series, Is used to intelligent control. emulate the functions desired in a final Single-chip device.' The F387XX devices currently defined are: F3870X Family F38700 CPU The F3870X family is a new generation of single-chip con- F38752 Analog Interface Unit (AIU) trollers that uses a modular approach to microcomputer F38753 Power Control Unit (PCU) design. This approach depends upon a core F387X-type F38754 Digital 1/0 Module (010) CPU and modular 110 features designed as a single-chip F38755 Serial 1/0 Module (SIO) 4-3 Controller Family Part Numbers Descriptions Because of the on·going growth of the F387X family, a new Following is data that describes the members of the F387X numbering system for these devices has been developed and F3870X single-chip microcomputer families. by Fairchild: F38 7X F3870X Emulation Devices T Technology/Option _ _ _ _ _ _ _ _ _ _...... Omit =NMOS C = CMOS F38700 E = EPROM CENTRAL PROCESSING UNIT L = Low·power stand·by option (F3872 only) Speed G r a d e - - - - - - - - - - - - - -..... Omit = Standard F38752 F38753 ANALOG POWER CONTROL A = 1.33 us cycle time INTERFACE UNIT UNIT B = 1 us cycle time ROM size - - - - - - - - - - - - - - - -...... F38754 1 1024 bytes PERIPHERAL 2 =2048 bytes INPUT/OUTPUT 3 =3072 bytes 4 =4032 or 4096 bytes Many users are familiar with the previous F387X device numbering system. To assist them, a cross·reference guide is provided in table 4·1. Table 4·1 F387X Number Cross·Reference Guide Old Number New Number F3870-1K F3870·1 F3870 F3870-2 F3872-3K F3872-3 F3872 F3872-4 F3872 with Power·Down Option F38L72-4 F3876-1K F3872-1 F3876 F3872-2 F3876 with Power-Down Option F38L72·1 F3878-3K F3870-3 F3878 F3870-4 F38E70 F38E70-2 F38C70 F38C70-2 F38701 F38701-2 4-4 F3870 Single-Chip Microcomputer Microprocessor Product Description Connection Diagram The Fairchild single-chip microcomputer series offers a 40-Pin DIP variety of circuits to serve the high-volume, cost-sensitive controller market. The F3870 is a complete 8-bit XTL, VDD microcomputer on a single MOS integrated circuit. The XTL2 RESET F3870 can execute the F8 instruction set of more than 70 POo EXT tNT commands, allowing expansion into multi-chip POl configurations with software compatibility. The device po-, features 64 bytes of scratchpad RAM, a programmable po, binary timer, 32 bits of 110, a single +5 V power supply STROBE requirement, and a choice of 1K, 2K, 3K, or 4K of ROM. 1'40 Poi 1 Utilizing Fairchild's double-ion-implanted, N-channel P42 silicon-gate technology and advanced circuit design techniques, the single-chip F3870 offers maximum cost 1'43 effectiveness in a wide range of control and logic P44 replacement applications. 1'45 P46 • Single-Chip Microcomputer P47 • Software-Compatible with F8 Family po, • 1024-, 2048-, 3072-, or 4096-Byte Programmable ROM PO, • 64-Byte Scratchpad RAM P05 • 32-Bit (4-Port) TTL-Compatible 1/0 PO, • Programmable Binary Timer: vss Interval Timer Mode Pulse Width Measurement Mode (Top View) Event Counter Mode • External Interrupt • Crystal, LC, RC, or External Time Base • Low Power (275 mW, Typical) • Single +5 V:t 10% Power Supply Signal Functions The functions of the F3870 inputs and outputs are described in Table 1. 4-5 F3870 Signal Functions Device Organization This section describes the basic functiQnal elements of CLOCK { XTL, P40 XTL2 P41 the F3870 shown in Figures 1 and 2. P42 EXTINT P43 Main Control Logic 1/0 PORT 4 DEVICE ( RESET P44 The instruction register (IR) receives the operation code CONTROL TEST pas (op code) of the instruction to be executed from the P46 program ROM via the data bus. During all op code po" Pa7 fetches, eight bits are latched into the IR.Some PO, instructions are completely specified by the upper four PO, Ps;, bits of .the op code; in such instructions, the lower four PO, P51 bits are an immediate register address or an immediate I 1/0 PORTO PO, P52 4-bit operand. Once latched into the IR, the main control POs PS, log.ic decodes the instruction and provides the necessary 1/0 PORT 5 po" PS, control gating signals to all circ.uit elements. P07 PS, P56 ROM Address Registers Pio PS, There are four 12-bit registers associated with the Pi, program ROM of the F3870. (In the F3870-1, -2, and -3, thE Pi, 12-bit registers can address more memory space than is 1/0 PORT 1 P13 physically available on the chip; user caution is advised. Pi4 Older versions of the F387D-1 and -2, predating date code Pis 8213, may have 11-bit registers; contact Fairchild if you Pi. VDD have any questions.) These are the program counter (PO), Pi, vSS the stack register (P), the data counter (DC), and the auxiliary data counter (DC1). The program counter is used to address instructions or immediate operands. The stack register is used to save the contents of PO during an interrupt or ·subroutine call. Thus, P contains the return address at which processing.is to resume upon completion of the subroutine or the interrupt routine. The data counter is used to address data tables. This register is autoincrementing. Of the two data counters, only DC can access the ROM. However, the XDC instruction allows DC and DC1 to be exchanged. Associated with the F3870 address registers is a 12-bit adderlincrementer. This logic element is used to increment PO or DC when required and is also used to add displacements to PO on relative branches or to add the data bus contents to DC in the add data counter (ADC) instruction. Program ROM The microcomputer program and data constants are stored in the program ROM, which may be 1024 x 8 (F3870-1), 2048 x 8 (F3870-2), 3072 x 8 (F3870-3), or 4096 x 8 (F3870-4) bytes. When a ROM access is required, the appropriate address register (PO or DC) is gated onto the ROM address bus and the ROM output is gated onto the main data bus. The first byte in the ROM is location zero. 4-6 F3870 Table 1 Signal Functions Mnemonic Pin No. Name Description Device Control EXTINT 38 External Software·programmable input that is also used in conjunction with the Interrupt timer for pulse width measurement and event counting. RESET 39 External Input that may be used to externally reset the F3870. When pulled low, Reset the F3870 resets; when then allowed to go high, the F3870 begins program execution at program location H'OOOO'. TEST 21 Test Line An input used only in testing the F3870. For normal circuit operation, • TEST is left unconnected or grounded. Clock STROBE 7 Ready Normally high output that provides a single low pulse after valid data is Strobe present on the P4 o-P4? pins during an output instruction. XTL" 1, 2 Time Base Inputs to which a crystal (1 MHz to 4 MHz), LC network, RC network, or XTL2 external single·phase clock may be connected. I/O Ports POO-PO? 3-6, 8-19, 1/0 Ports Thirty·two bidirectional lines that can be individually used as either P1 o-P1? 22-37 TTL·compatible inputs or latched outputs. P4 o-P4? P5s-P5? Power Voo 40 Power +5 V ± 10% power supply Input Vss 20 Ground Signal and power ground Fig. 1 F3870 Architecture Scratchpad and ISAR The scratch pad provides 64 8·bit registers that may be used as general·purpose RAM. The indirect scratchpad address register (ISAR) is a 6·bit register used to address the 64 registers. All 64 registers may be accessed using the ISAR. In addition, the lower order 12 registers may also be directly addressed. ACCUMULATOR The ISAR can be visualized as holding two octal digits. This division of the ISAR is important, since a number of PROGRAM TEST 1 COUNTER instructions increment or decrement only the least significant three bits of the ISAR when referencing STACK REGISTER scratchpad bytes via the ISAR. This makes it easy to DATA COUNTER 0 reference a buffer consisting of contiguous scratchpad bytes. For example, when the low·order octal digit is DATA COUNTER 1 incremented or decremented, the ISAR is incremented 2048x 8 from octal 27 to 20 or is decremented from octal EXTINT EPROM 20 to 27. This feature of the ISAR is very useful in Vee GND many program sequences. All six bits of the ISAR may be loaded at one time, or either half may be loaded independently. 4·7 F3170 Fig. 2 F3870 Block Diagram II PORT 6 INTERRUPT CONTROL REGISTER ROM ADDRESS PROGRAM REGISTERS ROM po, P, DC, DC' L-;:::===~...--.... POo-3 _ _ i'Oi-4 INDIRECT --ffi-5 L-----'\I SCRATCHPAD 1----"'1 SCRATCHPAD 110 PORT 0 .......-...... P03-6 ..---.. P04-19 ADDRESS REGISTERS _ _ 1iOs-.8 REGISTER ......--... 1506-17 ............ P07-16 ====! :=:~:~~ , 110 PORT. :=:~:~: . - - . 1514-22 --1'f5-23 --1'f6-24 & -1'i7-25 ALU STATUS ====! .-.-...1'iIi-9 _ _ i'40-8 _ _ ffi-.o _ _ ffi-l1 110 PORT 4 _ _ ffi-.2 ~P45-13 _1'46-.4 _J!47-.5 :::=:E=~--:-- + -S1'IiOR PSO-33 -7 _l'5i-32 ~P52-31 ...--..... P53-30 110 PORT 5 _ ii54-29 L-___..... ::::: - ~:~; P57-28 Scratchpad registers 9 through 15 (decimal) are given operations (using the data presented on the two Input mnemonic names (J, H, K, and 0) because of special buses). and provides the result on the .result bus. The linkages between these registers and other registers, arithmetic operations that can be performed in the ALU such as the stack register. These special linkages are binary add, decimal adjust, add with carry, facilitate the implementation of multi·level interrupts and decrement, and increment. The logic operations that can subroutine nesting. For example, the instruction LR K, P be performed are AND, OR, exclusive·OR, ones stores the lower eight bits of the stack register in complement, shift right, and shift left. Besides providing register 13 (Klower, orKL) and stores the upper four bits the result on the result bus, the ALU also provides four of P in register 12 (K upper, or KU). signals presenting the status of the result. These Signals, stored in the status register (W), represent the Arithmetic and Logic Unit (ALU) CARRY, OVERFLOW, SIGN, and ZERO conditions of the After receiving commands from the main control logic, result of the operation, the ALU performs the required arithmetic or logic 4-8 F3870 Accumulator An output ready strobe is associated with port 4. This The accumulator (ACC) is the principal register for data flag may be used to signal a peripheral device that the manipulation within the F3870. The ACC serves as one F3870 has just completed a single low pulse shortly after input to the ALU for arithmetic or logical operation. The the output operation is completely finished, so either results of ALU operations are stored in the ACC. edge may be used to signal the peripheral. This STROBE signal may also be used to request new input Status Register information from a peripheral simply by doing a dummy The status register (also referred to as the W register) output of H '00' to port 4 after completing the holds five status flags, as follows: input operation. Timer and Interrupt Control Port STATUS REGISTER (W) The timer is an 8-bit binary down counter that is 4 software-programmable to operate in one of three modes: the interval timer mode, the pulse width measurement mode, or the event counter mode; the timer SIGN characteristics are described in Table 2. As shown in CARRY Figure 4, associated with the timer is an 8-bit register ' - - - - - - ZERO called the interrupt control port, a programmable prescaler, and an 8-bit modulo-N register; a functional ' - - - - - - - - OVERFLOW logic diagram is shown in Figure 5. ' - - - - - - - - - I N T E R R U P T CONTROL BIT The desired timer mode, prescale value, starting and Summary of Status Bit stopping the timer, active level of the EXT INT pin, and local enabling or disabling of interrupts are selected by OVERFLOW CARRY 7 (±) CARRY 6 outputting the proper bit configuration from the ZERO ALU 7 /\ ALU 6 /\ ALU s /\ ALU4 accumulator to the ICP (port 6) with an OUT or OUTS ALU3 /\ ALU 2 /\ ALU, /\ ALUo instruction. Bits within the ICP are defined as follows: CARRY Interrupt Control Port (Port 6) SIGN Bit 0- External Interrupt Enable The interrupt control bit (ICB) of the status register may Bit 1-Timer Interrupt Enable be used to allow or disallow interrupts in the F3870. This Bit 2-EXT INTActive Level bit is not the same as the two interrupt enable bits in the Bit 3-Start/Stop Timer interrupt control port (ICP). If the ICB is set and the Bit 4- Pulse Widthllnterval Timer F3870 interrupt logic communicates an interrupt request Bit 5- -;- 2 Timer Prescale Values to the CPU section, the interrupt is acknowledged and Bit 6- -;- 5 Timer Prescale Values processed upon completion of the first non-privileged Bit 7 - -;- 20 Timer Prescale Values instruction. If the ICB is cleared, an interrupt request is not acknowledged or processed until the ICB is set. A special situation exists when reading the ICP with an IN or INS instruction. The accumulator is not loaded with 1/0 Ports the contents of the ICP; instead, accumulator bits 0 The F3870 provides four complete bidirectional 110 ports; through 6 are loaded with zeros, while bit 7 is loaded these are ports 0, 1, 4, and 5. In addition, the interrupt with the logic level being applied to the EXT INT pin, control register is addressed as port 6 and the binary thus allowing the status of the EXT INT pin to be timer is addressed as port 7. An output instruction (OUT determined without the necessity of servicing an external or OUTS) causes the contents of the ACC to be latched interrupt request. This capability is useful in establishing into the addressed port. An input instruction (IN or INS) a high-speed, polled handshake procedure or for using transfers the contents of the port to the ACC (port 6 is EXT INT as an extra input pin if external interrupts are an exception that is described later). The 1/0 pins on the not required and the timer is used only in the interval F3870 are logically inverted. The schematic of an 1/0 pin timer mode. and conceptual illustrations of available output drive options are shown in Figure 3. .= 4-9 F3870 Fig. 3 1/0 Port Diagram VDD PORT I/O PIN STANDARD OPEN DRAIN DIRECT DRIVE OUTPUT OUTPUT OUTPUT Ports 0 and 1 are standard output type only. Ports 4 and 5 may be any of the three output options, each pin individually assignable to any port. The STROBE output is always configured similar to a standard output, except that it is capable of driving three TIL loads. Fig.4 Timer and Interrupt Control Port Block Diagram EXTERNAL PRESCALER TIME BASE -0-2, 5, 10, 20, 40, 100, or 200 INT 8 BITS REO INTERRUPT CONTROL PORT (PORT 6) EVENT COUNTER MODE + 2 PRESCALE 4.,- _ o 1 4~.. 2Ll~ L L-.Ex:~TR::.~ ug3 INTERRUPT ENABLE TIMER INTERRUPT ENABLE + 5 PRESCALE _ o +10 PRESCALE _ 1 + 20 PRESCAlE _ o EXT INT ACTIVE LEVEL + 40 PRESCALE _ 1 EXT + 100 PRESCALE - o START/STOP TIMER INT + 20Il PRESCA.LE - 1 PULSE WIDTH/INTERVAL TIMER 4·10 Fig. 5 Timer/lnterrupt Functional Diagram FROM INTERRUPT CONTROL PORT 82 I 84 83 85 8. 87 'INS T 80 I 81 ~ TIMER INTERRUPT TIME BASE "LOADS INTERRUPT VECTOR H '020' UPON COMPLETION OF THE FIRST NON* PRIVILEGED INSTRUCTION ! ~ ACKNOWLEDGE TIMER INTERRUPT 'OUTS 7' 'I' = PULSE WIDTH MODE "...... Co) 011 ....I""L o EXTERNAL INTERRUPT INPUT JL '01' ACKNOWLEDGE EXTERNAL INTERRUPT II F3870 Table 2 Timer Characteristics Characteristic Value Interval Timer Mode Single Interval Error, Free·Running (Note 3) ± 6t Cumulative Interval Error, Free·Running (Note 3) 0 Error Between Two Tim~r Reads (Note 2) ± (tpsc + t to - (tpsc + t to - (tpsc + 7t to - 8t Load Timer to Stop Timer Error (Note 1) + t¢ to - (t psc + 2t to - (tpsc + 8t to - 9t Pulse Width Measurement Mode Measurement Accuracy (Note 4) + t to - (tpsc + 2t Event Counter Mode Minimum Active Time of EXT INT Pin 2t Minimum Inactive Time of EXT INT Pin 2t¢ Oellnltlons Error = indicated time value - actual time value tpsc = t x prescale value Notes 1. All times that entail loading, starting, or stopping the timer are referenced from the end of the last machine cycle of the OUT or OUTS instruction. 2. All times that entail reading the timer are referenced from the end of the last machine cycle of the IN or INS instruction. 3. All times that entail the generation of an interrupt request are referenced from the start of the machine cycle in which the appropriate interrupt request latch is set. Additional time may elapse if the interrupt request occurs during a privileged or multi·cycle instruction. 4. Error may be cumulative if operation is repetitively performed. The rate at which the timer is clocked in the interval explained in the following paragraphs. timer mode is determined by the frequency of an internal ¢ clock and by the division value selected for the An OUT or OUTS instruction to port 7 loads the contents prescaler. (The internal clock operates at one·half the of the accumulator into both the timer and the 8-bit external time base frequency.) If ICP bit 5 is set and bits modulo·N register, resets the prescaler, and clears any 6 and 7 are cleared, the prescaler divides by 2. previously stored timer interrupt request. As previously Likewise, if bit 6 or 7 is individually set, the prescaler noted, the timer is an 8·bit down counter that is clocked divides ¢ by 5 or 20, respectively. Combinations of bits 5, by the prescaler in the interval timer mode and in the 6, and 7 may also be selected. For example, if bits 5 and pulse width measurement mode. The prescaier is not 7 are set while bit 6 is cleared, the prescaler divides by used in the event counter mode. The modulo·N register 40. Thus, possible prescaler values are: .;. 2, .;. 5, .;. 10, is a buffer whose function is to save the value that was .;. 20, .,. 40, .;. 100, and.;. 200. most recently output to port 7. The modulo·N register is used in all three timer modes. Any of three conditions cause the prescaler to be reset: whenever the timer is stopped by clearing ICP Interval Timer Mode - When ICP bit 4 is cleared (logic 0) bit 3, on execution of an output instruction to port 7 (the and at least one prescale bit is set, the timer operates in timer is assigned port address 7), or on the trailing edge the interval timer mode. When bit 3 of the ICP is set, the transition of the EXT INT pin when in the pulse width timer starts counting .down from the modulo·N value. measurement mode. These last two conditions are After counting down to H '01', the timer returns to the 4·12 F3870 modulo-N value at the next count. On the transition from error over many intervals is zero. The prescaler and timer H '01' to H' N', the timer sets a timer interrupt request generate precise intervals for setting the timer interrupt latch. Note that the interrupt request latch is set by the request latch, but the time-out may occur at any time transition of H' N' in the timer, thus allowing a full 256 within a machine cycle. (There are two types of machine counts if the modulo-N register is preset to H '00'. If bit cycles: short cycles that consist of four clock periods, 1 of the ICP is set, the interrupt request is passed to the and long cycles that consist of 6 clock periods.) In the CPU section of the F3870. However, if bit 1 of the ICP is multi-chip F8 family, there is a signal referred to as the a logic 0, the interrupt request is not passed, but the write clock, which corresponds to a machine cycle. interrupt request latch remains set. If ICP bit 1 is Interrupt requests are synchronized with the internal subsequently set, the interrupt request is then passed to write clock, thus giving rise to the possible ± 6 error. the CPU. Only two events can reset the timer interrupt Additional errors may arise due to the interrupt request request latch: when the timer interrupt request is occurring while a privileged instruction or multi-cycle 4 acknowledged by the CPU, or when a new load of the instruction is being executed. Nevertheless, for most modulo-N register is performed. applications, all of the above errors are negligible, especially if the desired time interval is greater than Consider an example in which the modulo-N register 1 ms. is loaded with H '64' (decimal 100). The timer interrupt request latch is set at the 100th count following the Pulse Width Measurement Mode - When ICP bit 4 is set timer start, and the timer interrupt request latch is (logic 1) and at least one prescale bit is set, the timer repeatedly set on precise 100-count intervals. If the operates in the pulse width measurement mode. This prescaler is set at .,. 40, the timer interrupt request mode is used for accurately measuring the duration of a latch is set every 4000 clock periods. For a 2 MHz pulse applied to the EXT INT pin. The timer is stopped clock (4 MHz time base frequency), this produces and the prescaler is reset when the EXT INT pin is at its 2 ms intervals. inactive level. The active level of EXT INT is defined by ICP bit 2: if cleared, EXT INT is active-low; if set, EXT The range of possible intervals is from 2 to 51,200 INT is active-high. If ICP bit 3 is set, the prescaler and clock periods (1 ",s to 25.6 ms for a 2 MHz clock). timer start counting when EXT INT transfers to the active However, approximately 50 periods is a practical level. When EXT INT returns to the inactive level, the minimum because the time between setting the interrupt timer stops, the prescaler resets, and, if ICP bit 0 is set, request latch and the execution of the first instruction of an external interrupt request latch is set. (Unlike timer the interrupt service routine is at least 29 periods (the interrupts, external interrupts are not latched if the ICP response time is dependent upon how many privileged interrupt enable bit is not set.) instructions are encountered when the request occurs). To establish time intervals greater than 51,200 clock As in the interval timer mode, the timer may be read at periods is simply a matter of using the timer interrupt any time, or may be stopped at any time by clearing ICP service routine to count the number of interrupts, saving bit 3, the prescaler and the ICP bit 1 function as the result in one or more of the scratchpad registers previously described; the timer still functions as an 8-bit until the desired interval is achieved. With this binary down counter with the timer interrupt request technique, virtually any time interval, or several time latch being set on the timer's transition from H '01 ' to intervals, may be generated. H' N' (modulo-N value). Note that the EXT INT pin has nothing to do with loading the timer; its action is that of The timer may be read at any time and in any mode using automatically starting and stopping the timer and of an input instruction (IN 7 or INS 7); this may take place generating external interrupts. Pulse widths longer than on-the-fly without interfering with normal timer operation. the prescaler value times the modulo-N value are easily The timer may also be stopped at any time by clearing measured by using the timer interrupt service routine to bit 3 of the ICP. The timer holds its current contents store the number of timer interrupts in one or more indefinitely and resumes counting when bit 3 is again scratchpad registers. set. The prescaler, however, is reset whenever the timer is stopped; thus, a series of starts and stops results in a As for accuracy, the actual pulse duration is typically cumulative truncation error. slightly longer than the measured value because the status of the prescaler is not readable and is reset when For a free-running timer in the interval timer mode, the the timer is stopped. Thus, for maximum accuracy, it is time interval between any two interrupt requests may be advisable to use a small-division setting for the in error by ± 6 clock periods, although the cumulative prescaler. 4-13 F3870 Event Counter Mode - When ICP bit 4 is cleared and all When an interrupt is allowed, the CPU requests that the prescale bits (ICP bits 5, 6, and 7) are cleared, the timer interrupting element pass its interrupt vector address to operates in the event counter mode. This mode is used the program counter via the data bus. The vector address for counting pulses applied to the EXT INT pin. If ICP bit for a timer interrupt is H' 20'; the vector address for an 3 is set, the timer decrements on each transition from external interrupt is H 'OAO'. After the vector address is the inactive level to the active level of the EXT INT pin. passed to the program counter, the CPU sends an The prescaler is not used in this mode but, as in the acknowledge Signal to the appropriate interrupt request other two timer modes, the timer may be read at any latch, which clears that latch. The execution of the time, or may be stopped at any time by clearing ICP bit interrupt serVice routine then commences. The return 3; ICP bit 1 functions are previously described, and the address of the original program is automatically saved .in timer interrupt request latch is set on the timer's the stack register, P. transition from H '01' to H 'N' (modulo-N value). Power-On Clear Normally, ICP bit 0 should be kept cleared in the event The F3870 contains power-on clear circuitry to counter mode; otherwise, external interrupts are automatically reset the internal logic following the generated on the transition from the inactive level to the application of external power. Since many variations active level of the EXT INT pin. of power supply circuitry exist, Fairchild cannot guarantee that the power-on clear will operate under For the event counter mode; the minimum pulse width every power-up condition. required on the EXT INT pin is 2 clock periods, and the minimum inactive time is 2 clock periods; therefore, The power-on clear circuitry contains on-chip sensors to the maximum repetition rate is 500 Hz. monitor various conditions. The following conditions must be satisfied before the power-reset sequence is External Interrupts allowed to start: When the timer is in the interval timer mode, the EXT INT 1. Supply voltage must be above a certain value, typically pin is available for non-timer-related interrupts. If ICP bit + 3 V to +4 V. o is set, an external interrupt request latch is set when 2. The clocks of the device must be functioning. there is a transition from the inactive level to the active 3. The substrate bias must reach a certain level. level of the EXT INT pin (EXT INT is an edge-triggered input). The interrupt request is latched until either All three conditions must be met before the power-on acknowledged by the CPU or ICP bit 0 is cleared (unlike clear circuitry initiates a reset cycle. However, these timer interrupt requests, which remain latched even when conditions can be satisfied even with a supply voltage of ICP bit 1 is cleared). External interrupts are handled in as low as 3 volts. The latest versions of the F3870 have a the same fashion when the timer is in the pulse width modified delay circuit that gives a typicaldelay.of 500,.s measurement mode or in the event counter mode, except (with a 4 MHz crystal) after the above conditions are met. that in the pulse width measurement mode the external This is an improvement over the earlier F3870 versions. interrupt request latch is set on the trailing edge of the EXT INT input; that is, on the transition from the active Since the F3870 is only guaranteed to operate at a level to the inactive level. supply voltage of 4.5 V or greater, the user must ensure that the supply voltage is at least 4.5 V when the F3870 Interrupt Handling initiates the reset cycle. For power supplies having a When either a timer or an external interrupt request is slow rise time, an external RC network can be converted communicated to the CPU section of the F3870, it is to the external reset input of the F3870 to hold the acknowledged and processed at the completion of the device in a reset state long enough to allow the power first non-privileged instruction if the interrupt control bit supply to reach a voltage of 4.5 V. of the status register is set. If the interrupt control bit is +5V not set, the interrupt request continues either until the interrupt control bit is set and the CPU acknowledges the interrupt or until the interrupt request is cleared as previously described. R EXTERNAL RESET F3870 If there are a timer interrupt request and an external interrupt request when the CPU starts to process the requests, the timer interrupt is handled first. 4-14 F3870 External Reset Fig. 6 F3870 Clock Configurations When the RESET input is low, the contents of the program counter are pushed to the stack register and the Crystal Mode External Mode program counter and the ICB of the status register are cleared. The original stack register contents are lost. As with power-on clear, ports 4, 5, 6, and 7 are loaded with H '00'. The contents of all other registers and ports are unchanged. When RESET is high, the first program AT CUT 1 - 4 MHz OPEN EXTERNAL CLOCK instruction is fetched from ROM location H '0000'. • Test Logic Special test logic is implemented to allow access to the RC Mode LC Mode internal main data bus for test purposes. Vee In .normal operation, the TEST pin is unconnected or is ~L connected to ground. When TEST is placed at a level of from 2.8 V to 3.0 V, port 4 becomes an output of the ~* CEXTERNAl. (OPTIONAL-CAN internal data bus and port 5 becomes a wired-OR input to .L BE OMITTED) L_.,€-_J the internal data bus. The data appearing on the port 4 CEXTE.NAL (OPTIOIijAL) pins is logically true, whereas input data forced on port 5 must be logically false. When TEST is placed at a high Minimum R = 4kO Minimum L=O.l mH Minimum Q= 40 level (8.8 V to 9.0 V), the ports act as described above and, additionally, the program ROM is prevented from C = 20.5 pF ± 2.5 pF + CEXTERNAL Maximum CEXTERNAL = 30 pF driving the data bus. In this mode, operands and 1 instructions may be forced externally through port 5 f MIN " 1.1 RC+65ns C= 10 pF ± 1.3 pF + CEXTERNAL instead of being accessed from the program ROM. When TEST is in either the TTL state or the high state, STROBE 1 1 f=-- ceases its normal function and becomes a cycle clock f MAX " 1.0RC+15ns - 2",f[C (identical to the F8 mUlti-chip system write clock, except Example with CEXTERNAL = 0 Example with CEXTERNAL = 0 inverted). R= 15 kO± 5% L=0.3 mH± 10% f" 2.9 MHz± 26% f " 3.0 MHz± 10% Timing complexities render the capabilities associated with the TEST pin impractical for use in a user application, but these capabilities are sufficient to Instruction Set enable Fairchild to implement a rapid method for thoroughly testing the F3870. The F3870 executes the entire instruction set of the multi-chip F8 family (F3850 family), as shown in Table 3. F3870 Clocks Of course, the STORE instrllction is of little use in the The time bases for the F3870 may originate from one of F3870 because only read-only memory exists in the four external sources; the four external configurations addressing range of the data counter (the data counter, are shown in Figure 6. There is an internal 26.5 pF however, is incremented if STORE is executed). capacitor between XTL 1 and GND, and also between XTL 2 and GND. Thus, external capacitors are not A summary of programmable registers and ports is given required. In all external clock modes, the external time in Figure 7. base frequency is divided by 2 to form the internal clock. Also, for convenient reference, a programming model of the F3870 is given in Figure 8. 4-15 F3870 Table 3 F3870 Instruction Set Accumulator Group Instructions Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF ZERO CRY SIGN Add Carry LNK ACC-(ACC)+ CRY 19 1 1 110 110 110 110 Add Immediate AI ii ACC-(ACC) + H'ii' 24 ii 2 2.5 110 110 110 110 AND Immediate NI ii ACC-(ACC) A H'ii' 21 ii 2 2.5 0 110 0 I/O Clear CLR ACC-H'OO' 70 1 1 Compare Immediate CI ii H'ii' + (ACC) + 1 25 ii 2 2.5 I/O 110 I/O I/O Complement COM ACC-(ACC) .. H'FF' 18 1 1 0 I/O 0 I/O Exclusive OR Immediate XI jj ACC-(ACC) .. H'ii' 23 ii 2 2.5 0 110 0 I/O Increment INC ACC-(ACC)+ 1 IF 1 1 110 110 I/O I/O Load Immediate LI ii ACC-H'ii' 20 ii 2 2.5 - - - - Load Immediate Short LIS i ACC-H'Oi' 7i 1 1 - - - - OR Immediate 01 ii ACC-(ACC) V H'ii' 22 ii 2 2.5 0 I/O 0 I/O Shift Left One SL 1 SHIFT LEFT 1 13 1 1 0 I/O 0 I/O Shift Left Four SL 4 SHIFT LEFT 4 15 1 1 0 I/O 0 I/O Shift Right One SR 1 SHIFT RIGHT 1 12 1 1 0 110 0 1 Shift Right Four SR 4 SHIFT RIGHT 4 14 1 1 0 I/O 0 1 Branch Instructions (In All Conditional Branches, PO (PO) + 2 if the Test Conditions Are Not Met. Execution Is Complete in 30 Cycles.) Mnemonic Machine Status Bits Operation OP Code Operand Function Code Byte. Cycle. OVF ZERO CRY SIGN Branch on Carry BC aa PO-[(PO)+ 1)+ H'aa' if CRY= 1 82 aa 2 3.5 - - - - Branch on Positive BP aa PO-[(PO)+ 1)+ H'aa' if SIGN= 1 81 aa 2 3.5 - - - - Branch on Zero BZ aa PO-[(PO) + I) + H'aa' if ZERO = 1 84 aa 2 3.5 - - - - Branch on True BT t,aa PO-[(PO) + I) + H'aa' if any test is true 8t aa 2 3.5 - - - - t=TEST CONDITION I 22 I 2' I 2° I IZERO I CRY I SIGN I Branch if Negative BM aa PO-[(PO)+ 1)+ H'aa' if SIGN = 0 91 aa 2 3.5 - - - - Branch if No Carry BNC aa PO-[(PO) + I) + H'aa' if CARRY", 0 92 aa 2 3.5 - - - - Branch if No Overflow BNO aa PO-[(PO)+ 1)+ H'aa' if OVF=O 98 aa 2 3.5 - - - - Branch if Not Zero BNZ aa PO-[(PO)+ 1)+ H'aa' if ZERO=O 94 aa 2 3.5 - - - - Branch if False Test BF t,aa PO-[(PO)+ 1)+ H'aa' if all false test bits 9t aa 2 3.5 - - - - t = TEST CONDITION I 23 1 22 I 2' I 2° I I OVF IZERO I CRY I SIGN I Branch if ISAR (Lower) 7 BR7 aa PO-[(PO)+ 1)+ H'aa' if ISARLH 8F aa 2 2.5 - - - - PO-(PO)+2 if ISARL=7 2.0 - - - - Branch Relative BR aa PO-[(PO)+ 1)+ H'aa' 90 aa 2 3.5 - - - - Jump· JMP aaaa PO-H'aaaa' 29 aaaa 3 5.5 - - - - Memory Reference Instructions (In All Memory Reference Instructions, the Data Counter Is Incremented DC-DC.1.) Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF ZERO CRY SIGN Add Binary AM ACC-(ACC) + [(DC)) 88 1 2.5 110 I/O I/O I/O Add Decimal AMD ACC-(ACC)+ [(DC)] 89 1 2.5 I/O 110 I/O I/O AND NM ACC-(ACC) A [(DC)) 8A 1 2.5 0 110 0 I/O Compare CM [(DC)) + (ACC) + 1 80 1 2.5 I/O I/O I/O 110 Exclusive OR XM ACC-(ACC) .. [(DC)) 8C 1 2.5 0 110 0 I/O Load LM ACC-[(DC)) 16 1 2.5 - - - - Logical OR OM ACC-(ACC) V [(DC)) 8B 1 2.5 0 I/O 0 I/O Store ST (DC)-(ACC) 17 1 2.5 - - - - ·Prlvlleged instruction Note JMP and PI change accumulator contents to the high byte address. 4-16 F3870 Table 3 F3870 Instruction Set (Con!.) Address Register Group Instructions Mnemonic Machine Statu. Bit. Operation OP Code Operand Function Code Byte. Cycle. OVF ZERO CRY SIGN Add to Data Counter ADC DC-(DC)+ (ACC) 8E 1 2.5 - - - - Call to Subroutine PK" P-(PO); POU-(r12); PL-(r13) OC 1 4 - - - - Call to Subroutine Immediate PI" aaaa P-(P); PO- H'aaaa't 28 aaaa 3 6.5 - - - - Exchange DC XDC DC-DC1 2C 1 2 - - - - Load Data Counter LR DC,Q DCU-(r14); DCL-(r15) OF 1 4 - - - - Load Data Counter LR DC,H DCU-(r10); DCL-(r11) 10 1 4 - - - - Load DC Immediate DCI aaaa DC-H'aaaa' 2A aaaa 3 6 - - - - Load Program Counter LR PO,Q POU-(r14); POL-(r15) OD 1 4 - - - - - - - - II Load Stack Register LR P,K PU-(r12); PL-(r13) 09 1 4 Return From Subroutine POP" PO-(P) 1C 1 2 - - - - Store Data Counter LR Q,DC r14-(DCU); r15-(DCL) OE 1 4 - - - - Store Data Counter LR H,DC r10-(DCU); r11-(DCL) 11 1 4 - - - - Store Stack Register LR K,P r12-(PU); r13-(P) 08 1 4 - - - - Scratchpad Register Instructions (Refer to Scratch pad Addressing Modes.) Mnemonic Machine Statu. Bit. Operation OP Code Operand Function Code Byte. Cycle. OVF ZERO CRY SIGN Add Binary AS r ACC-(ACC) + (r) Cr 1 1 1/0 110 1/0 110 Add Decimal ASD r ACC-(ACC)+ tr) Dr 1 2 1/0 110 1/0 1/0 Decrement DS r r-(r) + H'FF 3r 1 1.5 1/0 1/0 1/0 1/0 Load LR A,r ACC-(r) 4r 1 1 - - - - Load LR A,KU ACC-(r12) 00 1 1 - - - - Load LR A,KL ACC-(r13) 01 1 1 - - - - Load LR A,QU ACC-(r14) 02 1 1 - - - - Load LR A,QL ACC-(r15) 03 1 1 - - - - Load LR r,A r-(ACC) 5r 1 1 - - - - Load LR KU,A r12-(ACC) 04 1 1 - - - - Load LR KL,A r13-(ACC) 05 1 1 - - - - Load LR QU,A r14-(ACC) 06 1 1 - - - - Load LR QL,A r15-(ACC) 07 1 1 - - - - AND NS r ACC-(ACC) A (r) Fr 1 1 0 1/0 0 1/0 Exclusive OR XS r ACC-(ACC)., (r) Er 1 1 0 1/0 0 1/0 Miscellaneous Instructions Mnemonic Machine Statu. Bits Operation OP Code Operand Function Code Byte. Cycle. OVF ZERO CRY SIGN Disable Interrupt DI RESET ICB 1A 1 2 - - - - Enable Interrupt" EI SET ICB 1B 1 2 - - - - Input IN aa ACC-(INPUT PORT aa) 26 aa 2 4 0 1/0 0 1/0 Input Short INS a ACC-(INPUT PORT a) Aa 1 4""" 0 1/0 0 1/0 Load ISAR LR IS,A ISAR-(ACC) OB 1 1 - - - - Load ISAR Lower LlSL a ISARL-a 01101a"" 1 1 - - - - Load ISAR Upper LlSU a ISARU-a 01100a"" 1 1 - - - - 1/0 Load Status Register" LR W,J W-(r9) 1D 1 2 1/0 1/0 110 No·Operation NOP PO-(PO)+ 1 2B 1 1 - - - - Output OUT aa OUTPUT PORT aa-(ACC) 27 aa 2 4 - - - - Output Short OUTS a OUTPUT PORT a-(ACC) Ba 1 4""" - - - - Store ISAR LR A,IS ACC-(ISAR) OA 1 1 - - - - Store Status Register LR J,W r9-(W) 1E 1 1 - - - - *Privileged instruction ""3·bit octal digit "" "Two machine cycles for CPU ports tContents of ACC destroyed 4·17 F3870 Table 3 F3870 Instruction Set (Cont.) Notes Each lower case character represents a hexadecimal digit. J scratchpad register #9 Each cycle equals four machine clock periods. K registers #12 and #13 Lower case denotes variables specified by the programmer. KL register #13 KU registe'r #12 Function D811"ltons PO program counter is replaced by POL least significant eight bits of program counter () the contents of POU most significant eight bits of program counter (-) binary ones complement of P stack register + arithmetic add (binary or decimal) PL least significant eight bits of program counter m logical OR exclusive PU most significant eight bits of active stack register A logical AND a registers #14 and #15 V logical OR inclusive aL register #15 H'#' hexadecimal digit au register #14 scratchpad register (any address through 11) Register Names W status register a address variable A accumulator Scratchpad Addressing Modes (Machine Code Format) DC data counter (indirect address register) r= C (hexadecimal) register addressed by ISAR (unmodified) DCl data counler #1 (auxiliary data counter) r= 0 (hexadecimal) register addressed by ISAR; ISARL incremented DCL least significant eight bits of data counteraddressed r= E (hexadecimal) register addressed by ISAR; ISARL decremented DCU most significant eight bits of data counter addressed r= F (no operation performed) H scratchpad register #10 and #11 r= O-B (hexadecimal) register 0 through 11 addressed directly from the i and ii immediate operand instruction ICB interrupt control bit IS indirect scratchpad address register Status Register ISAR indirect scratchpad address register no change in condition ISARL least significant three bits of ISAR 1/0 is set to 1 or 0, depending on conditions ISARU most significant three bits of ISAR CRY carry flag Mask Options The ROM array may contain object program code and/or 3. Input/output ports 0 and 1 can be specified either tables of nonvarying data. Every F3870 is implemented cleared or unaltered following an external reset. using a custom mask that specifies the state of every 4. External interrupt and external reset can be specified to ROM bit, as well as certain address mask options that are have or omit an internal pull·up resistor. ,external to the ROM array. The following mask options are 5. The I/O port output option choices are: the standard specified: pull·up (option A), the open drain (option B), and the driver pull·up (option C). 1, The 1024, 2048, 3072, or 4096 bytes of ROM storage. This reflects programs and permanent data tables The format for mask options must be submitted to stored in the PSU memory. Fairchild Microprocessor Division before device 2. Input/output ports can be any of the following three manufacture. The data,to be stored in permanent memory configurations: may be submitted in the form of an EPROM or a. Standard pull·up HP2644/HP264S cartridge (Formulator format only), Other b. Open drain options must be specified on the Fairchild ROM Code c. Direct drive Entry Form, available from a Fairchild representative. 4·18 F3870 Fig. 7 Programmable Registers and Ports ACCUMULATOR I A I Ii I I Ie I I STATUS BYTE ADDRESS REGISTER W SCRATCH PAD DEC HEX OCT 0 z S 0 4 3 I I INDIRECT SCRATCHPAO ADDRESS IS REGISTER 11 11 HU 10 A 1~ AUX DATA COUNTER lOCI H 1 11 13 1 Hl KU 12 11 1 Kl 13 "IS 1 DATA COUNTER I DC 0 1 1 au al " IS 16 17 16 10 20 11 STACK REGISTER I P S8 3A 72 11 S9 3. 73 PROGRAM COUNTER I PO 60 61 3C 3D 7' 7S 62 3E 76 63 3' 77 .,NARV I/O PORT 0 PORT 7 TIMER INTERRUPT CONTROL PORT 6 I/O PORT 1 PORT I/O PORT. I ~--------~~~ I/O PORT S 4·19 Fig. 8 Programmiag Medel OUTS 7 r--------------------------.~I AOC INS·7 el ~. • ST..A.T.V.S.,-- LNO Ol • . ~ OUTS 6 INS~6 1PO) tSAR OUTS P. (P 0.1.4,5) 110 5 V VOLTS lOGIC'O' lISU INS"P,-,P 0.1.4.5) POATS ON I/O (4) PINS SCRATCHPAO REGISTERS AYX DATA ,.0 COUNTER LA .... Iii I. I I I (90) ~ (IS)3:1. + os· .... I.... PROGRAM o ROM HEX OCTAL * These instructions sel status • • (00 < The "alue of the externat Inle:f'JUpt input is tHded 10 bit .7 of the accumulator (with bits 0 throu9h 6 loaded with UfOS) when the klsttucHon 'INS 6' is execLited. This insthlction -Ilso sets status. _ _ _ _.......,1 RESET t,.l1$f.,..P09 to P and tt po, p. DC, and DC1 .... 12·bU registers. then clears PO, 1C8 -bit 01 W. EXTERNAL INTERRUPT and¥orts 4. 5,6, and 7. INPUT ( ..S-V '" LOGIC 1) Note: The instructions PI and PI< are shown in two sequential parts (PI1, PI2, and PK1, PK2). F3870 Supplementary Notes This nomenclature is used to be consistent with the For total software compatibility when expanding into a assembly language mnemonics. multi·chip configuration, the F3871 Peripheral Input/Output circuit should be used. The F3871 has the For the F3870, execution of an INS or OUTS instruction same improved timer (binary count, readable, and three requires two machine cycles for ports 0 and 1, whereas modes of operation) and ready strobe outputs as ports 4 and 5 require four machine cycles. the F3870. When an external reset of the F3870 occurs, PO pushes The interrupt control bit of the status register is into P and the old contents of P are lost. It must be automatically reset when an interrupt request is noted that an external reset is recognized at the start of acknowledged. It is then the programmer's responsibility the machine cycle and not necessarily at the end of an 4 to determine when the ICB is again to be set (by instruction. Thus, if the F3870 is executing a multi·cycle executing the E1 instruction). This action prevents an instruction, that instruction is not completed and the interrupt service routine from being interrupted unless contents of P upon reset may not necessarily be the the programmer so desires. address of the instruction that would have been executed next. It may, for example, point to an When reading the interrupt control port (port 6), bit 7 of immediate operand if the reset occurred during the the accumulator is loaded with the actual logic level second cycle of an L1 or C1 instruction. Additionally, being applied to the EXT INT pin, regardless of the several instructions (JMP, P1, PK, LR, PO and Q) as well status of ICP bit 2 (the EXT INT active level bit); that is, if as the interrupt acknowledge sequence modify PO in the EXT INT pin is at + 5 V, bit 7 of the accumulator is parts. That is, they alter PO by loading first one part, then set to a logic 1, but if the EXT INT pin is at ground, the other, and the entire operation takes more than one accumulator bit 7 is reset to logic O. cycle. Should reset occur during this modification process, the value pushed into P is part of the old PO In Table 3, the number of cycles shown is "nominal (the as·yet unmodified part) and part of the new PO machine cycles." A nominal machine cycle is defined as (already·modified part). Thus, care should be taken 4 q, clock periods, thus requiring 2/1-s for a 2 MHz clock (perhaps by external gating) to ensure that reset does not frequency (4 MHz external time base frequency). occur at an undesirable time if any significance is to be given to the contents of P after a reset occurs. Table 3 also uses the following nomenclature for register names: F8 -F3870 PC o = PO Program Counter PC 1 = P Stack Register DC c = DC Data Counter DC 1 = DC1 Auxiliary Data Counter 4·21 F3870 Timing Characteristics The F3870 timing characteristics are described in Table 4 and illustrated in Figures 9 and 10. Table 4 Timing Characteristics Signal Symbol Characteristic Min Max Unit Notes to(EX) Time Base Period, All External Modes 250 1000 ns XTL 1 XTL 2 tEx(H) External Clock Pulse Width, high 90 700 ns 4 MHz-1 MHz tEx(L) External Clock Pulse Width, low 100 700 ns eI> tel> Internal eI> Clock Period 2tel> 4tel> Short Cycle WRITE tw Internal WRITE Clock Period Stel> Long Cycle 50 pF Plus One t dllO Output Delay from Internal WRITE Clock 0 1000 ns I/O TTL Load t sllO Input Setup Time to WRITE Clock 1000 ns tllOS Output Valid to STROBE Delay 3~ -1 00 3t~ +2 0 ns Note 1 STROBE tSL STROBE low Time 8t~ 12~ ns -20 +20 RESET tRH RESET Hold Time, low St~ ns + 70 Stel> To Trigger EXT INT Hold Time, Active. State ns + 750 Interrupt EXTINT tEH To Trigger Timer; EXT INT Hold Time, Inactive State 2tel> ns Note 2 Unmeasured Pins Input Capacitance: C IN 7 pF Returned to Vss; I/O Ports, RESET, EXT INT Note 4 Unmeasured Pins CXTL Input Capacitance: XTL 1, XTL 2 23.5 29.5 pF Returned to Vss; Note 4 Notes 1. 1/0 load is 50 pF plus one standard TTL input; S'i'RciiiE load is 50 pF plus three standard TTL inputs. 2. Specification is applicable when the timer is in the interval limer mode. 3. TA=O·C to +70·C, Voo= +5 V±10%, 1/0 power dissipation '" 100 mW, unless otherwise noted. 4. TA=25·C, f=2 MHz. 4·22 F3870 Fig. 9 Timing Diagrams EXTERNAL CLOCK INTERNAL (b CLOCK • liD PORT OUTPUT --""\\ r-- LtRH·-J EXT INT { ICPBIT dt-: L ICP BIT 2"' ---:I tEH Note All measurements are referenced to VIL max, VIH min, VOL max, or VOH min 4·23 F3870 Fig. 10 Port Input/Output Timing Diagrams A. Input on Port 4 or 5 INTERNAL WRITE CLOCK IN OR INS PORT ADDA. PORT DATA NEXT OPCOOE PLACED ON DRIVEN ON TO OPCODE FETCHED DATA BUS DATA BUS FETCHED PORTPIN$ ·Cycle timing shown for 4 MHz external clock B. Output on Port 4 or 5 INTERNAL WRITE CLOCK OUT OR OUTS PORT AODR. ACCUMULATOR NEXT OPCODE ON DATA CONTENTS OPCODE FETCHED BUS ON DATA BUS FETCHED POATPINS ----+--' STAYS LOW STRoiIE FOR TWO WRITE CYCLES (ACTIVE FOR PORT 4 ONLY) tI/O-S 500 ns' MIN ·Cycle timing shown for 4 MHz external clock c. Input on Port 0 or 1 D. Output on Port 0 or 1 INTERNAL INTERNAL WRITE WRITE CLOCK CLOCK PORT PINS ----+--' ·Cycle timing shown for 4 MHz external clock ·Cycle timing shown for 4 MHz: external clock 4·24 F3870 IiIC Characteristics Absolute Maximum Ratings The dc characteristics of the F3870 are described in These are stress ratings only, and functional operation at Table 5. these ratings, or under any conditions above those indicated in this data sheet, is not Implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. Voltage on any Pin with Respect to -1.0V, +7V • Ground (Except Open-Drain Pins) Voltage on any Open-Drain Pin -1.0V, +13.2V Power Dissipation 1.5W Ambient Temperature Under Bias O'C, + 70 'C Storage Temperature - 55'C, + 150'C "abla 5 DS Charaoterlstlcs TA=O'C to + 70'C, Vee= + 5 V;l:.10%, 1/0 power dissipation :;;100 mW &ymbO.1 Characteristic Min Max Unit Conditions lee Power Supply CurreAt 100 mA Outputs Open Po Pewer Dissipation 550 mW Outputs Open VIHEX External Cleck Input HIGH Vol·tage 2.4 5.8 V VII-HEX External Clock Input LOW Voltage -0.3 0.6 V IHEX External Clock I·nput HIGH Current 100 p.A VIHEX :;:2.4 V IILEX External Cleck Input LOW CurreAt -100 p.A VILEX =0.6 V VIH Input HIGH Vol-tage 2.0 5.B V VIL Input LOW Voltage -0.3 O,B V Input HIGH Current ('Except Open-Drain IIH 100 p.A V IH = 2.4 V, Internal Pull-Up aAd Direct-I!),rive 110 Ports) Input LOW Current (-Except Open-Drain IlL -1.6 mA V IL =0.4 V ana Direct-E>rive Ports) ILoa Leakage CurreRt (OpeR-Drain Ports) ;1:.10 p.A Pull·Down, Device Off, VOH=13.2 V Output HIGH Current (Except IOH -100 p.A VoH =2.4 V Open-Drain and Direct-Drive Perts) 10HDD Output Drive Current (Direct-Drive Ports) -1.5 -B.O mA VoH =0.7 V to 1.5 V 10L Output LOW Current 1.B mA Vo \.=O.4 V IOHS Out-put HIGH Current (STROBE Output) -300 p.A Vo H=2.4 V 10LS Output LOW Current (STROBE Output) 5.0 mA Vo\.=0.4 V 4-25 F3870 Ordering Information Order Code Package Temperature Range' F3870DC Ceramic C F3870Dl. Ceramic l. F3870DM Ceramic M F3870PC Plastic C F3870Pl. Plastic L F3870PM Plastic M 'C", CommerCIal Temperature Range O'C to + 70'C L", Limited Temperature Range ~40'C to +85'C M:= Military TempE1rature Range - 55'C to + 125'C 4·26 F3870AlF3870B High-Speed Single-Chip Microcomputer Advance Product Information Microprocessor Product Description The Fairchild F3870A and F3870B are advancements in the F3870 series of single-chip microcomputers. The F3870A and F3870B offer higher instruction execution speed, thereby improving the throughput of the microcomputer. • Fully Hardware- and Software- Compatible with the F3870 Series of Microcomputers • • The F3870A Offers An Instruction Cycle Time of 1.33 "sec, and the F3870B Cycle Time is 1 "sec. • Mask Option Internal Clock Divider Clock Crystal Frequency Without With Cycle Unit Internal + 2 Internal + 2 Time F3870 4 MHz F3870A 3 MHz 6 MHz F3870B 4 MHz 8 MHz For additional information, see the F3870 data sheet 4-27 F3870AI F3870B 4-28 F38C70 Single-Chip Microcomputer Microprocessor Product Description Connection Diagram 40-Pin DIP The Fairchild F38C70 8-bit single-chip microcomputer is a member of the F387X series; it executes all of the F8 instruction set and is software-compatible with the F3870. XTLl Vee Additional power-save instructions provide two different XTl2 RESET power-save modes. POo EXT INT P'o Implemented in ion-implanted CMOS doublepoly silicon- po, p,. gate technology, the F38C70 offers maximum cost effec- PII:J P'2 tiveness in a wide range of applications requiring very low STROBE Ph power consumption. More than 70 commands of the F8 instruction set are executed by the single-chip microcomputer, which features 2048 bytes of ROM, 64 bytes of scratch pad RAM, a pro- 1'40 P4i P42 I'4i P50 ps, P52 1'53 II grammable timer, 32 bits of 1/0, and a single + 5 V P54 power supply. P5s P56 • Single CMOS Integrated Circuit P57 • Software-Compatible with F8 and F3870 Ph • 2048-Byte Mask Programmable ROM P06 P'6 • 64·Byte Scratch pad RAM P05 ~/Ao • 32-Bit 1/0 with Four Options PO, • 8·Bit Programmable Timer with 16-Bit Vss TEST Programmable Prescaler • External Interrupt (Top View) • Crystal, LC, RC, or External Clock • Single + 5 V (:t 10%) Power Supply • Power·Save (PS) and Power-Save All (PSA) Modes • Option for all Short Machine Cycles Signal Functions • Direct Replacement for F3870 • Low Power (50 mW typ., 5 mW in PS mode, {~ XTL1 CLOCK ___ XTL, 0.5 mW in PSA mode) 110 PORT PORT ADDRESS INTERRUPTI RESET STROBE TEST Vcc~ Vss ....- l POWER L-_ _ _ _---I 4-29 F38C70 Figure 1 Block Diagram INTERRUPT ADDRESS VECTOR XTL2-1 XTL 1 -2 RESET-39 TEST-21 i'00-3 PO;-4 ROM ;:;0;-5 ADDRESS I/O PORTO ;;0;-6 REGISTERS PO, P, DC, DC1 P04-19 FiOS-18 POe-17 L..,._ _ _.....JI4--- P07-16 INDIRECT SCRATHPAD ADDRESS ~~~" ii"i':;-36 ii12-35 P1;-34 REGISTER --~-22 P1,-23 P16_24 ..........--. P1 7-25 P4;,-8 P4;-9 P4;-10 I/O PORT 4 P43-11 P4;-12 P4,-13 ~-14 i>.!;-15 .._~==::;-:-:--= STROBE-7 Ps;;-33 P5,-32 P5,-31 ii5,-30 I/O PORT 5 Ps.;-29 iiSs-28 P5;-27 Ps;-26 4·30 F38C70 Main Control Logic contiguous scratchpad bytes. For example, when the iow- order octal digit is incremented or decremented, the ISAR The instruction register (IR) receives the operation code is incremented from octal 27 (0'27) to 0'20' or is (OP code) of the instruction to be executed from the pro- decremented from 0'20' to 0'27'. This feature of the ISAR is gram ROM through the data bus. Eight bits are latched into very useful in many program sequences. the IR during all OP code fetches. Some instructions are completely specified by the upper four bits of the OP code; All six bits of the ISAR can be loaded at one time, or either in these instructions, the lower four bits are an immediate half can be loaded independently. register address or an immediate 4-bit operand. Once latch- ed into the IR, the main control logic decodes the instruc- The decimal scratch pad registers (9 through 15) are given tion and provides the necessary control gating signals to all mnemonic names (J, H, K, and Q) because of special circuit elements. linkages between these and other registers, such as the • stack register. These special linkages simplify the perfor- , ROM Address Registers mance of multi-level interrupts and subroutine nesting. For Four 12-bit registers are associated with the program ROM: example, the instruction LR K,P stores the lower eight bits program counter PO, stack register P, data counter DCO, of the stack register into register 13 (K lower, or KL) and and auxiliary data counter DC1. The program counter is us- stores the upper three bits of P into register 12 ed to address instructions or immediate operands; the (K upper, or KU). stack register is used to save the contents of PO during an interrupt or subroutine call. Thus, P contains the return ad- Arithmetic and Logic Unit (ALU) dress at which processing is to resume upon completion of After receiving commands from the main control logic, the the subroutine or the interrupt routine. ALU performs the required arithmetic or logic operations (using the data presented on the two input buses) and pro- The data counter is used to address data tables. This vides the result on the result bus. The arithmetic operations register is autoincrementing. Of the two data counters, only performed in the ALU are binary add, decimal adjust, add DCO can access the ROM; however, the XDC instruction with carry, decrement, and increment. The logic operations allows DCO and DC1 to be exchanged. performed are AND, OR, exclusive-OR, ones complement, shift right, and shift left. The ALU also provides four signals Associated with the address registers is a 12-bit adderl presenting the status of the result. These Signals, stored in incrementer. This logic element is used to increment PO status register W, represent the carry, overflow, sign, and or DC when required and to add displacements to PO on zero condition of the operation. relative branches or to add the data bus contents to DCO in the add data counter (ADC) instruction. Accumulator The accumulator (ACC) is the prinicpal register for data Program ROM manipulation within the F38C70. The ACC serves as one in- The microcomputer program and data constants are stored put to the ALU for arithmetic or logic operations; the in the 2048 X 8 byte program ROM. When a ROM access is results of ALU operations are stored in the ACC. required, the appropriate address register (PO or DCO) is gated onto the ROM address bus and the ROM output is Status Register gated onto the main data bus. The first byte in the ROM is The status fY'l) register holds five status flags: location zero. BIT NO. SUMMARY OF STATUS BITS Scratchpad and ISAR OVERFLOW=CARRY1. CARRYs The scratch pad provides 64 8-bit registers that can be used ZERO = ALU7 A KCOs A AlU s A AiJJ 4 11. SIGN ALU311. AiJJ 2 A ALUl 11. AUiO' as general purpose RAM memory. The indirect scratchpad CARRY CARRY = CARRY 1 address register (ISAR) is a 6-bit register used to address SIGN =ALU7 '-----ZERO the 64 registers. All 64 registers can be accessed using the ' - - - - - - OVERFLOW ISAR. In addition, the lower order 12 registers can also be '-------~. INTERRUPT CONTROL BIT directly addressed. The ISAR can be visualized as holding two octal digits. This division of the ISAR is important, since a number of instruc- tions increment or decrement only the least significant three bits of the ISAR when referencing scratch pad bytes through the ISAR. This simplifies referencing a buffer of 4-31 F38C70 Interl'\lpt Control Bit The interrupt control bit (ICB) is used to allow or disallow An output ready strobe is associated with port 4. This flag interrupts in the F38C70. (This bit is not the same as the is used to signal a peripheral device that the F38C70 has two interrupt enable bits in the interrupt control port.) If the just completed an output of new data to port 4. Because ICB is set and the F38C70 interrupt logic communicates an the strobe provides a single low pulse shortly after the out- interrupt request to the CPU section, the interrupt is put operation Is complete, either edge can be used to acknowledged and processed upon completion of the first signal the peripheral. The STROBE signal is also used to re- non-privileged instruction. If the ICB is cleared, an interrupt quest new input information ·from a peripheral by perform- request is not acknowledged or processed until the ICB is ing a dummy output of H'OO' to port 4 after completing the set again. input operation. 1/0 Ports Four output drive options are available for the F38C70 I/O ports. Individual bits of the four I/O ports are configured as The F38C70provides four complete bidirectional input/out- put ports: 0, 1, 4, and 5. In addition, the interrupt control 1. Open drain port Is addressed as port 6, and the binary timer is address- ed as port 7. Ports 8 and 9 are the l6-bit holding register for 2. CMOS 3-state push-pull buffer the timer prescaler. 3. TIL-compatible An output instruction (OUT or OUTS) causes the contents of the ACC to be latched into the addressed port. An input 4. CMOS push-pull buffer instruction (IN or INS) transfers the contents olthe port to the ACC (port 6, an exception, is described in the "Timer For the 3-state push-pull buffer, the I/O pin goes 3-state and Interrupt Control Port") section. The I/O buffers on the when executing an INS instruction to that port and remains F38C70 are logically inverted. in 3-state until an OUTS instruction is executed to that port. Figure 2. Timer and Interrupt Control Port Block Diagram TINIER EXTERNAL CLOCK TINIER TlNlE +2 PRESCALER 8·BIT DOWN COUNTER 1---0-1 1~1~RU~~T BASE n (PORT LATCH NlOOULO-N REGISTER INTERRUPT INT INTERRUPT B-BITS LOGIC REQ CONTROL PORT (PORT 6) 3 2 1 0 __ BIT NO. EVENT COUNTER NlODE ...--.. ... 2 PRESCALE .;. 5 PRESCALE ... 10 PRESCALE __ __ __ ___ p0 0 0 1 01 0 1 0 II IL.=~ 00'"'' '~-"~4" TINIER INTERRUPT ENABLE EXT INT ACTIVE LEVEL EXTERNAL INTERRUPT REQUEST + 20 PRESCALE LATCH .;. 40 PRESCALE _1 1 STARTISTOP TINIER .;. 100 PRESCALE -+- 1 0 .;. 200 PRESCALE + 200 PRESCALE 1 17ANOlpORT 8 AN~ PORTL 1 9-=-O------ PULSE WIDTH/INTERVAL TINIER USE 16·SIT DATA IN 1 llANO PORT 8 OR PORT 9 • 0 EXT INT PORT 8 AND PORT 9 AS PRESCALER VALUE 4-32 F38C70 Timer and Interrupt Control Port prescaler values are.,. 2, .,. 5, .,. 10, .,. 20,'" 40, .,. 100, and The timer is an 8-bit binary down counter that is software- .,. 200. If bits 5, 6, and 7 of the interrupt control port are set, programmable to operate in one of three modes: interval and the contents of either of the two prescaler registers are timer, pulse width measurement, or event counter. As not zero, the timer uses the value that is held in the two shown in figure 2, an 8-bit register (interrupt control port), a registers as a 16-bit prescaler value. programmable 16-bit prescaler, and an 8-bit modulo-N register are associated with the timer. Any of three conditions will cause the prescaler to be reset: The timer mode, prescale value, timer start and stop, active 1. When the timer is stopped by clearing ICP bit 3 level of the EXT INT pin, and interrupt local enable/disable are selected by the proper bit configuration output from the 2. When an output instruction to port 7 (the timer is accumulator to interrupt control port 6 with an OUT or assigned Port Address 7) is executed OUTS instruction. Bits within the interrupt control port are defined as follows: 3. On the trailing edge transition of the EXT INT pin when in the pulse width measurement mode Bit 0 = External interrupt enable Bit 1 = Timer interrupt enable An OUT or OUTS instruction to port 7 loads the contents of Bit 2 = EXT INT active level the accumulator to both the timer and the 8-bit modulo-N Bit 3 = Start/stop timer register, resets the prescaler, and clears any previously Bit 4 = Pulse width/internal timer stored timer interrupt request. The timer is an 8-bit down- Bit 5 = .,. 2 Prescaler control counter clocked by the prescaler in both the interval timer Bit 6 = .,. 5 Prescaler control mode and the pulse width measurement mode. The Bit 7 = .,. 20 Prescaler control prescaler is not used in the event counter mode. The modulo-N register is used as a buffer in all three timer Timer modes. Its function is to save the value that was most recently output to port 7. The F38C70 timer, like the F3870, is an 8-bit programmable down counter. However, the F38C70 has two additional 8-bit Interval Timer Mode registers (ports 8 and 9) that can be accessed by output in- When ICP bit 4 is cleared (logic 0) and at least one prescale structions. These registers can be used to generate very bit is set, the timer operates in the interval timer mode. long interval timer interrupts or any desired prescaler value. When bit 3 of the ICP is set, the timer starts counting down from the modulo-N value. After counting down to H'01', the A special situation exists when reading the interrupt control timer returns to the modulo-N value at the next count. On port with an IN or INS instruction). The accumulator is not the transition from H'01' to H'N', the timer sets a timer in- loaded with the content of the ICP; instead, accumlator bits terrupt request latch. Note that the interrupt request latch o through 6 are loaded with zeros, and bit 7 is loaded with is set by the transition of H'N' in the timer, thus allowing a the logic level being applied to the EXT INT pin. Thus, the full 256 counts if the modulo-N register is preset to H'OO'. status of EXT INT can be determined without needing to service an external interrupt request. This capability is If bit 1 of the ICP is set, the interrupt request is passed on useful in establishing a high-speed polled handshake pro- to the CPU section of the F38C70. However, if bit 1 of the cedure or for using EXT INT as an extra input pin if external ICP is a logic 0, the interrupt request is not passed on the interrupts are not required and the timer is used only in the the CPU section, although the interrupt request latch re- interval timer mode. mains set. If ICP bit 1 is subsequently set, the interrupt request is then passed on to the CPU section. (The inter- The rate at which the timer is clocked in the interval timer rupt request is acknowledged by the CPU section only if mode is determined by the frequency of an internal CI> clock ICB is set.) Only two events reset the timer interrupt re- and by the division value selected for the prescaler. (The in- quest latch: the timer interrupt request is acknowledged by ternal CI> clock operates at one-half the external time base the CPU section, or a new load of the modulo-N register frequency.) Assuming ports 8 and 9 have been loaded with is performed. zeros, if ICP bit 5 is set and bits 6 and 7 are cleared, the prescaler divides CI> by two. In the same manner, if bit 6 or 7 If the modulo-N register is loaded with H'64' (decimal 100), is individually set, the prescaler divides CI> by 5 or 20, the timer interrupt request latch is set at the 100th count respectively. Combinations of bits 5, 6, and 7 may also be following the timer start and the latch is repeatedly set on selected. For example, if bits 5 and 7 are set, while 6 is precise 100-count intervals. If the prescaler is set at .,. 40, cleared, the prescaler will divide by 40. Thus, possible the timer interrupt request latch is set every 4000 CI> clock 4-33 F38C70 periods. For a 2·mHz clock (4-mHz time base frequency), its inactive level. The active level of EXT INT is defined by this produces 2 ms intervals. ICP bit 2: if cleared, EXT INT is active low; if set, EXT INT is active high. If ports 8 and 9 are loaded with zeros, the range of possible intervals is from 2 to 51,200 clock periods (1 "s to 25.6 If ICP bit 3 is set, the prescaler and timer start counting ms for a 2-mHz clock). However, approximately 50 when EXT INT transfers to the active level. When EXT INT periods is a practical minimum, because the time between returns to the inactive level, the timer stops, the prescaler setting the interrupt request latch and the execution of the resets, and, if ICP bit 0 is s.et, an external interrupt request first instruction of the interrupt service routine is at least latch is set. (Unlike timer interrupts, external interrupts are 29 periods (the response time is dependent on how many not latched if the ICP interrupt enable. bit is not set.) privileged instructions are encountered when the request occurs). As in the interval timer mode, the timer can be read at any time and can be stopped at any time by clearing ICP bit 3 To establish time intervals greater than 51,200 clock (the prescaler and ICP bit 1 function as described in the in- periods, the 16-bit prescaler or the timer interrupt service terval timer mode section). The timer still functions as an routine can be used to count the number of interrupts, sav- 8-bit binary down counter with the interrupt request latch ing the result in one or more of the scratchpad registers un- set on the timer's transition from H'01' to H'N' (modulo-N til the desired interval is achieved. Virtually any time value). Note that the EXT INT pin has nothing to do with interval, or several time intervals, can be generated using loading the timer; its action is that of automatically starting this technique. and stopping the timer and of generating external inter- rupts. Pulse widths longer than the prescale value times the The timer is read at any time and in any mode, using an in- modulo-N value are easily measured by using the timer in- put instruction (IN 7 or INS 7), and can take place "on-the- terrupt service routine to store the number of timer fly" without interfering in normal timer operation. Also, the interrupts in one or more scratch pad registers. timer can be stopped at any time by clearing bit 3 of the ICP. The timer holds its current contents indefinitely and The actual pulse duration is typically slightly longer than resumes counting when bit 3 is set again. The prescaler is the measured value, because the prescaler status is not reset whenever the timer is stopped; thus, a series of readable and is reset when the timer is stopped. Thus, for starting arid stopping results in a cumulative maximum accuracy, it is advisable to use a small truncation error. division setting for the prescaler. For a free-running timer in the interval timer mode, the time Event Counter Mode interval between any two interrupt requests can be in error When ICP bit 4 is cleared and all prescale bits (ICP bits 5, by ± 6 clock periods, although the cumulative error over 6, and 7) are cleared, the timer operates in the event many intervals is zero. The prescaler and timer generate counter mode. This mode is used for counting pulses ap- precise intervals for setting the timer interrupt request plied to the EXT INT pin. If ICP bit 3 is set, the timer will latch, but the time out can occur at any time within a decrement on each transition from the inactive level to the machine cycle. (There are two machine cycle types: short, active level of the EXT INT pin. The prescaler is not used in which consist of 4 clock periods, and long, which consist this mode. As in the other two timer modes, the timer can of 6 clock periods.) The Fairchild multi-chip F8 family has be read at any time and can be stopped at any time by a write clock Signal that corresponds to a machine cycle. clearing ICP bit 3, ICP bit 1 functions as previously describ- Interrupt requests are synchronized with the internal write ed, and the timer interrupt request latch is set on. the clock, thus providing the possible ± 6 error. Additional timer's transition from H'01' to H'N' (modulo-N value). errors may arise if the interrupt request occurs while a privileged instruction or multi-cycle instruction is being Normally, ICP bit 0 should be kept cleared in the .event executed. Nevertheless, for most applications, all the above counter mode; otherwise, external interrupts are generated errors are negligible, especially if the desired time interval on the transition from the inactive level to the active level is greater than one ms. of the EXT INT pin. Pulse Width Measurement Mode For the. event counter mode, the minimum pulse width re- When ICP bit 4 is set (logic 1) and at least one prescale bit quired on EXT INT is 2 clock periods and the minimum is set, the timer operates in the pulse width measurement inactive time is 2 clock periods; therefore, the maximum mode. This mode is used to accurately measure the dura- repetition rate is 500 Hz. tion of a pulse applied to the EXTINT pin. The timer is stopped and the prescaler is reset whenever EXT INT is at F38C70 External Interrupts The power-on clear circuitry contains on-Chip sensors to When the timer is in the interval timer mode, the EXT INT monitor various conditions. The following conditions must pin is available for non-timer related interrupts. If ICP bit 0 be satisfied before the power-reset sequence is allowed is set,· an external interrupt request latch is set for a transi- to start: tion from the inactive level to the active level of EXT INT. (The EXT INT signal is an edge-triggered input.) The inter- 1. Supply voltage must be above a certain value, rupt request is latched either until acknowledged by the typically + 3 V to + 4 V. CPU section or until ICP bit 0 is cleared (unlike timer inter- rupt requests that remain latched even when ICP bit 1 is 2. The clocks of the device must be functioning. cleared). 3. The substrate bias must reach a certain level. External interrupts are handled in the same fashion when the timer is in the pulse width measurement mode or in the All three conditions must be met before the power-on clear event counter mode, except that when in the pulse width circuitry initiates a reset cycle. However, these conditions measurement mode, the external interrupt request latch is can be satisfied even with a supply voltage of as low as 3 set on the trailing edge of EXT INT (that is, on the transi- volts. The latest versions of the F38C70 have a modified tion from the active level to the Inactive level). delay circuit that gives a typical delay of 500 ,..s (with a 4 mHz crystal) after the above conditions are met. This is an Interrupt Handling improvement over the earlier F38C70 versions. When either a timer or an external interrupt request is com- municated to the CPU section of the F38C70, it is Since the F38C70 is only guaranteed to operate at a supply acknowledged and processed at the completion of the first voltage of 4.5 V or greater, the user must ensure that the non-privileged instruction if the interrupt control bit of the supply voltage is at least 4.5 V when the F38C70 initiates status register is set. If the interrupt control bit is not set, the reset cycle. For power supplies having a slow rise time, the interrupt request continues either until the interrupt an external RC network can be converted to the external control bit is set and the CPU Section acknowledges the in- reset input of the F38C70 to hold the device in a reset state terrupt or until the interrupt request is cleared (as previous- long enough to allow the power supply to reach a voltage ly described). of 4.5 V. For example: +5V If a timer interrupt request and an external interrupt request occur simultaneously, when the CPU section starts to pro· cess the requests, the timer interrupt is handled first. EXTERNAL RESET F387X When an interrupt is allowed, the CPU section requests that the interrupting element pass its interrupt vector ad- dress to the program counter through the data bus. The vector address for a timer interrupt is H'020'. "the vector ad- dress for external interrupts is H'OAO'. After the vector ad- dress is passed to the program counter, the CPU section sends an acknowledge signal to the appropriate interrupt request latch, which clears that latch. The interrupt service External Reset routine executes; the return address of the original program is automatically stored in stack When the 'RESET signal is taken low, the contents of the register P. program counter are pushed to the stack register and the program counter and the ICB of the status register are Power·On Clear cleared. The original stack register contents are lost. As with power-on clear, ports 4, 5, 6, and 7 are loaded with The F38C70 contains power-on clear circuitry to H'OO'. The contents of all other registers and ports are un- automatically reset the internal logic following the applica- changed. When the RESET signal is taken high, the first tion of external power. Since many variations of power sup· program instruction is fetched from ROM location H'OOOO'. ply circuitry exist, Fairchild cannot guarantee that the power-on clear will operate under every power-up condition. 4-35 F38C70 Figure 3 Clock Configurations ATCUT1-4MHz OPEN EXTERNAL CLOCK Vee Im,l E2JR OPEN * CEXTERNAL (OPTIONAL-CAN -±- BE OMITTED) L_.,t-_ J CEXTERNAL (OPTIONAL) Minimum R=4kO Example with CEXTERNAL = 0 C = 10 pF ± .1.3 pF + CEXTERNAL R=15kO±5% f " 2.9 MHz±26% 1 C '" 20.5 pF ± 2.5 pF +CEXTERNAL f= - - - 2".J[C 1 Minimum L=0.1 mH f MIN " 1.1 RC+65ns Example with CEXTERNAL = 0 Minimum Q = 40 L = 0.3 mH ± 10% Maximum CEXTEANAL = 30 pF f MAX " 1.0 RC+ 15 ns f " 3.0 MHz± 10% Test Logic The TEST pit:! capabilities are impractical for user applica- tions because of timing complexities; however these Special test logic is implemented to allow acceSs to the in- capabilities are sufficient to enable Fairchild to implement ternal main data bus for test purposes. In normal operation, rapid methods for thoroughly testing the F38C70. the TEST pin must be connected to ground. When the TEST signal is set to VO.o' port 4 becomes an output of the inter- Clocks nal data QUs and port .5 becomes a wired-OR input to the in- ternal data bus. The data appearing on the port 4 pins is The time bases for the F38C70 originate from one of four logically true, whereas input data forced on port 5 must be external sources by mask options. These four configura- logically false. When the TEST signal is set to one-half the tions are illustrated in figure 3. External capacitors are not level of Vcc (Vcc/2), the ports act as above and the 2K X 8 required. In all external clock modes, the external time basE program ROM is prevented from driving the data bus. In frequency is divided by two to form the internal clock. this mode, operands and instructions are forced externally The selection of clock configurations is by mask options. through port 5 instead of being accessed from the program ROM. When the TEST signal is in either the Voo/2 or the high state, the STROBE signal ceases its normal function and becomes a cycle clock (identical to the F8 mUlti-chip system write clock, except inverted). 4-36 F38C70 Figure 4 F38C70 Programmable Registers and Ports ACCUMULATOR STATUS BYTE ADORESS ~f::::S=C=R:AT=C=H=P=A=D:=:~OI O:C REGISTER W HEX OCT 7 4 3 0 10 ~~~~¢:: 1 DC1 L--------I 10 01_ 0 H K 1 HHUL 1 KU KL 1" 11 12 A C 11 12 13 l' • 13 0 15 g~1~TER I DC I Q 1 :L U l' 15 16 17 16 1" 20 10 STACK 1 REGISTER L_P_ _ _ _ _ _ _ _...J 58 3A 72 10 0 59 3B 73 PROGRAM COUNTER I PO L-_ _ _ _ _---I I 60 61 3C 30 7' 75 62 3E 76 63 3F 77 7 0 7 0 INTERRUPT CONTROL PORT I PORT 6 0 I I 1/0 PORT 0 I I BINARY PORT 7 1/0 PORT 1 TIMER PRESCALER LSW PORT 8 110 PORT' lSTROBE PRESCALER 110 PORT 5 PORT 9 MSW 4-37 F38C70 Figure 5 PS Instruction PS INSTRUCTION _~r-_'WAKE UP' 1- FETCH INSTRUCTION FROM LOCATION ~ EXTERNAL INTERRUPT EXTERNAL INTERRUPT ENArED EXTERNAL INTERRUPT DISArED. TIMED OUT ~ TIMER INTERRUPT TIMER INTERRUPT ENArED DljBLED ZERO SERVICE EXTERNAL FETCH tlEXT SERVICE TIMER FETCH NEXT INTERRUPT INSTRUCTION INTERRUPT INSTRUCTION Figure 6 PSA Instruction PSA INSTRUCTION I EXTERNAL RESET EXTERNAL INTERRUPT I ~ EXTERNAL INTERRUPT EXTERNAL INTERRUPT FETCH INSTRUCTION ENABLED DISABLED FROM LOCATION ZERO I I SERVICE EXTERNAL FETCH NEXT INTERRUPT INSTRUCTION 4-38 F38C70 Instruction Set Power-Save All Mode When the power-save all instruction (mnemonic PSA, Op The F38C70 executes the entire instruction set of the F3870 code 2F) is executed, the F38C70 halts all its operations family. In addition, two instructions exclusive to the F38C70 and goes into a power-save mode (refer to Figures 5 and 6). allow the F38C70 to further reduce its power consumption The microcomputer is returned to the previous operating by entering into one of two power-save modes. status by an external reset or an external interrupt. Both the timer and prescaler are reset when PSA is executed, except A summary of programmable registers and ports is shown in the event counter mode. in Figure 4. Table 1 lists the F38C70 instruction set and F8·compatible instructions. In returning from either power-save mode, the microcom- puter exercises the interrupt routine or continues with the Power-Save Mode next instruction, depending on whether the interrupt is • When the power-save instruction (mnemonic PS, OP code enabled. 2D) is executed, the F38C70 halts all its operations except the timer and interrupts. The microcomputer is returned to If the return is by an external reset, the microcomputer the operating status by an external reset, an external inter- restarts from the reset mode. rupt, or a timer interrupt (as the timer is timed out). Table 1 F38C70 Instruction Set and Fa-Compatible Instructions Accumulator Group Instructions Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF Zero CRY Sign Add Carry LNK ACC - (ACC) + CRY 19 1 1 1/0 1/0 1/0 110 Add .mmediate AI ii ACC - (ACC) H 'ii' 24ii 2 2.5 1/0 1/0 1/0 1/0 And Immediate NI ii ACC -+ (ACC) H 'ii' 21ii 2 2.5 0 1/0 0 1/0 Clear CLR ACC -+ H'OO' 70 1 1 Compare Immediate CI ii H'ii' 25ii 2 2.5 1/0 1/0 1/0 1/0 Complement COM ACC -+ (ACC) eH'FF' 18 1 1 0 1/0 0 1/0 Exclusive or XI ii ACC -+ (ACC) e H ii 23 ii 2 2.5 0 1/0 0 1/0 Immediate Increment INC ACC -+ (ACC) + 1 1F 1 1 1/0 1/0 1/0 1/0 Load Immediate LI ii ACC -+ H'ii' 20 ii 2 2.5 - - - - Load Immediate Short LIS 1 ACC -+ H'Oi' 7i 1 1 - - - - Or Immediate 01 ii ACC -+ (ACC) V H 'ii' 22ii 2 2.5 0 1/0 0 1/0 Shift Left One SL 1 Shift Left 1 13 1 1 0 1/0 0 1/0 Shift Left Four SL 4 Shift Left 4 15 1 1 0 1/0 0 1/0 Shift Right One SR 1 Shift Right 1 12 1 1 0 1/0 0 1/0 Shift Right Four SR 4 Shift Right 4 14 1 1 0 1/0 0 1/0 4-39 F38C70 Table 1 F38C70 Instruction Set and F8·Compatible Instructions (Continued) Branch Instructions (In all conditional branches, PO (PO) + 2 if the test conditions are not met. Execution is complete in 30 cycles.) Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF Zero CRY Sign Branch on Carry BC aa PO .... [(PO) + 1] + H'aa' if 82 aa 2 3.5 - - - - CRY = 1 Branch on Positive BP aa PO-- [(PO) + 1] + H'aa' if 81aa 2 3.5 - - - - Branch on Zero BZ aa PO -. [(PO) + 1] + H'aa' if 84aa 2 3.5 - - - - Zero = 1 Branch on True BT t,aa PO .... [(PO) + 1] + H'aa'if any test is true 8t aa 2 3.5 - - - - 1 . TEST CONDITION Branch if Negative BM aa PO .... [(PO) + 1] + H'aa'if 91aa 2 3.5 Sign =0 Branch if No Carry BNC aa PO .... [(PO) + 1] + H'aa'if 92 aa 2 3.5 Branch if No Overflow BNO aa Carry 0 '* PO .... [(PO)i + 1] + H'aa' if 98 aa 2 3.5 OVF =0 Branch if Not Zero BNZ aa PO .... [(PO) + 1] + H'aa' if 94 aa 2 3.5 Zero =0 Branch if False Test BF t.aa PO .... [(PO) + 1] + H'aa' if all 9t aa 2 3.5 false test bits 1 = TEST CONDITION 23 122 121 20 1OVF ZERO CRY 1 SIGN Branch If ISAR(Lower)7 BR7 aa PO+- [(PO) + 1]+ H'aa' if ISARL 8Faa 2 2.5 - - - - '!!,7 PO .... (PO) + 2 if ISARL 7 = 2.0 Branch Relative BR aa PO .... [(PO) + 1] + H'aa' 90 aa 2 3.5 Jump' JMP aaaa PO .... H'aaa' 29 aaa 3 5.5 ft Privileged instruction Note JMP and P1 change accumulator contents to the high byte address. 4·40 F38C70 Table 1 F38C70 Instruction Set and FIJ.Compatible Instructions (Continued) Memory Reference Instructions (In all memory reference instructions, the data counter is incremented DC .....DC - 1.) Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF Zero CRY Sign Add Binary AM ACC+-(ACC) + [(DC») 88 1 2.5 1/0 1/0 1/0 1/0 Add Decimal AMD ACC+-(ACC) + [(DC») 89 1 2.5 1/0 1/0 110 1/0 AND NM ACC ..... (ACC)A[(DC)) 8A 1 2.5 0 1/0 0 1/0 COMPARE CM [(DC») + (ACC) + 1 80 1 2.5 1/0 110 110 1/0 EXCLUSIVE OR XM ACC .....(ACC) ED [(DC)) 8C 1 2.5 0 1/0 0 1/0 LOAD LM ACC .....[(DC)) 16 1 2.5 - - -- LOGICAL OR OM ACC .....(ACC) lI[(DC») 8B 1 2.5 0 1/0 0 1/0 STORE ST (DC) .....(ACC) 17 1 2.5 - - -- Address Register Group Instructions Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF Zero CRY Sign Add to Data Counter ADC DC .....(DC) :+- (ACC) 8E 1 2.5 - - - - Call to Subroutine PK P+-(PO)CI>POU .....(r12) + DC 1 4 - - - - PL.....(r13) Call to Subroutine PI aaaa p .....(P) PO"'" H'aaaa' * 28aaaa 3 6.5 - - - - Immediate Exchange DC XDC DCWC1 2C 1 2 - - - - Load Data Counter LR DC,a DCU .....(r14), DCL .....(r15) OF 1 4 - - - - Load Data Counter LR DC,H DCU .....(r10), DCL .....(r11) 10 1 4 - - - - Load DC Immediate DCI aaaa DC ..... H·aaaa' 2Aaaaa 3 6 - - - - Load Program Counter LR pO,a POU .....(r14), POL .....(r15) OD 1 4 - - - - Load Stack Register LR P,K PU .....(r12), PL .....(r13) 09 1 4 - - - - Return From POP PO\P 1C 1 2 - - - - Subroutine Store Data Counter LR a,DC r14 .....(DCU), r15 .....(DCL) OE 1 4 - - - - Store Data Counter LR H,DC r10 .....(DCU), r11 .....(DCL) 11 1 4 - - - - Store Stack Register LR K,P r12 .....(PU), r13 ..... P 08 1 4 - - - - - 4·41 F38C70 Table 1 F38C70 Instruction Set and Fa-Compatible Instructions (Continued) Scratchpad Register Instructions (refer to scratch pad addressing modes.) I Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF Zero CRY Sign Add Binary . AS r ACC(ACC) + (I} Cr 1 1 1/0 1/0 1/0 1/0· Add Decimal ASD r ACC-(ACC) + (r) Dr 1 2 1/0 110 1/0 1/0 Decrement OS r r-(r) + H'FF' Sr 1 1.S 1/0 1/0 1/0 1/0 Load LR A,r ACC-(r) 4r 1 1 - - -- Load LR A,KlJ AC-(r12) 00 1 1 - -- - Load LR A,KL ACC-(r13) 01 1 1 - - -- Load LR A,QU ACC-(r14) 02 1 1 - - -- Load LR A,QL ACC-(r1S) 03 1 1 - - -- Load LR r,A r-(ACC) Sr 1 1 - - -- Load LR KU,A r12-(ACC) 04 1 1 - - -- Load LR KL,A r13-(ACC) OS 1 1 - - -- Load LR QU,A r14-(ACC) 06 1 1 - - -- Load ..- LR QL,A r1S-(ACC) 07 1 1 - - -- And NS r . ACC-(ACC)A(r) Fr 1 1 0 1/0 0 1/0 Exclusive Or XS r ACC-(ACC)$(r) Er 1 1 0 1/0 0 1/0 4-42 F38C70 Table 1 F38C70 Instruction Set and F8-Compatlble Instructions (Continued) Miscellaneous Instructions Mnemonic Machine Status Bits Operation OPCode Operand Function Code Bytes Cycles OVF Zero C~Y $Ign Disable Interrupt Enable Interrupt" 01 EI Reset ICB SET ICB 1A 1B 1 1 2 2 - - - - - - - - Input IN aa ACC - (Input PORT aa) 26aa 2 4 0 110 a 110 - - - Input Short INS a ACC - (Input PORT a) Aa 1 4*** 0 110 0 110 - - - -- • Load ISAR LR IS.A ISAR-(ACC) OB 1 1 Load ISAR Lower lISL a ISARL-a 01101a"" 1 1 Load ISAR Upper Load statusreglster lISU LR a W.J ISARU -a W-(r9) 01100"" 10 1 1 1 2 - - - - 110 110 110 110 No-Operation Nop PO-(PO) +1 2B 1 1 - - - - OUTPUT OUT aa OUTPUT PORT aa ... (ACC) 27 aa 2 4 - -.... ,-- - OUTPUT Short OUTS a OUTPUT PORT a ... (ACC) Ba 1 4**· -' - Store ISAR Store Status Reg LR LR A.15 J.W ACC-(ISAR) r9'" (W) OA 1E 1 1 1 1 - - -- -- -- PoWer Save PS Halt Internal Clock 20 1 -3 - - - - Power Save All PSA Halt Internal Clock and Timer 2F 1 3 - - - - • Privileged instruction ":Jobit octal dlgli ' •• ·Two machine cycles for CPU ports Notes J scratchpad register # Each lower case character represents a hexadecimal digit. K registers #12 and #13 Each cyCle equals four machine clock periods. Kl register #13 Lower case denotes variables specified by programmer. KU register #12 PO program counter Function dellnltlons POL least significant eight bits of program counter POU most significant eight bits of program counter is replaced by P stack register () the content. of Pl least significant eight bits of program counter (.) binary ones complement of PU most significant eight bits of active stack register + arithmetic edd (binary or decimal) a registers #14 and #15 • logical OR exclusive al register #15 logical AND au register #14 logical OR Inclusive r scralchpad/register (any address through 11) H'# hexedecimal digit W status register Regl..... Names Scratchped Add.....ng Model (Machine Code Format) a address variable r = C (hexadecimal) register addressed by ISAR (unmodified) DC A accumulator data counter (Indirect address register) r = 0 (hesadeclmal) register addressed by ISAR, ISARl Incremented r = E (hexadeCimal) Register addressed by ISAR, ISARl decremented DCI data counter 111 (auxiliary data counter) r =F (no operation performed) DCl least significant eight bits of data counter addressed r = ()'B (hexadecimal) register 0 through 11 addressed directly DCU most significant eight bits of data counter addressed from the instruction H scratchpad register #10 and #11 I and II Immediate operand Status Reglst.. ICB interrupt control bit IS Indirect scratchpad address register no change in condition ISAR Indirect scratchpad address register 1110 Is set to 1 or 0 depending on conditions ISARl least significant three bits of ISAR CRY carry flag ISARU most significant three bits of ISAR 443 - - ,_ .. - - ----- - '-~-- Supplementary Not.. For the F38070,eKecutlon ef an INS or OUTS instruction requires two l1;Iachlne cycles for ports a and 1, whereas The interrupt control bit of the status register is ports 4 an 5 require four maehlfle cycles. When an external automatically reset when an Interrupt request is reset of the F38C70 occurs, ~ is stored in P and the old acknowledged. It is then the programmer's responsibility to oontents of II' are lost. Nlilte that an external reset Is determine when iCB wilf again be set (by executing an EI recognized at the start 0f N'le m.hlne cycle and not Instruction). This action prevents an interrupt service routine naeesserily at the end of afl Instl'l:lCtlan. Thus, If the F38C70 from being interrupted, unless the prOgrammer so etesires. is executing a mul1l-cycleiflstNcNon, that Inatructhrm Is not completeC!l, and the canterns af 11', upGn r1!lset, may nlilt When reading the interrupt control port (port 6), bit 7 of·the necessarily be the a\!ldress of the Instructi&1'\ that wauld accumulator 1, loaded with the actual logic level being ap.- have been executed next. They may, flilrexample, paint ta plied to the EXT INT pin, regardless of the status of lOP bit an immediate operand, if N'Ie reset occurreC!l during the se- 2 (the EXT INT active level bit); that is, If EXT INT Is at + 5 cond cycle of an LI or CI Instruction. Alllditionally, several V, bit 7 of the accumulator Is set to a logic 1, but If EXT instructiGlns (JM'P, PI, PK, LPI, ~, 0) as well as the Inter· INT Is at Vss ' the accumulator bit 7 is reseUo logic O. rupt acknowleC!lge s8liluence, meetify PO in parts. That is, they alter PO lily first loadlnil ane part, then the GtfIer part, In the Instruction set summary (table 1), the number of and the efltire operation takes more than Glne cycle. Shliluld cycles shown are nominal machine cycles. A nominal cycle reset occur during this ""edl·ficat·ion prlilCess, the value Is defined as 4 III clock periOds, thus requiring 2 fAS for a stored In II' becomes part of the GIld PO (the not yet 2·mHz clock frequency (4·mHz external time base frequen· modlfleC!l part), and part af tl'le new PO (already modified cy). When deslreet, the long maChine cycles can be altered part). Thus, care sheulEi lie taken (iilerhaps lily external to short machine cycles by mask option. gating) to ensure that reset d_ not IilCcur at an undesirable time, If any si,nmcance is tlil be The following nomenclature for register names Is used for given to the contents af II' after a reset occurs. consistency with the assembly language mnemonics: If desired, theF38C1O can elteci"te all instNctlons in short F8 F38C1O Aegla'er cycles via mask optlofls tG Improve the execu·tian speed of Pee PO program counter the device. PC, P stack register DCa DC data counter DC, DC1 auxiliary data counter 4-44 F38C70 Signal Descriptions The F38C70 input and output signals are described in Table 2. Table 2 F38C70 Signal Descriptions Mnemonic Pin No. Name Description Clock XTL, 1 Clock The time base inputs to which a crystal (1 to 4 mHz), LC XTl:! network, RC network, or an external single-phase clock is connected. " 1/0 Ports POo- P07 3,4,5, Port Address The 32 ports are individually used as either TIL-compatible 6, 19, 18 inputs or as latched outputs. 17,16 P1o- P07 37,36, Port Address 35,34, 22,23, 24,25 P4o- P47 8,9,10, 1/0 Port 11, 12, 13, 14, 15, P5o- P57 33,32, 110 Port 31,30, 29,28, 27, 26 Interrupt/Reset EXTINT 38 External The active state of the external interrupt signal is software Interrupt programmable; it is also used in conjunction with the timer for pulse width measurement and event counting. RESET 39 Reset This input signal is used to reset the F38C70 externally. When the signal is allowed to go low, the F38C70 resets. When subsequently allowed to go high, the F38C70 begins program execution at location H'OOOO'. Strobe STROBE 7 Strobe This output pin, iNhich is normally high, provides a single low pulse after valid data is present on the P4o- P47 pins during an output instruction. . Test TEST 21 Test An input signal used only in testing the F38C70. For normal circuit function, this pin must be connected to ground. Power Vss 20 Ground Common power and signal return Vee 40 Power $upply Power supply input signal, + 5 (± 10%) V 4-45 F38C70 DC Characteristics The, characteristics of the F38C70 are provided in table 3. Table 3 F38C70 DC Charaterllticl TA =0' to 70'C, Vcc =5V ± 10%, I/O Power Dissipatlon:smW Symbol Parameter Min Max Unit Te.t Condltloris Icc Power Supply Current TBD mA Outputs Open Po Power Dissipation TBD mW Outputs Open VIHEX External Clock Input High Voltage 2.4 5.8 V VILHEX External Clock Input Low Voltage -0.3 0.6 V IHEX External Clock Input High Current 100 ,..A VIHEx =2.4 V ILEX External Clock Input Low Current -100 ,..A VILEX = 0.6 V VIH Input High Voltage 2.0 Vcc + 0.3 V VIL Input Low Voltage -0.3 0.8 V IIH Input High Current (except 3- 100 ,..A VIH =2.4 V, internal pull·up state option) IlL Input Low Current (except open -1.6 mA VIL =0.4 V drain and direct drive ports) ILOD Leakage Current ±10 ,..A o " VIN " Vcc 10H Output High Current (except open -100 ,..A VO H=2.4 V drain and direct drive ports) std. IOHDO Output Drive Current (push-pull) -1.5 TBD mA VOH = 0.7 V to 1.5 V IOL Output Low Current 1.8 mA VOL = 0.4 V IOHS Output High Current (STROBE Output) -300 ,..A VOH = 2.4 V IOLS Output Low Current (STROBE Output) 5.0 mA VOL =0.4 V Absolute Maximum Ratlngl Ordering Information These are stress ratings only, and functional operation at Part Temperatura these ratings, or under any conditions above those in· Number Package Range· dicated in this data sheet, is not Implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to F38C70DC Ceramic C stresses greater than those listed may cause permanent F38C70DL Ceramic L damage to the device. F38C70DM Ceramic M F38C70PC Plastic C Temperature (Ambient) Under Bias O'C, + 70'C' F38C70PL Plastic L Storage Temperature - 55'C, + 150°C Voltage on Any Pin with Respect -0.3 V, Vcc +0.3 V F38C70PM Plastic M to Ground (Except Open Drain Pins) ·c = Commercial Temperature Range o·c to + 7O·C Power Dissipation 1W L =Umlted Temperature Range - x prescale value Bit 3 - Start/Stop Timer Bit 4 - Pulse Widthllnterval Timer Interval Timer Mode Bit 5 - ... 2 Timer Prescale Values Single interval error, free-running (note 3) ± 6t Bit 6 - ... 5 Timer Prescale Values Cumulative interval error, free-running (note 3) 0 Bit 7 - -+- 20 Timer Prescale Values Error between two timer reads (note 2) ± (tpsc + t to - (tpsc + t to - (tpsc + 7t to - 8t the EXT INT pin, thus allowing the status of EXT INT to Load timer to stop timer error be determined without the necessity of servicing an (note 1) + t to - (tpsc + 2t to - (tpsc + 8t to - 9t the interval timer mode. Pulse Width Measurement Mode The rate at which the timer is clocked in the interval Measurement accuracy (note 4) + t to - (tpsc + 2t clock and by the division value selected for the prescaler. (The internal clock operates at one-half the Event Counter Mode external time base frequency.) If ICP bit 5 is set and bits Minimum active time of EXT INT pin 2t 6 and 7 are cleared, the prescaler divides by two. Minimum inactive time of EXT INT pin 2t Likewise, if bit 6 or 7 is individually set, the prescaler Not•• divides by 5 or 20, respectively. Combinations of bits 5, 1. All times that entail loading, starting, or stopping the limer are 6, and 7 may also be selected. For example, if bits 5 and referenced from the end of the last machine cycle of the OUT or 7 are set while 6 is cleared, the prescaler divides by 40. OUTS Instruction. 2. All limes that entail reading the timer are referenced from the end of Thus, possible prescaler values are ... 2, ... 5, ... 10, ... 20, the last machine cycle of the IN or INS instruction. -+- 40, +100, and + 200. 3. All times that entail the generation of an interrupt request are referenced from the start of the machine cycle in which the Any of three conditions causes the prescaler to be reset: appropriate interrupt request latch is set. Additional time may elapse if when the timer is stopped by clearing the ICP bit 3, on ,the interrupt request occurs during a privileged or multi-cycle .instruction. execution of an output instruction to port 7 (the timer is 4. Error may be cumulative if operation is repetitively performed. assigned port address 7), or on the trailing edge transition of the EXT INT pin when in the pulse width measurement mode. These last two conditions are explained in more detail below. The desired timer mode, prescale value, starting and stopping the timer, active level of EXT INT pin, and local An OUT or OUTS instruction to port 7 loads the content enabling or disabling of interrupts are selected by of the accumulator to both the timer and the 8-bit outputting the proper bit configuration from the modulo-N register, resets the prescaler, and clears any accumulator to the interrupt control port (port 6) with an previously stored timer interrupt request. As previously OUT or OUTS instruction. Bits within the interrupt noted, the timer is an 8-bit down counter that is clocked control port are defined as follows: by the prescaler in the interval timer mode and in the pulse width measurement mode_ The prescaler is not used in the event counter mode. The modulo-N register is a buffer whose function is to save the value that was most recently output to port 7. The modulo-N register is used in all three timer modes. 4-52 Fig. 4 Timer/Interrupt Functional Diagram FROM INTERRUPT CONTROL PORT 82 I B4 B3 B5 B6 B7 80 181 TIMER INTERRUPT- ~LOADS INTERRUPT VECTOR H '020' UPON COMPLETION OF THE FIRST NON·PRIVILEGED INSTRUCTION ... c:n ACKNOWLEDGE TIMER '" INTERRUPT 'I' =PULSE WIDTH MODE "T1 (0) STROBE RESET EXTINT t tI/O-S tSL tRH tEH Internal Clock Period Port Output to STROBE Delay STROBE Pulse Width, Low RESET Hold Time, Low EXT INT Hold Time, Active State 2to typo 3t-1000 min 3t+ 250 max 8t- 250 min 12t + 250 max 6t+ 750 min 6t+ 750 min ns ns ns ns ns 0.5 p's at 4 MHz ext. time base Note 1 Note 2 • Notes 1. Load is 50 pF plus 1 standard TTL input. 2. Specification is applicable when the timer is in the interval timer mode. See "Timer Characteristics" for EXT INT requirements when in the pulse width measurement mode or the event counter mode. 3. The timing diagrams are given in Figure 8. Fig. 8 Timing Diagrams TEST _23_V_-J ADDRESSES (Ao-A,.) NEXT ADDRESS DATA IN (PORT 5) NEXT DATA PROGRAM (piWG) IAV DATA OUT (PORT 4) DATA VERIFY DATA VERIFY 4·63 F38E70 ProgramlVerify Timing Symbol Parameter Min Max Unit tSET-UP 23 V Applied to PROG 5 ,.S tAS Address Set-up Time 1 ,.s tAH Address Hold Time 1 ,.s tos Data Set-up Time 1 ,.s tOH Data Hold Time 1 ,.s tAV Address to Data Out in Verify 5 ,.s tpv PROG to Data Out in Verify 2 ,.s tpo PROG to Data Out in Programming 5 ,.s tpROG Programming Time 50 ms Note Timing diagrams are given in Figure 9. Fig. 9 Program/Verify Timing Diagrams EXTERNAL CLOCK EXTERNAL + CLOCK 110 PORT OUTPUT I.....- - - I S L f ICP BIT 2=0 ICP BIT2=1 Note All measurements are referenced to VIL max., VIH min., VOL max., or VOH min. 4-64 F38E70 DC Characteristics Vcc=5V ±10%, TA=O·Cto +70·C Symbol Characteristic Min Typ Max Unit Test Conditions Icc Power Supply Current 60 mA Outputs Open Po Power Dissipation 330 mW Outputs Open VIHEX External Clock Input High Voltage 2.4 5.8 V VILHEX External Clock Input Low Voltage -0.3 0.6 V IHEX External Clock Input High Current 100 p,A V IH EX=2.4V • IILEX External Clock Input Low Current -100 p,A V ILEX =0.6 V V IH Input High Voltage 2.0 5.8 V V IL Input Low Voltage -0.3 0.8 V IIH Input High Current 100 p,A VIH = 2.4 V, Internal Pull-Up (Except Open-Drain and Direct·Drive 1/0 Ports) IlL Input Low Current -1.6 mA V IL =O.4 V (Except Open-Drain and Direct-Drive Ports) ILOO Leakage Current (Open-Drain Ports) 10 p,A Pull-Down, Device Off 10H Output High Current -100 p,A VOH=2.4 V (Except Open·Drain and Direct-Drive Ports) 10HOO Output Drive Current (Direct-Drive Ports) -1.5 -8 mA VOH = 0.7 V to 1.5 V 10L Output Low Current 1.8 mA VOL=O.4V 10HS Output High Current (STROBE Output) -300 p,A VOH=2.4 V 10LS Output Low Current (STROBE Output) 5.0 mA Vo L =O.4 V VTEST Test Pin Voltage for ProgramlVerify Mode 23 (±.5) V ITEST Test Pin Current for ProgramlVerify Mode 20 mA VPROG=0.4 V, VTEST=23 V Capacitance TA= 25 ·C, f = 2 MHz Symbol Characteristic Min Max Unit Test Condition CIN Input Capacitance: 1/0 Ports, RESET, EXT INT 7 pF Unmeasured pins returned to GND CXTL Input Capacitance: XTL 1 , XTL2 18 23 pf Typical Thermal Resistance Values Plastic 8JA (Junction to ambient) 60·C/W (still air) 8JA (Junction to case) 42·C/W Ceramic 8JA (Junction to ambient) 48·C/W (still air) 8JA (Junction to case) 33·C/W 4·65 F38E70 Ordering Information Part Number Package Temperature Range" F38E70DC Ceramic C F38E70DL Ceramic L F38E70DM Ceramic M F38E70PC Plastic C F38E70PL Plastic L F38E70PM Plastic M • C = Commercial Temperature Range 0 'C to + 70'C L = limited Temperature Range - 40'C to + 85'C M = Military Temperature Range - S5'C to + 12S'C 4-66 F3872/F38L72 Single·Chip Microcomputer Microprocessor Product Description Connection Diagram The Fairchild F3872 is a complete 8·bit microcomputer 40·Pin DIP on a single MOS integrated circuit. It can execute the F8 instruction set of more than 70 commands, allowing XTl, voo expansion into multi·chip configurations with software XTL2 RESETfiiAMi'RT' compatibility. The device features 64 bytes of scratchpad poo/v •• • EXT tNT RAM, 64 bytes of power·down executable RAM, a POjIVSB* P10 programmable binary timer, 32 bits of 110, a single + 5 V l'O2 P1, power supply requirement, and a choice of 1K, 2K, 3K, or PG, P1, 4K bytes of ROM. A low·power standby option for the STROBE Ph executable RAM is available on the F38L72. Utilizing Fairchild's double-ion-implanted, N-channel silicon·gate technology and advanced circuit design techniques, the single-chip F3870 offers maximum cost 1'40 P4i P42 1'40 i'5O PSi P5, 1'53 II effectiveness in a wide range of control and logic P44 Ps. replacement applications. I'4s I'5s i'46 I'5s The F3872 is an expanded memory version of the F3870 P47 JS5i single-chip microcomputer. It is identical to the F3870 in Po; ffi the following areas: instruction set, architecture, ac and po, P1. dc characteristics, and pinout. The only difference POs P1s between the F3872 and the F3870 lies in the memory po, P1.; expansion and the appropriate memory address registers. vss TEST • Single·chip Microcomputer (Top View) • Same Pinout as F3870 'Programmable pin; function determined by device option (standard or • Software·Compatible with F8 Family standby mode). • 1024',2048',3072·, or 4032·Byte Mask·Programmable ROM • 64·Byte Scratchpad RAM Signal Functions • 32·Bit (4·Port) TTL·Compatible 1/0 • Programmable Binary Timer: The functions of the F3872 inputs and outputs are Interval Timer Mode described in Table 1. Pulse Width Measurement Mode Event Counter Mode • External Interrupt • Crystal, LC, RC, or External Time Base • Low Power (285 mW, Typical) • Single +5 V:!: 10% Power Supply • 64 Additional Bytes of Executable RAM Addressable by Program or Data Counter • Standby Option for Executable RAM Low Standby Power (8.2 mW) 3.2 V Minimum Standby Supply Voltage No External Components Required to Trickle Charge Battery 4-67 F3872/F38L72 Signal Functions Device Organization This section describes the basic functional elements of XTL, ....---.. P40 CLOCK { XTL2 ~P41 the F3872 shown in Figures 1 and 2. ~P42 EXT INT P43 Main Control Logic DEVICE [ RESETI 110 PORT 4 The instruction register (lR) receives the operation code CONTROL RAMPRT' TEST (op code) of the instruction to be executed from the program ROM via the data bus. During all op code fetches, eight bits are latched into the IR. Some instructions are completely specified by the upper four bits of the op code; in such instructions, the lower four 110 PORTO Po3 bits are an immediate register address or an immediate 4-bit operand. Once latched into the IR, the main control logic decodes the instruction and provides the necessary P54 110 PORT 5 control gating signals to all circuit elements. ROM Address Registers Pio There are four 12-bit registers associated with the P11 program ROM of the F3872. (In the F3872-1, -2, and -3, the P12 12-bit registers can address more memory space than is 110 PORT 1 P13 physically available on the chip; user caution is advised.) Pi4 VSB* These are the program counter (PO), the stack register P15 Voo (P), the data counter (DC), and the auxiliary data counter P16 Vse* (DC1). The program counter is used to address P17 Vss instructions or immediate operands. The stack register is used to save the contents of PO during an interrupt or subroutine call. Thus, P contains the return address at which processing is to resume upon completion of the subroutine or the interrupt routine. The data counter is used to address data tables. This register is autoincrementing. Of the two data counters, only DC can access the ROM. However, the XDC instruction allows DC and DC1 to be exchanged. Associated with the F3872 address registers is a 12-bit adderlincrementer. This logic element is used to increment PO or DC when required and is also used to add displacements to PO on relative branches or to add the data bus contents to DC in the add data counter (ADC) instruction. Program ROM The microcomputer program and data constants are stored in the program ROM, which may be 1024x 8 (F3872-1), 2048 x 8 (F3872-2), 3072 x 8 (F3872-3), or 4032 x 8 (F3872-4) bytes. Whena ROM access is required, the appropriate address register (pO or DC) is gated onto the ROM address bus and the ROM output is gated onto the main data bus. The first byte in the ROM is location zero. 4-68 F3872/F38L72 Table 1 Signal Functions Mnemonic Pin No. Name Description Device Control EXTINT 38 External Software·programmable input that is also used in conjunction with the Interrupt timer for pulse width measurement and event counting. RESET/ 39 External Input that, in standard operating mode, may be used to externally reset RAMPRT Reset/RAM the F3872. When pulled low, the F3872 resets; when then allowed Protect to go high, the F3872 begins program execution at program location H'OOOO'. When RAM standby mode is selected, may be used as RAM protect TEST 21 Test Line control. When pulled low, the RAM is disabled and, therefore, protected from any alterations during loss of Voo. An input used only in testing the F3872. For normal circuit operation, TEST is left unconnected or grounded. II Clock STROBE 7 Ready Normally high output that provides a single low pulse after valid data is Strobe present on the P4 a-P4 7 pins during an output instruction. XTL 1, 1, 2 Time Base Inputs to which a crystal (1 MHz to 4 MHz), LC network, RC network, or XTL 2 external single-phase clock may be connected. PO a-P0 7 3-6, 8-19, I/O Ports Thirty-two bidirectional lines that can be individually used as either P1 a-P1 7 22-37 TTL-compatible inputs or latched outputs; POa and P0 1 may also serve P4 a-P4 7 power outputs in standby mode. P5 5-P5 7 Power VBB 3 Substrate Substrate decoupling power pin that is used only when the standby Decoupling option is selected; a 0.01 I'F capacitor is required to provide substrate decoupling; alternative function of POa, which is the standard function. Voo 40 Power +5 V ± 10% power supply Input VSB 4 Standby The RAM standby power supply if the standby option (+ 5.5 V to + 3.2 V) is Power selected; alternative function of P0 1, which is the standard function. Vss 20 Ground Signal and power ground 4-69 F3872/F38L72 Fig. 1 F3872 Architecture ALU 64 x8 ACCUMULATOR SCRATCHPAD voo STATUS REGISTER vss ISAR PROGRAM COUNTER TEST TEST SEOUENCER STACK REGISTER RESE'f POWER·ON RESET DATA COUNTER 0 XTL, CLOCK LOGIC DATA COUNTER 1 XTL2 ROM RAMPRT' EXT INT INTERRUPT LOGIC VSB· VaB· 'Standby Mode Only. 64 x 8 Executable RAM scratch pad bytes via the ISAR. This makes it easy to The upper 64 bytes of the total memory of the F3872 is reference a buffer consisting of contiguous scratch pad RAM. The first byte is at address 4032 decimal ('FCO' bytes. For example, when the low-order octal digit is hexadecimal). As with the ROM, the RAM may be incremented or decremented, the ISAR is incremented accessed by the PO and DC address registers. It may be from octal 27 to 20 or is decremented from octal written to via the store (Sn instruction, and it may be 20 to 27. This feature of the ISAR is very useful in read from via the load (LM) instruction. Additionally, many program sequences. All six bits of the ISAR instructions may be executed from the RAM. A mask- may be loaded at one time, or either half may be programmable standby power option is available in which loaded independently. the 64 x 8 RAM remains powered and protected so that its contents are saved during a loss of the normal circuit Scratch pad registers 9 through 15 (decimal) are given power supply. mnemonic names (J, H, K, and 0) because of special linkages between these registers and other registers, Scratchpad and ISAR such as the stack register. These special linkages The scratch pad provides 64 8-bit registers that may be facilitate the implementation of multi-level interrupts and used as general-purpose RAM. The indirect scratch pad subroutine nesting. For example, the instruction LR K, P address register (ISAR) is a 6-bit register used to address stores the lower eight bits of the stack register in the 64 registers. All 64 registers may be accessed using register 13 (K lower, or KL) and stores the upper four bits the ISAR. In addition, the lower order 12 registers may of P in register 12 (K upper, or KU). The scratchpad is not also be directly addressed. protected by the standby power option. The ISAR can be visualized as holding two octal digits. Arithmetic and Logic Unit (ALU) This division of the ISAR is important, since a number of After receiving commands from the main control logic, instructions increment or decrement only the least the ALU performs the required arithmetic or logic significant three bits of the ISAR when referencing operations (using the data presented on the two input 4-70 F3872/F38L72 Fig. 2 F3872 Block Diagram _vaa- 3" ..........- VDD-40 . -_ _..1-_ _- , - VSS-20 . - - EXT INT -38 ROM ADDRESS REGISTERS po, P, DC, DCl PROGRAM ROM . - - - - - - - , _ XTL,-1 ,.--XTLl-2 _RESET_39 II ~TEST-21 '-;:====~_ PDQ-3 INDIRECT .........-.. POi"-4 _1'02-5 '-___-.J\I SCRATCH PAD 1----'\1 SCRATCHPAD _~-6 ~P04-19 ADDRESS REGISTERS ~P05-18 REGISTER _1'G6-17 ~P07-16 ===: ~P1o-37 .......-..W,-36 :=:~:~! ...-.-.. 'J5l4-22 ....--... ffi-23 ACCUMULATOR ~1'16-24 & ~ffi-25 ~===: .....--..1540-8 ALU STATUS ......-.... P4i-9 _ JI42-10 _ 1f43-11 ~~-,12 ...-..-.... P4s-13 _P46-14 ....--.-. P4'7-15 ::=::::!==~-:---:srROft .--.... PSo-33 -7 .......-.. P51-32 ~P52-31 ~P53-30 Standby Mode Options Only: .....-..... P54-29 • Alternate Function for Pin 4 •• Alternate Function for Pin 3 :=:w.:~~ ...._ _ _ _... ~ P57-26 ••• Alternate Function for Pin 39 buses) and provides the result on the result bus. The CARRY, OVERFLOW, SIGN, and ZERO conditions of the arithmetic operations that can be performed in the ALU result of the operation. are binary add, decimal adjust, add with carry, decrement, and increment. The logic operations that can Accumulator be performed are AND, OR, exclusive-OR, ones The accumulator (ACC) is the principal register for data complement, shift right, and shift left. Besides providing manipulation within the F3872. The ACC serves as one the result on the result bus, the ALU also provides four input to the ALU for arithmetic or logical operation. The signals presenting the status of the result. These results of ALU operations are stored in the ACC. signals, stored in the status register (W), represent the 4·71 F3872/F38L72 Status Register The interrupt control bit (ICB) of the status register may The status register (also referred to as the W register) be used to allow or disallow interrupts in the F3872. This holds five status flags, as follows: bit is not the same as the two interrupt enable bits in the ...-BITNO. interrupt control port (ICP). If the ICB is set and the F3872 interrupt logic communicates an interrupt request STATUS REGISTER (WI to the CPU section, the interrupt is acknowledged and processed upon completion of the first non-privileged instruction. If the ICB is cleared, an interrupt request is SIGN not acknowledged or processed until the ICB is set. I....-~-CARRY 110 Ports ~----ZERO The F3872 provides four complete bidirectional 1/0 ports; ' - - - - - - - - OVERFLOW these are ports 0, 1, 4, and 5. In addition, the interrupt control register is addressed as port 6 and the binary '--_ _ _ _ _ _ _ _ INTERRUPT CONTROL BIT timer is addressed as port 7. An output instruction (OUT or OUTS) causes the contents of the ACC to be latched Summary of Status Bit into the addressed port. An input instruction (IN or INS) OVERFLOW CARRY 7 c±l CARRY s tranSfers the contents of the port to the ACe (port 6 is ZERO ALU7 1\ ALUs 1\ ALU s 1\ ALU 4 an exception that is described later). The 110 pins on the ALU3 1\ ALU~ 1\ ALU, 1\ ALUo F3872 are logically inverted. The schematic of an 1/0 pin and conceptual illustrations of available output drive CARRY CAR RY 7 options are shown in Figure 3. SIGN ALU7 Fig_ 3 110 Port Diagram VDD z . 0 >= 0: :;) PORT 1/0 " ... ... ;;: Z 0: 0 0: 0 PIN 0 0. . U 0. 0: 0 0 0 ::l0: g ~ ! I; STANDARD OPEN CRAIN DIRECT DRIVE OUTPUT OUTPUT OUTPUT Ports 0 and 1 are standard output type only. Ports 4 and 5 may be any of the three output options, each pin Individually assignable to any port. The STROBE output is always configured similar to a standard output, except that it is capable of driving three TTL loads. The RESET and EXT INT pins may have standard S kG (typical) pull-up or may have no pull-up. 4-72 F3872/F38L72 An output ready strobe is associated with port 4. This The desired timer mode, prescale value, starting and flag may be used to signal a peripheral device that the stopping the timer, active level of the EXT INT pin, and F3S72 has just completed a single low pulse shortly after local enabling or disabling of interrupts are selected by the output operation is completely finished, so either outputting the proper bit configuration from the edge may be used to signal the peripheral. This STROBE accumulator to the ICP (port 6) with an OUT or OUTS signal may also be used to request new input instruction. Bits within the ICP are defined as follows: information from a peripheral simply by doing a dummy output of H '00' to port 4 after completing the Interrupt Control Port (Port 6) input operation. Bit O-Externallnterrupt Enable Timer and Interrupt Control Port Bit 1-Timer Interrupt Enable The timer is an S-bit binary down counter that is Bit 2- EXT INT Active Level • software-programmable to operate in one of three Bit 3-Start/Stop Timer ' modes: the interval timer mode, the pulse width Bit 4- Pulse Width/Interval Timer measurement mode, or the event counter mode; the timer Bit 5- + 2 Timer Prescale Values characteristics are described in Tab/e 2. As shown in Bit 6- + 5 Timer Prescale Values Figure 4, associated with the timer is an S-bit register Bit 7- + 20 Timer Prescale Values called the interrupt control port, a programmable prescaler, and iin S-bit modulo-N register; a functional A special situation exists when reading the ICP with an logic diagram is shown in Figure 5. IN or INS instruction. The accumulator is not loaded with Table 2 Timer Characteristics Characteristic Value Interval Timer Mode Single Interval Error, Free-Running (Note 3) ±6tei> Cumulative Interval Error, Free-Running (Note 3) 0 Error Between Two Timer Reads (Note 2) ± (tpsc+ tei» Start Timer to Stop Timer Error (Notes 1, 4) + tei> to - (tpsc + tei» Start Timer to Read Timer Error (Notes 1,2) - 5tei> to - (tpsc + 7tei» Start Timer to Interrupt Request Error (Notes 1, 3) - 2tei> to - Stei> Load Timer to Stop Timer Error (Note 1) + tei> to - (tpsc + 2tei» Load Timer to Read Timer Error (Notes 1, 2) - 5tei> to - (tpsc + Stei» Load Timer to Interrupt Request Error (Notes 1, 3) - 2tei> to - 9tei> Pulse Width Measurement Mode i Measurement Accuracy (Note 4) + tei> to - (tpsc + 2tei» Minimum Pulse Width of EXT INT Pin 2tei> Event Counter Mode Minimum Active Time of EXT INT Pin 2tei> Minimum Inactive Time of EXT INT Pin 2tei> Definitions Error= indicated time value- actual time value tpsc ; t x prescale value Noles 1. All times that entail loading, starting, or stopping the timer are referenced from the end of the last machine cycle of the OUT or OUTS instruction. 2. All times that entail reading the timer are referenced from the end of the last machine cycle of the IN or INS instruction. 3. All times that entail the generation of an interrupt request are referenced from the start of the machine cycle in which the appropriate interrupt request latch is set. Additional time may elapse if the interrupt request occurs during a privileged or multi-cycle instruction. 4. Error may be cumulative if operation is repetitively performed. 4-73 F3872/F38L72 the contents of the ICP; instead, accumulator bits 0 An OUT or OUTS instruction to port 7 loads the contents through 6 are loaded with zeros, while bit 7 is loaded of the accumulator into both the timer and the 8·bit with the logic level being· applied to the EXT INT pin, modulo-N register, resets the prescaler, and clears any thus allowing the status of the EXT INT pin to be previously stored timer interrupt request. As previously determined without the necessity of servicing an external noted, the timer is an 8-bit down counter that is clocked interrupt request. This capability is useful in establishing by the prescaler in the interval timer mode and in the a high-speed, polled handshake procedure or for using pulse width measurement mode. The prescaler is not EXT !NT as an extra input pin if external interrupts are used in the event counter mode. The modulo-N register not required and the timer is used only in the interval is a buffer whose function is to save the value that was timer mode. most recently output to port 7. The modulo-N register is used in all three timer modes. The rate at which the timer is clocked in the interval timer mode is determined by the frequency of an internal Interval Timer Mode - When ICP bit 4 is cleared (logic 0) q, clock and by the division value selected for the and at least one prescale bit is set, the timer operates in prescaler. (The internal clock operates at one-half the the interval timer mode. When bit 3 of the ICP is set, the external time base frequency.) If ICP bit 5 is set and bits timer starts counting down from the modulo-N value. 6 and 7 are cleared, the prescaler divides q, by 2. After counting down to H '01', the timer returns to the Likewise, if bit 6 or 7 is individually set, the prescaler modulo-Nvalue at the next count. On the transition from divides q, by 5 or 20, respectively. Combinations of bits 5, H '01' to H' N', the timer sets a timer interrupt request 6, and 7 may also be selected. For example, if bits 5 and latch. Note that the interrupt request latch is set by the 7 are set while bit 6 is cleared, the prescaler divides by transition of H 'N' in the timer, thus allowing a full 256 40. Thus, possible prescaler values are: -;- 2, -;- 5, -;- 10, counts if the modulo-N register is preset to H'OO'. If bit -;- 20, -;- 40, + 100, and -;- 200. 1 of the ICP is set, the interrupt request is passed to the CPU section of the F3872. However, if bit 1 of the ICP is Any of three conditions cause the prescaler to be a logic 0, the interrupt request is not passed, but the reset: whenever the timer is stopped by clearinglCP interrupt request latch remains set. If ICP bit 1 is bit 3, on execution of an output instruction to port 7 (the subsequently set, the interrupt request is then passed to timer is assigned port address 7), or on the trailing edge the CPU. Only two events can reset the timer interrupt transition of the EXT INT pin when in the pulse width request latch: when the timer interrupt request is measurement mode. These last two conditions are acknowledged by the CPU, or when a new load of the explained in the following paragraphs. modulo-N register is performed. Fig. 4 Timer and Interrupt Control Port Block Diagram EXTERNAL PRESCALER CLOCK TIME BASE 2, 5, 10, 20, 40, 100, or 200 INT REO INTERRUPT CONTROL PORT l (PORT 6) l_ L L 3 2 1 0 . . - BIT NO. EVENT COUNTER MODE ____ I EXTERNAL INTERRUPT ENABLE + 2 PRESCALE ..;. 5 PRESCAlE ---- -4-- 0 I TIMER INTERRUPT ENABLE + 10 PRESCALE +20 PRESCALE ____ _ 0 1 ~ EXT INT ACTIVE LEVEL +40 PRESCALE ____ 1 EXT + 100 PRESCALE ____·1 - - - - . . START/STOP TIMER INT +200 PRESCALE _ 1 L _________________ PULSE WIDTHIINTERVAl TIMER 4-74 Fig. 5 Timer/Interrupt Functional Diagram FROM INTERRUPT CONTROL PORT 82 I 84 83 85 8. 87 80 I 81 '1' SELECTS TIMER INTERRUPT' TIME BASE 'LOADS INTEARUPT VECTOR H '020' UPON COMPLETION OF THE FIRST NON- PRIVILEGED INSTRUCTION ..,. ACKNOWLEDGE .:... 01 TIMER INTERRUPT 'I' = PULSE WIDTH MODE "'TI Co) 011 ....... .IL ~ "'TI EXTERNAL Co) INTERRUPT 011 INPUT ...JL r- ....... N t LOADS INTERAUPT VECTOR H 'DAD' UPON COMPLETION OF THE FIRST NON· PRIVILEGED INSTRUCTION ''01' ACKNOWLEDGE EXTERNAL INTERRUPT II F38721F38L72 Consider an example in which the modulo-N register Pulse Width Measurement Mode - When ICP bit 4 is set is loaded with H '64' (decimal 100). The timer interrupt (logiC 1) and at least one prescale bit is set, the timer request latch is set at the 100th count following the operates in the pulse width measurement mode. This ' timer start, and the timer interrupt request latch is mode is used for accurately measuring the duration of a repeatedly set on precise 100-count intervals. If the pulse applied to the EXT INT pin. The timer is stopped prescaler is set at + 40, the timer interrupt request and the prescaler is reset when the EXT INT pin is at its latch is set every 4000 clock periods; For a 2 MHz inactive level. The active level of EXT INT is defined by clock (4 MHz time base frequencyj, this produces ICP bit 2: if cleared, EXT INT is active-low; if set, EXT 2 ms intervals. INT is active-high. If ICP bit 3 is set, the prescaler and timer start counting when EXT INT transfers to the active The range of possible intervals is from 2 to 51,200 level. When EXT INT returns to the inactive level, the clock periods (1 p,s to 25.6 ms for a 2 MHz clock). timer stops, the prescaler resets, and, if ICP bit 0 is set, However, approximately 50 periods is a practical an external interrupt request latch is set. (Unlike timer minimum because the time between setting the interrupt interrupts, external interrupts are not latched if the ICP request latch and the execution of the first instruction of interrupt enable bit is not set.) the interrupt service routine is at least 29 periods (the response time is dependent upon how many privileged As in the interval timer mode, the timer may be read at instructions are encountered when the request occurs). any time, or may be stopped at any time by clearing ICP To establish time intervals greater than 51,200 clock bit 3, the prescaler and the ICP bit 1 function as periods is simply a matter of using th~ timer interrupt previously described; the timer still functions as an 8-bit service routine to count the number of interrupts, saving binary down counter with the timer interrupt request the result in one or more of the scratchpad registers latch being set on the timer's transition from H '01' to until the desired interval is achieved. With this H' N' (modulo-N value). Note that the EXT INT pin has technique, virtually any time interval, or several time nothing to do with loading the timer; its action is that of intervals, may be generated. automatically starting and stopping the timer and of generating external interrupts. Pulse widths longer than The timer may be read at any time and in any mode using the prescaler value times the modulo-N value are easily an input instruction (IN 7 or INS 7); this may take place measured by using the timer interrupt service routine to on-the-fly without interfering with normal timer operation. store the number of timer interrupts in one or more The timer may also be stopped at any time by clearing scratch pad registers. bit 3 of the ICP. The timer holds its current contents indefinitely and resumes counting when bit 3 is again As for accuracy, the actual pulse duration is typically set. The prescaler, however, is reset whenever the timer slightly longer than the measured value because the is stopped; thus, a series of starts and stops results in a status of the prescaler is not readable and is reset when cumulative truncation error. the timer is stopped. Thus, for maximum accuracy, it is advisable to use a small-division setting for the For a free-running timer in the interval timer mode, the prescaler. time interval between any two interrupt 'requests may be in error by ± 6 clock periods, although the cumulative Event Counter Mode - When ICP bit 4 is cleared and all error over many intervals is zero. The prescaler and timer prescale bits (ICP bits 5, 6, and 7) are cleared, the timer generate precise intervals for setting the timer interrupt operates in the event counter mode. This mode is used request latch, but the time-out may occur at any time for counting pulses applied to the EXT INT pin. If ICP bit within a machine cycle. (There are two types of machine 3 is set, the timer decrements on each transition from cycles: short cycles that consist of four clock periods, the inactive level to the active level of the EXT INT pin. and long cycles that consist of 6 clock periods.) In the The prescaler is not used in this mode but, as in the multi-chip F8 family, there is a signal referred to as the other two timer modes, the timer may be read at any write clock, which corresponds to a machine cycle. time, or may be stopped at any time by clearing ICP bit Interrupt requests are synchronized with the internal 3; ICP bit 1 functions are previously described, and the write clock, thus giving rise to the possible ± 6 error. timer interrupt request latch is set on the timer's Additional errors may arise due to the interrupt request transition from H '01' to H 'N' (modulo-N value). occurring while a privileged instruction or multi-cycle instruction is being executed. Nevertheless, for most Normally, ICP bit 0 should be kept cleared in the event applications, all of the above errors are negligible, counter mode; otherwise, external interrupts are especially if the desired time interval is greater than generated on the, transition from the inactive level to the 1 ms. active level of the EXT INT pin. 4-76 F3872/F38L72 For the event counter mode, the minimum pulse width guarantee that the power-on clear will operate under required on the EXT INT pin is 2 q, clock periods, and the every power-up condition. minimum inactive time is 2 q, clock periods; therefore, the maximum repetition rate is 500 Hz. The power-on clear circuitry contains on-Chip sensors to monitor various conditions. The following conditions External Interrupts must be satisfied before the power-reset sequence is When the timer is in the interval timer mode, the EXT INT allowed to start: pin is available for non-timer-related interrupts. If ICP bit 1. Supply voltage must be above a certain value, typically o is set, an external interrupt request latch is set when + 3 V to + 4 V. there is a transition from the inactive level to the active 2. The clocks of the device must be functioning. • level of the EXT INT pin (EXT INT is an edge-triggered 3. The substrate bias must reach a certain level. input). The interrupt request is latched until either acknowledged by the CPU or ICP bit 0 is cleared (unlike All three conditions must be met before the power-on timer interrupt requests, which remain latched even when clear circuitry initiates a reset cycle. However, these ICP bit 1 is cleared). External interrupts are handled in conditions can be satisfied even with a supply voltage of the same fashion when the timer is in the pulse width as low as 3 volts. The latest versions of the F3872 have a measurement mode or in the event counter mode, except modified delay circuit that gives a typical delay of 500 p's that in the pulse width measurement mode the external (with a 4 MHz crystal) after the above conditions are met. interrupt request latch is set on the trailing edge of the This is an improvement over the earlier F3872 versions. EXT INT input; that is, on the transition from the active level to the inactive level. Since the F3872 is only guaranteed to operate at a supply voltage of 4.5 V or greater, the user must ensure Interrupt Handling that the supply voltage is at least 4.5 V when the F3872 When either a timer or an external interrupt request is initiates the reset cycle. For power supplies having a communicated to the CPU section of the F3872, it is slow rise time, an external RC network can be converted acknowledged and processed at the completion of the to the external reset input of the F3872 to hold the first non·privileged instruction if the interrupt control bit device in a reset state long enough to allow the power of the status register is set. If the interrupt control bit is supply to reach a voltage of 4.5 V. not set, the interrupt request continues either until the interrupt control bit is set and the CPU acknowledges +5V the interrupt or until the interrupt request is cleared as previously described. R If there are a timer interrupt request and an external interrupt request when the CPU starts to process the F3872 EXTERNAL RESET requests, the timer interrupt is handled first. When an interrupt is allowed, the CPU requests that the interrupting element pass its interrupt vector address to the program counter via the data bus. The vector address for a timer interrupt is H '20'; the vector address for an external interrupt is H 'DAD'. After the vector address is External Reset passed to the program counter, the CPU sends an When the RESET input is low, the contents of the acknowledge signal to the appropriate interrupt request program counter are pushed to the stack register and the latch, which clears that latch. The execution of the program counter and the ICB of the status register are interrupt service routine then commences. The return cleared. The original stack register contents are lost. As address of the original program is automatically saved in with power-on clear, ports 4, 5, 6, and 7 are loaded with the stack register, P. H' 00'. The contents of all other registers and ports are unchanged. When RESET is high, the first program Power·On Clear instruction is fetched from ROM location H '0000'. The F3872 contains power-on clear circuitry to automatically reset the internal logic following the Test Logic application of external power. Since many variations SpeCial test logic is implemented to allow access to the of power supply circuitry exist, Fairchild cannot internal main data bus for test purposes. 4-77 F38721F38L72 In normal operation, the TEST pin is unconnected or is Two modes are recommended for powering .oown. In the connected to ground. When TEST is placed at a level of first mode (see Figure 6A), the processor must be from 2.8 V to 3.0 V, port 4 becomes an output of the interrupted early enough to save all necessary data internal data bus and port 5 becomes a wired-OR input to before the Vee falls below the minimum level. After the the internal data bus. The data appearing on the port 4 save is done, the RESETIRAMPRT pin can fall. This pins is logically true, whereas input data forced on port 5 prevents any further RAM accesses; Voo may then fall. must be logically false. When TEST is placed at a high level (8.8 V to 9.0 V), the ports act a~ described above The second mode (see Figure 68) may be used if a and, additionally, the program ROM is prevented from special save data routine is not needed. External driving the data bus. In this mode, operands and interrupt need not be used, and the only requirement to instructions. may be forced externally through port 5 save the RAM data is that RAMPRT be low for Voo drops instead of being accessed from the program ROM. When below 4.5 V. For example, if a few key variables are to be TEST is in either the TTL state or the high state, STROBE stored in power-down RAM and it is desired that these ceases its normal function and becomes a cycle clock be saved during a loss of power, two copies of each (identical to the F8 multi-chip system write clock, except variable are kept with an associated flag in the power- inverted). down RAM; thus, no interrupt and save routine is necessary. The method of updating a variable is Timing complexities render the capabilities associated as follows: with the TEST pin impractical for use in a user application, but these capabilities are sufficient to Clear Flag Word 1 enable Fairchild to implement a rapid method for Update Variable (Copy 1) thoroughly testing the F3872. . Set Flag Word 1 Clear Flag Word 2 Standby Power.Option Update Variable (Copy 2) If the standby power option is not selected, bits 0 and 1 Set Flag Word 2 of port 0 can be read from and written to. If the standby power-down option is selected, port 0 bit 1. is readable Execution may terminate at any time, even during the only; bit 0 remains both readable and writeable via update of a variable of flag word, causing that byte in software, although it is not connected to a package lead. scratchpad to be "bad" data. There is always a "good" The standby power source {Vsel is connected to pin 4. (A data byte that contains either the most recent or next- 0.01 I'F capacitor must be connected to pin 3; the most recent value .of the variable. Any copy of the purpose of this capacitor is to decouple noise coupled to variable in which the flag word is set is a good data byte. the substrate of the circuit when Voo is switched off and While this method significantly encumbers the data on.) Nickel-cadmium batteries (typical voltage of three storage process, it eliminates the need for a power fail series cells is 3.6 V) are recommended for use as the interrupt, which reduces external circuitry and leaves the standby power source, since the F3872 can automatically external interrupt pin completely free for other uses. trickle charge three such cells. If more than three cells in series are used, a charging circuit must be provided In either power-down mode, the RESETIRAMPRT Signal outside the F3872. When the RESET/RAMPRT pin is should be held low until Voo is above the minimum level brought low, the standby RAM (64 8-bit words in PO/DC when power returns. address spaces 4032 to 4096 10, or FC0 16 to FFFlel is disabled from being read from or written to. The RAM itself is also switched from Voo power to the VSB power.. 4-78 F3872/F38L72 Fig. 6 Standby Power Option Modes A. Data Save Routine, Vsa .. 3.2 V VDD SUSTAINED BY CAPACITOR OR BATTERY UNTIL A1mIIT BROUGHT LOW VDD----------~------~ MAIN POWER SUPPLY FAILURE DETECTED EXT INT - - - - - - - - - \ 1 --_/ RESETIRAMPRT -----------~-----~ -_/ II DATA SAVE MUST BE DONE HERE B. No Save Routine, Vsa .. 3.2 V VDD------------~ MAIN POWER / FAILURE DETECTED , _ _ _ _ _ _ _, _ - - - - -.... RAMPRTIRESET-------------~~~ ____________________ ~~----------------------~~ 4·79 F3872/F38L72 F3872 Clocks Fig. 7 F3872 Clock Configurations The time bases for the F3872 may originate from one of Crystal Mode External Mode four external sources; the four external configurations are shown in Figure 7. There is an internal 26.5 pF capacitor between XTL 1 and GND, and also between XTL2 and GND. Thus, external capacitors are not required. In all external clock modes, the external time ATCUT1-4MHz OPEN EXTERNAL base frequency is divided by 2 to form the internal CLOCK + clock. Instruction Set RC Mode LC Mode vee The F3872 executes the entire instruction set of the multi·chip Fa family (F3850 family), as shown in Tab/e 3. Of course,the STORE instruction only accesses memory ~R in locations FFO-FFF (the data counter, however, is incremented each time STORE is executed). * ~ CEXTERNAL (OPTIONAL-CAN BE OMITTED) L_-lf-_J CEXTERNAL (OPTIONAL) A summary of programmable registers and ports is given in Figure 8. Minimum R=4kO Minimum L=O.l mH Minimum Q=40 Also, for convenient reference, a programming model of C = 20.5 pF ± 2.5 pF + CEXTERNAL Maximum CEXTERNAL = 30 pF the F3872 is given in Figure 9. 1 f M1N ", 1.1 RC+65ns C,,10pF±1.3pF+CEXTERNAL Mask Options 1 1 The ROM array may contain object program code and/or f MAX '" 1.0RC+15ns f '" 2".v'[C tables of nonvarying data. Every F3872 is implemented using a custom mask that specifies the state of every Example with CEXTERNAL = 0 Example with CEXTERNAL = ° R,,15kO±5% L,,0.3mH±10% ROM bit, as well as certain address mask options that f '" 2.9 MHz± 26% f '" 3.0 MHz± 10% are external to the ROM array. The following mask options are specified: 1. The 1024, 2048, 3072, or 4096 bytes of ROM storage. This reflects programs and permanent data tables HP2644/HP2645 cartridge (Formulator format only). Other stored in the PSU memory. . options must be specified on the Fairchild ROM Code 2. Input/output ports can be any of the following three Entry Form, available from a Fairchild representative. configurations: a. Standard pull-up Supplementary Notes b. Open drain c. Direct drive For total software compatibility when expanding into a 3. Input/output ports 0 and 1 can be specified either multi-chip configuration, the F3871 Peripheral cleared or unaltered following an external reset. Input/Output circuit should be used. The F3871 has the 4. External interrupt and external reset can be specified same improved timer (binary count, readable, and three to have or omit an internal pull-up resistor. modes of operation) and ready strobe outputs as 5. The I/O port output option choices are: the standard the F3872. pull-up (option A), the open drain (option B), and the driver pull-up (option C). The interrupt control bit of the status register is automatically reset when an interrupt request is The format for mask options must be submitted to acknowledged. It is then the programmer's responsibility Fairchild Microprocessor Division before device to determine when the ICB is again to be set (by manufacture. The data to be stored in permanent executing the E1 instruction). This action prevents an memory may be submitted in the form of an EPROM or interrupt service routine from being interrupted unless the programmer so desires. 4-80 F3872/F38L72 Table 3 F3872 Instruction Set Accumulator Group Instructions Mnemonic Machine Status Bits Operation OP Code Operand Function Code Bytes Cycles OVF ZERO CRY SIGN Add Carry LNK ACC-(ACC)+ CRY 19 1 1 1/0 1/0 110 110 Add Immediate AI ii ACC-(ACC) + H'ii' 24 ii 2 2.5 1/0 1/0 1/0 1/0 AND Immediale NI ii ACC-(ACC) A H'ii' 21 ii 2 2.5 0 1/0 0 1/0 Clear CLR ACC-H'OO' 70 1 1 Compare Immediale CI ii H'ii' + (ACC) + 1 25 ii 2 2.5 110 110 1/0 1/0 Complemenl COM ACC-(ACC) .. H'FF' 18 1 1 0 1/0 0 1/0 Exclusive OR Immediate XI ii ACC-(ACC) .. H'ii' 23 ii 2 2.5 0 1/0 0 1/0 • Increment INC ACC-(ACC)+ 1 IF 1 1 1/0 1/0 .1/0 110 Load Immediale LI ii ACC-H'ii' 20 ii 2 2.5 - - -- - Load Immediate Shari OR Immediale LIS 01 i ii ACC-H'Oi' ACC-(ACC) V H'ii' 7i 22 il 1 2 1 2.5 - 0 - 110 0 - 110 Shift Left One SL 1 SHIFT LEFT 1 13 1 1 0 110 0 110 Shift Left Four SL 4 SHIFT LEFT 4 15 1 1 0 110 0 110 Shift Righi One SR 1 SHIFT RIGHT 1 12 1 1 0 110 0 1 Shlfl Righi Four SR 4 SHIFT RIGHT 4 14 1 1 0 110 0 1 Branch Instructions (In All Conditional Branches, PO (PO) + 2 if the Test Conditions Are Not Met. Execution Is Complete in 30 Cycles.) Mnemonic Machine StatuI Bltl Operation OP Code Operand Function Code Byte. Cycle. OVF ZERO CRY SIGN Branch on Carry BC aa PO-((PO)+ lJ+ H'aa' if CRY= 1 82 aa 2 3.5 - - - - Branch on Posilive BP aa PO-((PO)+ lJ+ H'aa' if SIGN= 1 81 aa 2 3.5 - - - - Branch on Zero BZ aa PO-((PO)+ lJ+ H'aa' if ZERO= 1 84 aa 2 3.5 -- - - - Branch on True BT I,aa PO-((PO)+ lJ + H'aa' if any lesl is Irue 81 aa 2 3.5 - - - I = TEST CONDITION I 22 I 21 I 2° I IZERO ICRY ISIGN I Branch if Negalive BM aa PO-((PO)+ lJ+ H'aa' if SIGN=O 91 aa 2 3.5 -- - - - Branch if No Carry BNC aa PO-((PO)+ lJ+ H'aa' if CARRY"O 92 aa 2 3.5 - - - Branch if No Overflow BNO aa PO-((PO) + lJ + H'aa' if OVF = 0 98 aa 2 3.5 - - - - Branch if Nol Zero BNZ aa PO-((PO)+ lJ+ H'aa' if ZERO=O 94 aa 2 3.5 - - - - Branch if False Tesl BF I,aa PO-((PO)+ lJ+ H'aa' if all false lesl bils 91 aa 2 3.5 - - - - I = TEST CONDITION I 23 I 22 I 21 I 2° I I OVF IZERO I CRY I SIGN I -- Branch if ISAR (Lower) 7 BR7 aa PO-((PO)+ lJ+ H'aa' if ISARL,,7 8F aa 2 2.5 - - - PO-(PO)+2 if ISARL= 7 2.0 - - - Branch Relalive BR aa PO-((PO) + lJ + H'aa' 90 aa 2 3.5 - - - - Jump' JMP aaaa PO-H'aaaa' 29 aaaa 3 5.5 - - - - Memory Reference Instructions ((n All Memory Reference Instructions , the Data Counter (s Incremented DC- DC.1 ) Mnemonic Machine StatuI Bits Operation OP Code Operand Function Code Byte. Cycles OVF ZERO CRY SIGN Add Binary AM ACC-(ACC) + ((DC)] 88 1 2.5 110 110 110 110 Add Decimal AMD ACC-(ACC)+ ((DC)] 89 1 2.5 110 110 110 110 AND NM ACC-(ACC) A ((Dc)J 8A 1 2.5 0 110 0 110 Compare CM [(DC)] + (ACC) + 1 8D 1 2.5 110 110 110 110 Exclusive OR XM ACC-(ACC) .. ((DC)J 8C 1 2.5 0 110 0 110 Load LM ACC-((Dc)J 16 1 2.5 - - - - Logical OR OM ACC-(ACC) V ((DC]) 86 1 2.5 0 110 0 110 Siore ST (DC)-(ACC) 17 1 2.5 - - - - • Pnvlleged ,"slruchon Note JMP and PI change accumulalor conlenls 10 Ihe high byle address. 4·81 F38721F38L72 Table 3 F3872 Instruction Set (Cont.) Address Register Group Instructions Mnemonic Machine Status Bits Ope... tlon OP Code, Ope... nd, Function " Cod. Byte. Cycle. OVF ZERO CRY SIGN Add to Data Counter ADC DC-(DC)+ (ACC) 8E 1 2,5 - - - - Call to Subroutine PK' P-(PO); POU-(r12); PL-(r13) OC 1 4 - - - - Call to Subroutine Immediate PI' aaaa P-(P); PO- H'aaaa'* 28 aaaa 3 6.5 - - - - Exchange DC XDC DC-DC1 2C 1 2 - - - - Load Data Counter LR DC,a DCU-(r14); DCL-(r15) OF 1 4 - - - - Load Data Counter LR DC,H DCU-(r10); DCL-(r11) 10 1 4 - -, - - - Load DC Immediate DCI aaaa· DC-H'aaaa' 2Aaaaa 3 6 - - - Load Program Counter LR PO,a POU-(r14); POL-(r15) 00 1 4 - - - - Load Stack Register LR P,K PU-(r12); PL-(r13) 09 1 4 - - - ~ Return From Subroutine Store Data Counter POP' LR a,DC PO-(P) r14-(DCU); r15-(DCL) 1C OE 1 1 2 4 - - - - -' - --, Store Data Counter LR H,DC r10-(DCU); r11-(DCL) 11 1 4 - - - - Store Stack Register LR K,P r12-(PU); r13-(P) 08 1 4 - - - - Scratchpad Register Instructions (Refer to Scratch pad AddreSSing Modes) Mnemonic Machine Status Bit. Operation OPCode Ope ...nd Function Code Byte. Cycle. OVF ZERO CRY SIGN Add Binary AS r ACC-(ACC)+(r) Cr 1 1 i/O 110 flo 1/0 Add Decimal ASD 'r ACC-(ACC)+(r) Dr 1 2 110 110 1/0 1/0 Decrement oS r r-(r)+ H'FF' 3r 1 1,5 1/0 1/0 1/0 1/0 Load LR A,r ACC-(r) 4r 1 1 - - - - Load LR A,KU ACC-(r12) 00 1 1 - - - - Load LR A,KL ACC-(r13) 01 1 1 - - - - Load LR A,aU ACC-(r14), 02 1 1 - - - - Load LR A,aL ACC-(r15) 03 1 1 - - - - Load LR r,A r-(ACC) 5r 1 1 - - - - Load LR KU,A r12-(ACC) 04 1 1 - - - - Load LR KL,A r13-(ACC) 05 1 1 - - - - Load LR aU,A r14-(ACC) 06 1 1 - - - - Load LR aL,A r15-(ACC) 07 1 1 - - - - ANp NS r ACC-(ACC) A (r), Fr 1 1 0 1/0 0 1/0 Exclusive OR XS r ACC-(ACC) .. (r) Er 1 1 0 1/0 0 1/0 Miscellaneous Instructions Mnemonic Machine Status Bits Op.... tion OP Cod. Ope...nd Function Cod. Byte. Cycle. OVF ZERO CRY SIGN Disable Interrupt 01 RESET ICB 11'. 1 2 - - - - Enable: Interrupt' EI SET ICB 1B 1 2 - - - - Input IN aa ACC-(INPUT PORT aa) 26 aa 2 4 0 110 0 1/0 Input Short INS a ACC-(INPUT PORT a) Aa 1 4'" 0 110 0 ' 110 Load ISAR , LR IS,A ISAR-(ACC) OB 1 1 - - - - Load ISAR Lower LISL a "ISARL-a 01101a" 1 1 - - - - Load ISAR Upper ,LlSlJ a ISARU-a 01100a" 1 1 - - - - Load Status Regis,te,r: ' LR W,J W-(r9) 10 1 2 1/0 110 1/0 110 No-Operation NOP PO-(PO)+ 1 2B 1 1 - - - - Output ," OUT aa OUTPUT PORT aa-(ACC) 27 aa 2 4 - - - - Output Short OUTS a OUTPUT PORT a-(ACC) , Ba 1 4'" - - - - Store ISAR LR A,IS ACC-(ISAR) 01'. 1 1 - - - - StQre Status Register LR J,W r9-(W) 1E 1 1 - - - - ! 'Privileged instructIon ','3·bit octal digit .. 'Two machine cycles for CPU ports *Contents of ACC destroyed 4-82 F3872/F38L72 Table 3 F3872 Instruction Set (Cont.) Nota. Each lower case character represents a hexadecimal digit. scratchpad register 119 Each cycle equals four machine clock periods. K registers '12 and 1113 lower case denotes variables specified by the programmer. Kl register '13 KU register 1112 Function Dallnltons PO program counter is replaced by POL least significant eight bits of program counter () the contents of POU most significant eight bits of program counter (-) binary ones complement of P stack register + arithmetic add (binary or decimal) Pl least significant eight bits of program counter .. logical OR exclusive PU most significant eight bits of active stack register • A logical AND a registers 1114 and #15 V logical OR inclusive al register #15 H',' hexadecimal digit au register '14 r scratchpad register (any address through 11) Regllter Name. W status register a address variable A accumulator Scratchpad Addressing Modes (Machine Code Format) DC data counter (indirect address register) r= C (hexadecimal) register addressed by ISAR (unmodified) DC1 data counter 111 (auxiliary data counter) r= D (hexadecimal) register addressed by ISAR; ISARl incremented DCl least significant eight bits of data counter addressed r= E (hexadecimal) register addressed by ISAR; ISARl decremented DCU most significant eight bits of data counter addressed r= F (no operation performed) H scratchpad register '10 and 1111 r = O-B (hexadecimal) register 0 through 11 addressed directly from the i and ii immediate operand instruction ICB Interrupt control bit IS indirect scratchpad address register Status Raglster ISAR indirect scratchpad address register no change in condition ISARl least significant three bits of ISAR 110 is set to 1 or 0, depending on conditions ISARU most significant three bits of ISAR CRY carry flag When reading the interrupt control port (port 6), bit 7 of For the F3872, execution of an INS or OUTS instruction the accumulator is loaded with the actual logic level requires two machine cycles for ports 0 and 1, whereas being applied to the EXT INT pin, regardless of the ports 4 and 5 require four machine cycles. status of ICP bit 2 (the EXT INT active. level bit); that is, if the EXT INT pin is at + 5 V, bit 7 of the accumulator is When an external reset of the F3872 occurs, PO pushes set to a logic 1, but if the EXT INT pin is at ground, into P and the old contents of P are lost. It must be accumulator bit 7 is reset to logic O. noted that an external reset is recognized at the start of the machine cycle and not necessarily at the end of an In Table 3, the number of cycles shown is "nominal instruction. Thus, if the F3872 is executing a multi-cycle machine cycles." A nominal machine cycle is defined as instruction, that instruction is not completed and the 4", clock periods, thus requiring 2,.s for a 2 MHz clock contents of P upon reset may not necessarily be the frequency (4 MHz external time base frequency). address of the instruction that would have been executed next. It may, for example, point to an Table 3 also uses the following nomenclature for immediate operand if the reset occurred during the register names: second cycle of an L1 or C1 instruction. Additionally, several instructions (JMP, P1, PK, LR, PO and 0) as well F8 -F3872 as the interrupt acknowledge sequence modify PO in PCo= PO Program Counter parts. That is, they alter PO by loading first one part, then PC 1 = P Stack Register the other, and the entire operation takes more than one DC o= DC Data Counter cycle. Should reset occur during this modification DC 1 = DC1 Auxiliary Data Counter process, the value pushed into P is part of the old PO (the as-yet unmodified part) and part of the new PO This nomenclature is used to be consistent with the (already-modified part). Thus, care should be taken assembly language mnemonics. (perhaps by external gating) to ensure that reset does not occur at an undesirable time if any significance is to be given to the contents of P after a reset occurs. 4·83 F38721F38L72 Fig. 8 Programmable Registers and Ports 7 ACCUMULATOR: I A I STA'TUS REGISTtR W 1~10121CISI SCRATCHPAD 0 DEC 0 8YTE ADDRESS HEX OCT • 3 I f INDIRECT SCAATCHPAO ADDRESS IS REGISTER 11 11 'AU X DATA COUNTER I, DC" H HU 10 11 A 8 12 13 Hl KU 12 C I. I 11 Kl 13 D 15 OU I. 16 DATA COUNTER DC 0 Ol '5 17 16 10 20 11 STACK REGISTER I P 58 3A 7. 11 59 38 73 PROGRAM COUNTER I PO 60 61 3C 30 7. 75 62 3E 76 63 3F 77 0 BINARY TIMER PORT 7 110 PORT 0 I INTERRUPT CONTROL PORT 6 110 PORT 1 PORT 110 PORT 4 L- STROBE 110 PORT 5 4·84 Fig. 9 Programming Model OUTS 7 r - - - - - - - - - - - - - - - o > - - ! I ODC INS·7 EI ~ STATUS,.......- LN. DI, ~ OUTS 6 INS-6 (PO) ISAR OUTS P. (P 0.1.4.5) 5 V VOLTS 110 PORTS LOGIC '0' LISU INS·P. (P 0,1,4.5) ON 110 (') PINS SCRATCHPAD REGISTERS AUX DATA COUNTER .... Q, LR U'1 m 14 11 T1 LR I' I. • (PO) H U 12 L 13 ." Co) ¥-*I I" (IS)=:-1 I. DS· CO ..... U1i ~ Q PROGRAM ." ROM ~ ~ N Jf HEX OCTAL • These inslructions set status t The value 01 the extemal interrupt Input Is loaded to bit 7 of the accumulator (wflh bits 0 through fj loaded RAM with zeros) when the InstrucHon 'INS 6' Is executed. Sl(De) 64x' This Instruction also sets status. "FCO"H H '000' RESET transfers P09 to P and tt PO. P, DC. and DC1 are 12·bit registers. TD then clears PO, Ica bit of W, "FFP'H EXTERNAL INTERRUPT INPUT (·5 Y '" LOGIC 1) and ports 4, 5, 8, and 7. Note: The instructions PI and PK are shown in two sequential parts (PI1, P12, and PK1, PK2). II F38721F38L72 Timing Characteristics The F3872 timing characteristics are described in Table 4 and illustrated in Figures 10 and 11. Table 4 Timing Characteristics Signal Symbol Characteristic Min Max Unit Notes tJEX) Time Base Period, Ail External Modes 250 1000 ns XTL, XTL2 tEx(H) External Clock Pulse Width, High 90 700 ns 4 MHz-1 MHz tEx(L) External Clock Pulse Width, Low 100 700 ns q, tq, Internal q, Clock Period 2tq, WRITE tw Internal WRITE Clock Period 4tq, Short Cycle 6tq, Long Cycle 50 pF Plus One tdl/O Output Delay from Internal WRITE Clock 0 1000 ns 110 TIL Load tsllO Input Setup Time to WRITE Clock 1000 ns tllos Output Valid to STROBE Delay 3,& 3t~ ns Note 1 -1 00 +20 STROBE tSl S'i"FiO'BE Low Time 8t; 12~ ns -20 +20 RESET tRH RESET Hold Time, Low 6t~ ns +70 EXT INT Hold Time, Active State 6tq, ns To Trigger +750 Interrupt EXTINT tEH To Trigger Timer; EXT INT Hold Time, Inactive Stafe 2tq, ns Note 2 Input Capacitance: Unmeasured Pins C IN 1/0 Ports, REm, EXT INT 7 pF Returned to Vss; RAMPRT, TEST Note 3 Unmeasured Pins CXTL Input Capacitance: XTL" XTL 2 23.5 29.5 pF Returned to Vss; Note 3 Not•• ,. I/O load is 50 pF plus one standard TTL input; STROBE load is 50 pF plus three standard TTL inputs. 2. Specification is applicable when the timer Is in the interval timer mode. 3. TA=2S·C,f=2MHz. 4. fA" O'C to + 70'C, IIcc'" + 5 II ± '0%, 110 power dissipation s mW, unless otherwise noted. 4-86 F38721F38L72 Fig.10 Timing Diagrams EXTERNAL CLOCK INTERNAL (.~ CLOCK • 1/0 PORT OUTPUT EXT INT { 2~1 E ::I 'CPB'TJ ICP BIT IEH L Not. All measurements are referenced to VIL max. VIH min. VOL max, or VOH min Absolute Maximum Ratings These are stress ratings only, and functional operation at these ratings, or under any conditions above those indicated in this data sheet, is not implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. Voltage on any Pin with Respect to -1.0V, + 7V Ground(Except Open·Drain Pins) Voltage on any Open·Drain Pin -1.0V,+13.2V Power Dissipation 1.5W Ambient Temperature Under Bias O°C, + 70°C Storage Temperature - 55°C, + 150°C 4-87 F38721F38L72 Fig; 11 Port Input/Output Timing Diagrams A. Input on Port 4 or 5 INTERNAL WRITE CLOCK II OR INS PORT ADDR. PORT DATA NEXT OPCODE PLACED ON DRIVEN ON TO OPCODE FETCHED DATA BUS DATA BUS FETCHED PORT PINS ------' ·Cycle timing shown for 4 MHz external clock B. Output on Port 4 or 5 INTERNAL WRITE CLOCK OUT OR OUTS PORTADDR. ACCUMULATOR NEXT OPCODE ON DATA CONTENTS OPCODE FETCHED BUS ON DATA BUS FETCHED PORT PINS ___ -+-J~~--- STAYS LOW S'i'AOaE FOR TWO WRITE CYCLES (ACTIVE FOR PORT 4 ONLY) II/O·S 5OOn8* MIN ·Cycle timing shown tor 4 MHz external clock C. Input on Port 0 or 1 D. Output on Port 0 or 1 llTERNAL INTERNAL WRITE WRITE CLOCK CLOCK PORT PINS _ _ _ _ _ -1-_.1 ·Cycle timing shown for -4 MHz external clock ·Cycle timing shown for 4 MHz external clock 4-88 F3872/F38L72 DC Characteristics The dc characteristics of the F3872 are described in Table 5. Table 5 DC Characteristics Symbol Characteristic Min Max Unit Conditions Icc Power Supply Current 100 rnA Outputs Open Po Power Dissipation 500 mW Outputs Open • VIHEX External Clock Input High Voltage 2.4 5.8 V VILHEX External Clock Input Low Voltage -0.3 0.6 V IHEX External Clock Input High Current 100 p.A VIHEX=V OO IILEX External Clock Input Low Current -100 p.A VILEX = Vss V IH Input High Voltage RESET, EXT INT 2.0 5.8 V RESET and EXT INT Have Internal Schmitt V IL Input Low Voltage RESET, EXT INT -0.3 0.8 V Triggers Giving Minimum 0.2 V Hysteresis VIHOO Input High Voltage (Open·Drain Ports) 2.0 13.2 V IlL Input Low Current RESET, EXT INT -1.6 mA VIL=O.4V Note 1 10 V IN = 13.2 V ILOO Leakage Current (Open·Drain Ports) p.A Note 2 - 5.0 VIN=O.O V -100 Vo H=2.4 V 10H Output High Current RESET, EXT INT p.A -30 VOH= 3.9 V - 0.1 mA Vo H=2.4 V Output High Current 10HOO -1.5 mA Vo H= 1.5 V (Direct·Drive Ports) -8.5 mA Vo H= 0.7 V 10L Output Low Current 1.8 mA VOL =O.4 V 10HS Output High Current (STROBE Output) -300 p.A Vo H=2.4 V 10LS Output Low Current (STROBE Output) 5.0 mA Vo L = 0.4 V VIHRPR RAMPRT Input High Level 1.9 5.8 V Guaranteed 0.1 V less than V IH for RESET VILRPR RAMPRT Input Low Level -0.3 0.4 V Guaranteed 0.1 V less than VIL for RESET V SB Standby Voo for RAM 3.2 5.5 V 6.0 mA VsB =5.5 V ISB Standby Current 3.7 mA VSB = 3.2 V Trickle Charge Available on VSB with -0.8 mA VSB= 3.8 V ICHG Voo - 4.5 to 5.5 V -15 mA VSB= 3.2 V 600 mW All Pins POlO Power Dissipated by I/O Pins 60 mW Any One Pin, Note 3 Notes 1. RESET or EXT INT programmed with standard pull·up. 2. RESET or EXT INT programmed without standard pull·up. 3. Power dissipation of 110 pins is calculated by l: (Voo - VIL ) (IIILI)+ l: (Voo - VoH )(lIoHI)+ l: (VOL) (I OL )' 4. TA ; O·C to + 70·C, Voo; + 5 V ± 10%, 110 power dissipation" 100 mW. 4·89 F38721F38L72 Ordering Information Ordereode Package Temperature Range· F3872DC, F38L72DC Ceramic C F3872DL, F38L72DL Ceramic L F3872DM, F38L72DM Ceramic M F3872PC, F38L72PC Plastic C F3872PL, F38L72PL Plastic L F3872PM, F38L72PM Plastic M 'C= Commercial Temperature Range O'C to + 70'C L= Limited Temperature Range -40'C to +85'C M = Military Temperature Range - 55'C to + 125'C 4·90 F38700 Central Processing Unit Advance Product Information Microprocessor Product Description Connection Diagram The Fairchild F38700 is a complete 8-bit central processing unit (CPU) for the Fairchild F387XX microprocessor family. Fabricated with double-ion- implanted, N-channel, silicon-gate technology, the F38700 has 64 bytes of scratchpad register and an 8-bit accumulator. It contains interrupt logic to serve the on- chip external interrupt, the timer interrupt, and interrupts from peripherals. It also has a nonmaskable interrupt input having higher priority than other interrupts. Unlike the F8 series microprocessor, the F38700 program and data counters are inside the CPU, and the 16-bit address bus can address 65K bytes of external memory. Figure 1 is a block diagram of the F38700 CPU. • 8-Bit Word Size • Compatibility with F8 and F387X Software • 64-Byte Scratchpad Register • Programmable Binary Timer with Interrupt • External Interrupt • On-Chip Clock Generation • TTL-Compatible Inputs and Outputs • 8-Bit Data Bus and 16-Blt Address Bus • Direct Memory Access (DMA) Capability • 40-Pin DIP • Nonmaskable Interrupt Signal Functions CPU 38700 IAK BGT 4> 4>W 4-91 F38700 Figure 1 F38700 Block Diagram .... II I~ A I I DATA BUS <: IBI'EiITERNAL DATA BUS' V ~ STATUS REGISTER (W) ~ YBUS MUX (Y) ~ ADDER LOGIC (ALU) ~ XBUS MUX (X) <= SCRATCH PAD REGISTERS (RAM) Vt- r k INDIRECT ACCUMULATOR SHIFT ¢= SCRATCHPAD ~ (ACC) ADDRESSING Iv' RIGHT/ LEFT REG (ISAR) 0- 0 {'r ~ II "- r-~ ~r- v ) INSTRUCTIONAL I-- REGISTER (lR) './" CONTROL ROM (CROM) PC/DC ADDER rv {'r ~ PC/DC REGISTER y- NMI/F I J I (ICP) 1/06 ~ ADDRESS BUS 0 MUX CONTROL LOGIC ./ I (TMR) I lJ 1107 ~ D, ~ERNALADDRESS BUS' 4·92 F38700 Signal Descriptions The F38700 signals are described in table 1. Table 1 F38700 Signal Descriptions Mnemonic Pin No. Name Description Address • Ao· A15 7·16 Address Active-higH, three-state output signals that form a 16-bit 24-29 address bus for up to 64K bytes of memory. The lower eight bits of the address contain the 1/0 address during an 1/0 instruction. Bus BGT 19 Bus Grant An active-low output signal used in conjunction with a bus request. Indicates to the requesting device that the data and address buses and the write and read Signals have been set t o their high-impedance state. BRO 17 Bus Request An input signal informing the CPU that another device requests the control of the memory bus. Clock 4I,4IW 20, 38 System Clocks An output to other devices on the bus for system clocking. Crystal XTL1, XTL2 2, 3 Crystal Input signals connected to a crystal to drive the internal clock Connections oscillator. Data Do - 0 7 30-37 Data Lines Active-high, three-state inputloutput signals that form an 8-bit, bidirectional data bus. Interrupt IAK 4 Interrupt An active-low output signal from the CPU to its peripherals Acknowledge indicating that It Is ready for the Interrlipt. The peripheral requesting service responds by outputting the upper and lowe interrupt address vectors on the data bus. INT REO 39 Interrupt An active-low Input signal informs the CPU that one of its Request peripherals requires service. Input/Output 10E 6 I/O Enable An active-low signal indicating that the CPU Is executing an instruction and that the 1/0 port whose address is the same as the lower eight bits of the address bus should respond. 4-93 F38700 Mnemonic Pin No. Name Description Nonmaskable Interrupt NMI/F 18 Nonmaskable An external·interrupt, negative·edge·trigger input that cannot Interrupti be turned off by software. Instruction fetch Power Vee 1 Power + 5 V (± 10%) power supply input Vss 21 Ground o V ground reference Read Enable RD 22 Read An active·low signal that indicates data is to be read out of a memory location of 1/0 port. Reset RSTI 40 Reset In An external reset to the CPU specifying that HEX«I>«I> be loaded into the program counter. RSTO 5 . Reset Out A synchronous reset output signal from the CPU to the rest of the system. Write Enable WR 23 Write An active·low signal that indicates data on the data bus is to be written into a memory location or an 1/0 port. Mode Fllp·Flop The mode fIIp·flop (MFF) is a special feature of the The MFF is reset to zero when a reset or power·on reset F38700 that, when set, reduces INS, OUTS, and interrupt operation occurs. Resetting the MFF makes all the long routines by one long machine cycle (1.5 times the normal cycles into short cycles and allows the F38700 timing to cycle). It should be noted that the OUTS instruction is no again be completely compatible with that of the F3870. longer privileged when the MFF is set. Table 2 presents the instructions associated with the MFF. Table 2. MFF Instructions Machine Status Operation Mnemonic Function Code Byte d,cle OVF ZERO CRY SGN Set MFF SM MFF-1 2D 1 1 Reset MFF RM MFF-O 2E 1 1 Compare 1/0 F CPF (II OF) + (ACe) + 1 2F 1 2.5 0/1 0/1 0/1 0/1 4·94 F38701 Single-Chip Microcomputer Advance Product Information Microprocessor Product Description Signal Functions The Fairchild F38701 Single Chip Microcomputer, a controller-oriented device, is a complete 8-blt micro- computer on a single MOS integrated circuit. The device features 2048 bytes of mask-programmable ROM, 64 bytes of scratchpad RAM, a programmable binary timer, RESET { 16 bidirectional 110 bits, five analog 110 pins, a zero- TEST crossing detector, seven ac drive pins with phase control INTERRUPT and zero-crossing switching capabilities, a serial 110 port with block and data gate, and a single + 5 volt power • DIGITAL supply. TIME BASE { • 84 x 8 Scratchpad Memory • Programmable Timer • External Interrupt • 2K x 8 ROM • Two 8·Blt Parallel Digital 1/0 Channels POWER ( CONTROL • One Handshake Serial Digital 1/0 Channel • Five Analog 110 Channels • Seven AC Power Control Outputs with Phase Control and Zero·Crosslng Switching Capabilities ZERO CROSSING • Real-Time Counter • Programmable Interrupt Vector • 4O·Pln Package POWER { • Single + 5 V Power Supply • Crystal, LC, RC, and Extemal Clock Modes F38701 Slngle·Chlp Microprocessor SIGNAL DESCRIPTIONS Mnemonic Name Description Analog AIOo - AI04 Analog Lines Five bidirectional analog lines that are used either as AID inputs or as DIA outputs. Digital 0100 - DlO15 Digital Lines Bidirectional lines that are individually used as TTL-compatible inputs or as latched outputs. 4-95 F38701 Mnemonic Name Description Power Vee Power Supply +5V(±10%) Vss Ground Digital ground VAA Ground Analog ground Power Control ACo - ACs Power Control Seven output drivers that may be used to control loads in the zero- Lines crossing or phase control modes. Reset Test Interrupt INT External Interrupt An external interrupt input whose active state is software-programmable It is also used with the timer for pulse width measurement and event counting. Reset Test Interrupt RST Reset An external reset input that, when pulled low, resets the F38701. When allowed to go high, the F38701 begins program execution at program location H'OOOO'. TEST Test Circuit An input used only in testing the F38701. For normal circuit functions this pin is unconnected or grounded. Serial Data SOC Serial Data Clock Bidirectional signal that clocks data in and out of the serial data port; one bit of data is shifted in our out for each data clock pulse. SOT Serial Data A bidirectional serial data line that shifts data in and out, least significant bit first, synchronous with the data clock. STE Serial Data Gate When the bidirectional data gate is high, both the data clock and the serial data port are enabled. Time Base XL1 Time Base The time base inputs to which a crystal (1-4 MHz), LC network, RC XL2 network, or an external Single-phase clock are connected. Zero Crossing ZC Zero Crossing An input signal that senses zero crossings. This Signal is used to sense Input the 50/60 Hz line or as an external sensor input. 4-96 F38701 Serial Port AC Output Control The serial interface consists of three bidirectional lines: The seven ac output bits (ACo - ACe) perform the the data line sends and receives data; the data clock is a following functions. synchronous pulse used to clock the serial data in and out of the chip; and the data transfer enable is high Zero-Crossing Drive Mode during the time when valid data is on the serial interface lines. The serial interface is operated in the master or The selected ac output bits are triggered after a slave mode. In either mode, the CPU can send or receive programmable delay time from the zero crossing of the data. ac line, and remain on until turned off by the program. • Real-Time Clock Phase Control Mode The real·time clock consists of a divide-by-50/60 and a The duty cycle register is loaded with the value divide-by-60 cascade counter. The clock generates an corresponding to the desired firing angle; the output(s) internal interrupt on zero crossings, seconds, and are activated when the register reaches its terminal minutes. These interrupts are under program control. count, and remain activated until the next zero crossing. Power Control Ports Analog-Input/Output Channels The seven ac outputs are individually capable of sinking Five input channels operate in different modes selected 20 mA of current when driven separately; only four of any by setting the appropriate bits in port D, which is the seven can be turned on at rated current at anyone time. control port used by the AID converter and the analog multiplexer. Anyone of the five channels can be Zero-Crossing Detection selected and converted from a 0.5 V to (V oo -0.5) V analog input, to an 8-bit digital equivalent, in less than 100 The zero-crossing input is tied to the 50/60 Hz line microseconds. The results are stored in the appropriate through a resistor. This input, which monitors the power port. Completion is signaled by an internal interrupt. line and generates an interrupt (depending on how the control register is set up), can be one of the following: The D/A mode can output an analog signal through any positive-going zero crossing, negative-going zero one of the five analog 1/0 lines. The D/A has an 8-bit crossing, both positive and negative zero crossing, resolution. The selected D/A channels are refreshed seconds, or minutes. every 600 microseconds or less, except during an analog rea~ or write period. The zero-crossing (ZC) detector also supplies the input for the interval timers and to the ac output circuitry. In the AID mode, the selected analog line is like the digital equivalent after the AID conversion is performed. The results of this conversion are stored in port F. After the conversion, an internal interrupt is generated, indicating the conversion is complete. F38701 I I . I 4-98 F38752 Analog Interface Unit Advance Product Information Microprocessor Product Description • AID or DIA Conversion Capability for Each Channel • 8-Bit Resolution for All Five Channels Designed to operate with the F38700 CPU, the Fairchild • Conversion Time of 24 lAs per Channel F38752 Analog Interface Unit (AIU) contains a five- • Programmable Interrupt Vector by Strap-Pin Selection channel ana!og-to-digital (AID) or digital-to-analog (D/A) • Daisy-Chain Interrupt Control converter (see figure 1)_ The AID conversion is • Single + 5 V Power Supply accomplished using a successive approximation • 40-Pin Package technique, and the DIA conversion is accomplished using a charge redistribution technique with binary- weighted capacitors_ The" F38752 also contains interrupt logic to support daisy-chain Interrupt functions. Figure 1 38752 Block Diagram AI03 AIOI AI04 AI02 AIOD R8 Vss SliSf CONTROL REGISTER RS DATA REGISTER R4 REGISTER ADDRESS DATA REGISTER R3 DECODER DATA REGISTER R2 DATA REGISTER Rl BUFFER DATA REGISTER RD DATA BUS Iili Viii MS CPU READIWRITE INTERFACE A2 DATA BUS INTERRUPT AI CONTROL INTERFACE AD_ DB7 DBS DB3 DBI DB8 DB4 DB2 DBO 4-99 F38752 Signal Descriptions Table 1 F38752 Signal Descriptions The signals for the F38752 are described in table 1. Mnemonic Name Description Registers DBo - DB7 Data Bus Bidirectional data, status, The F38752 has eight registers numbered 0 through 7. and control information The first five are data registers; number 5 is the control register, number 6 the status register, and number 7 the Aa - A2 Register Data, status, and control buffer register. All have read and write capability except Address register selection inputs register 6 and register 7, which can only be read. Table 2 describes the registers, and table 3 gives their CPU AIOo-AI0 4 Analog Bidirectional analog lines addresses. Channels 4>W Clock Input from the CPU SRST Synchronized Active-low input Reset MS Module Active-high input Select RD Read Enable Active-low input WR Write Enable Active-low input INT Interrupt Active-low output Request IAI Interrupt Active-low input for the Acknowledge daisy chain lAO Interrupt Active-low output for the Acknowledge daisy chain STs,STs' Strap Pins Active-low strapping for ST7 the programmable interrupt vector Voo Power Input + 5 V power supply input Vss Ground o V reference VAA Ground o V reference for the internal analog circuitry 4·100 F38752 Table 2 Addressable Register Format Register Register Number Name Bit Description RO Data 0-7 Data for channel 0 R1 Data 0-7 Data for channel 1 R2 Data 0-7 Data for channel 2 R3 Data 0-7 Data for channel 3 R4 R5 Data Control 0-7 0 1 2 3 4 Data for channel 4 1 1 = D/A mode, 0 = AID mode for channel 0 = D/A mode, 0 = AID mode for channel 1 1 = D/A mode, 0 = AID mode for channel 2 1 = D/A mode, 0 = AID mode for channel 3 1 = D/A mode, 0 = AID mode for channel 4 • 5 Bit Mode Interrupt mode 6 5 6 0 0 MC multichannel interrupt 0 1 DASC D/A single channel 1 0 ADSC AID single channel 1 1 ALLSC All single channels 7 1 = Interrupt enable, 0 = Interrupt disable R6 Status 0 1 = Channel 0 selected; 0 = Channel 0 not selected (read only) 1 1 = Channel 1 selected; 0 = Channel 1 not selected 2 1 = Channel 2 selected; 0 = Channel 2 not selected 3 1 = Channel 3 selected; 0 = Channel 3 not selected 4 1 = Channel 4 selected; 0 = Channel 4 not selected 5 Bit Mode Interrupt mode 6 5 6 0 0 MC multichannel interrupt 0 1 DASC D/A single channel 1 0 ADSC AID Single channel 1 1 ALLSC All single channels 7 1 = Interrupt enable, 0 = Interrupt disable R7 0-7 AID; results of last analog conversion Buffer read { 0-7 D/A; data for present conversion 4-101 F38752 Table 3 Register Address Operation Description . Register Name MS A2 A1 AO All five channels are multiplexed. Writing into the control register initiates the conversion starting with channel 0 and sequencing through channel 4. It continuously 0 Data 1 0 0 0 performs the conversion unless the interrupt is enabled. 1 Data 1 0 0 1 Wheri AD interrupts are selected, register 7 must be read 2 Data 1 0 1 0 to continue to the next channel. When DA interrupts are 3 Data 1 0 1 1 selected, register 6 must be read. 4 Data 1 1 0 0 5 Control 1 1 0 1 6 Status 1 1 1 0 7 Buffer 1 1 1 1 I 4·102 F38753 Power Control Unit Microprocessor Product Advance Product Information Description Signal Functions The Fairchild F38753 Power Control Unit (PCU) is designed to operate with the F38700 CPU. It has eight current-sinking high outputs that may be used to directly CLOCK { .. DB• ..WR DB, drive opto-Isolators or trlacs. The on-chip logic allows zero-crossing switching, delayed switching, and phase control without CPU intervention. The F38753 PCU contains logic to provide seconds and minutes counting ADDRESS I A. A, A. A, DB. DB, DB, DB, DATA BUS in either 50-Hz or 60-Hz operations. DB. SYNCHRONIZED RESET SRS'f DB, The PCU internal Interrupt logic implements first-come first-served interrupts. The Interrupt request latch is reset after the first read signal Is input. If the first Interrupt request is the minute transition, the minute INTERRUPT I iNT ill 1AO zc . ACo ZERO CROSSING interrupt has the highest priority, the second Interrupt AC, has the next highest priority, and the positive zero- AC. crossing (ZC) Interrupt has the lowest priority, if all three I AC, EXTERNAL Interrupt control bits are set. CE AC, CONTROL CHIP WR AC, CONTROL • Eight ac Control Outputs, Each with Current Sinking RD AC. Capability of 20 mA AC, • Four Output Modes: Zero-Crossing Switching, Positive and Negative Delayed Swltchlngs, and Phase Firing • Capability of Programming Each Output Differently vcc So • Separate Output On·Off Control • Capability of Programming Outputs to be Pulsed by POWER { vss s, s. Internal Clock TEST TID • Four Real-Time Interrupts: Positive Zero Crossing, Negative Zero CrOSSing, Second, and Minute Signal Descriptions Mnemonic Name Description Address Ao-A3 Address Bus Input lines that are used to select the Internal registers, which are addressed as I/O ports. Chip Control CE Chip Select An actlve·low Input signal that Indicates the CPU is trying to read from or write to the PCU Internal registers. RD Read Enable An input Signal that indicates the CPU Is performing a read operation. WR Write Enable An Input signal that indicates the CPU i.s performing a write operation. 4-103 F38753 Signal Descriptions Mnemonic Name Description Clock 4> System Clock A clock input signal originating at the CPU. 4>WR Clock The clock input from the CPU. Data Bus DBo-DB7 Data Bus Bidirectional 3-state lines that link the PIO to all other devices within the microprocessor system. External Control AC o-AC7 Power Seven output drivers that may be used to control loads in the zero- Control Lines crossing or phase control modes. Interrupt IAI Interrupt An input signal from the CPU that indicates the CPU is ready to service Acknowledge the PCU interrupt. lAO Interrupt An output signal that is connected to the interrupt acknowledge input of Acknowledge other chips in a daisy-chain to establish interrupt priority. Output - INT Interrupt An output signal to the CPU; a logical low means the chip requires Request service from the CPU. Power Vee Power Supply + 5 V (± 10%) power input Vss Ground o V input Strap Pins SO·S2 Strap/Interrupt Three active·low input signals that select the internal address and the Address Selection interrupt address vectors. Synchronized Reset SRST Synchronized An active-low input signal that resets the internal logic of the CPU. Reset Test TEST Test Circuit An active·low input used only in testing theF38753 PCU. For normal circuit functions this pin in unconnected or grounded. Zero Crossing ZC Zero Crossing 3-5 V POp, 50/60 Hz ac main signal. Input 4·104 F38754 Peripherallnput/Output Microprocessor Product Advance Product Information Description Signal Functions The Fairchild F38754 Peripheral Input/Output (PIO) device two 8-bit 1/0 ports with TTL-compatible outputs. It .... 0110 PAc> has one 8-blt serial 1/0 serial 1/0 channel for communi- PA, cating with other microprocessors or for driving other Plio peripheral devices that accept serial data. The PIO has PA, on-chip Interrupt logic that may be used to interrupt the PAo CPU through the serial data port. PA, PAs • • Two 8-Blt ParrallelllO Ports, Providing 16 PA7 1/0 PORTS Bidirectional TTL-Compatible 1/0 Lines PB. • One 8-Blt Serial 110 with Handshake and PB, Programmable Data Transfer Rate PB. • Different Interrupt Vectors for Transmit and Receive PB. Operations PB, PBs PB. PB7 INTERRUPT ACKNOWLEDGE lAO OUTPUT m !RiC m STRAPIINTERRUPT So ADDRESS SELECTION CC SS Signal Descriptions Mnemonic Name Description Address Ao-A, Address Bus Input lines used to select the internal registers, which are addressed as 1/0 ports. Chip CE Chip Select An active-low input signal that Indicates the CPU Is trying to read from 0 write to the PIO internal registers. Clock ell System Clock Clock input signal originating at the CPU. Data Bus DBa - DB7 Data Bus Bidirectional 3-state lines that link the PIO to all other devices. within the microprocessor system. 4-105 F38754 Mnemonic Name Deacrlption Interrupt : INT Interru pt Req U$st An output signal to the CPU; a logical low means the chip requires service from the CPU. IAI Interrupt Aniilput signal from the CPU that indicates the CPu is ready to service Acknowledge the PCU interrupt. Interrupt Acknowledge, Output lAO Interrupt An output signal that is connected to the Interrupt acknowledge input Acknowledge of other chips in a daisy·chain to establish fnterrupt priority: Output 110 Ports pAc· PA7 I/O Ports Bidirectional ports through which the PIO communications with logic PBe - PB7 external to the microprocessor system. Power Vce Power Supply +5 V (±10%) Vss Ground System ground - 0 V Read Enable RD Read Enable An input signal that indicates the CPU is performing a read operation. Serial Data SOC Serial Data Clock A bidirectional signal that clocks data in and out -of the serial data port; one bit of data Is shifted In or out for each data clock pulse. SOT Serial Data A bidirectional serial data line that shifts data in and out, least significant bit first, synchronous with the data clock. STE Serial Data Gate When the bidirectional data gate is high, both the data clock and the, serial data port are enabled. ,Strap/,Interrupt , ' Address Selection So Strap/Interrupt Three active low input signals that select the internal address and the Address Selection, interrupt addr!lss vectors. Write Enable WR Write Enable An Input signal that Indicates the CPU Is performaing a write operation. 4,106 [!J 1 I INTRODUCTION !,;l2 IORDERING AND PACKAGE ~ INFORMATION 1C!JIF8 MICROCOMPUTER FAMILY 1 0 1 CONTROLLER FAMILY F6800 MICROPROCESSOR FAMILY 101F16000 MICROPROCESSOR FAMILY I[!] I ROM PRODUCTS Inlg 1DEVELOPMENT SYSTEMS AND L!J SOFTWARE I[!QJ 1APPLICATIONS I[!IJ I RESOURCE AND TRAINING CENTERSI I[!!] 1SALES OFFICES Section 5 F6800 Microprocessor Family General The Fairchild F6800 microprocessor family is a set of 8·bit MOS devices that offers a complete and constantly growing selection of microprocessors having a powerful instruction set. As shown in figure 5·1, the F6800 family now includes seven different CPUs (described in table 5·1), supported by such circuits as synchronous and asynchronous controllers for data communications, timers, a direct memory access controller, CRT controllers, RAMs, ROMs, and EPROMs (described in table 5·2). Table 5·1 F6800 Microprocessor Family CPUs • Data No. of No. of No. of Power External Length Basic Bytes Bytes 1/0 Other Device No. Pins Supply Addressing (Bits) Clock Instructions (RAM) (ROM) Lines 110 Timer F6800 40 +5V 64K 8 No - - - - - F6801 40 +5V 64K 8 Yes 82 128 2K 31 Serial 16·Bit F6802 40 +5V 64K 8 Yes 72 128 - - - - F6803 40 +5V 64K 8 Yes 82 128 - 13 Serial 16·Bit F6808 40 +5V 64K 8 Yes 72 - - - - - F6809 40 +5V 64K 8 Yes 59 - - - - - F6882 40 +5V 64K 8 Yes 72 128 - - - - Table 5·2 F6800 Peripheral Devices Type Number Name Comment General·Purpose F6820 Peripheral Interface Twenty I/O Lines Adapter General·Purpose F6821 Peripheral Interface Twenty I/O Lines Adapter General·Purpose F6840 Programmable Timer Module Three·to 16-Bit Timers General·Purpose F68488 General·Purpose IEEE·488 Bus Controller Interface Adapter Special Function F6844 Direct Memory Access Three I/O Channels Controller Special Function F6845 CRT Controller Available in Interlace or Non·lnterlace Special Function F6846 ROM, I/O, Timer 2K x 8 ROM, Parallel 110, Timer Special Function F6847 Video Display Generator Low·Cost Video Controller Data Communications F6850 Asynchronous Communications Interface Adapter Data Communications F6852 Synchronous Serial Data Adapter Data Communications F6854 Advanced Data Link HDLC/SDLC Controller Data Communications F6856/ Synchronous Communications HDLC/SDLC/BTSYNC F3846 Protocol Controller Data Communications F68456/ Multi·Protocol HDLC/SDLC/BISYNC/ASYNC F38456 Communications Controller Memory F6810 128 x 8·Bit Static RAM 5·3 F6800 Microprocessor Family Figure 5·1 F6800 Family Organization F6802/F6808/F6882 MICROPROCESSOR WITH CLOCK AND RAM r-----L....J.-----, F6800 MICROPROCESSING UNIT F6610 STATIC RAM F8820 PERIPHERAL INTERFACE ADAPTOR F6840 PROGRAMMABLE TIMER F6844 DIRECT MEMORY ACCESS CONTROLLER F6845/F6645A CRT CONTROLLER F6846 ROM·I/O·TIMER F6847 VIDEO DISPLAY GENERATOR F6850 ASYNCHRONOUS COMMUNICATIONS INTERFACE ADAPTOR F6852 SYNCHRONOUS SERIAL DATA ADAPTOR F6854 ADVANCED DATA LINK CONTROLLER F3646/F6856 SYNCHRONOUS PROTOCOL COMMUNICATIONS CONTROLLER F38456/F68456 MULTIPLE PROTOCOL COMMUNICATIONS CONTROLLER F68468 GENERAL PURPOSE INTERFACE ADAPTOR 5·4 F6800 Microprocessor Family Instruction Set Figure 5-3 F6801/F6803 Programming Model Because a single instruction set is inadequate for the 7 07 0 number and flexibility of devices in the F6800 family, it has 1;5-m----~----------l----------~---m---iiJ 8·BIT ACCUMULATORS A AND B OR 16·BIT DOUBLE ACCUMULATOR D been necessary to develop three such sets, each serving a ~ 0 portion of the family. I X I INDEX REGISTER (X) ~ 0 The basic instruction set, comprising 72 instructions, is I ~ I STACK POINTER (SP) 15 0 supported by the F6800, F6802, F6808, and F6882; figure 5-2 I PC I PROGRAM COUNTER (PC) is the associated programming model. An expanded in- struction set, consisting of the basic set plus several addi- r:,l":'tr:":'l'":'T.:"I"':=r:::.0 CONDITION CODE REGISTER (CCRj tional instructions, is supported by the F6801 and F6803; CARRY/BORROW FROM MSB figure 5-3 illustrates the associated programming model. OVERFLOW The expanded instruction set is upward-compatible with the ZERO • basic set (that is, programs written using either are inter- '----NEGATiVE changeable, provided that the additional instructions are ......---INTERRUPT not involved). Both the basic and expanded instruction sets ' - - - - - - H A L F CARRY (from Bit 3) are described in table 5-3. The instruction set supported by the high-performance Figure 5-4 F6809 Programming Model F6809 is similar in structure to the basic and expanded sets, but is not upward-compatible. It is greatly enhanced to INDEX REGISTER (X) ) take fullest advantage of the powerful F6809 architecture. IN DEX REGISTER (Y) Figure 5-4 illustrates the F6809 programming model and table 5-4 describes the instruction set. HARDWARE STACK (S) ...._ _ _ _ _....;...PC;;..._ _ _ _ _...... PROGRAM COUNTER Figure 5-2 F6800/F6802IF68081F6882 Programming Model 7 0 -====A===~===B===~ACCUMULATORS I ACCA I ACCUMULATOR A 7 0 D I ACCB I ACCUMULATOR B ...._ _...:D;.:.P_ _....... DIRECT PAGE REGISTER 15 o I IX I INDEX REGISTER (X) r:E:-r:F~Hr:""'r.:"Il':'I'::r~ CONDITION CODE 15 o (CC) REGISTER I PC , PROGRAM COUNTER (PC) 1! 15 o CARRY/BORROW SP I STACK POINTER (SP) OVERFLOW o ......---ZERO '------NEGATIVE 1 H I N.Z V C . CONDITION CODE REGISTER (CCR) '-------INTERRUPT MASK CARRY (from Bit 7) ......- - - - - H A L F CARRY OVERFLOW ' - - - - - - - F A S T INTERRUPT MASK ZERO ' - - - - - - - - - E N T I R E STATE ON STACK NEGATIVE INTERRUPT MASK HALF CARRY (from Bit 3) 5-5 F6800 Microprocessor Family Table 5-3 Basic and Expanded Instruction Sets Instruction Description ABA Add Accumulators *ABX Add Accumulator B to Index Register ADC Add With Carry ADD Add *ADDD Add Double Accumulator to Memory; Leave Sum In Double Accumulator AND Logical AND ASL Arithmetic Shift Left *ASLD Double Accumulator Shift Left; Clear LSB; Shift MSB into C-Bit ASR Arithmetic Shift Right BCC Branch if Carry Clear BCS Branch if Carry Set BEO Branch if Equal To Zero BFE Branch if Greater Than or Equal To Zero BGT Branch if Greater Than BHI Branch if Higher Than *BHS Branch if Higher Than or Same As BIT Bit Test BLE Branch if Less Than or Equal To *BLO Branch if Lower Than BLS Branch if Lower Than or Same As BLT Branch if Less Than Zero BMI Branch if Minus BNE Branch if Not Equal To Zero BPL Branch if Plus BRA Branch Always 'BRN Branch Never BSR Branch to Subroutine BVC Branch if Overflow Clear BVS Branch if Overflow Set CBA Compare Accumulators CLC Clear Carry CLI Clear Interrupt Mask CLR Clear CLV Clear Overflow CMP Compare COM Complement CPX Compare Index Register 'CPX Compare Index Register; Permits Use With Any Conditional Branch Instruction DAA Decimal Adjust DEC Decrement DES Decrement Stack Pointer DEX Decrement Index Register EOR Exclusive OR 'F6801/F6803 Only 5-6 F6800 Microprocessor Family Table 5·3 Basic and Expanded Instruction Sets (Cont.) Instruction I Description INC Increment INS Increment Stack Pointer INX Increment Index Register JMP Jump JSR Jump to Subroutine *JSR Additional Addressing Mode Direct LDA Load Accumulator *LDD Load Double Accumulator from Memory LDS Load Stack Pointer • LDX Load Index Register *LSL Memory or Accumulator Shift Left; Clear LSB; Shift MSB into C·Bit *LSLD Double Accumulator Shift Left; Clear LSB; Shift MSB into C·Bit LSR Logical Shift Right * LSRD Double Accumulator Shift Right; Clear MSB; Shift LSB into C·Bit *MUL Multiply Accumulators; Leave Product in Double Accumulator NEG Negate NOP No Operation ORA Inclusive OR Accumulator PSH Push Data *PSHX Push Index Register to Stack PUL Pull Data *PULX Pull Index Register from Stack RJOL Rotate Left ROR Rotate Right RTI Return from Interrupt RTS Return from Subroutine SBA Subtract Accumulators SBC Subtract With Carry SEC Set Carry SEI Set Interrupt Mask SEV Set Overflow STA Store Accumulator *STD Store Double Accumulator STS Store Stack Register STX Store Index Register SUB Subtract *SUBD Subtract Double Accumulator; Leave Difference in Double Accumulator SWI Software Interrupt * F6801/F6803 Only 5·7 F6800 Microprocessor Family Table 5-3 Basic and Expanded Instruction Sets (Cont.) Instruction Description TAB Transfer Accumulators TAP Transfer Accumulators to Condition Code Register TBA Transfer Accumulators TPA Transfer Condition Code Register to Accumulator TST Test TSX Transfer Stack Pointer to Index Register TXS Transfer Index Register to Stack Pointer WAI Wait for Interrupt *F6801/F6805 Only Table 5·4 F6809 Instruction Set Instruction Description ABX Add Accumulator B to Index Register ADCA,ADCB Add Memory to Accumulator With Carry ADDA,ADDB Add Memory to Accumulator ADDD Add Memory to Accumulator D ANDA,ANDB AND Memory With Accumulator ANDCC AND Condition Code Register ASl, ASLA Arithmetic Shift left of Accumulator or Memory ASlB ASR, ASRA, Arithmetic Shift Right of Accumulator or Memory ASRB BCC, lBCC Branch if Carry Clear BCS,lBCS Branch if Carry Set BEO,lBEO Branch if Equal To BGE, lBGE Branch if Greater Than or Equal To BGT,lBGT Branch if Greater Than BHI, lBHI Branch if Higher BHS,lBHS Branch if Higher Than or Same As BITA, BITB Bit Test Memory With Accumulator BlE,lBlE Branch if less Than or Equal To BlO, lBlO Branch if lower BlS, lBlS Branch if lower Than or Same As BlT, lBlT Branch if less Than BMI, lBMI Branch if Minus BNE, lBNE Branch if Not Equal To BPl, lBPl Branch if Plus BRA, lBRA Branch Always BRN, lBRN Branch Never BSR,lBSR Branch to Subroutine BVC,lBVC Branch if Overflow Clear BVS,lBVS Branch if Overflow Set ClR, ClRA, Clear Accumulator or Memory location ClRB CMPA CMPB Compare Memory from Accumulator 5-8 F6800 Microprocessor Family Table 5·4 F6809 Instruction Set (Cont.) Instruction Description CMPD Compare Memory from Accumulator D CMPS, CMPU Compare Memory from Stack Pointer CMPX, CMPY Compare Memory from Index Register COM, COMA, Complement Accumulator or Memory Location COMB CWAI AND Condition Code Register; Wait for Interrupt DAA Decimal Adjust Accumulator A DEC, DECA, Decrement Accumulator or Memory Location DECB EORA, EORB ,Exclusive OR Memory With Accumulator EXG D, R Exchange D With X, Y, S, U, or PC EXG R1, R2 INC, INCA, INCB Exchange R1 With R2 (R1, R2 = A,B, CC, DP) Increment Accumulator or Memory Location II JMP Jump JSR Jump to Subroutine LDA, LDB Load Accumulator from Memory LDD Load Accumulator D from Memory LDS, LDU Load Stack Pointer from Memory LDX, LDY Load Index Register from Memory LEAS,LEAU Load Effective Address into Stack Pointer LEAX,LEAY Load Effective Address into Index Register LSL, LSLA, Logical Shift Left Accumulator or Memory Location LSLB LSR, LSRA, Logical Shift Right Accumulator or Memory Location LSRB MUL Unsigned Multiply NEG, NEGA, Negate Accumulator or Memory NEGB NOP No Operation ORA,ORB OR Memory With Accumulator ORCC OR Condition Code Register PSHS Push A, B, CC, DP, D, X, Y, U, or PC onto hardware stack PSHU Push a, B, CC, DP, D, X, Y, U, or PC onto user stack PULS Pull A, B, CC, DP, D, X, Y, U, or PC fro hardware stack PULU 'pull A, B, CC, DP, D, X, Y, U, or PC from user stack ROL, ROLA, Rotate Accumulator or Memory Left ROLB ROR, RORA, Rotate Accumulator or Memory Right RORB RTI Return from Interrupt RTS Return from Subroutine 5·9 F6800 Microprocessor Family Table 5·4 Instruction Set (Cont.) Instruction Description SBCA, SBCB Subtract Memory from Accumulator With Borrow SEX Sign Extend Accumulator B into Accumulator A STA,STB Store Accumulator to Memory STD Store Accumulator D to Memory STS, STU Store Stack Pointer to Memory STX,STY Store Index Register to Memory SUBA,SUBB Subtract Memory from Accumulator SUBD Subtract Memory from Accumulator D SWI SWI2, Software Interrupt SWI3 SYNC Synchronize With Interrupt Line TFR D, R Transfer D to X, Y, S, U, or PC TFR R, D Transfer X, Y, S, U, or PC to D TFR R1, R2 Transfer R1 to R2 TST, TSTA, Test Accumulator or Memory Location TSTB Descriptions Following is data that describes the members of the F6800 microprocessor family. 5·10 F6800/F68AOO/F68BOO 8-Bit Microprocessing Unit Microprocessor Product Description Logic Symbol The F6800 is a monolithic 8-bit microprocessing unit (MPU) 33 32 31 30 29 28 27 26 forming the central control function for the Fairchild F6800 family. Compatible with TTL, the F6800, as with all F6800 system parts, requires only one +5.0 V power supply and no Ao external TTL devices for bus interface. .'., A, 10 A. 11 The F6800 is capable of addressing 65K bytes of memory A:l 12 37 with its 16-bit address lines. The 8-bit data bus is A, 13 bidirectional as well as 3-state, making direct memory As 14 addressing and multiprocessing applications realizable. A, ,. A, 16 F6800 • 8-Bit Parallel Processing Aa 17 • Bidirectional Data Bus A, 18 • • 16-Bit Address Bus - 65K Bytes of Addressing 36 OBE AlO 19 • 72 Instructions - Variable Length Au 20 39 TSC • 7 Addressing Modes - Direct, Relative, Immediate, A12 22 Indexed, Extended, Implied and Accumulator 40 RESET Au 23 • Variable Length Stack A14 24 • Vectored Restart A1S 25 • Maskable Interrupt Vec;tor • Separate Non-Maskable Interrupt - Internal Registers 34 Saved in Stack • 6 Internal Registers - 2 Accumulators, Index Vcc= Pin 8 Register, Program Counter, Stack Pointer, and Vss= Pins 1, 21 Condition Code Register • Direct Memory Addressing (DMA) and Multiple Processor Capability Connection Diagram • Simplified Clocking Characteristics 40-Pin DIP • Clock Rates 1 MHz (F6800), 1_5 MHz (F68AOO), and v__ 2 MHz (F68BOO) RESET ., • Simple Bus Interface Without TTL • Halt and Single Instruction Execution Capability HALT TSC N.C • Pin Names 0 0 -0 7 HALT Bidirectional Data Bus Halt Input IRQ VMA NMI .' OBE N.C. 1>1,1>2 Clock Inputs BA RiW IRQ Interrupt Request Input Vee Do NMI Non-Maskable Interrupt Input Ao 0, DBE Data Bus Enable Input A, 0, TSC 3-State Control Input A. 03 RESET Reset Input A3 0, VMA Valid Memory Address Output A4 D. BA Bus Available Output As Oa Ao-A'5 Address Bus Outputs Ao D? R/W Read/Write Output A, A1S Vee +5 V Power Supply Input Aa A14 Vss Ground A. Au AlO A12 vs_ Au (Top View) 5-11 F6800/F68AOO/F68BOO Block Diagram CLOCK,., CLOCK,., RESET NON-MASKABLE INTERRUPT (NMI) HALT INTERRUPT REOUEST (IRO) 3-STATE CONTROL (TSC) OATA BUS ENABLE (DBE) BUS AVAILABLE (BA) VALID MEMORY ADDRESS (VMA) READ/WRITE (R/W) MPU Signal Description Address Bus (Ao-A 1s) Sixteen pins are used for the address bus. The outputs are Proper operation of the MPU requires that certain control and 3-state bus drivers capable of driving one standard TTL load timing signals be provided to accomplish 'specific functions and 90 pF. When the output is turned off, it is essentially an and that other signal lines be monitored to determine the open circuit. This permits the MPU to be used in DMA state of the processor. applications. Putting TSC in its HIGH state forces the address bus to go into the 3-state mode. Clocks Phase One a,nd Phase Two (CP1,2) Two pins are used for a 2-phase non-overlapping clock that Data Bus (00-07) runs at the Vcc voltage level. Eight pins are used for the data bus. It is bidirectional, transferring data to and from the memory and peripheral Figure 27 shows the microprocessor clocks, and the Clock devices. It also has 3-state output buffers capable of driving Timing table shows the static and dynamic clock one standard TTL load and 130 pF. The data bus is placed in specifications. The HIGH level is specified at VIHC and the the 3-state mode when DBE is LOW. LOW level is specified at VILC. The allowable clock frequency is specified by f (frequency). The minimum 1 and Data Bus Enable (DBE) 2 HIGH level pulse widths are specified by PWH (pulse This input is the 3-state control signal for the MPU data bus width HIGH time). To guarantee the required access time for and will enable the bus drivers when in the HIGH state. This the peripherals, the clock up time, t ut , is specified. Clock input is TTL-compatible; however, in normal operation it separation, td, is measured at a maximum voltage of Vov would be driven by the phase'two clock. During an MPU read (overlap voltage). This allows for a multitude of clock cycle, the data bus drivers will be disabled internally. When it variations at the system frequency rate. is desired that another device control the data bus, such as 5-12 F6800/F68AOO/F68BOO Fig. 1 MPU Flow Chart WAI • CONDITION CODE REGISTER z V C 'ITEMP' 1·BIT BUFFER REGISTER N Notes 1. Reset is recognized at any position in the flowchart. 2. Instructions which affect the I·Bit act· upon a one·bit buffer register, "ITMP". This has the effect of delaying any clearing of the I·Bit one clock time. Setting the I· Bit, however, is not delayed. 3. Refer to tables 8 through 13 for details of instruction execution. 5·13 F6800/F68AOO/F68BOO in Direct Memory Access (DMA) applications, DBE should be cycles are required for the processor to stabilize in held LOW. preparation for restarting. During these eight cycles, VMA will be in an indeterminate state so any devices that are If additional data set-up or hold time is required on an MPU enabled by VMA which could accept a false write during this write, the DBE down time can be decreased as shown in time (such as a battery-backed RAM) must be disabled until Figure 29 (DBE 0/= q,2). The minimum down time for DBE is VMA is forced LOW after eight cycles. RESET can go HIGH tOSE as shown and must occur within q, I up time. The asynchronously with the system clock any time after the minimum delay from the trailing edge of DBE to the trailing eighth cycle. edge of q, I is tOBEO' By skewing DBE with respect to E in this manner, data set-up or hold time can be increased. Reset timing is sh.own in Figure 2 and the Read/Write Timing table. The maximum rise and fall transition times are Bus Available (BA) specified by tPCr and tpCt. If RESET is HIGH at tpcs The Bus Available signal will normally be in the LOW state; (processor control set-up time) as shown in Figure 2 in any when activated, it will go to the HIGH state, indicating that given cycle, then the restart sequence will begin on the next the microprocessor has stopped and that the address bus is cycle as shown. The RESET control line may also be used to available. This will occur if the HALT line is in the LOW state reinitialize the MPU system at any time during its operation. or the processor is in the WAIT state as a result of the This is accomplished by pulsing RESET LOW for the duration execution of a WAIT instruction. At such time, all 3-state of a minimum of three complete q,2 cycles. The Reset pulse output drivers will go to their OFF state and other outputs to can be completely asynchronous with the MPU system clock their normally inactive level. The processor is removed from and will be recognized during q,2 if set-up time tpcs is met. the WAIT state by the occurrence of a maskable (mask bit I = "0") or nonmaskable interrupt. This output is capable of Interrupt Request (IRQ) driving one standard TTL load and 30 pF. H TSC is in the This level-sensitive input requests that an interrupt sequence HIGH state, Bus Available will be LOW. be generated within the machine. The processor will wait until it completes the current instruction that is being Read/Write (R/W) executed before it recognizes the request. At that time, if the This TTL -compatible output signals the peripherals and interrupt mask bit in the condition code register is not set, memory devices whether the MPU is in a Read (HIGH) or the machine will begin an interrupt sequence. The index Write (LOW) state. The normal standby state of this signal is register, program counter, accumulators, and condition code Read (HIGH). 3-State Control (TSC) going HIGH will turn register are stored away on the stack. Next the MPU will Read/Write to the OFF (high-impedance) state. Also, when respond to the interrupt request by setting the interrupt mask the processor is halted, it will be in the OFF state. This bit HIGH so that further interrupts may occur. At the end of output is capable of driving one standard TTL load the cycle, a 16-bit address will be loaded that points to a and 90 pF. vectoring address which is located in memory locations FFF8 and FFF9. An address loaded at these locations Reset (RESET) causes the MPU to branch to an interrupt routine in memory. The RESET input is used to reset and start the MPU from a Interrupt timing is shown in Figure 3. power-down condition resulting from a power failure or initial start-up of the processor. This input can also be used to The HALT line must be in the HIGH state for interrupts to be reinitialize the machine at any time after start-up. serviced. Interrupts will be latched internally while HALT is LOW. If a HIGH level is detected in this input, this will signal the MPU to begin the reset sequence. During the reset The IRQ has a high-impedance pullup device internal to the sequence, the contents of the last two locations (FFFE, chip; however, a 3 kQ external resistorto Vcc should be FFFF) in memory will be loaded into the program counter to used for wire-OR and optimum control of interrupts. point to the beginning of the reset routine. During the reset routine, the interrupt mask bit is set and must be cleared Non-Maskable Interrupt (NMI) and Wait for Interrupt (WAI) under program control before the MPU can be interrupted by The F6800 is capable of handling two types of interrupts: IRQ. While RESET is LOW (assuming a minimum of eight maskable (IRQ) as described earlier, and non-maskable clock cycles have occurred) the MPU output signals will be (NMI). IRQ ismaskable by the interrupt mask in the condition in the following states: VMA = LOW, BA = LOW, data bus = code register while NMI is not n,~.skable. The handling of high impedance, R/W = HIGH (read state), and the address th.ese interrupts by the MPU is the same except that each bus will contain the reset address FFFE. Figure 2 illustrates has its own vector address. The behavior of the MPU when a power-up sequence using the RESET control line. After the interrupted is shown in Figure 3 which details the MPU power supply reaches 4.75 V a minimum of eight clock response to an interrupt while the MPU is executing the 5-14 F6800/F68AOO/F68BOO Fig. 2 Reset Timing 1 CYO~LE 1 02 1 03 1 #7 1 #8 1 #9 1 1 n +1 1"+21n+3 I n + 4 I n + 5 1 ., JlJL...I4~ L- POWER ON j is SWITCH POWER SUPPLY - '4.75 V 5.25 V '5 :: --I tpcs 55 5S ADDRESS • BUS FFFE FFFE FFFF NEW PC R/Vi ~~~~~~~~~\~~~~~~'l~\\'l~"''l~~~~~~@~\~~~:~~'l~~~~~~~~~"'~~~~~~V~"""---'Hj------------- VMA ~~~~~\\~~\~~~~~~~_ _ _~~j--_ _ _~I DATA BUS ~~%~~~\\\~~~\~~\\~\\\~t\~ PC 8~1S PC 0·7 FIRST ~ INSTRUCTION BA \~\\~\\\\~\\i~~~~--------~'S~----------------------------~SI5S--------_________ ~ = INDETERMINATE Fig. 3 Interrupt Timing 1 CY#~LE 1 02 1 #3 1 #4 1 os 1 #6 1 #7 1 #8 1 #9 1 #10 1 #11 1 #12 I #13 I 014 I 015 I ., ADDRESS ----~,---,,--~~--~--~~--~---U~--U_--_V--~U_--~~--~,_--~--~,_-­ BUS SPIn - 1) SPIn - 2) SPIn - 3) SPIn - 4) SPIn - 5) SPIn - 6) SPIn - 7) FFF8 FFF9 NEW PC ADDRESS ADDRESS ADDRESS fRO OR NMI INTERRUPT MASK INST (x) PC 0·7 PC 8·15 X 0·7 X 8·15 ACCA ACCB CCR NEW PC 8·15 NEW PC 0·7 FIRST INST OF ADDRESS ADDRESS INTERRUPT ROUTINE R/Vi VMA 5·15 F6800/F68AOO/F68BOO control program. The interrupt shown could be either IRQ or will reach the high impedance state at tTSO (3'state delay), NMI and can be asynchronous with respect to 2. The with VMA being forced LOW. In this example, the data bus is interrupt is shown going LOW at time tpcs in cycle # 1 which also in the high impedance state while 2 is being held LOW precedes the first cycle of an instruction (OP code fetch). since DBE = 2. At this time, a DMA transfer could occur on This instruction is not executed, but instead, the program cycles #3 and #4. When TSC is returned LOW, the MPU counter (PC), index register (IX), accumulators (ACCX), and address and R/W lines return to the bus. Because it is too the condition code register (CCR) are pushed onto the stack. late in cycle #5 to access memory, this cycle is dead and used for synchronization. Program execution resumes in The Interrupt Mask bit is set to prevent further interrupts. The cycle #6. address of the interrupt service routine is then fetched from FFFC, FFFD for an NMI interrupt and from FFF8, FFF9 for an Valid Memory Address (VMA) IRQ interrupt. Upon completion of the interrupt service This output indicates to peripheral devices that there is a routine, the execution of RTI will pull the PC, IX, ACCX, and valid address on the address bus. In normal operation, this CCR off of the stack; the Interrupt Mask bit is restored to its signal should be utilized for enabling peripheral interfaces condition prior to Interrupts. such as the PIA and ACIA. This signal is not 3·state. One standard TTL load and 90 pF may be directly driven by this Figure 4 is a similar interrupt sequence, except in this case, active HIGH signal. a WAIT instruction has been executed in preparation for the interrupt. This technique speeds up the MPU's response to HALT the interrupt because the stacking of the PC, IX, ACCX, and When this level sensitive input is in the LOW state, all the CCR is already done. While the MPU is waiting for the activity in the machine will be halted. interrupt, Bus Available will go HIGH indicating the following states of the control lines: VMA is LOW, and the address The HALT line provides an input to the "MPU to allow control bus, R/W and data bus are all in the high impedance state. of program execution by an outside sowce. If HALT is HIGH, After the interrupt occurs, it is serviced as the MPU will execute the instructions; if it is LOW, the MPU previously described. will go to a halted, or idle, mode. A response signal, Bus Available (BA) provides an indication of the current MPU Table 1 Memory Map for Interrupt Vectors status. When BA is LOW, the MPU is in the process of Vector executing the control program; if BA is HIGH, the MPU has MS LS Description halted and all internal activity has stopped. FFFE FFFF Restart When BA is HIGH, the address bus, data bus, and R/W line FFFC FFFD Non-maskable Interrupt will be in a high impedance state, effectively removing the MPU from the system bus. VMA is forced LOW so that the FFFA FFFB Software Interrupt floating system bus will not activate any device on the bus FFF8 FFF9 Interrupt Request that is enabled by VMA. Refer to Figure 4 for program flow for Interrupts. While the MPU is halted, all program activity is stopped, and 3-State Control (TSC) if either an NMI or IRQ interrupt occurs, it will be latched into When the 3-State Control (TSC) line is a logic" 1", the the MPU and acted on as soon as the MPU is taken out of address bus and the R/W line are placed in a high the halted mode. If a RESET command occurs while the impedance state. VMA and BA are forced LOW when TSC = MPU is halted, the following states occur: VMA = LOW, "1" to prevent false reads or writes on any device enabled BA = LOW, data bus = high impedance, R/W = HIGH (read by VMA. It is necessary to delay program execution while state), and the address bus will contain address FFFE as TSC is held HIGH. This is done by insuring that no transitions long as RESET is LOW. As soon as the HALT line goes HIGH, of 1 (or 2) occur during this period. (Logic levels of the the MPU will go to locations FFFE and FFFF for the address clocks are irrelevant so long as they do not change.) Since of the reset routine. the MPU is a dynamic device, the 1 clock can be stopped for a maximum time PWH without destroying data within the Figure 6 shows the timing relationships involved when halting MPU. TSC then can be used in a short Direct Memory the MPU. The instruction illustrated is a I-byte, 2·cycle Access (DMA) application. instruction such as CLRA. When HALT goes LOW, the MPU will halt after completing execution of the current instruction. Figure 5 shows the effect of TSC on the MPU. TSC must The transition of HALT must occur tpcs before the trailing have its transitions at tTSE (3-state enable) while holding 1 edge of 1 of the last cycle of an instruction (Point A of HIGH and ¢2 LOW as shown. The address bus and R I W line 5-16 F6800/F68AOO/F68BOO Fig. 4 Wait Instruction Timing I n+l I n+2 I n+3 I n+4 I n+5 I .2 NEW pc ADDRESS ADDRESS~~:)C:::~::::~-+ BUS~'" __~~__ -+____~::::){::::~:::>C:::: INSTRUCTION SPIn) SPIn - 1) SPIn - 4) SPIn - 5) SPIn - 8) SPIn - 7) FFF8 FFF9 R/iN VMA INTERRUPT MASK FIRST INST OF INTERRUPT ROUTINE IRQ OR NMI DATA BUS ~.~x=~~~~=x=c~~ ~~~ PC 0-7 PC 8-15 ACCA ACCB CCR I11'5- NEW PC 8-15 NEW PC 0-7 ADDRESS ADDRESS BA --------------------------~S:5~--------------~--~I~ .. \'------ Note Midrange waveform indicate's high-impedance state. 5-17 F6800/F68AOO/F68BOO Fig. 5 3·State Control Timing CYCLE #1 #2 #3 #. #5 #6 #7 #8 #9 .' SYSTEM trSD tTSD ADDRESS BUS R/Vi VMA -"~ __~+-~ ________________ ~~ DATA BUS <1>2 = DBE TSC ITSE Fig. 6 Halt and Single Instruction Execution for System Debug INSTRUCTION INSTRUCTION FETCH IEXECUTE I ., BA I ss ,______r- I- VMA :::x:::::J<'y=-......---.ljS:5~_ _ _-J1 FETCH EXECUTE ADDRESS BUS < ADOR M +1 X ) DATA BUS INST INST X Note Midrange waveform indicates high impedance state. 5·18 F6800/F68AOO/F68BOO Figure 6). HALT must not go LOW any time later than the arithmetic logic unit operation: negative (N), zero (Z), minimum tpcs specified. overflow (V), carry from bit 7 (C), and half carry from bit 3 (H). These bits of the condition code register are used as The fetch of the OP code by the MPU is the first cycle of the testable conditions for the conditional branch instructions. Bit instruction. If HALT had not been LOW at Point A, but went 4 is the interrupt mask bit (I). The unused bits of the LOW during <1>2 of that cycle, the MPU would have halted condition code register (bit 6 and bit 7) are ones. after completion of the following instruction. BA will go HIGH by time tSA (bus available delay time) after the last MPU Instruction Set instruction cycle. At this time, VMA is LOW and R/W, address bus, and the data bus are in the The F6800 instructions are described in detail in the F6800 high-impedance state. Programming Manual. This section will provide a brief introduction and discuss their use in developing F6800 To debug programs it is advantageous to step through control programs. The F6800 has a set of 72 different programs instruction by instruction. To do this, HALT must be executable source instructions. Included are binary and • brought HIGH for one MPU cycle and then returned LOW as decimal arithmetic, logical, shift, rotate, load, store, shown at Point B of Figure 6. Again, the transitions of HALT conditional or unconditional branch, interrupt and stack must occur tpcs before the trailing edge of the next 1, manipulation instructions. indicating that the Address Bus, Data Bus, VMA and R/W lines are back on the bus. A single-byte, 2-cycle instruction Each of the 72 executable instructions of the source such as LSR is used for this example also. During the first language assembles into one to three bytes of machine cycle, the instruction Y is fetched from address M + 1. BA code. The number of bytes depends on the particular returns HIGH at tSA on the last cycle of the instruction instruction and on the addressing mode. (The addressing indicating the MPU is off the bus. If instruction Y had been modes which are available for use with the various executive three cycles, the width of the BA LOW time would have been instructions are discussed later.) increased by one cycle. The coding of the first (or only) byte corresponding to an MPU Registers executable instruction is sufficient to identify the instruction and the addressing mode. The hexadecimal equivalents of The MPU has three 16-bit registers and three 8-bit registers the binary codes, which result from the translation of the 72 available for use by the programmer (Figure n. instructions in all valid modes of addressing, are shown in Table 2. There are 197 valid machine codes, 59 of the 256 Program Counter possible codes being unassigned. The program counter is a 2-byte (16 bits) register that points to the current program address. When an instruction translates into two or three bytes of code, the second byte, or the second and third bytes Stack Pointer contain(s) an operand, an address, or information from which The stack pointer is a 2-byte register that contains the an address is obtained during execution. address of the next available location in an external push- down I pop-up stack. This stack is normally a random access Microprocessor instructions are often divided into three read I write memory that may have any location (address) general classifications: (1) memory reference, so called that is convenient. In those applications that require storage because they operate on specific memory locations; (2) of information in the stack when power is lost, the stack must operating instructions that function without needing a memory be nonvolatile. a reference; (3) II instructions for transferring data between the microprocessor and peripheral devices. Index Register The index register is a 2-byte register that is used to store In many instances, the F6800 performs the same operation data or a 16-bit memory address for the Indexed mode of on both its internal accumulators and the external memory memory addressing. locations. In addition, the F6800 interface adapters (PIA and ACIA) allow the MPU to treat peripheral devices exactly like Accumulators other memory locations, hence, no 110 instructions as such The MPU contains two 8-bit accumulators that are used to are required. Because of these features, other hold operands and results from an arithmetic logic unit (ALU). classifications are more suitable for introducing the F6800's instruction set: (1) accumulator and memory operations; (2) Condition Code Register program control operations; (3) condition code The condition code register indicates the results of an register operations. 5-19 F6800/F68AOO/F68BOO Fig. 7 Programming Model of The Microprocessing Unit ACCA ACCUMULATOR A AceB ACCUMULATOR B 15 IX INDEX REGISTER 15 PC PROGRAM COUNTER 15 SP STACK POINTER CONDITION CODe REGISTER CARRY (FROM 'BIT 7) OVERFLOW ZERO L -_ _ _ NEGATIVE ' - - - - - INTERRUPT MASK L _ _ _ _ _ _ HALF CARRY (FROM BIT 3) Table 2 Microprocessor Instruction Set-Alphabetic Sequence ABA Add Accumulators CLV Clear Overflow ROR Rotate Right ADC Add with Carry CMP Compare RTI Return from Interrupt ADD Add COM Complement RTS Return from Subroutine AND Logical And CPX Compare Index Register SBA Subtract Accumulators ASL Arithmetic Shift Left DAA Decimal Adjust SBC Subtract with Carry ASR Arithmetic Shift Right DEC Decrement SEC Set Carry BCC Branch if Carry Clear DES Decrement Stack Pointer SEI Set Interrupt Mask BCS Branch if Carry Set DEX Decrement Index Register SEV Set Overflow BEQ Branch if Equal to Zero Exclusive OR STA Store Accumulator EOR BGE Branch if Greater or Equal Zero STS Store Stack Register BGT Branch if Greater than Zero INC Increment STX Store Index Register BHI Branch if Higher INS Increment Stack Pointer SUB Subtract BIT Bit Test INX Increment Index Register SWI Software Interrupt BLE Branch if Less or Equal JMP Jump TAB Transfer Accumulators BLS Branch if Lower or Same JSR Jump to Subroutine TAP Transfer Accumulators to Condition BLT Branch if Less than Zero Code Reg. LDA Load Accumulator BMI Branch if Minus TBA Transfer Accumulators LDS Load Stack Pointer BNE Branch if Not Equal to Zero TPA Transfer Condition Code Reg. to LDX Load Index Register BPL Branch if. Plus Accumulator LSR LogicarShift Right BRA BranchAlways TST Test BSR Branch to Subroutine NEG Negate TSX Transfer Stack Pointer to Index BVC Branch if Overflow Clear NOP No Operation Register BVS Branch if Overflow Set ORA Inclusive OR Accumulator TXS Transfer Index Register to Stack CBA Compare Accumulators PSH Push Data Pointer CLC Clear Carry PUL Pull Data Wait for Interrupt WAI CLI Clear Interrupt Mask ROL Rotate Left CLR Clear 5-20 F6800/F68AOO/F68BOO Table 3 Hexadecimal Values of Machine Codes 00 3B RTI 76 ROR EXT B1 CMP A EXT EC 01 NOP 3C 77 ASR EXT B2 SBC A EXT ED 02 3D 78 ASL EXT B3 EE LOX INO 03 3E WAI 79 ROL EXT B4 AND A EXT EF STX INO 04 3F SWI 7A DEC EXT B5 BIT A EXT FO SUB B EXT 05 40 NEG A 7B B6 LOA A EXT F1 CMP B EXT 06 TAP 41 7C INC EXT B7 STA A EXT F2 SBC B EXT 07 TPA 42 70 TST EXT B8 EOR A EXT F3 08 INX 43 COM A 7E JMP EXT· B9 AOC A EXT F4 AND B EXT 09 OEX 44 LSR A 7F CLR EXT BA ORA A EXT F5 BIT B EXT OA CLV 45 80 SUB A IMM BB ADD A EXT F6 LOA B EXT OB SEV 46 ROR A 81 CMP A IMM BC CPX EXT F7 STA B EXT OC CLC 47 ASR A 82 SBC A IMM BO JSR EXT F8 AOC B EXT 00 SEC 48 ASL A 83 BE LOS EXT F9 AOC B EXT • OE Cli 49 ROL A 84 AND A IMM BF STS EXT FA ORA B EXT OF SEI- 4A DEC A 85 BIT A IMM CO SUB B IMM FB ADD B EXT 10 SBA 4B 86 LOA A IMM C1 CMP B IMM FC 11 CBA 4C INC A 87 C2 SBC B IMM FO 12 40 TST A 88 EOR A IMM C3 FE LOX EXT 13 4E 89 AOC A IMM C4 AND B IMM FF STX EXT 14 4F CLR A 8A ORA A IMM C5 BIT B IMM 15 50 NEG B 8B ADD A IMM C6 LOA B IMM 16 TAB 51 8C CPX A IMM C7 17 TBA 52 80 BSR REL C8 EOR B IMM 18 53 COM B 8E LOS IMM C9 AOC B IMM 19 OAA 54 LSR B 8F CA ORA B IMM 1A 55 90 SUB A OIR CB ADD B IMM 1B ABA 56 ROR B 91 CMP A OIR CC 1C 57 ASR B 92 SBC A OIR CD 10 58 ASL B 93 CE LOX IMM 1E 59 ROL B 94 AND A OIR CF 1F 5A DEC B 95 BIT A OIR DO SUB B OIR 20 BRA REL 5B 96 LOA A OIR 01 CMP B OIR 21 5C INC B 97 STA A OIR 02 SBC B OIR 22 BHI REL 50 TST B 98 EOR A OIR 03 23 BLS REL 5E 99 AOC A OIR 04 AND B OIR 24 BCC REL 5F CLR B 9A ORA A OIR 05 BIT B OIR 25 BCS REL 60 NEG INO 9B ADD A OIR 06 LOA B OIR 26 BNE REL 61 9C CPX OIR 07 STA B OIR 27 BEQ REL 62 90 08 EOR B OIR 28 BVC REL 63 COM INO 9E LOS OIR 09 AOC B OIR 29 BVS REL 64 LSR INO 9F STS OIR OA ORA B OIR 2A BPL REL 65 AO SUB A INO DB ADD B OIR 2B BMI REL 66 ROR INO A1 CMP A INO DC 2C BGE REL 67 ASR INO A2 SBC A INO DO 20 BLT REL 68 ASL INO A3 DE LOX OIR 2E BGT REL 69 ROL INO A4 AND A INO OF STX OIR 2F BLE REL 6A DEC INO A5 BIT A INO EO SUB B INO 30 TSX 6B A6 LOA A INO E1 CMP B IND. 31 INS 6C INC INO A7 STA A INO E2 SBC B INO 32 PUL A 60 TST INO A8 EOR A INO E3 33 PUL B 6E JMP INO A9 AOC A INO E4 AND B INO 34 DES 6F CLR INO AA ORA A INO E5 BIT B INO 35 TXS 70 NEG EXT AB ADD A INO E6 LOA B INO 36 PSH A 71 AC CPX INO E7 STA - B INO 37 PSH B 72 AD JSR INO E8 EOR B INO 38 73 COM EXT AE LOS INO E9 AOC B INO 39 RTS 74 LSR EXT AF STS INO EA ORA B INO 3A 75 BO SUB A EXT EB ADD B INO Notes 1. Addressing Modes: A = Accumulator A IMM = Immediate REL = Relative B = Accumulator B OIR = Direct INO = Indexed 2. Unassigned code indicated by an asterisk (.) 5·21 --------~- F6800/F68AOO/F68BOO Table 4 Accumulator and Memory Operations The accumulator and memory operations and their effect on the CCR are shown in Table 4. Included are Arithmetic Logic, Data Test and Data Handling instructions. Add .... ing Mod•• Boolean/Arithmetic Operation Condo Code Reg •• Operations Mnemonic Immed Direct Index Extnd Impliad (All register labels S 4 3 2 1 0 OP - = OP - = OP - = OP - = OP - = refer to contents H I N Z V C Add ADDA 86 2 2 9B 3 2 AB 5 2 BB 4 3 A + M-A I • I I I I ADDB CB 2 2 .DB 3 2 EB 5 2· FB 4 3 B + M-B I • I I I I Add Acmltrs ABA lB 2 1 A+B-A I • I I I I Add with Carry ADCA 89 2 2 99 3 2 A9 5 2 B9 4 3 A+M+C-A I • I I I I ADCB C9 2 2 D9 3 2 E9 5 2 F9 4 3 B+M+C-B I • I I I And ANOA 84 2 2 94 ·3 2 A4 5 2 B4 4 3 A. M - A • • R • I I AN DB C4 2 2 D4 3 2 E4 5 2 F4 4 3 B. M - B • • R • I I Bit Test BITA 85 2 2 95 3 2 A5 5 2 B5 4 3 A·M • • R • I I BITB C5 2 2 D5 2 E5 5 2 F5 4 3 B·M • • R • I I I Clear CLR 3 6F 7 2 7F 6 3 00 - M • • R S R R CLRA 4F 2 1 00 - A • • R S R R CLRB 5F 2 1 00 - B • • R S R R Compare CMPA 81 2 2 91 3 2 A1 5 2 B1 4 3 A-M • • I I I I CMPB Cl 2 2 D1 3 2 E1 5 2 F1 4 3 B-M • • I I I I Compare Acmltrs CBA 11 2 1 A-B • • I I I I Complement, Is COM 63 ·7 2 73 6 3 M-M • • R S I I COMA 43 2 1 A-A • • R 5 I I COMB 53 2 1 B-B • • R S I I Complement, 2s NEG 60 7 2 70 6 3 OO-M-M • • 1 2 I I (Negate) NEGA 40 2 1 OO-A-A • • 1 2 I I NEGB 50 2 1 OO-B-B • • 1 2 I I Decimal Adjust, A DAA 19 2 1 Converts Binary Add. of BCD • • 3 I I I Characters into BCD Format Decrement DEC 6A 7 2 7A 6 3 M -1 - M • • 4 • I I DECA 4A 2 1 A-I - A • • 4 • I I DECB 5A 2 1 B-1 - B • • 4 • I I Exclusive OR EORA 88 2 2 98 3 2 A8 5 2 B8 4 3 A + M-A • • R • I I EORB C8 2 2 D8 3 2 E8 5 2 F8 4 3 B + M-B • • R • I I Increment INC 6C 7 2 7C 6 3 M + 1- M • • 5 • I I INCA 4C 2 1 A + 1- A • • 5 • I I INCB 5C 2 1 B + 1- B • • 5 • I I Load Acmitr LDAA 86 2 2 96 3 2 A6 5 2 B6 4 3 M-A • • R • I I LDAB C6 2 2 D6 3 2 E6 5 2 F6 4 3 M-B • • R • I I Or, Inclusive ORAA 8A 2 2 9A 3 2 AA 5 2 BA 4 3 A+M-A • • R • I I ORAB CA 2 2 DA 3 2 EA 5 2 FA 4 3 B + M -.B • • R • I I Push Data PSHA PSHB 36 37 4 4 1 1 A - Msp, SP - 1 - SP B - Msp, SP - 1 - SP .. • • • • • • • • • • • Pull Data PULA 32 4 1 SP + 1 - SP, Msp - A • • • • • • PULB 33 4 1 SP + 1 - SP, Msp - B • • • • • • 5·22 F6800/F68AOO/F68BOO Table 4 Accumulator and Memory Operations (Cont.) Addressing Mode. Boolean/Arithmetic Operation Condo Code Reg •• Operations Mnemonic Immad Direct Index Extnd Implied (All register labels 5 4 3 2 1 0 OP - = OP - = OP '- = OP - = OP - = ralar to contents H I N Z V C Rotate Left ROL 69 7 2 79 6 3 M • • I I 6 I }L{]-II I I II I IIJ • • Rotate Right ROLA ROLB ROR 66 7 2 76 6 3 49 59 2 2 1 1 • • A B M C b7 - bO •• I I I I I I 6 6 6 I I I RORA 46 2 1 A }CD-II I I I I I I J C b7 bO • • I I 6 I • • :} - RORB 56 2 1 B I I 6 I Shift Left, Arithmetic ASL ASLA 68 7 2 78 6 3 48 2 1 C - bO • • 0-111 I I I I 11-0 • • b7 I I I I 6 6 I I • • I I 6 I • ASLB 58 2 1 Shift Right, ASR 67 7 2 77 6 3 M • • I I 6 I Arithmetic ASRA 47 2 1 A }DI III b7 11 11-0 bO C • • I I 6 I ASRB 57 2 1 B • • I I 6 I Shilt Right, Logic LSR LSRA LSRB 64 7 2 74 6 3 44 54 2 2 1 1 M A }O-i I I I 1 1 1 1 1 - 0 B b7 - bO C • • R • • R • • R I I I 6 6 6 I I I Store Acmltr STAA 97 4 2 A7 6 2 B7 5 3 A-M • • I I R • STAB 07 4 2 E7 6 2 F7 5 3 B-M • • I I R • Subtract SUBA 60 2 2 90 3 2 AO 5 2 80 4 3 A- M - A • • I I I I SUBB CO 2 2 DO 3 2 EO 5 2 FO 4 3 B- M - B • • I I I I Subtract Acmltrs SBA 10 2 1 A- B - A • • I I I I Subtr, with Carry SBCA 82 2 2 92 3 2 A2 5 2 B2 4 3 A-M-C-A • • I I I I SBCB C2 2 2 02 3 2 E2 5 2 F2 4 3 B-M-C-B • • I I I I Transler Acmltrs TAB 16 2 1 A-B • • I I R • TBA 17 2 1 B-A • • I I R • Test, Zero TST 60 7 2 70 6 3 M - 00 • • I I R R or Minus TSTA 40 2 1 A - 00 • • I I R R TSTB 50 2 1 B - 00 • • I I R R H I N Z V C Note Accumulator addressing mode instructions are included in the column for IMPLIED addressing ·See condition code register notes page 26 Legend: Condition Code Symbols: OP Operation Code (Hexadecimal); H Half·carry from bit 3; Number 01 MPU Cycles; I Interrupt mask # Number of Program Bytes; N Negative (sign bit) + Arithmetic Plus; Z Zero (by1e) Arithmetic Minus; V Overflow. 2's complement Boolean AND; C Carry from bit 7 Msp Contents of memory locatiol1 R Reset Always pointed to be Stack Pointer; S Set Always + Boolean Inolusive OR; Test and set if true. cleared otherwise e M Boolean Exclusive OR; Complement of M; Not Affected ~ Transfer Into; O B i t = Zero; 00 By1e = Zero; 5-23 F6800/F68AOO/F68BOO Program Control Operations register. This causes'the next byte to 'be pulled from the' stack to come from the location indicated by the index Program Control operation can be subdivided into two register. The utility of these two instructions can be, clarified categories: (1) index register / stack pointer instructions; (2) by describing the stack concept relative to the jump and branch operations. F6800 system. Index Register/Stack POinter Operations The stack can be thought of as a sequential list of data The instructions for direct operation on the MPU's index stored in the MPU's read/write memory. The stack pointer register and stack pointer are summarized in Table 5. contains a 16-bit memory address that is used to access the Decrement (OEX, DES), increment (lNX, INS), load (LOX, list from one end on a last-in-first-out (LIFO) basis in contrast LOS), and store (STX, STS) instructions are provided for to the random access mode used by the MPU's other both. The compare instruction, CPX, can be used to compare addressing modes. the index register to a 16-bit value and update the, condition code register accordingly. The F6800 instruction set and interrupt structure allow extensive ~se of the stack concept for efficient handling of The TSX instruction causes the index register to be loaded data movement, subroutines and interrupts. The instructions with the address of the last data byte put onto the stack. can be used to establish one or more stacks anywhere in The TXS instruction loads the stack pointer with a value read/write memory. Stack length is limited only by the equal to one less than the current contents of the index amount of memory that is made available. Table 5 Index Register and Stack Pointer Instructions Condo Code Reg.· Pointer Immed Direct Index Extend Implied Boolean/Arithmetic 5 4 3 2 1 Operations Mnemonic Operation . 0 OP - # OP - # OP - # OP - # OP - # H I N Z V C Compare .Index Reg CPX 8C 3 3 9C 4 2 AC 6 2 BC 5 3 XH - M, XL - (M + 1) • ® • • (j) I Decrement Index Reg DEX 09 4 1 X-1-X • • • • • I Decrement Stack Pntr ; DES 34 4 1 SP - 1 - SP • • • • • • Increment Index Reg iNX 08 4 1 X+1-X • • • • • I Increment Stack Pntr iNS 31 4 1 SP + 1 - SP • • • • • • Load Index Reg LOX CE 3 3 DE 4 2 EE 6 2 FE 5 3 M - XH, (M + 1) - XL • •® I R • Load Stack Pntr LOS 8E 3 3 9E 4 2 AE 6 2 BE 5 3 M - SPH, (M + 1) - SPL • •® I R • Store Index Reg STX OF 5 2 EF 7 2 FF 6 3 XH - M, XL - (M + 1) • .® I R • Store Stack Pntr STS 9F 5 2 AF 7 2 BF 6 3 SPH - M, SPL - (M + 1) • •® I R • Indx Reg - Stack Pntr TXS 35 4 1 X - 1 - SP • • • • • • Stack Pmr - Indx Reg TSX 30 4 1 SP + 1 - X • • • • • • ·See condition code register notes page 26 5-24 F6800/F68AOO/F68BOO Operation of the stack pointer with the push and pull is pushed onto the stack. For both of these instructions, the instructions is illustrated in Figures 8 and 9. The push return address is the memory location following the bytes of instruction (PSHA) causes the contents of the indicated code that correspond to the BSR and JSR instruction. The accumulator (A in this example) to be stored in memory at code required for BSR or JSR may be either two or three the location indicated by the stack pointer. The stack pOinter bytes, depending on whether the JSR is in the indexed (two is automatically decremented by one following the siorage bytes) or the extended (three bytes) addressing mode. operation and is "pointing" to the next empty stack location. Before it is stacked, the program counter is automatically The pull instruction (PULA or PU.LB) causes the last byte incremented the correct number of times to be pointing at the stacked to be loaded into the appropriate accumulator. The location of the next instruction. The return from subroutine stack pointer is automatically incremented by one just prior instruction, RTS, causes the return address to be retrieved to the data transfer so that it will point to the last byte and loaded into the program counter as shown in Figure 14. stacked rather than the next empty location. Note that the pull instruction does not remove the data from memory; in the There are several operations that cause the status of the example, 1A is still in location (m + 1) following execution of MPU to be saved on the stack. The software interrupt (SWI) PULA. A subsequent push instruction would overwrite that and wait for injerrupt (WAI) instructions as well as the location with the new pushed data. maskable (IRQ) and non-maskable (NMI) hardware interrupts 5 all cause the MPU's internal registers (except for the stack Execution of the branch to subroutine (BSR) and jump to , pointer itself) to be stacked as shown in Figure 16. MPU subroutine (JSR) instructions cause a return address to be status is restored by the return from interrupt, RTI, as shown saved on the stack as shown in Figures 11 through 13. The in Figure 15. stack is decremented after each byte of the return address Fig. 8 Stack Operation, Push Instruction MPU ACCA m ~- m - 2 m- 2 m-1 .,'"'" SP----.m -1 SP~m e NEW DATA m F3 l- e PREVIOUSLY STACKED DATA 1m + m +1 m +3 2 7F 63 FD c PREVIOUSLY STACKED r+ m+2 1 DATA m + 3 7F 63 FD - 3C' 3C P$HA PC _ _ NEXT INSTR (a) BEFORE PSHA (b) AHER PSHA 5-25 F6800/F68AOO/F68BOO Fig. 9 Stack Operation, Pull Instruction MPU MPU ACCA EEl m -2 r-- - m -2 m-l m-l I SP--+-m PREVIOUSLY m + 1 STACKED m+ 2 lA I S p - m+1 PREVIOUSLY m+2 m 1A 3C DATA +3 m 3C D5 3 STAg~~~ m + ::::.~D~5:::~ PC - EC PULA EC PC_ NEXT INSTR (a) BEFORE PULA - - Fig. 10 Program Flow for Jump and Branch Instructions INDXD I ~ n+ 1 X+K MAIN PROGRAM ~--T"'--" '---_...... ..-.....J~~ ~ K .....---...., INEXT INSTRUCTION I n+l (n+2) ±K . . . --r--... ~ _ _ _ _ _... ·K = SIGNED NIIT VALUE (a) JUMP (b) BRANCH Fig. 11 Program Flow for BSR , m_2~ m-1 sP ......... m SP~m-2 m -1 m ~ - (n +2)H (n +2)L m +1 - -- 7E m+l 7E - 7A pc·....... n - BSR r- BSR n +1 ±K =OFFSET· n +1 ±K =OFFSET - n+2 NEXT MAIN INSTR n+2 NEXT MAIN INST · K = SIGNED 7-BIT VALUE - PC"'(n +2) ±K lSTSUBRINSTR (a) BEFORE EXECUTION (b) AFTER EXECUTION 5·26 F6800/F68AOO/F68BOO Fig. 12 Program Flow for JSR (Extended) m- 2 ~ - m- 3 m -1 SP ...... m - 2 SP ....... m m -1 (n+3)H m +1 7E (n + 3)L m +2 7A m +1 7E PC_n - - 7D_ JSR~BD m +2 JSR n+1 !Itt = SUBR ADDR n+1 SH = SUBR ADDR n+2 SL = SUBRADDR n+2 SL = SUBR ADDR n+3 NEXT MAIN INSTR II n+3 NEXT MAIN INSTR (a) BEFDRE EXECUTION (S FORMED FROM SHANDSL) 1--::::=::1 (b) AFTER EXECUTION Fig. 13 Program Flow for JSR (Indexed) m- 2 sP ....... m - 2 m-1 m -1 (n +2)H SP--.m m (n +2)L m+1 m+1 7E 7A PC--+-n .JSR ~ AD n+1 n+1 K ~ OFFSET n+2 NEXT MAIN INSTR n+2 NEXT MAIN INSTR *K = a-BIT UNSIGNED VALUE PC- X· +K 1ST SUBR INSTR (a) BEFORE EXECUTION ·CONTENTS OF INDEX REGISTER (b) AFTER EXECUTION 5·27 F6800/F68AOO/F68BOO Fig. 14 Prollrlm Flow for RTS Sp-..m-2 - - m-·2 m -1 ("+3)H m -1 ,m ("+3)l SP:""""'m 'm + 1 7E m+l - - 7~ JSR =10 - JSR -BD " +1 SH = SUBRADDR SH = SUIR ADDR "+'2 IlL = SOBRADDR SL - SUBR ADDR " +3 NEXT MAIN INSTR NEXT MAIN INSTR lAST SUBR INSTR -- lAST SUBR INSTR RTS Sn RTS - (a) BEFORE EXECUTION (b) AFTER EXECUTION Flg.15 ProClrlm Flow for RTI SP--...m -7 --... m -7 m -8 CCR m -6 CCR m -5 ACCB m -5 ACCB m -4 ACCA m -4 ACCA m -3 X- (INDEX REG) m- 3 X- m -2 XL (INDEX REG) m-2 XL m-l PC(" + l)H m -1 PCH m PC(" + l)L SP---.m PCl " +1 - 7E_ NEXT MAIN INSTR PC_" + 1 - 7E_ NEXT MAIN INSTR Sn LAST INTER INSTR - LAST IIiTER INSTR - PC_ RTI Sn RTI -....- (a) BEFORE EXECUTION - - (b) AFTER EXECUTION 5·28 F6800/F68AOO/F68BOO Fig. 16 Program Flow for Interrupts n+1 1..-_ _ _...11 c> SP ---+-m - 7 m -6 m- 5 m -4 m- 3 m -2 CONDITION CODE ACMLTR B ACMLTR A INDEX REGISTER (X.) INDEX REGISTER (Xu • m-1 PC(n + l)H PC(n + l)L SWI HDWR WAI NMI INT HDWR INT NO REO NMI WAIT LOOP FFFA FFF8 FFFC FFFE FFFB FFF9 FFFD FFFF INTERRUPT MEMORY ASSIGNMENT1 FFF8 CONSTANT, HDWARE MS FFF9 CONSTANT, HDWARE LS FIRST INSTR FFFA FFFB FFFC SOFTWARE SOFTWARE NON-MASKABLE INT MS LS MS c:=> ADDR FORMED BY FETCHING 2 BYTES FROM PER MEM ASSIGN INTERRUPT PROGRAM FFFD NON·MASKABLE INT LS I 1ST INTERRUPT INSTR FFFE RESTART MS FFFF RESTART LS Note MS = Most Significant Address Byte LS = Least Significant Addres. Byte 5·29 F6800/F68AOO/F68BOO JU,mp and Branch Operation Execution of the jump instruction, JMP, and branch always, The jump and branch instructions are summarized in Table 6. BRA, affects program flow as shown in Figure 10. When the These instructions are used to control the transfer of MPU encounters the jump (indexed) instruction, it adds the operation from one point to another in the control program. offset to the value in the index register and uses the result as the address of the next instruction to be executed. In the The no operation instruction, NOP, while included here, is a extended addressing mode, the address of the next jump operation in a very limited,sense. Its only effect ill to instruction to be executed is fetched from the two locations increment the program counter by one. It is useful during immediately following the JMP instruction. The branch always program development as a stand-in for some other (BRA) instruction is similar to the JMP (extended) instruction instruction that is to be determined during debug. It is also except that the relative addressing mode applies and the used for equalizing the executidn time through alternate branch is limited to the range within -125 or +127 bytes of paths in a control program. the branch instruction itself. The opcode for the BRA instruction requires one less byte than JMP (extended) but takes,one more, cycle to execute. Table 6 Jump and Branch Instructions Condo Code Reg. t Relative Index Extend Implied Operations Mnemonic Branch Test 5 4 3 2 1 0 OP - # OP - # OP - # OP - # H I N Z V C Branch Always BRA 20 4 2 None • • • • • • Branch if Carry Clear BCC 24 4 2 C=O • • • • • • Branch if Carry Set BCS 25 4 2 C = 1 • • • • • • Branch if = Zero BEQ 27 4 2 Z = 1 • • • • • • Branch if ;,: Zero BGE 2C 4 2 N + V = 0 • • • • • • Branch if > Zero B,GT 2E 4 2 Z + (N + V) = 0 • • • • • • Branch if Higher BHI 22 4 2 C+Z=O • • • • • • Branch if :5 Zero BlE 2F 4 2 Z + (N + V) =1 • • • • • • Branch if lower or Same BlS 23 4 2 C +'Z = 1 • • • • • • Branch if < Zero BlT 20 4 2 N + V= 1 • • • • • • Branch if Minus BMI 2B 4 2 N = 1 • • • • • • Branch if not Equal Zero BNE 26 4 2 Z = 0 • • • • • • Branch if Overflow Clear BVC 28 4 2 V = 0 • • • • • • Branch if Overllow Set BVS 29 4 2 V = 1 • • • • • • Branch if Plus BPl 2A 4 2 N = 0 • • • • • • Branch to Subroutine BSR 80 8 2 • • • • • • Jump JMP 6E 4 2 7E 3 3 } See SpeCial Operations • • • • • • Jump to Subroutine JSR AD 8 2 BO 9 3 • • • • • • No Operation NOP 01 2 1 Advances Prog, Cntr. Only • • • • • • Return from Interrupt ATI 3B 10 1 --@-- Aeturn from Subroutine RTS 39 5 1 Software Interrupt Wait for Interrupt' SWI WAI 3F 12 1 3E 9 1 } See Special 'Operations ·I(• ·•)1·1·1·1· • @ •••• • • • • - 'WAI puts address bus, R/W, and data, bus in the 3'state mode while VMA is held LOW. tSee condition code register notes page 26. 5-30 F6800/F68AOO/F68BOO The effect on program flow for the jump to subroutine (JSR) was negative or positive, respectively. and branch to subroutine (BSR) is shown in Figures 11 2. Branch on equal (BEQ) and branch on not equal through 13. Note that the program counter is properly (BNE) are used to test the zero status bit, Z, to incremented to be pointing at the correct return address determine whether or not the result of the previous before it is stacked. Operation of the branch to subroutine operation was equal to zero. These two instructions are and jump to subroutine (extended) instruction is similar useful following a compare (CMP) instruction to test for except for the range. The BSR instruction requires less equality between an accumulator and the operand. opcode than JSR (2 bytes versus 3 bytes) and also executes They are also used following the bit test (BIT) to one cycle faster than JSR. The return from subroutine, RTS, determine whether or not the same bit positions are set is used at the end of a subroutine to return to the main in an accumulator and the operand. program as indicated in Figure 14. 3. Branch on overflow clear (BVC) and branch on overflow set (BVS) tests the state of the V bit to The effect of executing the software interrupt, SWI, and the determine if the previous operation caused an wait for interrupt, WAI, and their relationship to the hardware arithmetic overflow. • interrupts is shown in Figure 15. SWI causes the MPU 4. Branch on carry clear (BCC) and branch on carry contents to be stacked and then fetches the starting address set (BCS) tests the state of the C bit to determine if of the interrupt routine from the memory locations that the previous operation caused a carry to occur. BCC respond to the addresses FFFA and FFFB. Note that as in and BCS are useful for testing relative magnitude when the case of the subroutine instructions, the program counter the values being tested are regarded as unsigned is incremented to point at the correct return address before binary numbers, that is, the values are in the range 00 being stacked. The return from interrupt instruction, RT!, (lowest) to FF (highest). BCC following a comparison (Figure 15) is used at the end of an interrupt routine to (CMP) will cause a branch if the (unsigned) value in the restore control to the main program. The SWI instruction is accumulator is higher than or the same as the value of useful for inserting break points in the control program, that the operand. Conversely, BCS will cause a branch if is, it can be used to stop operation and put the MPU the accumulator value is lower than the operand. registers in memory where they can be examined. The WAI instruction is used to decrease the time required to service a The fifth complementary pair, branch on higher (BHI) and hardware interrupt; it stacks the MPU contents and then branch on lower or same (BLS) are in a sense complements waits for the interrupt to occur, effectively removing the to BCC and BCS. BHI tests for both C and Z = 0; if used stacking time from a hardware interrupt sequence. following a CMP, it will cause a branch if the value in the accumulator is higher than the operand. Conversely, BLS will Fig. 17 Conditional Branch Instructions cause a branch if the unsigned binary value in the accumulator is lower than or the same as the operand. BMI: N= 1 ; BEQ: Z= 1 ; BPL: N = "'; BNE: Z = "'; The remaining two pairs are useful in testing results of operations in which the values are regarded as signed two's BVC: V = "'; BCC: C = "'; complement numbers. This differs from the unsigned binary BVS: V= 1 ; BCS: C=1 case in the following sense: In unsigned, the orientation is higher or lower; in signed two's complement, the comparison BHI: C + Z = '" ; BL T: N 0 V = 1 ; is between larger or smaller where the range of values is BLS: C + Z = 1 ; BGE: N 0 V = '" ; between -128 and +127. BLE: Z + (N 0 V) = 1 ; BGT: Z + (N 0 V) = '" ; Branch on less than zero (BL T) and branch on greater than or equal zero (BGE) test the status bits for N G1 V = "1" The conditional branch instructions, Figure 17, consist of and N G1 V = "0", respectively. BL T will always cause a seven pairs of complementary instructions. They are used to branch following an operation in which two negative numbers test the results of the preceding operation and either were added. In addition, it will cause a branch following a continue with the next instruction in sequence (test fails), or CMP in which the value in the accumulator was negative and cause a branch to another point in the program the operand was positive. BL T will never cause a branch (test succeeds). following a CMP in which the accumulator value was positive and the operand negative. BGE, the complement to BL T, will Four of the pairs are used for simple tests of status bits N, Z, cause a branch following operations in which two positive V, and C: values were added or in which the result was zero. 1. Branch on minus (BMI) and branch on plus (BPL) tests the sign bit, N, to determine if the previous result The last pair, branch on less than or equal zero (BLE) and 5-31 F6800/F68AOO/F68BOO branch on greater than zero (BGT) test the -status bits for Z the MPU that is useful in controlling program flow during ED (N + V) = "1" and zED (N + V) = "0", respectively. system operation. The bits-are defined in Figure 18. The action of BlE is identical to that for Bl T except that a branch will also occur if the result of the previous result was The instructions shown in Table 7 are available to the user zero. Conversely, BGT is similar to BGE except that no for direct manipulation of the CCA. In addition, the MPU branch will occur following a zero result. automatically sets or clears the appropriate status bits as many of the other instructions on the condition code register Condition Code Register Operations were indicated as they were introduced. The condition code register (CCR) is a 6-bit register within Table 7 Condition Code Register Instructions Condo Code Reg.· Implied Operations Mnemonic 5 3 2 1 0 I! OP - # Boolean Operation H .4 I N Z V C Clear Carry ClC OC 2 1 O-C •• .R• • • • R • • •R •• Clear Interrupt Mask Clear Overflow CLI ClV OE OA 2 2 1 1 0-1 O-V • • • • .. Set Carry Set Interrupt Mask Set Overflow Acmltr A - CCR SEG SEI SEV TAP 00 OF OB 06 2 2 2 2 1 1 1 1 1 - C 1 - I 1 -V A - CCR •• S• •• •• • • @ .. •• •S S • • I • I • I • I • I • CCR - Acmltr A TPA 07 2 1 CCR - A R = Reset S= Set • = Not affected t (ALL) Set according to tl1e contents of Accumulator A_ 'See Condition Code Register notes below Condition Code Register Notes: (Bit set if test is true and cleared otherwise) 1 -(Bit V) Test: Result = 10000000? 8 (Bit V) Test: 2s complement overflow from subtraction of MS bytes? 2 (Bit C) Test: Result = OOOOOOOO? 9 (Bit N) Test: Result less than "O"? (Bit 15 = 1) 3 (Bit C) Test: Decimal value of most significant BCD character greater than nine? (Not c.leared if 10 (All) load condition code register from stack. previously set.) (See Spacial Operations) 4 (Bit V) Test: Operand = 10000000 prior to execution? 11 (Bit I) Set when interrupt occurs. If previously set, a non-maskable interrupt is required to exit 5 (Bit V) Test: Operand =- 01111111 prior to execution? the wait state. 6 (Bit V) Test: Set equal to result of N <:E> C after shift 12 (All) Set according to the contents of has occurred. accumUlator A. 7 (Bit N) Test: Sign bit of most significant (MS) byte = 1? 5·32 F6800/F68AOO/F68BOO Fig.·18 Condition Code Register Bit Definition Selection of the desired addressing mode is made by the user as the source statements are written. Translation into bo appropriate opcode then depends on the method used. If H N Z v C manual translation is used, the addressing mode is inherent in the opcode. For example, the immediate, direct, indexed, and extended modes may all be used with the ADD H = Half-carry; set whenever a carry from b 3 to b 4 of the instruction. The proper mode is determined by selecting result is generated by ADD, ABA, ADC; cleared if no b3 (hexadecimal notation) 8B, 9B, AB, or BB, respectively. to b4 carry; not affected by other instructions. Interrupt Mask; set by hardware or software interrupt or The source statement format includes adequate information SEI instruction; cleared by CLI instruction. (Normally not for the selection if an assembler program is used to gen- used in arithmetic operations.) Restored to a zero as a erate the opcode. For instance, the immediate mode is result of an RTI instruction if 1m stored on the stack is selected by the assembler whenever it encounters the" #" LOW. symbol in the operand field. Similarly, an "X" in the operand field causes the indexed mode to be selected. Only the N Negative; set if high order bit (b 7 ) of result is set; relative mode applies to the branch instructions; therefore, cleared otherwise the mnemonic instruction itself is. enough for the assembler to determine addressing mode. Z Zero; set if result = 0; cleared otherwise. For the instructions that use both direct and extended v Overlow; set if there were arithmetic overflow as a modes, the assembler selects the direct mode if the operand result of the operation; cleared otherwise. value is in the range 0-255 and extended otherwise. There are a number of instructions for which the extended mode is C Carry; set if there were a carry from the most valid but the direct is not. For these instructions, the significant bit (b 7 ) of the result; cleared otherwise. assembler automatically selects the extended mode even if the operand is in the 0-255 range. The addressing modes are A CLI-WAI instruction sequence operated properly with early summarized in Figure 19. F6800 processors only if the preceding instruction were odd. (Least Significant Bit = "1".) Similarly it was advisable to Inherent (Includes "Accumulator Addressing") Mode precede any SEI instruction with an odd opcode-such as The successive fields in a statement are normally separated NOP. These precautions are not necessary for F6800 by one or more spaces. An exception to this rule occurs for processors indicating manufacture in November, 1977 instructions that use dual addressing in the operand field and or later. for instructions that must distinguish between the two accumulators. In these cases, A and B are "operands" but Systems which require an interrupt window to be opened the space between them and the operator may be omitted. under program control should use a CLI-NOP-SEI sequence This is commonly done, resulting in apparent four character rather than CLI-SEI. mnemonics for those instructions. Addressing Modes The addition instruction, ADD, provides an example of dual addressing in the operand field: The MPU operates on 8-bit binary numbers presented to it via the data bus. A given number (byte) may represent either Operator Operand Comment data or an instruction to be executed, depending on where it ADD A MEM12 ADD CONTENTS OF MEM12 is encountered in the control program. The F6800 has 72 TO ACCA unique instructions; however, it recognizes and takes action or AD DB MEM12 ADD CONTENTS OF MEM 12 on 197 of the 256 possibilities that can occur using an 8-bit TO ACCB word length. This larger number of instructions results from the fact that many of the executive instructions have more The example used earlier for the test instruction, TST, also than one addressing mode. applies to the accumulators and uses the "accumulator addressing mode" to designate which of the two These addressing modes refer to the manner in which the accumulators is being tested: program causes the MPU to obtain its instructions and data. The programmer must have a method for addressing the Operator Comment MPU's internal registers and all of the external TSTB TEST CONTENTS OF ACCB memory locations. or TSTA TEST CONTENTS OF ACCA 5·33 F6800/F68AOO/F68BOO A number of the instructions either alone or together with an Direct and Extended Addressing Modes accumulator operand contain all of the address information In the direct and extended modes of addressing, the operand that is required, that is, "inherent" in the instruction itself. field of the source statement is the address of the value that For instance, the instruction ABA causes the MPU to add the is to be operated on. The direct and extended modes differ contents of accumulators A and B together and place the only in the range of memory locations to which they can result in accumulator A. The instruction INCB, another direct the MPU. Direct addressing generates a single a-bit example of "accumulator addressing", causes the contents operand and, hence, can address only memory locations 0 of accumulator B to be increased by one. Similarly, INX, through 255; a two byte operand is generated for extended incrementing the index register, causes the contents of the addressing, enabling the MPU to reach the remaining index register to be increased by one. memory locations, 256 through 65535. An example of direct addressing and its effect on program flow is illustrated Program flow for instructions of this type is illustrated in in Figure 23. Figures 20 and 21. In these figures, the general case is shown on the left and a specific example is shown on the The MPU, after encountering the opcode for the instruction right. Numerical examples are in decimal notation. LDAA (direct) at memory location 5004 (program counter = Instructions of this type require only one byte of opcode. 5004), looks in.the next location, 5005, for the address of Cycle-by-cycle operation of the inherent mode is shown the operand. It then sets the program counter equal to the in Table 8. Flg_ 19 Addressing Mode Summary DIRECT: DO INSTRUCTION IMMEDIATE: INSTRUCTION EXAMPLE: SUBS Z n+ 1 Z = OPRND ADDRESS EXAMPLE: LDAA #K 0+ 1 K = OPERAND ADOR. RANGE = 0-255 (K = ONE-BVTE OPRND) n+ 2 NEXT INSTR 0+2 NEXT INSTR &. OR (K = TWD-BYTE DPRND) INSTRUCTION (CPX, LOX, AND LOS) 0+1 KH = OPERAND (K = ONE-BYTE OPRND) z I K = OPERAND n +,2 KL = OPERAND OR 0+3 NEXTINSTR (I( = TWO-BYTE OPERAND) Z I-_KH.;;.=...;.O_PE_R_A_N_D_-I Z + 1 L.._K..;L;.=_O_PE_R_A_N_D_.1 RELATIVE: INSTRUCTION EXAMPLE: BNE K 0+ 1 ± K = BANeI! OFFSET (K =SlGNED 7-BIT VALUE) 0+2 NEXT INSTR .& ADDR. RANGE: -125TO+129 RELATIVE TO o. EXTENDED: FO INSTRUCTION EXAMPLE: CMPA Z o + 1 ZH = OPRND ADDRESS , ("+2) ±K I NEXTINSTR :&:1 ADDR. RANGE: &IF BRNCHT8t FALSE, .& IF BRNCHTst TRUE. &. 256-85535 o + 2 ZL = OPRND ADDRESS o+3 NEXT INSTR INDEXED: INSTRUCTION EXAMPLE: ADDA Z, X 0+1 Z = OFFSET ADDR. RANGE: 0+2 NEXT INSTR (K =ONE-BYTE OPRND) Z I K = OPERAND DR 0-255 RELATIVE TD INDEX REGISTER, X (K = TWo-BVTE OPERAND) Z KH = OPERAND Z+1 KL = OPERAND (Z = a-BIT UNSIGNED VALUE) X+Z I K = OPERAND 5-34 F6800/F68AOO/F68BOO Table 8 Inherent Mode Cycle·by·Cycle Operation Address Mode and Instructions Address Bus Data Bus Inherent ABA DAA SEC 1 1 Op Code Address 1 Op Code ASl DEC SEI 2 1 Op Code Address + 1 1 Op Code of Next Instruction ASR INC SEV CBA lSR TAB ClC NEG TAP 2 CLI NOP TBA ClR ROl TPA ClV ROR TST COM SBA DES 1 1 Op Code Address 1 Op Code DEX 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 INS 3 0 Previous Register Contents 1 Irrelevant Data (Note 1) INX 4 0 New Register Contents 1 Irrelevant Data (Note 1) PSH 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 1 Stack Poi nter 0 Accumulator Data 4 0 Stack Pointer -1 1 Accumulator Data PUl 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 0 Stack Poi nter 1 Irrelevant Data (Note 1) 4 1 Stack Poi nter + 1 1 Operand Data from Stack TSX 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 0 Stack Poi nter 1 Irrelevant Data (Note 1) 4 0 New Index Register 1 Irrelevant Data (Note 1) TXS 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 0 Index Register 1 Irrelevant Data 4 0 New Stack Pointer 1 Irrelevant Data RTS 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Irrelevant Data (Note 2) 3 0 Stack Pointer 1 Irrelevanl Data (Note 1) 5 4 1 Stack Poi nter + 1 1 Address of Next Instruction (High Order Byte) 5 1 Stack Poi nter + 2 1 Address of Next Instruction (low Order Byte) 5·35 --~~- - - - - - - --------- - - - - - - F6800/F68AOO/F68BOO Table 8 Inherent Mode Cycl.by·Cycle Operation (Cont.) Address Mode and Instructions Address Bus Data Bus Inherent (Cont'd) WAI 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 3 1 Stack Pointer 0 Return Address (Low Order Byte) 4 1 Stack Pointer - 1 0 Return Address (High Order Byte) 9 5 1 Stack POinter - 2 0 Index Register (Low Order Byte 6 1 Stack Pointer - 3 0 Index Register (High Order Byte) 7 1 Stack Pointer - 4 0 Contents of Accumulator A 8 1 Stack Pointer - 5 0 Contents of Accumulator B 9 1 Stack Pointer - 6 (Note 3) 1 Contents of Condo Code Register RTI 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Irrelevant Data (Note 2) 3 0 Stack Pointer 1 Irrelevant Data (Note 1) 4 1 Stack Pointer + 1 1 Contents of Condo Code Register from Stack 5 1 Stack Pointer + 2 1 Contents of Accumulator B from Stack 6 1 Stack Pointer + 3 1 Contents of Accumulator A from Stack 10 7 1 Stack Pointer + 4 1 Index Register from Stack (High Order Byte) 8 1 Stack Pointer + 5 1 Index Register from Stack (Low Order Byte) 9 1 Stack POinter + 6 1 Next Instruction Address from Stack (High Order Byte) 10 1 Stack Pointer + 7 1 Next Instruction Address from Stack (LOw Order Byte) SWI 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Irrelevant Data (Note 1) 3 1 Stack Poi nter 0 Return Address (Low Order Byte) 4 1 Stack Pointer - 1 0 Return Address (High Order Byte) 5 1 Stack POinter - 2 0 Index Register (Low Order Byte) 6 1 Stack Pointer - 3 0 Index Register (High Order Byte) 12 7 1 Stack POinter - 4 0 Contents of Accumulator A 8 1 Stack POinter - 5 0 Contents of Accumulator B 9 1 Stack Pointer - 6 0 Contents of Condo Code Register 10 0 Stack Pointer - 7 1 Irrelevant Data (Note 1) 11 1 Vector Address FFFA (Hex) 1 Address of Subroutine (High Order Byte) 12 1 Vector Address FFFB (Hex) 1 Address of Subroutine (Low Order Byte) Notes 1. If device which is addressed during this cycle uses VMA. then the data bus will go to the high impedance 3-state condition. Depending on bus capacitance, data from the previous cycle may be retained on the data bus. 2. Data is ignored by the MPU. 3. While the MPU is waiting for the interrupt, Bus Available will go HIGH indicating the following states of the control lines: VMA is LOW; address bus, R/W, and data bus are all in the high impedance state. 5-36 F6800/F68AOO/F68BOO Fig. 20 Inherent Addressing Fig. 22 Immediate Addressing Mode MPU MPU PC PC ~ 5002 GENERAL FLOW PC ~ 5000 t--;';';"--I, EXAMPLE Fig. 23 GENERAL FLOW Direct Addressing Mode EXAMPLE • Fig. 21 Accumulator Addressing AOOR t-....;=--f' ADOR = 100 t-----I\. PC PC == 5004 PC + 1 I-";:'~~-II 5005 AOOR - 0 $: 255 GENERAL FLOW EXAMPLE PC PC ~ 5001 GENERAL FLOW EXAMPLE 5·37 F6800/F68AOO/F68BOO Table 9 Immediate Mode Cycle·by·Cycle Operation Address Mode and Instructions Address Bus Data Bus Immediate ADC EOR 1 1 Op Code Address 1 Op Code ADD LOA 2 1 Op Code Address + 1 1 Operand Data AND ORA 2 BIT SBC CMP SUB CPX 1 1 Op Code Address 1 Op Code LOS 3 2 1 Op Code Address + 1 1 Operand Data (High Order Byte) LOX 3 1 Op Code address + 2 1 Operand Data (Low Order Byte) Table 10 Direct Mode Cycle·by·Cycle Operation Address Mode and Instructions Address Bus Data Bus Direct ADC EOR 1 1 Op Code Address 1 Op Code ADD LOA 2 1 Op Code Address + 1 1 Address of Operand AND ORA 3 3 1 Address of Operand 1 Operand Data BIT SBC CMP SUB CPX 1 1 Op Code Address 1 Op Code LOS 2 1 Op Code Address + 1 1 Address of Operand 4 LOX 3 1 Address of Operand 1 Operand Data (High Order Byte) 4 1 Operand Address + 1 1 Operand Data (Low Order Byte) STA 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Destination Address 4 3 0 Destination Address 1 Irrelevant Data (Note) 4 1 Destination Address 0 Data from Accumulator STS 1 1 Op Code Address 1 Op Code STX 2 1 Op Code Address + 1 1 Address of Operand 5 3 0 Address of Operand 1 Irrelevant Data (Note) 4 1 Address of Operand 0 Register Data (High Order Byte) 5 1 Address of Operand + 1 0 Register Data (Low Order Byte) Nole If device which is addressed during this cycle uses VMA, then the data bus will go to the high impedance 3-state condition. Depending on bus capacitance, data from the previous cycle may be retained on the data bus. 5·38 F6800/F68AOO/F68BOO value found there (100 in the example) and fetches the with the "#" symbol. Program flow for this addressing mode operand, in this case a value to be loaded into accumulator is illustrated in Figure 22. A, from that location. For instructions requiring a 2-byte operand such as LOX (load the index register), the operand The operand format allows either properly defined symbols bytes would be retrieved from locations 100 and 101. Table or numerical values. Except for the instructions CPX, LOX, 10 shows the cycle-by-cycle operations for the direct mode and LOS, the operand may be any value in the range 0 to of addressing. 255. Since compare index register (CPX), load index register (LOX), and load stack pointer (LOS), require 16-bit values, Extended addressing, Figure 24, is similar except that a two- the immediate mode for these three instructions requires byte address is obtained from locations 5007 and 5008 after two-byte operands. In the immediate addressing mode, the the LOAB (extended) opcode shows up in location 5006. "address" of the operand is effectively the memory location Extended addressing can be thought of as the standard immediately following the instruction itself. Table 9 shows the addressing mode, that is, it is a method of reaching any cycle-by-cycle operation for the immediate addressing mode. place in memory. Direct addressing, since only one address • byte is required, provides a faster method of processing data Relative Addressing Mode and generates fewer bytes of control code. In most In both the direct and extended modes, the address obtained applications, the direct addressing range, memory locations by the MPU is an absolute numerical address. The relative 0-255, are reserved for RAM. They are used for data addressing mode, implemented for the MPU's branch buffering and temporary storage of system variables, the instructions, specifies a memory location relative to the area in which faster addressing is of most value. Cycle-by- program counter's current location. Branch instructions cycle operation is shown in Table 11 for extended generate two bytes of machine code, one for the instruction addressing. opcode and one for the "relative" address. (See Figure 25.) Since it is desirable to be able to branch in either direction, the 8-bit address byte is interpreted as a signed 7 -bit value; Fig_ 24. Extended Addressing Mode the 8th bit of the operand is treated as a sign bit, "0" = plus and "1" = minus. The remaining seven bits represent the numerical value. This results in a relative addressing range of ± 127 with respect to the location of the branch instruction itself. However, the branch range is computed with respect to the next instruction that would be executed if the branch conditions are not .satisfied. Since two bytes are generated, the next instruction is located at PC + 2. If 0 is defined as ADDR ADDR=300 ~__~__~ the address of the branch designation, the range is then: (PC + 2) - 127.$ 0 .$ (PC + 2) + 127 or PC - 125 .$ 0 .$ PC + 129 pc = 5006 1-______-1 that is, the destination of the branch instruction must be pc I-~=--II\ within -125 to + 129 memory locations of the branch ADOR 256 GENERAL FLOW 5009 ----_. EXAMPLE instructions itself. For transferrring control beyond this range, the unconditional jump (JMP), jump to subroutine (JSR), and return from subroutine CRTS) are used. In Figure 25, when the MPU encounters the opcode for BEQ (branch if result of last instruction was zero), it tests the zero Immediate Addressing Mode bit in the condition code register. If that bit is "0", indicating In the immediate addressing mode, the operand is the value a non-zero result, the MPU continues execution with the next that is to be operated on. For instance, the instruction instruction (in location 5010 in Figure 25). If the previous result were zero, the branch condition is satisfied and the Operator Operand Comment MPU adds the offset, 15 in this case, to PC + 2 and LOAA #25 LOAD 25 INTO ACCA branches to location 5025 for the next instruction. causes the MPU to "immediately load accumulator A with the value 25"; no further address reference is required. The immediate mode is selected by preceding the operand value 5-39 F6800/F68AOO/F68BOO Table 11 Extended Mode Cycle·by·Cycle Operation Address Mode and Instructions Address Bus bata Bus Extended STS 1 1 Op Code Address 1 Op Code STX 2 1 Op Code Address + 1 1 Address of Operand (High Order Byte) 3 1 Op Code Address + 2 1 Address of Operand (Low Order Byte) 6 4 0 Address of Operand 1 Irrelavant Data (Note 1) 5 1 Address of Operand 0 Operand Data (High Order Byte) 6 1 Address of Operand +1 0 Operand Data (Low Order Byte) JSR 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Address of Subroutine (High Order Byte) 3 1 Op Code Address + 2 1 Addres.s of Subroutine (Low Order Byte) 4 1 Subroutine Starting Address 1 Op Code of Next Instruction 9 5 1 Stack Pointer 0 Return Address (Low Order Byte) 6 1 Stack Pointer -1 0 Return Address (High Order Byte) '1 0 Stack Pointer - 2 1 Irrelevant Data (Note 1) 8 0 Op Code Address + 2 1 Irrelevant Data (Note 1) 9 1 Op Code Address + 2 1 Address of Subroutine (Low Order Byte) JMP 1 1 Op Code Address 1 Op Code 3 2 1 Op Code Address + 1 1 Jump Address (High Order Byte) 3 1 Op Code Address + 2 1 Jump Address (Low Order Byte) ADC EOR 1 1 Op Code .Address 1 Op Code ADD LOA 2 1 Op Code Address + 1 1 Address of Operand (High Order Byte) AND ORA 4 3 1 Op Code Address + 2 1 Address of Operand (Low Order Byte) BIT SBC 4 1 Address of Operand 1 Operand Data CMP SUB CPX 1 1 Op Code Address 1 Op Code LOS 2 1 Op Code Address + 1 1 Address of Operand (High Order Byte) LOX 5 3 1 Op Code Address + 2 1 Address of Operand (Low Order Byte) 4 1 Address of Operand 1 Operand Data (High Order Byte) 5 1 Address of Operand + 1 1 Operand Data (Low Order Byte) STA A 1 Op Code Address 1 Op Code STA B 2 1 Op Code Address + 1 1 Destination Address (High Order Byte) 5 3 1 Op Code Address + 2 1 Destination Address (Low Order Byte) 4 0 Operand Destination Address 1 Irrelevant Data (Note 1) 5 1 Operand Destination Address 0 Data from Accumulator ASL LSR 1 1 Op Code Address 1 Op Code ASR NEG 2 1 Op Code Address + 1 1 Address of Operand (High Order Byte) CLR ROL 3 1 Op Code Address + 2 1 Address of Operand (Low Order Byte) COM ROR 4 1 Address of Operand 1 Curent Operand Data 6 DEC TST 5 0 Address of Operand 1 Irrelevant Data (Note 1) INC 6 1/0 Address of Operand 0 New Operand Data (Note 2) (Note 2) Nota. 1. If device which is addressed during this cycle: uses VMA, then the data bus will go to the high impedance 3-state condition. Depending on bus capacitance, data from the previous cycle may be retained on the data bus. 2. For TST, VMA = "0" and operand data does not change. 5-40 F6800/F68AOO/F68BOO The branch instructions allow the programmer to efficiently The operand field can also contain a numerical value that will direct the MPU to one point or another in the control program be automatically added to X during execution. This format is depending on the outcome of test results. Since the control illustrated in Figure 26. program is normally in read-only memory and cannot be chang!!d, the relative address used in execution of branch When the MPU encounters the LOAB (Indexed) opcode in instructions is a constant numerical value. Cycle-by-cycle location 5006, it looks in the next memory location for the operation is shown in Table 12 for relative addressing. value to be added to X (5 in the example) and calculates the required address by adding 5 to the present index register' Indexed Addressing Mode value of 400. In the operand format, the offset may be With indexed addressing, the n\lmerical address is variable represented by a label or a numerical value in the range 0- and depends on the current contents of the index register. A 255 as in the example. In the earlier example, STAA X, the source statement such as operand is equivalent to 0, X, that is, the 0 may be omitted when the desired address is equal to X. Table 13 shows the Operator Operand Comment cycle-by-cycle operation for the indexed mode of addressing. STAA X Put A in Indexed Location Fig. 26 Indexed Addressing Mode causes the MPU to store the contents of accumulator A in MPU the memory location specified by the contents of the index MPU register (recall that the label "X" is reserved to designate the index register). Since there are instructions for manipulating X during program execution (LOX, INX, OEX, etc.), the indexed addressing mode provides a dynamic on- the-fly way to modify program activity. ADDA=INDX OFFSET .......;;=:....-1\ -;;;;..---1\ ADDA = 405 .... Fig. 25 Relative Addressing Mode PC PC = 5006 ....__ = __-11 OFFSET $ 255 GENERAL FLOW EXAMPLE PC I-~~_I\ PC 5008 ....__~_-I, (PC + 2) .....______.. pc 5010 ~=..;;,;;;.;,,;,;... (PC + 2) ~=~~~ + (OFFSET) .....______.. PC 5025 .... = ____"'" 5-41 F6800/F68AOO/F88BOO Table 12 Relative Mode Cycle·by·Cycle Operation Addres$ Mode and Instructions Address Bus Deita BU8 Rel8tive BCC BHI BNE 1 1 Op Code Address 1 Op Code BCS BLE BPL 2 1 Op Code Address + 1 1 Branch Offset 4 BEQ BLS BRA 3 0 Op Code Address + 2 1 Irrelevant Data (Note) BGE BLT BVC 4 0 Branch Address 1 Irrelevant Data (Note) BGT BMI BVS BSR 1 1 Op'Code Address 1 Op COde 2 1 Op Code Address + 1 1 Branch Offset 3 0 Return Address of Main Program 1 Irrelevant Data (Note) 4 1 Stack Pointer 0 Return Address (Low Order Byte) 8 5 1 Stack Pointer - 1 0 Return Address (High Order Byte) 6 0 Stack Pointer - 2 1 Irrelevant Data (Note) 7 0 Return Address of Main Program 1 Irrelevant Data (Note) 8 0 Subroutine Address 1 Irrelevant Data (Note) Note I! device which is addressed during this cycle uses VMA, then the data bus will go to the high impedance 3-state condition. Depending on bus capacitance, data from the previous cycle may be retained on the data bus. ' Table ~3 Indexed Mode Cycle.by.Cycle Operation Address Mode VMA and Instructions Addres8 Bus Data BU8 Indexed JMP 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Offset 4 3 0 Index Register 1 Irrelevant Data (Note 1) 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) (w/o Carry) ADC EOR 1 1 Op COde Address 1 Op Code ADD LOA 2 1 Op Code Address + 1 1 Offset AND ORA 3 0 Index Register 1 Irrelevant Data (Note 1) 5 BIT SBC 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) CMP SUB (w/o Carry) 5 1 Index Register Plus Offset 1 Operand Data CPX 1 1 Op Code Address 1 Op Code LOS 2 1 Op Code Address + 1 1 Offset LOX 3 0 Index Register 1 Irrelevant Data (Note 1) 6 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) (w/O Carry) 5 1 Index Register Plus Offset 1 Operand Data (High Order Byte) 6 1 Index Register Plus Offset + 1 1 Operand Data (Low Order Byte) STA 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Offset 3 0 Index Register 1 Irrelevant Data (Note 1) 6 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) (w/o Carry) 5 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) 6 1 Index Register Plus Offset 0 Operand Data 5·42 F6800/F68AOO/F68BOO Table 13 Indexed Mode Cycle·by·Cycle Operation (Cont.) Address Mode and Instructions Address Bus Data Bus Indexed (Cont.) ASL LSR 1 1 Op Code Address 1 Op Code ASR NEG 2 1 Op Code Address +1 1 Offset CLR ROL 3 0 Index Register 1 Irrelevant Data (Note 1) COM ROR 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) DEC TST (w/o Carry) INC 7 5 1 Index Register Plus Offset 1 Current Operand Data 6 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) ,. 7 110 Index Register Plus Offset 0 New Operand Data (Note 2) (Note 2) STS 1 1 Op Code Address 1 Op Code STX 2 1 Op Code Address +1 1 Offset 3 0 Index Register 1 Irrelevant Data (Note 1) 4 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) 7 (w/oCarry) 5 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) 6 1 Index Register Plus Offset 0 Operand Data (High Order Byte) 7 1 Index Register Plus Offset + 1 0 Operand Data (Low Order Byte) JSR 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Offset 3 0 Index Register 1 Irrelevant Data (Note 1) 4 1 Stack Pointer 0 Return Address (Low Order Byte) 8 5 1 Stack Pointer - 1 0 Return Address (High Order Byte) 6 0 Stack Pointer - 2 1 Irrelevant Data (Note 1) 7 0 Index Register 1 Irrelevant Data (Note 1) 8 0 Index Register Plus Offset 1 Irrelevant Data (Note 1) (w/o Carry) Note 1. If device which is addressed during this cycle uses VMA, then the data bus will go to the high impedance 3-8tate condition. Depending on bus capacitance, data from the previous cycle may be retained on the data bus. 2. For TST, VMA = "0" and operand data does not change. 5-43 F6800/F68AOO/F68BOO Absolute Maximum Ratings This device contains circuit,ry to protect the inputs against damage due:to Supply Voltage -0..3 V. +7.0. V high static voltages or electric fields; however. it is advised that normal precautions be taken to avoid ·application 01 any voltage higher than Input Voltage -0..3 V, +7.0. V maximum rated veiltages: to this high-impedance circuit. Operating Temperature Range-TL to TH F6800, F66AOO,F66BOO COC,+7COC F6600C, F68AOOC, F68BOOC -4C o C, +85°C F6800DM, F66AOODM, F68BOODM -55°C, +125°C Storage Temperature Range -55°C, +15C o C Thermal Resistance Plastic Package Ceramic Package DC Characteristics Vcc = 5.0. V ± 5%, Vss = 0., TA = h to TH, unless otherwise noted Symbol Characteristic Min Typ .Max Unit Conditions VIH Input HIGH Voltage Logic Vss + 2.0. Vcc" V VIHC .p1, .p2 Vcc - 0..6 Vcc + 0..3 VIL Input LOW Voltage Logic Vss - 0..3 Vss+ 0..8 V VILC .p1, .p2 Vss - 0..3 Vss + 0..4 liN Input Leakage CLirrent Logic' 1.0. 2.5 p.A VIN = 0. to 5.25 V, Vcc = Max .p1, .p2 10.0. VIN = 0. to 5.25 V, Vcc = 0..0. V ITSI 3-State (OFF State) 00- 0 7 2.0. 10. p.A VIN = 0..4 to 2.4 V, Vcc = Max Input Current Ao-A IS , R/IN 10.0. VOH Output HIGH Voltage 00- 0 7 Vss + 2.4 V ILoad = -20.5 p.A, Vcc = Min Ao-A IS , R/IN, VMA Vss + 2.4 ILoad = -145 p.A, Vcc = Min BA Vss + 2.4 ILoad = -10.0. p.A, Vcc = Min VOL Output LOW Voltage Vss + 0.:4 V ILoad = 1.6 mA, Vcc = Min Po Power Dissipation 0..5 1.0. W CIN Input Capacitance .p1 25 35 pF .p2 45 70. VIN = 0., TA = 2.5°C, f = 1.0. MHz 0 0-0 7 10. 12.5 Logic Inputs 6.5 10. COUT Output Capacitance Ao-A IS , R/IN, VMA 12 pF 5-44 F6800/F68AOO/F68BOO Clock Timing Vcc = 5.0 V ± 5%. Vss = O. TA = h to TH• unless otherwise noted Symbol Characteristic Min Typ Max Unit Conditions f Frequency of Operation F6800 0.1 1.0 MHz F68AOO 0.1 1.5 F68BOO 0.1 2.0 teye Cycle Time (Figure 27) F6800 1.000 10 j.LS F68AOO 0.666 10 F68BOO 0.500 10 PW.pH Clock Pulse Width 1>1.1>2 - F6800 400 9500 ns Vcc - 0.6 V 1>1.1>2 - F68AOO 230 9500 • 1>1.1>2 - F68BOO 180 9500 tut Total 1>1 and 1>2 F6800 900 ns Up Time F68AOO 600 F68BOO 440 t.pr.t.pf Rise and Fall Times 100 ns Measured Between Vss + 0.4 V and Vcc - 0.6 V td Delay Time or Clock 0 9100 ns Vov = Vss + 0.6 V @ tr = tf S 100 ns Separation (Figure 27) 0 9100 Vov = Vss + 1.0 V @ tr = tf S 35 ns Read/Write Timing (Reference Figures 28 through 32) F6800 F68AOO F68BOO Symbol CharacteristiC Min Typ Max Min Typ Max Min Typ Max Unit tAD Address Delay ns C = 90 pF 270 180 150 C = 30 pF 250 165 135 taee Peripheral Read Access Time 530 360 250 ns taee = tut - (tAD + tOSA) tOSA Data Set-up Time (Read) 100 60 40 ns tH Input Data Hold Time 10 10 10 ns tH Output Data Hold Time 10 25 10 25 10 25 ns tAH Address Hold Time 30 50 30 50 30 50 ns (Address. R/Iii. VMA) tEH Enable HIGH Time for DBE Input 450 280 220 ns toow Data Delay Time (Write) 225 200 160 ns Processor Controls tpcs Processor Control Set-up Time 200 140 110 ns tPCr. tpCf Processor Control Rise and Fall Time 100 100 100 ns tBA Bus Available Delay 250 165 135 ns tTSE 3-State Enable 40 40 40 ns tTSO 3-State Delay 270 270 220 ns tOBE Data Bus Enable Down Time During 1>1 Up Time 150 120 75 ns tOBEr. tOBEf Data Bus Enable Rise and Fall Times 25 25 25 ns 5-45 F6800/F68AOO/F68BOO Fig. 27 Clock Timing Waveform I----------I,y,----------I I.f Fig. 28 Read Data From Memory or Peripherals \~------"lV- -O.SV R/W ADDRESS FROM MPU VMA DATA FROM MEMORY OR PERIPHERALS ~ DATA NOT VALID 0.8 V ----"",..====""""- 5-46 F6800/F68AOO/F68BOO Fig. 29 Write In Memory or Peripherals R/W ADDRESS FROM MPU • VMA tDBEr tH 2.4 V---::.,+ofl!!!""-------., ~~~~UD"-------------------------.,r---..~~~ DATA VALID 0.4 V --"',..---------f ~ DATA NOT VALID 5·47 F6800/F68AOO/F68BOO Fig. 30 Typical Data Bus Output Delay Fig. 31 Typical ReAD/WRITE, VMA,and Address vs Capacitive Loading (tDDW) Output Delay VB Capacitive Loading (tAD) 500 500 IOH = -206 ,..A MAX @l2.4V 16.. =145~M~x@~AV -10l =.1.8mAMAX@0.4V -leL = 1.8mAIII!AX@0.4V _'Icc = 5.0 V Vcc = 5.0V 400 TA = 25"<: 400 -TA = 25"<: ~ ~ .. I 300 lE i--"" .. I 300 lE ...... 1-""" VMj- . ;: :l.. ".... .. ;: ~ 1:1 200 --' ", L .. ...c 200 1:1 --' ", --' "... --' f'ADDRESS R/W-I-- 100 ;--' 100 ....... --' CL INCLUDES'STRAY CAPACITANCE CL INCLUDES STRAY CAPACITANCE 100 200 300 400 500 .100 200 300 400 500 'CL - LOAD CAPACITANCE ~ pF CL - LOAD·CAPACITANCE - pF Fig. 32 Bus Timing Tes~ loads Test Conditions Vee The dynamic test load for the d4ta bus is 130 pF and One standard TTL load, as shown. The Address, R/W, and VMA RL=2.2k outputs are tested under two conditions to allow optimum operalion in both' buffered and unbuffered systems. The resistor TEST POINT - . -......--1(\--.. (R) is chosen to insure specified load currents during VOH measurement. IN914 Notice that the data bus lines, the address lines, the interrupt OR EQUIV 'request line, and the DBE line are all specified and tested to guarantee 0.4 V of dynamic nOise immunity at both" 1" and "0" logic levels. C = 130 pF,Ior 0 0 -07, E = 90 pF for Ao-A,., R/W, and VMA (except t AD2) = 30 pF for Ao7A,., R/W, .•nd VMA (t A02 only) = 30 pF for BA. R = 11.7 kll for 0 0 -0 7 = 16.5 kll for Ao-A,., R/W, and VMA = 24 kll for BA ' "548 F6800/F68AOO/F68BOO Ordering Information Speed Order Code Temperature Range 1.0 MHz F6800P,S o to +70°C F6800CP,CS -40 to +85°C F6800DM -55 to +125°C 1.5 MHz F68AOOP,S o to +70°C F68AOOC,CS -40 to +85°C F86AOODM -55 to +125°C 2.0 MHz F68BOOP,S o to +70°C F68BOOC,CS -40 to +85°C F68BOODM -55 to +125°C ·P=plastlc package, S=CER-DIP package. II 5-49 F6800/F68AOO/F68BOO 5·50 F6801/F6803 Single-Chip Microcomputer Advance Product Information Microprocessor Product Description Connection Diagram The Fairchild F6801/F6803 is an 8-bit single-chip microcom- Vss puter unit (MCU) which significantly enhances the XTAL1 SC , capabilities of the F6800 family. It includes an upgraded F6800 microprocessor unit (MPU) with upward-source and EXTAL2 sc, object-code compatibility. The F6801/F6803 MCU can func- NM PJO tion as a monolithic microcomputer or can be expanded to fROi P" a 64K byte address space. Features of the F6801/F6803 MCU include: RESET P" Vee P 33 • Enhanced F6800 Instruction Set (see table 1) P,o P 34 • 8 x 8 Multiply Instruction • Serial Communications Interface (SCI) P" P 35 • • 16-bit Three-Function Programmable Timer P" P" • Bus Compatibility with the F6800 Family P 37 P" • 2048 Bytes of ROM (F6801 Only) • 128 Bytes of RAM P'4 P 40 • 64 Bytes of RAM, Retainable During Powerdown P '0 P 4l • 29 Parallel I/O and Two Handshake Control Lines P ll P 4, • Internal Clock Generator With Divide-by-Four Output • Interrupt Capability P12 P 43 • TTL compatible P 13 P44 • 40-Pin Ceramic or Plastic Package P '4 P 45 • + SV Power Supply P 15 P4• The F6801/F6803 MCU can be configured to function in a P,. P 47 wide variety of applications. This flexibility is provided by PH Vee its ability to be hardware-programmed into eight different STANDBY operating modes (see table 2). The operating mode controls the configuration of 18 of the 40 MCU pins, available on- chip resources, memory map, location of interrupt vectors, and type of external bus. Configuration of the remaining 22 pins is not dependent on the operating mode. The F6803 can be considered an F6801 that operates in Modes 2 and 3 only (either internal RAM with no ROM, or no internal RAM or ROM, respectively). 5-51 F6801/F6803 Figure 1 Block Diagram MODE IF IW~·M~.",'~~ I EXPANDED NON-MULTIPLEXED SINGLE CHIP Pzo P2, p., A,/D, 0, 110 PORT Poe 110/0, D. 110 2 p.. P36 As/D. Os 110 PORT P23 p.. A"D. Do 110_ 3 P33 Ao/Do Do 110 p.. p.. ~/Da D. 110 Po, A,ID, D, 110 P30 Ao/~ ~ 110 SC. R/W R/W OS. SC, AS IDS iSs TIMER SCI p.. A,. A, 110 p,. P46 A,. 110 110 P" p,. p.. A,. 110 110 p,. p.. A,. As 110 PORT po. A. 110 1 P,o A" p.. A,. A. 110 p,. Po, 110 A, 110 p,. p.. 110 Ao 110 P17 5-52 F6801/F6803 Figure 2 Programming Model I___ ~ __ ~U~_. _~ __ ~18'BITACCUMULATORSAANDB 15 D O O R 16·BIT DOUBLE ACCUMULATOR D 115 X 01 INDEX REGISTER (X) 115 SP 01 STACK POINTER (SP) 115 PC 01 PROGRAM COUNTER (PC) L-_ _ _ _ _ _ _ HALF CARRY (From Bit 3) • 5·53 F6801/F6803 Table 1 New Instructions Instructio Description ABX Unsigned addition of Accumulator B to Index Register ADDD Adds (without carry) the double accumulator to memory and leaves the sum in the double accumulator ASLD or LSLD Shifts the double accumulator left (towards MSB) one bit, the LSB is cleared and the MSB Is shifted into the C-bit BHS Branch if Higher or Same, unsigned conditional branch (same as BCC) BLO Branch if Lower. Unsigned conditional branch (same as BCS) BRN Branch Never JSR Additional addressing mode direct LDD Loads double accumulator from memory LSL Shifts memory or accumulator left(towards MSB) one bit, the LSB is cleared and the MSB la shifted into the C·blt (same as ASL) LSRD Shifts the double accumulator right (towards LiSB) one bit, the MSB is cleared and the LSB is shifted into the C-bit MUL Unsigned multiply, multiplies the two accumulators and leaves the product in the double accumulator PSHX Pushes the Index Register to stack PULX Pulls the Index Register from stack STD Stores the double accumulator to memory SUBD Subtracts memory from the double accumulator and leaves the difference in the double accumulator CPX Internal processing modified to permit Its use with any conditional branch instruction 5·54 F6801/F6803 Table 2 Summary of F680lIF6803 Operating Modes Common to all Modes: Reserved Register Area Port 1 Port 2 Programmable Timer Serial Communications Interface Single Chip Mode 7 128 bytes 0 RAMk, 2048 bytes of ROM Port 3 is a parallel I/O port with two control lines Port 4 is a parallel I/O port SC1 is Input Strobe 3 (IS3) SC2 is Output Strobe 3 (OS3) II Expanded Non-Multiplexed Mode 5 128 bytes of RAM, 2048 bytes of ROM 256 bytes of external memory space Port 3 is an 8-bit data bus Port 4 is an input port/address bus SC1 is Input/Output Select (lOS) SC2 is Read/Write (RIW) Expanded Multiplexed Modes 1, 2, 3 6 Sour memory space options (64K address space) (1) No internal RAM or ROM (Mode 3) (2) Internal RAM, no ROM (Mode 2) (3) Internal RAM and ROM (Mode 1) (4) Internal RAM, ROM with partial address bus (Mode 6) Port 3 is a multiplexed address/data bus Port 4 is an address bus (inputs/address in Mode 6) SC1 is Address Strobe (AS) SC2 is Read/Write (RIW) Test Modes 0 and 4 Expanded Multiplexed Test Mode 0 May be used to test RAM and ROM Single Chip and Non-Multiplexed Test Mode 4 (1) May be changed to Mode 5 without going through reset (2) May be used to test Ports 3 and 4 as I/O ports 5-55 F6801/F6803 Table 3 . Instruction Execution Times in E·Cycles Addressing Mode Addressing Mode .! '"0 .! .S! CII c!! :6 11 c!! '"0 U '"0 c 11 .~ '"0 11 CII .~ ~ CII CII C e !! ~ 1.1 '"0 .! 1ii "ii e ~ )( CII CII .&: SIII .5 0 w .E .E a: .5 0 w '"0 .E .E a: • • •• ••4 •• •• •• •3 •3 ABA •2 •3 2 INX 3 • ABX 3 •• JMP • • •• •2 • ADC ADD 4 JSR 5 6 6 • •• • 2 3 4 4 LOA 3 4 4 ADDD 4 5 6 6 • • LDD 3 4 5 5 • AND 2 3 4 4 •2 •• LOS 3 4 5 5 • • ASL • • 6 6 LOX 3 4 5 5 • • ASLD •• • • •6 •6 3 •• LSL •• •• 6 6 2 • ASR • •• • • 2 • LSLD •6 •6 3 • ••• BCC • • • 3 LSR • 2 • ••• •• • BCS • • • • 3 LSRD • 3 • BEQ •• •• •• •• 3 MUL •6 •6 10 • BGE BGT • 3 NEG •• • • • • 2 • 3 NOP 2 • BHI • •2 •• •• ••4 • • 3 ORA 2 3 4 4 •3 • BHS • 3 •3 PSH • • • •• • •• BIT • • 3 4 • • • PSHX • • 4 • BLE BLO •• • •• •• •• PUL • •• • •• • 4 •• 3 PULX •6 •6 5 •• • BLS 3 ROL 2 BLT • • • • 3 ROR • • 6 6 2 • • •• • • • • • • •• BMI • • • • 3 RTI 10 • BNE 3 RTS • • • 5 • ••• ••• • • ••• •2 •3 •4 •4 • BPL 3 SBA 2 BRA •• •• 3 sec •2 • BRN BSR •• •• • • • 3 6 SEC SEI •• • • • • • • 2 • • BVC • • • 3 SEV • • • • 2 • • •• •• •• •2 •• • BVS CBA • 3 • STA 3 4 4 • STD 4 5 5 • • •• •• •• •• •• CLC 2 CLI 2 STS • 4 5 5 • • CLR •• • 6 6 2 • STX •2 4 5 5 • • CLV •3 •4 •4 2 •• SUB 3 4 4 • • CMP 2 • SUBD 4 5 6 6 • • COM •4 •5 6 6 2 • SI • • • • 12 • CPX 6 6 •2 • TAB •• •• •• •• 2 • •• •• •6 •6 • •• DAA TAP 2 DEC 2 • TBA •• • • • 2 •• • • •• TPA • •6 •6 •• •• DES 3 2 DEX •3 •4 3 TST •• •• • • 2 EOR 2 4 • • TSX 3 • •• •3 •• • •• •• • • •• INC 6 6 TXS 3 INS • • • WAI • 9 • 5·56 F6802lF68821F6808 Microprocessor with Clock and RAM Microprocessor Product Description Connection Diagram The F6802/F6882 is a monolithic 8-bit microprocessor 40-Pln DIP that contains all the registers and accumulators of the F6800, plus an internal clock oscillator and driver on the vss REseT same chip. The F6802/F6882 also has 128 bytes of RAM HALT EXTAL on board, located at hex addresses $0000 to $007F, Vce MR XTAL standby can be utilized on the F6802/F6882 to facilitate IRQ E memory retention during a power-down situation; the VMA RE first 8 bytes of RAM at hex addresses $0000 to $0007 can NMI Vee STANDBY be retained on the F6882, and the first 32 bytes of RAM BA Rm at hex addresses $0000 to $001 F can be retained on the Vee Do F6802. The F6808 is identical to the F6802 without on- As 0, board RAM. 0, 0, The F6802/F6882 is completely software-compatible with the F6800 microprocessor and the entire F6800 family of parts. (Figure 1 illustrates a typical application using an F6800 family device.) D. Os D. 0, II A7 A15 • On-Chip Clock Circuit • 128 x 8-blt On-Chip RAM (Not Included on F6808) As A14 • 8 Bytes of RAM are Retalnable on the F6882 A9 A13 • 32 Bytes of RAM are Retainable on the F6802 A10 Au • Software-Compatible with the F6800 A11 Vss • Standard TTL-Compatible Inputs and Outputs • 8-blt Bidirectional Data Bus • 16-blt Memory Addressing F6802/F6882/F6808 Signal Functions • Interrupt Capability RAM • Three Speed Grades: CONTROL RE Ao 1.0 MHz F6802/F68821F6808 INPUTS A, 1.5 MHz F68A02/F68A821F68A08 A, 2.0 MHz F68B02/F68B82/F68B08 A, EXTAL A. CLOCK CONTROL XTAL As 1 MR A, A, ADDRESS As BUS RESET A, j CPU NMI AlO CONTROL INPUTS iRQ A" HALT A12 A13 '" I A,. BA A15 CONTROL VMA OUTPUTS R/iN Do 0, 0, -"1 Vee 0, DATA Vee D. BUS STBY Vss Os 0, 0, 5-57 F6802/F6882/F6808 Fig. 1 Typical Microcomputer Block Diagram Vee Vee Vee Vee Vee COUNTER TIMER 1/0 { = F6846 ROM, 1/0, TIMER CSo VMA IRQ MR "' ' J RESET RES HALT -I VMA RESET CLOCK RE 4--"=" 2K BYTES ROM 10110 LINES 3 LINES TIMER R/W R/W F68021 F6882 NMI - 00·0, W 00·0, BA XTAL D EXTAL Registers A general block diagram of the F6802/F6882 is shown in Program Counter Figure 2. The number and configuration of the registers The program counter is a 2·byte (16·bit) register that are identical to the F6800, as shown, with a 128 x 8·bit points to the current program address. RAM- added to the basic microprocessor. The first 8 bytes in the F6882 and the first 32 bytes in the F6802 Stack Pointer may be operated in a low·power mode via a Vee standby The stack pOinter is a 2·byte register that contains the and can be retained during power·up and power·down address of the next available location in an external conditions via the RE signal. The F6808 is identical to push·down/pop·up stack. This stack is normally a random the F6802 except for on· board RAM. Since the F6808 access read/write memory that may have any location does not have on·board RAM, pin 36 must be tied to (address) that is convenient. In those applications that ground, allowing the processor to utilize up to 64K bytes require storage of information in the stack when power is of external memory. lost, the stack must be non·volatile. The microprocessing unit (MPU) has three 16·bit registers Index Register and three 8·bit registers available for use by the The index register is a 2·byte register that is used to programmer, as shown in Figure 3. store data or a 16·bit memory address for the indexed mode of memory addressing. 'If programs are not executed from on·board RAM, TAV1 applies. If pro- grams are to be stored and executed from on·board RAM, TAV2 applies. Accumulators For normal data storage in the on·board RAM, this extended delay does The two 8·bit accumulators are used to hold operands not apply. Programs ean be exeeuted from on·board RAM when using and results from an arithmetic logic unit (ALU). 1.5 and 2.0 MHz parts. On·board RAM ean be used for data storage with all parts. 5·58 F6802lF68821F6808 Fig. 2 F6802/F6882 Block Diagram A15A14A13A12A11A1() As Aa A, A, A5 A, A3 A, A, Ao 25 24 23 22 20 19 18 17 18 15 14 13 12 11 10 9 MEMORY READY 3 ENABLE 37 RESET 40 NON·MASKABLE INTERRUPT HALT INTERRUPT REQUEST EXTAL 4 6 2 39 II XTAL 38 BUS AVAILABLE VALID MEMORY ADDRESS READ/WRITE 34 26 27 28 29 30 31 32 33 07 06 05 D4 03 02 01 Do t Condition Code Register (Status Word Register) instructions. Bit 4 is the interrupt mask bit (I). The The condition code register indicates the results of an unused bits of the condition code register (bit 6 and bit arithmetic logic unit operation: negative (N), zero (Z), 7) are binary ones (1). overflow (V), carry from bit 7 (C), and half-carry from bit 3 (H). These bits of the condition code register are used as Figure 4 shows the order of saving the microprocessor testable conditions for the conditional branch status within the stack. 5·59 F6802lF68821F6808 Fig. 3 Programming Model of the Microprocessing Unit F6802lF6882 Signal Descriptions The control and timing signals for the F68021F6882 are L.._ _A_CC_A_ _ -I\ ACCUMULATOR A identical to those of the F6800, with the following exceptions: ° ...._ _A_CC_B_ _.,...\ ACCUMULATOR B 1. TSC, DBE "'10 "'2 input, and two unused pins have been .i. 5_ _ _ _ _ _'X_ _ _ _ _--'0\INOEX REGISTER eliminated. 2. The following signal and timing lines have been .i. PC_ _ _ _ _ 5_ _ _ _ _ _ --'1 PROGRAM COUNTER added: RAM Enable (RE) Crystal Connections EXtal and Xtal ...1 '5_ _ _ _ _ _ SP_ _ _ _ _- - " STACK POINTER Memory Ready (MR) Vcc Standby CONDITION CODE Enable "'2 Output (E) REGISTER L...L.........'T'-T.I-rI-~ The following summarizes the F6802/F6882 MPU signals. CARRY -(FROM BIT 7) OVERFLOW Data Bus ZERO NEGATIVE 0 0-0 7 (Data Bus Lines),· Pins 26-33 ' - - - - - INTERRUPT Bidirectional bus used to transfer data to and from the ' - - - - - - H A L F CARRY (FROM BIT 3) memory and peripheral devices. Also has 3-state output buffers capable of driving one standard TTL load and 130 pF. Fig. 4 Saving the Status of the Microprocessor in the Stack Data bus lines are in the output mode when the internal RAM is accessed. This prohibits external data from entering the MPU. The internal RAM is fully decoded from addresses $0000 to $007F. External RAM m-9 at $0000 to $007F must be disabled when internal RAM m - 8 _ _ SP is accessed. m - 7 m - 6 CC m - 5 ACCB Address Bus m - 4 ACCA m - 3 IXH Ao-A15 (Address Bus Lines), Pins 9-20, 22-25 m - 2 m - 2 IXl Sixteen output lines form the address bus. The outputs m -, _ _ SP m -, PCH '~" 0 are capable of driving one standard TTL load and 90 pF. m m PCl II> These lines do not have 3·state capability. --~T m + 1 m +1 m +2 m +2 CPU Control Inputs til I RESET (Reset), Pin 40 BEFORE AFTER Input used to reset and start the MPU from a power-down Notes condition resulting from a power failure or an initial start· SP = Stack Pointer up of the processor. When this line is low,the MPU is CC = Condition Code (also called the Processor St"tus Byte) inactive and the information in the registers is lost. If a ACCB = Accumulator B high level is detected on the input, this Signals the MPU ACCA = Accumulator A IXH = Index Register, higher order 8 bits to begin the restart sequence. This starts execution of a IXl= Index Register, lower order 8 bits routine to initialize the processor from its reset PCH = Program Counter, higher order 8 bits condition. All the higher order address lines are forced PCl = Program Counter, lower order 8 bits high. For the restart, the last two locations in memory 5-60 F6802lF68821F6808 ($FFFE, $FFFF) are used to load the program that is Fig. 6 Power·Down Sequence addressed by the program counter. During the restart routine, the interrupt mask bit is set and must be reset Vee before the MPU can be interrupted by iRQ. Power·up and reset timing sequences are shown in Figures 5 and 6. When brought low, RESET must be held low at least three clock cycles. This is Independent of the power·up delay required for oscillator start·up (T Rd. E When RESET is released, it must go through the low-to- high threshold without bouncing, oscillating, or otherwise causing an erroneous reset (less than three V'H -----------------. clock cycles) that may cause improper MPU operation RE until the next valid reset. Fig. 5 Power-Up and Rese. Timing ~------------------------~.~,-------------------------------- Vee E-+-------<~ V'H -~ _ _ _ ------'JII_- REsa ____-4______ V~'L~ ~ t __--------1:-,_____ --------- OPTION 1 ~- (SEE NOTE BELOW) V'L RESET - - - - - - - - - - - OPTION 2 SEE· FIGURE 4 FOR POWER DOWN CONDITION RE _______________~V~'L V'ft -~--:lI.r-'--t -:.'--, Pe - ._ _ ~ --. ·....--tPcA Nota I! option 1 is chosen. RESET and RE pins ean be tied together. 5-61 F6802lF68821F6808 NMI (Non.Maskable Interrupt), Pin 6 Fig. 7 MPU Flow Chart A low-going edge on this input requests that a non· maskable interrupt sequence be generated within the processor. As with the interrupt request (IRQ) signal, the processor completes the current instruction being executed before it recognizes the NMI signal. The interrupt mask bit in the condition code register has no effect on NMI. The index register, program counter, accumulators, and condition code register are stored on the stack, as shown in Figure 4. At the end of the cycle, a 16·bit address will be loaded from memory locations $FFFC and $FFFD that points to a vectoring address. An address loaded from these locations causes the MPU to branch to a non·maskable interrupt routine in memory. A nominal 3 kO external resistor to Vee should be used for wire-OR and optimum control of interrupts. The NMI signal may be tied directly to Vee if not used. The IRQ and NMI inputs are hardware interrupt lines that are sampled when E is high and start the interrupt routine on a low E following the completion of an instruction. Figure 7 is a flow chart describing the major decision paths and interrupt vectors of the microprocessor. Table 1 gives the memory map for interrupt vectors. Table 1 Memory Map for Interrupt Vectors Vector MS LS Description $FFFE $FFFF Restart $FFFC $FFFD Non·Maskable Interrupt $FFFA $FFFB Software Interru pt so that no further interrupts may occur. At the end of the $FFF8 $FFF9 Interrupt Request cycle, a 16-bit address is loaded from memory locations $FFF8 and $FFF9 that point to a vectoring address. An address loaded from these locations causes the MPU to IRQ (Interrupt Request), Pin 4 branch to an interrupt routine in memory. This level·sensitive input requests that an interrupt sequence be generated within the machine. The The HALT line must be in the high state for interrupts to processor waits until it completes the current instruction be serviced. Interrupts are latched internally while HALT that is being executed before it recognizes the request. is low. At that time, if the interrupt mask bit in the condition code register is not set, the machine begins an interrupt The iRa has a high-impedance pull-up device internal sequence. The index register, program counter, to the chip; however, a 3kO external resistor to Vee accumulators, and condition code register are stored on should be used for the wire-un and optimum control the stack as shown in Figure 4. The MPU responds to the of interrupts. interrupt request by setting the interrupt mask bit high 5-62 F6802/F68821F6808 HALT (Halt), Pin 2 R/W (Read, Write), Pin 34 When this input is in the low state, all activity in the This TTL·compatible output signals the periphals and machine is halted. This input is level-sensitive. In the halt memory devices whether the MPU is in a read (high) or mode, the machine stops at the end of an instruction. write (low) state. The normal standby state of this signal Bus Available is in a high state, and Valid Memory is read (high). When the processor is halted, it is in the Address is in a low state. The address bus displays the read state. This output is capable of driving one standard address of the next instruction. TTL load and 90 pF. To ensure single·instruction operation, transition of the Power HALT line must occur t pcs before the falling edge of E and the HALT line must go high for one clock cycle. Vcc (Power Supply), Pin 8 Vcc tolerance is ± 5%. HALT should be tied high if not used. V cc STBY (Power Supply Standby), Pin 35 RAM Control Port This pin supplies the dc voltage to the first 8 or 32 bytes of RAM as well as the RAM enable (RE) control logic. 5 RE (RAM Enable), Pin 36 Thus, retention of data in this portion of the RAM on a A TTL-compatible RAM enable input that controls the on- power-up, power-down, or standby condition is chip RAM. When placed in the high state, the on·chip guaranteed. Maximum current drain at maximum VS B memory is enabled to respond to the MPU controls. In is ISBB ' the low state, the RAM is disabled. This pin may also be utilized to disable reading from and writing to the on-chip Vss (Ground), Pins 1, 21 RAM during a power-down situation. The RE signal must System ground; 0 V reference. be low three cycles before Vcc goes below 4.75 V during power-down as shown in Figure 6. Clock Control The RE signal should be tied low on the F6808; it should E (Enable), Pin 37 be tied to the correct high or low state if not used. This pin supplies the clock for the MPU and the rest of the system. This Is a single-phase, TTL·compatible clock CPU Control Outputs and may be conditioned by a memory ready (MR) signal. The E signal Is equivalent to 4>2 on the F6800, and is BA (Bus Available), Pin 7 capable of driving one TTL load and 130 pF. Is normally in the low state; when activated, it goes to the high state, indicating that the microprocessor has EXTAL (External Crystal Connector), Pin 39 stopped and that the address bus is available (but not in XTAL (Crystal Connector), Pin 38 a 3·state condition). This occurs if the HALT line is in the The F6802JF6882 has an internal oscillator that may be low state or the processor is in the wait state as a result crystal controlled. These connections are for a parallel- of execution of a WAIT instruction. At such time, all resonant, AT cut, fundamental crystal. (Figure 8 3·state output drivers go to their off state and other illustrates the crystal specifications.) A divide-by-four outputs to their normally Inactive levels. The processor is circuit has been added so that a 4 MHz crystal may be removed from the wait state by the occurrence of a used in place of a 1 MHz crystal for a more cost-effective = maskable (mask bit 1 0) or nonmaskable interrupt. This system. An example of the crystal circuit layout on a output is capable of driving one standard TTL load and printed circuit board is shown in Figure 9. 30 pF. Pin 39 may be driven externally by a TTL-input signal four VMA (Valid Memory Address), Pin 5 times the required clock frequency. Pin 38 is to be This output indicates to peripheral devices that there is a grounded in this mode. valid address on the address bus. In normal operation, this signal should be utilized for enabling peripheral An RC .network is not directly usable as a frequency interfaces, such as the PIA and ACIA. This signal is not source on pins 38 and 39. An RC network-type TTL or 3-state. One standard TTL load and 90 pF may be directly CMOS oscillator works well as long as the TTL or CMOS driven by this active-high signal. output drives the on-chip oscillator. 5-63 F6802/F6882/F6808 Fig. 8 Crystal Specification Fig. 9 Suggested PC Board Layout EXAMPLE OF BOARD DESIGN Q USING THE CRYSTAL OSCILLATOR VI C'N CaUl 3.58 MHz 27pF 27pF 38rD~3~ 4MHz 27 pF 27pF OTHER SIGNALS ARE NOT WIRED IN THIS AREA. 6MHz 20pF 20pF COUl T T CIN 8MHz 18 pF 18 pF Crystal Loading YI --~IDI-I-- E SIGNAL IS WIRED APART 39 FROM 38 PIN AND 39 PIN. Co 3.58 MHz 4.0 MHz 6.0 MHz 8.0 MHz '-----------¢~:~----~,; E Rs 60n son 30-50n 20~40n Co 3.5 pF 6.5 pF 4-6 pF 4-6 pF 0.01- 0.01- C, 0.015 pF 0.025 pF 0.02 pF 0.02 pF Q >40K >30K >20K >20K Nominal Crystal Parameters· *These are representative AT-cut parallel-response crystal parameters only. Crystals of other types of cuts may also be used. LC networks in place of the crystal are not recommended. Flg.10 Memory Ready Synchronization If an external clock is used, it may be halted'for more 4xfo than $PWOL. The F6802/F6882/F6808 is a dynamic part OSCILLATOR except for the internal RAM, and requires the external clock to retain information. EXTAL 39 MR (Memory Ready), Pin 3 F6802 "<.7 A TTL·compatible input control Signal that allows ~ XTAL stretching of the enable (E) signal. Use of MR requires synchronization with the 4xfo signal, as shown in A A COMB 5321B~B R , Complement.2s NEG 60 7 2 70 6 3 00 - M ~ M CD0 (Negate) NEGA 402100-A·A CD0 NEGB 5021 OO-B~B tCD0 Decimal AdJust, A DAA 19 2 1 Converts 8,nary Add. of BCD Characters tCD Into BCD Format Decrement D'C 6A 7 2 7A 6 3 M - l-M OECA 4A 2 1 OEca SA 2 I 8 - 1~B EORA 88 2 2 98 3 2 A8 5 2 B8 4 3 A CD M - A R EORB C8 2 2 08 3 2 E8 5 2 F8 4 3 a CD M 8 --> A Increment INC 6C 7 2 7C 6 3 M t 1 --> M ®. INCA 4C 2 1 A t I ~ A ® INCB 5C 2 I B+l~8 ® • Load Acmltr lDAA 86229632AG528643 M~A lOAB CG 2 2 06 3 2 E6 5 2 F6 4 3 M- 8 Or,lnciusive DRAA SA 2 9A32AA5 BA 4 A+M~A Legend ORAa CA 2 DA 3 2 fA 5 FA 4 a+M~ a Push Data PSHA 36 4 I A --> M Sp , SP - 1 --> SP OP Operation code (hexadecimal) PSHa 37 4 1 a - MSp. SP - 1 --> SP Number of MPU cycles Pull Data PULA 32 4 1 SP + 1 --+SP. MSp-A Number of program bytes PUla 33 4 I SP+l~SP.Msp~a + Arithmetic plus ® Arithmetic minus ~lL{] - """ II jJ Rotate left AOL 69727963 t t ROlA 49 2 I 1 ® t Boolean AND ROlB 59 2 1 B C b7 bO ® Msp Contents of memory location Rotate Right ROA RORA RORa 66727663 46 2 56 2 1 1 ~lLO a C -- 1 I 1 1 1 1 II b7 bO ;J t ® ® 1 ® 1 1 + point to be stack pOinter Boolean Inclusive-OR Boolean exclusive-OR StHh left, ® ~l 0 -- 1 1 I 1 1 1 1 1 1- 0 A'L 68 7 2 78 6 3 Arithmetic ASlA 48 2 1 t® M Complement of M ASlB 58 2 1 a C b7 bO I® Transfer into ® o Bit = zero ;1~C?IIIIIIII - 0 Shift Right, A'R 67 7 2 77 6 3 1 1 Arithmetic ASRA 47 2 I t® 00 Byte = zero ASRB 57 2 1 b7 bO C I® ® :1~B Shih Right. L'A 64 7 2 74 6 3 1 I Logic lSRA 44 2 1 0--:1 1 I ! I I I 1 I - 0 1 ® I lSRB 54 2 1 b7 bO ®I Condition Code Symbols Store Acmll' STAA 97 4 A7 6 B7 5 3 A--M H Half-carry from bit 3 STAB 07 4 E7 6 F7 S B-M I Interrupt mask Subtract SUBA 80229032 A052 804 A-M-A N Negative (sign bit) SUBB CO 2 2 00 3 2 EO 5 2 FO 4 3 8-M-a Z Zero (byte) Subtract Acmltrs SBA 102 1 A-8--A Sub!r. with Carry SBCA 8222923 A252a24 A-M-C---A V Overflow, 2's complement SBCB C222023 E2 5 2 F2 4 8-M-c---a C Carry from bit 7 Tran$fer Acmltrs TAB 16 2 1 A --> a R Reset always TBA 17 2 1 a ----- A S Set always Te5t, Zero TST 60 7 2 70 6 3 M -00 A Test and set If true, cleared TSTA 402 I A-OO R R or Minus otherwise TSTB 50 2 1 a -00 A A Not affected z v C Note Accumulator addressing mode instructions are included In the column for implied addressing. 5-67 F6802lF68821F6808 Table 4 Index Register and Stack Manipulation Instructions COND CODE REG IMMED DIRECT INDEX EXTND IMP~IED 5 4 3 2 1 0 POINTER OPERATIONS MNEMONIC OP - • OP - • OP - • OP - • OP - # BOOLEAN/ARITHMETIC OPERATION H I N Z V C Compare Index Reg CPX 8C 3 3 9C 4 2 AC 6 2 BC 5 3 XH - M. XL - 1M +1. ·· · · ®. • (f) I ·· ·· ·· · ··· ··· Decrement Index Reg OEX 09 4 1 X-I - X I Decrement Stack Pnlr DES 34 4 1 SP - 1 - SP Increment Index Reg INX 08 4 1 X+1-X I Increment Stack Pntr Load Index Reg INS LOX CE 3 3 DE 4 2 EE 6 2 FE 5 3 31 4 1 SP + 1 - SP M - XH. 1M + 1 ' - XL ·· ·• ®· · · ·· • @ I R ··· • ® ··· Load Stack Pntr LOS 8E 3 3 9E 4 2 AE 6 2 BE 5 3 M - SPH. ,M+ 1 - SPL R I Store Index Reg STX OF 5 2 EF 7 2 FF 6 3 XH - M. XL - 1M + 1 .@ I R Store Stack Pntr STS 9F 5 2 AF 7 2 BF 6 3 SPH - M, SPl- 1M + 11 R ·· ·· ·· ·· ·· ·· I Indx Reg - Stack Pntr TXS 35 4 1 X-I - SP Stack Pntr - Indx Reg TSX 30 4 1 SP + 1 - X Table 5 Jump and Branch Instructions CONDo CODE REG. RELATIVE INDEX EXTND IMPLIED 5 4 3 2 1 0 OPERATIONS MNEMONIC OP # OP - # OP # OP # BRANCH TEST H I N Z V C Branch Always BRA 20 4 2 None 0 0 0 0 0 0 Branch II Carry Clear BCC 24 4 2 C=O 0 0 0 0 0 0 Branch If Carry Set BCS 25 4 2 C= 1 0 0 0 0 0 0 Branch If = Zero BEQ 27 4 2 Z=1 0 0 0 0 0 0 Branch If c' Zero BGE 2C 4 2 N(j)V = 0 0 0 0 0 • 0 ..· Branch If -- Zero BGT 2E 4 2 Z+IN(t>V,=O 0 0 0 0 0 Branch If Higher BHI 22 4 2 C+Z=O 0 0 0 0 0 0 Branch If oS Zero BLE 2F 4 2 Z+ IN(t>V, = 1 0 0 0 0 0 Branch If Lower Or Same Branch If < Zero BLS BLT 23 20 4 4 2 2 C+Z=1 N(t>V= 1 0 · 0 0 0 · . ·•· 0 0 0 0 0 0 Branch If Minus BMI 2B 4 2 N= 1 0 0 0 0 0 Branch If Not Equal Zero BNE 26 4 2 Z=O 0 0 0 Branch If Overflow Clear BVC 28 4 2 V=O 0 0 0 0 0 Branch If Overflow Set BVS 29 4 2 V=1 · . 0 0 0 0 0 0 Branch If Plus BPL 2A 4 2 N =0 0 0 0 0 0 Branch To Subroutme BSR 80 8 2 } 0 0 0 0 0 Jump JMP 6E 4 2 7E 3 3 See Special Operations 0 0 0 0 0 0 Jump To Subroutine JSR AD 8 2 BO 9 3 0 0 0 0 0 0 No Operation NOP 01 2 1 Advances Prog. Cntr. Only 0 0 0 0 0 0 Return From Interrupt RTI 3B 10 1 -@- Return From Subroutine Software Interrupt Wait for Interrupt· RTS SWI WAI 39 5 3F 12 3E 9 1 1 1 } See SpeCial Operations · . .I.: . . :• rODI @ :• •1• 1• 0 0 ·WAI puts address bus, ANi, and data bus in the 3·state mode while VMA is held low. 5-68 F6802/F68821F6808 Table 6 Condition Code Register Manipulation Instructions CONDo CODE REG. IMPLIED 5 4 3 2 1 0 OPERATIONS MNEMONIC OP - # BOOLEAN OPERATION H I N Z V C Clear Carry CLC OC 2 1 0- C 0 0 0 0 0 R Clear Interrupt Mask CLI OE 2 1 0-1 0 R 0 0 0 0 Clear Overflow CLV OA 2 1 O-V 0 0 0 0 R 0 Set Carry SEC 00 2 1 1-C 0 0 0 0 0 S Set Interrupt Mask SEI OF 2 1 1 -I 0 S 0 0 0 0 Set Overflow SEV OB 2 1 1- V 0 0 0 0 S 0 Acmltr A - CCR TAP 06 2 1 A - CCR --@--- CCR - Acmltr A TPA 07 2 1 CCR - A 01 0 1 0 1 0 \0\0 II Condition Code Register Notes (Bit set if test is true and cleared otherwise) 1 (Bit V) Test: Result = 100oo0oo? (Bit V) Test: 2's complement overflow from subtraction of MS 2 (Bit C) Test: Result = 00000000? bytes? (Bit C) Test: Decimal value of most significant BCD character 9 (Bit N) Test: Result less than zero? (Bit 15= 1) greater than nine? (Not cleared if previously set.) 10 (All) Load condition code register from stack (see Figure 10) 4 (Bit V) Test: Operand = 10000000 prior to execution? 11 (Bit I) Set when interrupt occurs. If previously set, a non·maskable 5 (Bit V) Test: Operand=01111111 prior to execution? interrupt is required to exit the wait state. 6 (Bit V) Test: Set equal to result of N .. C after shift has occurred. 12 (All) Set according to the contents of accumulator A. 7 (Bit N) Test: Sign bit of most significant (MS) byte = I? Table 7 Instruction Addressing Modes and Associated Execution Times (Times in Machine Cycles) (Dual Operand) ACCX Immediate Direct Extended Indexed Implied Relative (Dual Operand) ACCX Immediate Direct Extended Indexed Implied ABA INC ADC INS ADD INX AND JMP ASL JSR ASA LDA BCC LOS BCS LDX BEA LSR BGE NEG BGT NOP BHI ORA BIT PSH BLE PUL BLS ROL BLT ROR BMI RTI 10 BNE RTS 5 BPL SBA 2 BAA SBC BSA SEC BVC SEI BVS SEV CBA STA, CLC STS CLI STX CLR SUB CLV SWI 12 CMP TAB 2 COM TAP cpx TBA DAA TPA DEC TST DES TSX DEX TSX EOR WAI Note Interrupt time is 12 cycles from the end of the instruction being executed" except foltowing a WAI instruction, when it is four cycles. 5·69 F6802lF68821F6808 FIg,12 Special Operations JSR. JUMP TO SUBROUTINE: PC Main Program SP Stack PC Subroutine ~ AD ~ JSR - SP - 2 INX T K tst Subr. Instr. INDXD { nT 1 n- 2 K- Offset" !\Iext Main In5tr. Q SP -1 SP nT 2 L . K - 8-Blt Unsigned Value nT2Hand n ,2,L Form n ,2 PC Main -Program SP Stack PC Subroutine - ~ BD ~ JSR - SP - 2 S 1st Subr. Instr. EXTND { nT1 n-2 nT3 SH ~ Subr. Addr. SL ~ Subr. Addr. Next Main Instr. Q SP - 1 SP - n.,. 3 L ~ Stack POinter After Execution. ~ Formed From SH and SL BSR. BRANCH TO SUBROUTINE: PC Main Program SP Stack PC Subroutine. ~ 8D ~ BSR SP - 2 nT2::K nT1 nT2 :: K ~ Offset' Next Main In5tr. Q SP - 1 SP nT2 L 'K ~ 7·Blt Signed Value n T 2 Formed From n ,2 Hand n -r2.L JMP. JUMP: PC Main Program PC Main Program 6E ~ JMP 7E ~ JMP IND)(o { nT1 XTK K ~ Offset INext Instruction m"D" { nT1 nT2 K" ~ Next Address . KL ~ Next Address K I Next InstruellOn RTS. RETURN FROM SUBROUTINE: PC Subroutme SP Stack PC Main Program 139~RTS § S SP Next Main Instr. I Q SP T 1 - SP T 2 NL RTI. RETURN FROM INTERRUPT: PC Interrupt Program SP Stack PC Main Program S 13B~RTI 0] Q SP SP T 1 CondillOn Code n Next Main Instr. SP T 2 Acmltr B SP T 3 Acmltr A SP T 4 Index Register XH SP T 5 Index Register XL SP T 6 NH - SP T 7 NL 5·70 F6802/F6882/F6808 Extended Addressing Output Delay in extended addressing, the address contained in the second byte of the instruction is used as the higher 8 Figures 13 and 14 illustrate typical output delays versus bits of the address of the operand. The third byte of the capacitance loading. instruction is used as the lower 8 bits of the address for the operand. This is an absolute address in memory. These are 3·byte instructions. Fig. 13 Typical Data Bus Output Delay vs, Capacitive Loading Indexed Addressing In indexed addressing, the address contained in the 600 IOH = -205 pA max @ 2.4 V second byte of the instruction is added to the index IOL = 1.6 mA max @ 0.4 V Vee = 5.0 V register's lowest 8 bits in the MPU. The carry is then 500 TA = 25°C added to the higher order 8 bits of the index register. This result is then used to address memory. The iii' 400 S • modified address is held in a temporary address register w so there is no change to the index register. These are ~ 300 .... 2·byte instructions. > ~ ~ 200 ..,/ V Implied Addressing .,/ / In the implied addressing mode, the instructions give the 100 address (I.e., stack pointer, index register, etc.). These are 1·byte instructions. CL includes stray capacitance 100 200 300 400 500 600 Relative Addressing Cl. LOAD CAPACITANCE (pF) In relative addressing, the address contained in the second byte of the instruction is added to the program counter's lowest 8 bits plus two. The carry or borrow is then added to the higher 8 bits. This allows the user to Fig. 14 Typical Read/Write, VMA and Address Output address data within a range of -125 to + 129 bytes of Delay vs, Capacitive Loading the present instruction. These are 2·byte instructions. 60 0 IOH - -145 Ji.A max @2.4 V 10l = 1.6 rnA max @ 0.4 V Summary of Cycle·by·Cycle Operation 500 Vee = 5.0 V TA = 2S"C Tab/e 8 provides a detailed description of the information present on the address bus, data bus, valid memory 400 I address (VMA) line, and the read/write (RlW) line during each cycle for each instruction. A:::::1MA 300 .,/ Hw This information is useful in comparing actual with expected results during debug of both software and hardware as the control program is executed. The information is categorized according to addressing mode and number of cycles per instruction. (In general, instructions with the same addressing mode and number 20 0 100 0 - ---- .,/ V ~ CL includes stray capacitance o 100 200 300 400 500 600 of cycles execute in the same manner. Exceptions are indicated in the table.) Cl. LOAD CAPACITANCE (pF) 5·71 F6802lF68821F6808 Table 8 Operation Summary R/W Address Bus Line . Data Bu. Immediate ADC EOR , ,, Op Code Address ,, Op Code ADD LOA 2 Op Code Address + f Operand Data AND ORA 2 BIT SBC CMP SUB CPX , ,, Op Code Address ,, Op Code LOS LOX 3 2 3 , Op Code Address + , Op Code Address + 2 , Operand Data (High Order Byte) Operand Data (Low Order. Byte) Direct ADC EOR , ,, Op Code Address .,, Op Code APD AND LOA ORA 3 2 3 , Op Code Address + , Address of Operand , Address of Operand Operand Data , BIT SBC CMP SUB CPX , ,, Op Code Address ,,, Op Code ,, LOS 2 Op Code Address + , Address of Operand 4 LOX 3 4 Address of Operand Operand Address + , , Operand Data (High Order .Byte) Operand Data (Low Order Byte) STA , ,, Op Code Address' ,, Op Code 4 . 2 3 , 0 Op Code Address + , Desti nation Add ress , Destination Address Irrelevant Data INote.', 4 Destination Address 0 Data from Accumulator STS , ,, Op Code Address ,,, . Op Code STX 2 OP. Code Address + , AQdress of Operand ,, 5 3 0 . Address of Operand Irrelevant Data INote " 4 Address of Operand 0 Register Data (High Order Byte) 5 Address of Operand + , 0 Register Data (Low Order Byte) Indexed JMP , ,, Op Code Address ,, Op Code 4 2 3 0 Op Code Address + , Index Register ,, Offset Irrelevant Data (Note " 4 0 Index Register Plus Offset (w/o Carry I ADC EOR , ,, Op Code Address ,, Irrelevant Data I Note. " Op Code ADD LOA 2 Op Code Address + , , Offset ,, AND ORA 5 3 0 Index Register Irrelevant Data INote " BIT CMP SBC SUB 4 5 , 0 Index Register Plus Offset (w/o Carryl Index Register Plus Offset Irrelevant Datil INote " Operand Data CPX , , Op Code Address I ,, Op Code LOS 2 1 Op Code Address + , Offset LOX 6 3 0 Index Register ,, Irrelevant Data INote " ,, 4. 0 Index Register Plus Offset I WID Carry) Irrelevant Data INote ,) 5 6 Index Register Plus Offset Index Register Plus Offset + , , OperanQ Data (High Order Byt~) Operand Data (Low Order Byte) 5·72 F6802lF68821F6808 Tabl. 8 Op.... tlon Summary (Cont.) Addre•• Mode AIW and Instruction. Addr... Bu. LIne Da.. Bu. STA 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Offset 3 0 Index Register 1 Irrelevant Data (Note 11 6 4 0 Index Register Plus Offset (w/o tarry I 1 Irrelevant Data (Note 11 5 0 Index Register Plus Offset 1 Irrelevant Data (Note 11 6 1 Index Register Plus Offset 0 Operand Data ASL LSR 1 1 Op Code Address 1 Op Code ASR NEG 2 1 Op Code Address + 1 1 Offset CLR ROL 3 0 Index Reg ister 1 Irrelevant Data (Note 11 COM ROR 7 4 0 Index Register Plus Offset (w/o Carry I 1 Irrelevant Data (Note 11 DEC TST 5 1 Index Register Plus Offset 1 Current Operand Data INC 6 0 Index Register Plus Offset 1 Irrelevant Data (Note 11 7 1/0 Index Register Plus Offset 0 New Operand Data INote 31 (Note 31 STS 1 1 Op Code Address 1 Op Code STX 2 1 Op Code Address + 1 1 Offset 3 0 t"ndex Reg ister 1 Irrelevant Data (Note 11 7 4 0 Index Register Plus Offset I wlo Carry I 1 Irrelevant Data (Note 1'1 5 0 Index Register Plus Offset 1 Irrelevant Data (Note 11 6 1 Index Register Plus Offset 0 Operand Data (High Order By1e) 7 1 Index Register Plus Offset + 1 0 Operand Data (Low Order By1e) JSR 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Offset 3 0 Index Register 1 Irrelevant Data (Note 11 4 1 Stack Pointer 0 Return 'Address (High Order Byte) 8 Stack Pointer - 1 Return Address (Low Order By1e) 5 1 0 6 0 Stack Poi nter - 2 1 Irrelevant Data INote 11 7 0 Index Register 1 Irrelevant Data (Note 11 8 0 Index Register Plus Offset (w/o Carry 1 Irrelevant Data INote 11 Extended JMP 1 1 Op Code Address 1 Op Code 3 2 1 Op Code Address + 1 1 Jump Address (High Order Byte) 3 1 Op Code Address + 2 1 Jump Address (LLow Order By1e) ADC EOR 1 1 Op Code Address 1 Op Code ADD LOA 2 1 Op Code Address + 1 1 Address of Operand (High Order By1e) AND ORA 4 3 1 Op Code Address + 2 1 Address of Operand (Low Order By1e) BIT SBC 4 1 Address of Operand 1 Operand Data CMP SUB CPX 1 1 Op Code Address 1 Op Code LOS 2 1 Op Code Address + 1 1 Address of Operand (High Order By1e) LOX 5 3 1 Op Code Address + 2 1 Address of Operand (Low Order By1e) 4 1 Address of Operand 1 Operand Data (High Order By1e) 5 1 Address of Operand + 1 1 Operand Data (High Order By1e) STA A 1 1 Op Code Address 1 Op Code STA B 2 1 Op Code Address + 1 ' 1 Destination Address (High Order By1e) 5 3 1 Op Code Address + 2 1 Destination Address (Low Order Byte) 4 0 Operand Destination Address 1 Irrelevant Data (Note 11 5 1 Operand Destination Address 0 Data from Accumulator ASL LSR 1 1 Op Code Address 1 Op Code ASR NEG 2 1 Op Code Add ress + 1 1 Address of Operand (High Order By1e) CLR ROL '3 1 Op Code Add ress + 2 1 Address of Operand (Low Order By1e) COM ROR 6 4 1 Address of Operand 1 Current Operand Data DEC TST 5 0 Address of Operand 1 Irrelevant Data (Note 11 INC 6 1/0 Address of Operand 0 New Operand Data (Note 31 (Note 31 5-73 F6802lF68821F6808 Table 8 Operation Summary (Cont.) Address Mode RIW and Instructions Address Bus Line Data Bus STS 1 1 Op Code Address 1 Op Code STX 2 1 Op Code Add ress + 1 1 Address of Operand (High Order Byte) 3 1 Op Code Address + 2 1 Address of Operand (Low Order Byte) 6 4 0 Address of Operand '1 Irrelevant Data I Note 11 5 1 Address of Operand 0 Operand Data (High Order Byte) 6 1 Address of Operand + 1 0 Operand Data (Low Order Byte) JSR 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Address of Subroutine (High Order Byte) 3 1 Op Code Address + 2 1 Address of Subroutine (Low Order Byte) 4 1 Subroutine Starting Address 1 Op Code of Next Instruction 9 5 1 Stack Pointer 0 Return Address (Low Order Byte) 6 1 Stack Pointer - 1 0 Return Adc:fress (High Order Byte) 7 0 Stack POinter - 2 1 Irrelevant Data 1Note 11 8 0 Op Code Address + 2 1 Irrelevant Data INote '11 9 1 Op Code Address + 2 1 Address of Subroutine (Low Order Byte) Inherent ABA DAA SEC 1 1 Op Code Address 1 Op Code ASL DEC SEI 2 2 1 Op Code Address + 1 1 Op Code of Next Instruction ASR INC SEV CBA LSR TAB CLC NEG TAP CLI NOP TBA CLR ROL TPA CLV ROR TST " COM SBA DES 1 1 Op Code Address 1 Op Code DEX 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 INS 3 0 Previous Register Contents 1 Irrelevant Data I Note 11 INX 4 0 New Register Contents 1 Irrelevant Data INote 11 PSH 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 .. 3 1 Stack Pointer 0 Accumulator Data 4 0 Stack Pointer - 1 1 Accumulator Data PUL 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 0 Stack Pointer 1 Irrelevant Data (Note 11 4 1 Stack Pointer + 1 1 Operand Data from Stack TSX , 1 Op Code Address 1 Op Code 2 1 Op Code Addiess + 1 ,1 Op Code of Next Instruction 4 3 0 Stack Pointer 1 Irrelevant Data (Note 11 TXS 4 1 , 0 New I ndex Register Op Code Address 1 1 Irrelevant Data (Note 11 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 4 3 0 Index Register 1 Irrelevant Data 4 0 New Stack Pointer 1 Irrelevant Data RTS 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Irrelevant Data (Note 21 5 3 0 Stack Pointer 1 Irrelevant Data (Note 1} 4 1 Stack Pointer + 1 1 Address of Next Instruction (High Order Byte) 5 1 Stack Pointer + 2 1 Address of Next Instruction (Low Order Byte) 5·74 F6802lF6882/F6808 Table 8 Operation Summary (Cont.) Address Mode R/W and Instructions Address Bus LIne Data Bus WAI 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Op Code of Next Instruction 3 1 Stack Pointer 0 Return Address (Low Order Byte) 4 1 Stack Pointer - 1 0 Return Address (High Order Byte) 9 5 1 Stack Pointer - 2 0 Index Register (Low Order Byte) 6 1 Stack Pointer - 3 0 Index Register (High Order Byte) 7 1 Stack Pointer - 4 0 Contents of Accumulator A 8 1 Stack Pointer - 5 0 Contents of Accumulator B 9 1 Stack Pointer - 6 INote 4, 1 Contents of Condo Code Register RTI 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Irrelevant Data INote 21 • 3 0 Stack Pointer 1 Irrelevant Data I Note 11 4 1 Stack Pointer + 1 1 Contents of Condo Code Register from Stack 5 1 Stack Pointer + 2 1 Contents of Accumulator B from Stack 10 6 1 Stack Pointer + 3 1 Contents of Accumulator A from Stack 7 1 Stack Pointer·+ 4 1 Index Register from Stack (High Order Byte) 8 1 Stack Pointer + 5 1 Index Register from Stack ('Low Order Byte) 9 1 Stack Pointer + 6 1 Next Instruction Address from Stack (High Order Byte) 10 1 Stack Pointer + 7 1 Next Instruction Address from Stack (Low Order Byte) SWI 1 1 Op Code Address 1 Op c'ode 2 1 Op Code Address + 1 1 Irrelevant Data I Note 11 3 1 Stack Pointer 0 Return Address (Low Order Byte) 4 1 Stack Pointer - 1 0 Return Address (Aigh Order Byte) 5 1 Stack Pointer - 2 0 Index Register (Low Order Byte) 6 1 Stack Pointer - 3 0 Index Register (High Order Byte) 12 7 1 Stack Pointer - 4 0 Contents of Accumulator A 8 1 Stack Pointer - 5 0 Contents of Accumulator B 9 1 Stack Pointer - 6 0 Contents of Condo Code Register 10 0 Stack Pointer - 7 1 Irrelevant Data INote 11 11 1 Vector Address FFFA I Hex I 1 Address of Subroutine (High Order Bytel 12 1 Vector Address FFFB I Hex I 1 Address of Subroutine (Low Order Byte) Relative BCC BHI BNE 1 1 Op Code Address 1 Op Code BCS BLE BPL 2 1 Op Code Address + 1 1 Branch Offset 4 BEQ BLS BRA 3 0 Op Code Address + 2 1 Irrelevant Data I Note 11 BGE BLT BVC 4 0 Branch Address 1 Irrelevant Data I Note 11 BGT BMI BVS BSR 1 1 Op Code Address 1 Op Code 2 1 Op Code Address + 1 1 Branch Offset I 3 0 Return Address of Main Program 1 Irrelevant Data INote 11 4 1 Stack Pointer 0 Return Address (Low Order Byte) 8 Stack Pointer - 1 Return Address (High Order Byte) 5 1 0 6 0 Stack Pointer - 2 1 Irrelevant Data INote 11 7 0 Return Address of· Main Program 1 Irrelevant Data INote 11 8 0 Subroutine Address 1 Irrelevant Data (Note 11 Not,.: 1. If devIce that is addressed during this cycle uses VMA, the data bus goes to the high·impedance 3·state condition. Depending on bus capacitance, data from the previous cycie may be retained on the data bus. 2. Data is ignored by the MPU. = 3. For TST, VMA 0 and operand data does not change. 4. Most significant byte of address bus = most significant byte of address of BSR Instruction, and least Significant byte of address bus = least significant byte of subroutine address. 5·75 F6802lF6882/F6808 DC Characteristics Absolute Maximum Ratings Table 9 contains the dc characteristics of the These are stress ratings only, and functional operation at F6802/F6882. these ratings, or under any conditions above those indicated In this data sheet, is not Implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. Voltage of any Pin Relative to GND - 0.3 V, + 7.0 V Storage Temperature - 55·C, + 150·C Power Dissipation 1.5W Thermal Resistance, IJJA (Plastic Package) 1W (CER-DIP Package) 55·CIW Table 9 DC Characterlstlc$ Vee= 5.0 V ± 5%, Vss= 0, TA = 0 to 70·C unless otherwise noted) Symbol Characteristic Min Typ Max Unit Condition VIH Input High Voltage Vdc Logic EXtal Vss + 2.0 - Vee Logic Reset Vss + 4.0 - Vee VIL Input Low Voltage Vdc Logic Extal, Reset Vss - 0.3 - Vss+0.8 liN Input Leakage Current ~dc Logic - 1.0 2.5 VIN=O to 5.25 V, Vee= Max VOH Output High Voltage Vdc 0 0-0 7 Vss +2.4 - - I LOAD = -206 ~dc, Vee = Min Ao-A 15, RiiN, VMA, E Vss +2.4 - - ILOAD= -145 "Adc, Vee = Min BA Vss + 2.4 - -. I LOAD = -100 "Adc, Vee= Min VOL Output Low Voltage - - V ss +O.4 Vdc I LOAD = 1.0 mAdc, Vee= Min PD" Power Dissipation - 0.600 1.2 W Vee Standby Vdc VSBB Power Down 4.0 - 5.25 VSB Power Up 4.75 - 5.25 ISBB Standby Current mA F6802 - - 8.0 F6882 - - 3.0 Capacitance pF CIN 0 0-0 7 - - 12.5 Logic Inputs EXtal - 6 10 VIN=O, TA= 25·C, f= 1.0 MHz COUl Ao-A 15, RiiN, VMA - - 12 'In power-down mode, maximum power dissipation Is less than 42 mW. Capacitances are periodically sampled. rather than 100% tested. 5-76 F6802lF68821F6808 Timing Characteristics Tables 10 and 11 contain timing characteristics Information. Table 10 Frequency Characteristics F8B02 F880A02 F88B02 Symbol Characteristic Min Max Min Max Min Max Unit fo Frequency of Operation 0.1 1.0 0.1 1.5 0.1 2.0 MHz fXTAL Crystal Frequency . 1.0 4.0 1.0 6.0 1.0 8.0 MHz 4xfo External Oscillator Frequency 0.4 4.0 0.4 6.0 0.4 8.0 MHz tCYC Cycle Time 1.0 10 0.666 10 0.5 10 P.s • tPWEH E High 450 9500 280 9700 220 9700 Clock Pulse Width ns tPWEL E Low 450 5000 280 5000 210 5000 tA, tF Fall Time - 25 - 25 - 20 ns trc Crystal Oscillator Startup Time 100 - 100 - 100 - ms Table 11 ReadlWrlte Timing F8802 F880A02 F88B02 Symbol Characteristic Min Max Min Max Min Max Unit tAO Address Delay - 270 - 220 - 180 ns t AV1 Address Delay (Internal RAM) - 270 - 240 - 200 ns tAV2 Read Access Time Useable by Peripheral @ 1 MHz - 605 - 310 - 235 tAce= tCYC- tAO + tosA+ tF tOSA Data Setup Time (Read) 100 - 70 - 60 - ns tOHA Input Data Hold Time 10 - 10 ~ 10 - ns tOHW Output Data Hold time 30 - 20 - 20 - ns tAH Address Hold Time (Address, R/W, VMA) 20 - 20 - 20. - ns toow Data Delay Time (Write) - 225 - 170 - 160 ns Processor Controls tpcs Processor Control Setup Time 200 - 140 - 110 - tpCA, tPCF Processor Control Rise and Fall Time (Does Not Apply to RESEn - 100 - 100 - 100 ns (Measured between 0.8 V and 2.0 V) Note If programs are not executed from on·board AAM, TAVl applies. If programs are to be stored and executed from on·board RAM, TAV2 applies. For normal data storage In the on·board RAM, this extended delay does not apply. Programs cannot be exeucted from on·board RAM when using A and B parts (F68A02, F68AOB, F68BOB). One·board RAM can be used for data storage with all parts. 5·77 F6802/F6882/F6808 Bus Timing Characteristics F68D2NS F68D2 F68AD2 F68BD2 F68D8 F68AD8 F68BD8 Symbol Parameter Min Max Min Max Min Max Unit tCYC G) Cycle Time 1.0 10 0.667 10 0.5 10 I's PWEL o Pulse Width, E Low 450 5000 280 5000 210 5000 ns PWEH CD Pulse Width, E High 450 9500 280 9700 220 9700 ns t r, tf 8) Clock Rise and Fall Time - 25 - 25 - 20 ns tAH ® Address Hold Time 20 - 20 - 20 - ns IAV1 @ Non·Muxed Address Valid Time to E (See Note 5) 160 - 100 - 50 - ns tAV2 - 270 - - - - tOSR @ Read Data Setup Time 100 - 70 - 60 - ns tOHR @ Read Data Hold Time 10 - 10 - 10 - ns toow @ Write Data Delay Time - 225 - 170 - 160 ns tOHw @ Write Data Hold Time 30 - 20 - 20 - ns tACC @ Usable Access Time (See Note 4) 605 - 310 - 235 - ns E RIW ADDRESS (NON·MUXED) --t...,... READ DATA NON·MUXED _ _+_~ NOTE WRITE DATA NON·MUXED ----..3: Notes 1. Voltage levels shown are VL oS 0.4 V, VH '" 2.4 V, unless otherwise specified. 2. Measurement pOints shown are O.B V and 2.0 V, unless otherwise noted. 3. All electricals shown for the F6802 apply to the F6802NS and F680B, unless otherwise noted. 4. Usable access time is computed by 12+ 3+ 4-17. 5·78 F6802/F6882/F6808 FIg.15 Read Data from Memory or Peripherals PW~H t, R/W -----~~I .... tDSA ..... DATAFROM ___~__________________________~~~~~~~~~~~ • MEMORY OR PERIPHERALS 0.8 V ~ DATA NOT VALID Note Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts. unless otherwise noted. Fig. 16 Write Data In Memory or Peripherals ~---- PW~H---"'" E ~4----PW~L-----{f--------------------~ R/W ---""'-~~~r DATA ______~____________________~----~~~~~~~~1il FROM MPU ~ DATA NOT VALID Note Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts. unless otherwise noted. Fig. 17 Bus Timing Test Load 4.75 V C = 130 pF FOR 0 0-0,. E Rl = 2.2 kO = 90 pF FOR Ao-A, •• R/W. AND VMA = 30 pF FOR BA TEST POINT 0-...-..... ---1( MMD6150 OR EQUIV. R = 11.7 kG FOR 0 0-0,. E 16.5 kG FOR Ao-A, •• R/W. AND VMA c R 24 kll FOR BA MMD7000 OR EQUIV. 5-79 F6802lF68821F6808 Ordering Information Order Code Speed Temperature Range F6802P, S 1.0 MHz O·C to + 70·C F6882P,S 1.0 MHz O·C to + 70·C F6802CP, CS 1;0 MHz - 40·C to + 85·C F68A02P,S 1.5 MHz O·C to + 70·C F68A02CP, CS 1.5 MHz -40·Cto -t:85·C F68B02P,S 2.0 MHz O·C, to + 70·C P = Plastic package S = Ceramic package 5-80 F6809 Central Processing Unit Advance Product Information Microprocessor Product Description Connection Diagram The Fairchild F68098-bit Microprocessor is an advanced, high-performance member of the F6800 family. It offers vss greater throughput, improved byte efficiency, and NMI XTAL increased adaptability to various software disciplines, IRQ EXTAL Including position-independent code, re-entrancy, recursion, block structuring, and high-level language FIRQ RES generation. The F6809 is compatible with all F6800 BS MRDY peripheral devices and Is upward source code BA Q compatible with F6800-serles microprocessors. vee E Architectural improvements, such as additional 16-bit IlMAiBREQ registers and dual 8-bit data paths, allow for powerful enhancements to the instruction set and addressing R/W capabilities. • Compatible with Entire F6800 Family -Hardware Interfaces with all F6800 Peripherals -Software Has Upward-Compatible Instruction Set and Addressing Modes • Two 16-Bit Index Registers • Two Indexable 16-Blt Stack Pointers • Two 8-Blt Accumulators Can Be Concatenated to Form One 16-Blt Accumulator • Direct Page Register Allows Direct Addressing Throughout Memory Map • Single + 5 V Supply • On-Chip Oscillator • MRDY Input Extends Data Access Time for Use with Slow Memory (Top View) • DMA/BREQ Allows Access to Bus for DMA and Memory Refresh • Fast Interrupt Request (FIRQ) Stacks Only Program Counter and Condition Code Register • Interrupt Acknowledge Output Allows Vectoring by Device • Sync Acknowledge Output Allows for Synchronization to External Event • 16-Blt Arithmetic (ADD, SUBTRACT, COMPARE, LOAD, STORE) • 8 x 8 Unsigned Multiply • Transfer/Exchange all Registers • Push/Pull all Registers • Ten Addressing Modes • Expanded Indexed AddreSSing, Accumulator or up to 16-Blt Offset, Auto-Increment/Decrement by One or Two • True Indirect Addressing • Load-Effective Address 5-81 F6809 Block Diagram ...--vee +-Vss DMAIBREQ RIW HALt BA BS XTAL EXTAL MRDY E L-_ _. . Q 5·82 F681 O/F68A1O/F68B1 0 128 x 8-Bit Static Random Access Memory Microprocessor Product Description Logic Symbol The F6810 128 x 8-bit static RAM is a byte-organized 10 11 12 13 14 15 16 memory designed for use in bus-organized systems. Fabricated with n-channel, silicon-gate technology, the device is available in three frequency ranges: 1.0 MHz (F6810), 1.5 MHz (F68A10), 2.0 MHz (F68B10). The device, 23 Ao which operates from a single power supply, is A, 22 compatible with TTL and DTl; it needs no clocks or 21 A, refreshing because of its static operation. 20 Ao F6810 The memory is compatible with the F6800 microcomputer 19 A4 family, providing random storage in byte increments. 18 As Memory expansion is provided through multiple chip select inputs. 17 A, • Organized as 128 Bytes of 8 Bits • Static Operation • Bidirectional 3-State Data Input/Output 2 3 4 6 7 8 9 • Six Chip Select Inputs (Four Active LOW, Two Active HIGH) Vee = Pin 24 • Single + 5 V Power Supply Vss = Pin 1 • TTL-Compatible • Maximum Access Time: 450 ns for F6810 Connection Diagram 360 ns for F68A10 24-Pin DIP 250 ns for F68B10 Vss Vee Pin Names Do Ao Do-D7 Bidirectional Data Bus D, A, Ao-A6 Address Inputs CSO-CS5 Chip Select Inputs D, A, R/W Read/Write Input Do Ao D. A4 Ds As D, A, . D7 R/Vi eso Clis CS:1 CS4 es, (Top View) 5-83 F681 O/F68A1O/F688 10 Block Diagram Do As .. .. .. • .. 0, . MEMORY MATRIX 3-STATE BUFFER • .. 03 A, .. ADDRESS DECODE (121 x I) o. A.o 05 As 0, A.o .. 07 ~ ......... MEMORY U- CONTROL I h. t RIW CSo ..... Signal Function Descriptions Absolute Maximum Ratings Pin Supply Voltage -0.3 V, +7.0V Mnemonic Name Description Input Voltage -0.3 V, + 7.0 V No. Operating Temperature - TL, TH Bus Handshake F6810, F68A10, F68B10 O·C, + 70·C Ao-As 17-23 Address Input signal lines con· F6810C, F68A10C - 40·C, + 85·C Bus taining address to F6810DM -55·C, +125·C which data is to be Storage Temperature Range -65·C, + 150·C written or from which Thermal Resistance - OJA 82.5·CiW data is to be read 00-07 2-9 Data Bidirectional inputl This device contains circuitry to protect the inputs against damage due to high static voltages or electric fields; however, it is advised that Bus output signal lines over normal precautions be taken to avoid application of any voltage higher which data is read from than maximum rated voltages. or written to the device These are stress ratings only, and functional operation at these ratings, or Chip Control under any conditions above those indicated in this data sheet, is not CSO-CS5 10-15 Chip Input signal lines that implied. Exposure to the absolute maximum rating conditions for extendec Select prepare the device for a periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. read or write operation R/W 16 Readl Input signal lines that Write selects a chip read or Recommended Operating Conditions write operation; a HIGH Symbol Characteristic Min Typ Max Unit selects memory read. and a LOW selects Vee Supply Voltage 4.75 5.0 5.25 V memory write VIH Input HIGH Voltage 2.0 5.25 V Supply VIL Input LOW Voltage -0.3 0.8 V Vss Ground Ground for supply and signals Vee 24 Supply + 5 V supply voltage 5-84 F6810/F68A10/F68B10 DC Characteristics Vee = 5.0 V ±5%, Vss = 0, TA = TL to TH, unless otherwise noted. Symbol Characteristic Min Typ Max Unit Conditions liN Input Current (An, RIW, CSn, CSn) 2.5 p.A VIN = 0 to 5.25 V VOH Output HIGH Voltage 2.4 V IOH = -205 p.A VOL Output LOW Voltage 0.4 V IOL = 1.6 mA ILO Output Leakage Current, 3-State 10 p.A CS = 0.8 V or CS = 2.0 V, Vo = 0.4 V to 2.4 V lee Supply Current F6810 80 mA Vee = 5.25 V, all other pins F68A10, F68B10 100 grounded, TA =O°C CIN Input Capacitance 7.5 pF f = 1.0 MHz, COUT Output Capacitance 12.5 pF TA = 25°C Bus Timing Characteristics Vee = 5.0 V ±50f0, Vss = 0, TA = TL to TH, unless otherwise noted. • -------,------------------------,-----------,------------,-----------,------ Symbol Characteristic Unit Read (Figure 1) tcyc(R) Read Cycle Time 450 360 250 ns tacc Access Time 450 360 250 ns tAS Address Set-up Time 20 20 20 ns tAH Address Hold Time 0 0 0 ns tOOR Data Delay Time (Read) 230 220 180 ns tRes Read-to-Select Delay Time 0 0 0 ns tOHA Data Hold from Address 10 10 10 ns tH Output Hold Time 10 10 10 ns tOHR Data Hold from Read 10 80 10 60 10 50 ns tRH Read Hold from Chip Select 0 0 0 ns Write (Figure 2) tcyC(W) Write Cycle Time 450 360 250 ns tAS Address Set-up Time 20 20 20 ns tAH Address Hold Time 0 0 0 ns tes Chip Select Pulse Width 300 250 210 ns twes Write-to-Chip Select Delay Time 0 0 0 ns tosw Data Set-up Time (Write) 190 80 60 ns tH Input Hold Time 10 10 10 ns tWH Write Hold from Chip Select 0 0 0 ns 5-85 F681 O/F68A 1O/F68B 10 Fig. 1 Read Cycle Timing I~_ _ - - - - - t a c c tcyc{R) . 2.0V ADDRESS 0.8 V \_-IAH_ 2.0 V CS cs 0.8 V 2.0 V .. 2.0V 0.8 V - IAH I_ R/W 2.4 V DATAOUT-------------------------( 0.4 V Don't Care Note CS and Cs can be enabled for consecutive read cycles, provided ANV' remains at VIH. 5·86 F681 O/F68Al O/F68Bl 0 Fig. 2 Write Cycle Timing I - - - - - - - - - - - - - I , y , CW) 11 . . . ~ I ADDRE~-:-:-:------------------------------------------------,~~------------ 1_ lAS -I I.. les -1- -I IAH 0.av~20V CS _ _ _ _ _:::::.;:.;_;t;;I.J.'.J..I.."'"'""'"'"1J \] ~'--_ _ _ _ _ _ _ __ ~--------~~~~~~~ _ -_[twes - - ~81",",,"---o.av 2.ov1I1 _-..J!Il IWH I r~,..,..,..,..,..,..,..,..,..,..,..,..,.. R/W BL.av I. . . f----- losw 1 .. !IIIIII/A I tH [.- DATAtN~:·.:: DATAtNSTABLE "'"'1"1">"'1"1""""""""""'"' ' '" W_= Don't Care Nole es and CS can be enabled for consecutive write cycles, provided ANi is strobed to VIH before or coincident with the address change, and remains HIGH for time tAS. Fig. 3 Output Load Timing Conditions The conditions under which the timing characteristics --<.-..--1< If-CB'j CB, B CONTROLS Functional Description PIA ReadlWrite (RNi), Pin 21 - T.his signal is generated by the MPU to control the direction of data transfers on PIA Interface Signals for MPU the data bus. A LOW on the PIA read/write line enables The PIA interfaces to the F6800 MPU with an 8·bit the input buffers, and data is transferred from the MPU bidirectional data bus, three chip select lines, two to the PIA on the E signal if the device has been register select lines, two interrupt request lines, a selected. A HIGH on the read/write line sets up the PIA read/write line, an enable line, and a reset line. These for a transfer of data to the bus. The PIA output buffers signals, in conjunction with the F6800 VMA output, are enabled when the proper address and the E pulse permit the MPU to have complete control over the PIA. are present. The VMA signal should be utilized in conjunction with an MPU address line into a chip select of the PIA. RESET, Pin 34 - The active·LOW RESET line is used to reset all register bits in the PIA to a logic 0 (LOW). This PIA Bidirectional Data (00.07), Pins 26·33 - The line can be used as a power·on reset and as a master bidirectional data lines (00.07) allow the transfer of data reset during system operation. between the MPU and the PIA. The data bus output drivers are 3·state devices that remain in the high· PIA Chip Select (CSo, CSl, and CS2), Pins 22·24 - These impedance (OFF) state except when the MPU performs a three input signals are used to select the PIA. eso and PIA read operation. The read/write line is in the read eS1 must be HIGH and eS2 must be LOW for selection (HIGH) state when the PIA is selected for a of the device. Data transfers are then performed under read operation. the control of the enable and read/write signals. The chip select lines must be stable for the duration of the E PIA Enable (E), Pin 25 - The enable (E) pulse is the only pulse. The device is "deselected" when any of the chip timing signal that is supplied to the PIA. Timing of all selects are in the inactive state. other signals is referenced to the leading and trailing edges of the E pulse. This signal is normally a derivative PIA Register Select (RSo and RS1), Pins 35, 36 - The two of the F6800 and R/W Valid to Enable Positive Transition 160 ns tOOR Data Delay Time 320 ns tH Data Hold Time 10 ns tAH Address Hold Time 10 ns tEr, tEl Rise and Fall Time for Enable Input 25 ns Write Figures 11 and 12 tcycE Enable Cycle Time 1.0 ILS PWEH Enable Pulse Width, HIGH 0.45 25 ILS PWEL Enable Pulse Width, LOW 0.43 ILs tAS Set-up Time, Address and R/W Valid to Enable Positive Transition 160 ns tosw Data Set-up Time 195 ns tH Data Hold Time 10 ns tAH Address Hold Time 10 ns tEr, tEl Rise and Fall Time for Enable Input 25 ns Fig. 1 Peripheral Data Set·up Time Fig. 2 CA2 Delay Time (Read Mode) (Read Mode; CRA·S = CRA·3 = 1, CRA·4 = 0) pAo·PAl P~~.~PB~l ______J. X .• 2.0V ~~O.8~V~ __ ~ ___________________ E~O.4V / \ 1- -I ,. ."j \ 1- -'L IPDSU J'+--m-4Vp _-IRS" E_---J/~2.4V ~~.o~A~V______________-J;f • Assumes part was deselected during any previous E pulse. 5-98 F6820 Fig. 3 CA2 Delay Time (Read Mode; CRA·5 1, CRA·3 CRA·4 0) 0.4 V --' ... 1-------- --'-1 I~ tr, tl C_A_'- - - 1 - - - - - - - ( t-: -----,Xc..:::.::...::~__ ~-~'\I ~ 0.4~ CA, --~--------------. Fig. 4 Peripheral CMOS Data Delay Times (Write Mode; CRA·5 = CRA·3 = 1, CRA·4 0) Fig.5 Peripheral Data.and CB2 Delay Times (Write Mode; CRB·5 = CRB·3 = 1, CRB·4 0) \ O.4V / -------------~ 1- Ipow ~2~.47.V~-------------- PAO·PAl PBo·PB7 0.4 V H'~ 2.4 V 0.4 V Fig. 6 CB2 Delay Time (Write Mode; CRB·5 CRB·3 = 1, CRB·4 0) Note CB2 goes LOW as a result of the positive transition of the E pulse. ;12.4 V \ ;1 C~B=,= = = =_I- - ~I'I-~';';'4.;. v.;. le_. ~~~~~~~~_~_- Fig. 7 CB2 Delay Time (Write Mode; CRB·5 1, CRB·3 CRB·4 0) ,____ __I--,r" -11- 1,,11 CB-,---+-----~i:-~:~:V~VX~----- ,. Assumes part was deselected during the previous E pulse. __ le·'\1 IRs,._1 2.4~ ~~ • Assumes part was deselected during the previous E pulse. 5-99 F6820 Fig. 8 Interrupt Release Time Fig. 9 RESET LOW Time I _ - - - - - . R l - - - - -__ I _~2'4V _ ____1__ IROA (lROB) 1-.~~~_"R~~~~~.~.2'4~V-- / ' ·The RESET line must be at VIH for a minimum of 1.0 .s before addressing the PIA. Fig. 11 Bus Write Timing Characteristics (Write Information into PIA) Fig. 10 Bus Read Timing Characteristics (Read Information from PIA) 1 _ - - - - - t c y c E - - - - - - - <...1 "'--PWEH~ 1_--,------tcycE-----__ 1 E ~ tEr ....- -----.. .....- tEl l...-tAS----' tDSW ~ -.- 2.0 V RS, CS, RIW RS. CS, RIW 0.8 V - I-'AH I-'H X X 2.0 V DATA BUS 0.8 V DATA BUS Fig. 12 Bus Timing Test Loads LOAD A LOAD B LOAD C 00·07, PAo·PA7, PBo·PB7, CA2, CB2) (iRO ONLY) (CMOS LOAD) 3k TEST POINT -<..-..--K H"-JV\('v-- 5.0 V TEST POINT ~ 5.0 V TESTPOINT~ C IN914 OR EOUIV. 1100 pF I 30PF C 130 pF for 00·07 30 pF for PAo·PA7. PBo·PB7, CA2, and CB2 R 11,7 kO for 00·07 24 kO for PAo·PA7, PBo-PB7, CA2 and CB2 5·100 F6820 Ordering Information Speed Order Code Temperature Range 1.0 MHz F6820P,S ooe to + 70 e 0 P = Plastic DIP S = Ceramic DIP • 5·101 5·102 F6821/F68A21/F68821 Peripheral Interface Adapter (PIA) Microprocessor Product Description Logic Symbol The F6821 Peripheral Interface Adapter (PIA) provides a 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 universal means of interfacing peripheral equipment to the F6800 microprocessing unit (MPU). This device is capable -~-----~~~-----~ of interfacing the MPU to peripherals through two 8-bit 36 RSo bidirectional data buses and four control lines, in three 35 RS, speed ranges: 1.0 MHz (F6821), 1.5 MHz (F68A21), and 2.0 22 CSo MHz (F68B21). No external logic is required for interfacing 24 (VMA)CS, to most peripheral devices. 23 CS, The functional configuration of the PIA is programmed by 25 E IROA 38 F6821 the MPU during system initialization. Each of the peripheral 21 RNi IROB 37 data lines can be programmed to act as an input or output, 40 CA, and each of the four control/interrupt lines may be 39 CA, programmed for one of several control modes. This allows 18 CB, • a high degree of flexibility in the overall operation of 19 the interface. 34 • 8-Bit Bidirectional Data Bus for Communication with the MPU 33 32 31 30 29 28 27 26 • Two Bidirectional 8-Bit Buses for Interface to Peripherals Vee = Pin 20 • Two Programmable Control Registers Vss = Pin 1 • Two Programmable Data Direction Registers • Four Individually Controlled Interrupt Input Lines, Two Usable as Peripheral Control Outputs Connection Diagram • Handshake Control Logic for Input and Output Peripheral 40-Pin DIP Operation • High-Impedance 3-State and Direct Transistor Drive Vss Peripheral Lines PA. • Program-ContrOlled Interrupt and Interrupt Disable Capability PA, • CMOS Drive Capability on Section A Peripheral Lines PA, • Two-TTL Drive Capability on All A- and B-Section Buffers PA, • TTL-Compatible PA, • Static Operation PAs PAs PA, PB. PB, PB, PB, PB, PBs PBs PB, 17 CB, 18 CB, 19 Vee (Top-View) 5-103 F6821 IF68A21 IF68B21 Block Diagram IROA -.I---------------;::::=====~i~IN~T~E~R~R~Uf'PT;-·.-,ll-.cA, .... STATUS CONTROL A . . - - . CA 2 L..-_ _ _.,.J DO_ 01~ OAT A DIRECTION (DORA) REGISTER A D._ 02_ 0,- DATA BUS BUFFERS (DBB) 0._ 0,_ 0,_ .......-. PAO ......... PAl ~PA2 PERIPHERAL ........ PA 3 INTERFACE BUS INPUT A ........ PA 4 REGistER ~PA5 (BIR) ......... PA6 ~PA7 ........... PS o .......... PB l .......... PB 2 PERIPHERAL INTERFACE ......... PB 3 CSo---' B .......... PB 4 CS 1 - - - - - . CHIP ......... PBs CS 2 - - - . RSO- - - ' AND SELECT RiW' . . - . PB 6 ~PB7 RS1----" CONTROL Riw~ ENABLE ------. RESET----' DATA DIRECTION REGISTER B (DORB) ,ROB ... I---------------------·-LI__:_J_!_~~_~_~_:_~I::::::: PIA/MPU Interface Signals Data Bus (Do - 0 7), Pins 26-33 The bidirectional data lines allow the transfer of data The PIA interfaces to the F6800 MPU with an 8-bit between the MPU and the PIA. The data bus output drivers bidirectional data bus, three chip select lines, two register are 3-state devices that remain in the high-impedance select lines, two interrupt request lines, a read/write line, (OFF) state, except when the MPU performs a PIA read an enable line, and a reset line (see Figure 1). These operation. The read/write (R/W) line is in the read (HIGH) signals, in conjunction with the F6800 VMA output, permit state when the PIA is selected for a read operation. the MPU to have complete control over the PIA. The VMA output should be utilized in conjunction with an MPU address line into a chip select of the PIA. 5-104 F6821/F68A21/F68B21 Fig. 1 PIA Bus Interface ~ CA:2 CA, I SECTION A CONTROLS r------. . . . . .., ADATA SECTIONA ~ DATA DATA DIRECTION REG A INTERFACE CONTROL REG A BDATA W • OATA DIRECTION REG B ECTIONB DATA INTERFACE CONTROL REG B DATA ADDRESS BUS ~ CB'I ~ • SECTION B CB, CONTROLS BUS BUS CONTROL Enable (E), Pin 25 Register Select (RS o, RS 1), Pins 35, 36 The enable input pulse is the only timing signal that is The two register select inputs are used to select the various supplied to the PIA. Timing of all other signals is registers within the PIA. These two lines are used in referenced to the leading and trailing edges of the E pulse. conjunction with internal control registers to select a This signal is normally a derivative of the <1>2 F6800 clock. particular register that is to be written to or read from. The register select lines should be stable for the duration of Read/Write (R/W), Pin 21 the E pulse while in the read or write cycle. This input signal is generated by the MPU to control the direction of data transfer on the data bus. A LOW on the Interrupt Request (IROA, IROB), Pins 37, 38 R/IN line enables the input buffers and allows data transfer The active-LOW interrupt request inputs act to interrupt the from the MPU to the PIA on the E signal if the device has MPU either directly or through interrupt priority circuitry. been selected. A HIGH on the R/IN line sets up the PIA for These lines are open drain (no load device on the chip). a transfer of data to the bus; the PIA output buffers are This permits all interrupt request lines to be tied together enabled when the proper address and the E pulse in a wired-OR configuration. are present. Each interrupt request line has two internal interrupt flag bits that can cause either line to go LOW. Each flag bit is Reset (RESET), Pin 34 associated with a particular peripheral interrupt line. Four The active -LOW RESET input is used to reset all register bits interrupt enable bits are also provided in the PIA; these may in the PIA to a logic 0 I LOW) state. This line can be used be used to inhibit a particular interrupt from a as a power-on reset and as a master reset during peripheral device. system operation. Servicing an interrupt by the MPU is accomplished by Chip Select (CSo - CS2), Pins 22-24 a software routine that. on a priority basis. sequentially These three input signals are used to select the PIA. The reads and tests the two control registers in each PIA for CSc and CS1 lines must be HIGH and CS2 must be interrupt flag bits that are set. LOW for selection of the device. Data transfers are The interrupt flags are cleared Iset to 0) as a result of an then performed under control of the enable and read/write MPU read peripheral data operation of the corresponding signals. The device is "deselected" when any of the chip data register. After being cleared. the interrupt flag bit select lines is in the inactive state. cannot be enabled until the PIA is "deselected" during The chip select lines should be stable for the duration of an E pulse. The E pulse is used to condition the the E pulse. interrupt control lines ICA 1• CA 2• CB 1. CB 2 ). When these 5·105 F6821 IF68A21 IF68B21 lines are used as interrupt inputs, at least one E pulse must transition for these signals is also programmed by the two occur from the inactive edge to the active edge of the control registers. interrupt input signal to condition the edge sense network. If the interrupt flag has been enabled and the edge sense Peripheral Control (CA 2, CB 2), Pins.39, 19 circuit has been conditioned properly, the interrupt flag is Peripheral control line CA2 can be programmed to act as an set on the next active transition of the interrupt input pin. interrupt input or as a peripheral control output. As an output, this line is compatible with standard TTL; as an PIA/Peripheral Interface Signals input, the internal pull-up resistor on this line represents one standard TTL load. The function of this signal line is The PIA provides two 8-bit bidirectional data buses and four programmed by control register A (CRA). interrupt/control lines for interfacing to peripheral devices. Peripheral control line CB2 may also be programmed to act as in interrupt input or peripheral control output. As an Section A Peripheral Data (PA o - PA 7 ), Pins 2-9 input, this line has high input impedance and is compatible Each of the peripheral data lines is programmed to act with .standard TTL. As an output, it is compatible with as an input or output. This is accomplished by setting a 1 standard TTL and may also be used as a source of up to in the corresponding data direction register (DDR) bit for 1 .mA at 1.5 V to drive the base of a transistor switch directly. those lines that are to be outputs. A 0 in a bit of the DDR This line is programmed by control register B (CRB). causes the corresponding peripheral data line to act as an It is recommended that the control lines (CAt, CBt, CA2, input. During an MPU read peripheral data operation, the CB2) be held in a logic 1 state when the RESET line is data on peripheral lines programmed to act as inputs active to prevent setting of corresponding interrupt flags in appears directly on the corresponding MPU data bus lines. the control register when RESET goes to an inactive state. In the input mode, the internal pull-up resistor on these Subsequent to RESET going inactive, a read of the data lines represents a maximum of one standard TTL load. registers may be used to clear any undesired The data in output register A (ORA) appears on the data lines interrupt flags. that are programmed to be outputs. A logic 1 written into the register causes a HIGH on the corresponding data line, while Internal Controls a 0 results in a LOW. Data in ORA may be read by an MPU read peripheral data A operation when the corresponding There are six locations within the PIA that are accessible to lines are programmed as outputs. This data is read properly if the MPU data bus: two peripheral registers, two data the voltage on the peripheral data lines is greater than 2.0 V direction registers, and two control registers. Selection of for a logic 1 output and less than 0.8 V for a logic 0 output. these locations is controlled by the register select inputs, Loading the output lines in such a way that the voltage on together with bit 2 in the control register, as shown in Table 1. these lines does not reach full voltage causes the data transferred into the MPU during a read operation to differ Table 1 Internal Addressing from that contained in the respective bit of output register A. Control Section B Peripheral Data (pB, - PB 7), Pins 10-17 Register Bit The peripheral data lines in the B section of the PIA can RS, RSo CRA-2 CRB-2 Location Selected be programmed to act as either inputs or outputs in a 0 0 1 X Peripheral Register A manner similar to the A section lines. However, the output buffers driving these lines differ from those driving. the A 0 0 0 X Data DirectIOn Register A section lines, having a 3-state capability that allows them to 0 t X X Control Register A enter a high-impedance state when the peripheral data line is used as an input. In addition, data on peripheral data lines 1 0 X 1 Peripheral Register B PB o through PB T is read properly from those lines 1 0 X 0 Data Direction Register B programmed as outputs even if the voltages are below 2.0 V t 1 X X Control Register B for a HIGH. As outputs, these lines are compatible with standard TTL and may also be used as a source of up to x = Don't Care 1 mA at 1.5 V to drive the base of a transistor switch directly. Interrupt Input (CA" CB,), Pins 18 and 40 Initialization The interrupt input lines are input-only lines that set the A LOW on the RESET line has the effect of zeroing all PIA interrupt flags of the control registers. The active registers. This sets PAo - PA 7, PB o - PB 7 , CA 2, and CB 2 5·106 F6821/F68A21/F68B21 as inputs and disables all interrupts. The PIA must be CA2. and CB2i. In addition. they allow the MPU to enable configured during the restart program that follows the reset. the interrupt lines and monitor the status of the interrupt flags. Bits 0 through 5 of the two registers may be written to Register Operation or read from by the MPU when the proper chip select and register select signals are applied. Bits 6 and? of the Possible configurations of the data direction and control two registers are read-only and are modified by external registers are as follows: interrupts occurring on the peripheral control lines. The format of the control words is shown in Table 2. Data Direction Registers (DORA, DDRB) The two data direction registers allow the MPU to control Table 2 Control Word Format the direction of data through each corresponding peripheral data line. A DDR bit set to 0 configures the corresponding 7 6 5 I 4 I 3 2 1 ~ 0 peripheral data line as an input; a 1 results in an output. CRA IROA, IROA2 CA2 Control DDRA CA, Control Access • Control Registers (CRA, CRB) The two control registers allow the MPU to control the 7 6 5 4 3 2 1 0 operation of the four peripheral control lines (CA,. CB1. CRB IROB, IROB2 CB2 Control DDRB CB, Control Access Table 3 Interrupt Input Line Control Bits MPU Interrupt CRA-1 CRA-O Interrupt Input Interrupt Flag Request (CRB-1) (CRB-O) CAl (CB,) CRA-7 (CRB-7) IRQA (IRQB) 0 0 I Active Set HIGH on I of CAl I CB,i. Disabled; IRQ remains HIGH. 0 1 I Active Set HIGH on I of CAl ICB,I. Goes LOW when interrupt flag bit CRA-? ICRB-?) goes HIGH. 1 0 t Active Set HIGH on t of CAl ICB,I. Disabled; IRQ remains HIGH. 1 1 t Active Set HIGH on t of CAl ICB,). Goes LOW when interrupt flag bit CRA-? ICRB-?) goes HIGH. Table 4 Peripheral Control Line Control Bits (CRA-5/CRB-5 LOW) MPU Interrupt CRA-5 CRA-4 CRA-3 Interrupt Input Interrupt Flag Request (CRB-5) (CRB-4) (CRB-3) CA 2 (CB 2) CRA-6 (CRB-6) IRQA (lRQB) 0 0 0 I Active Set HIGH on I CA2 Disabled; IRQ remains ICB21. HIGH. 0 0 1 I Active Set HIGH on I of CA2 Goes LOW when inteJrupt (CB2i. flag bit CRA-6 (CRB-61 goes HIGH. 0 1 0 t Active Set HIGH on t of CA2 Disabled; IRQ remains (CB21. HIGH. 0 1 1 t Active Set HIGH on t CA2 Goes LOW when interrupt (CB2i. flag bit CRA-6 (CRB-61 goes HIGH. Notes 1. I indicates negative transition I HIGH-ta-LOWI. 2. 1 indicates positive transition I LOW-ta-HIGHI. 3. The interrupt flag bit.CRA-7. is cleared by an MPU read of the A data register. and CRB-7 is cleared by an MPU read of the B data register. 4. If CRA-O ,CRB-O' is LOW when an interrupt occurs linterrupt disabled' and is later brought HIGH. 1RQil. ,TFiQli,occurs after CRA-O ,CRB-ol is written to a ,. 5-107 F6821/F68A21/F68B21 Data Direction Access Control Bit (CRA-2, CRB"2) and CRB-O are used to enable MPU interrupt signals IROA Bit 2 in each control register allows selection of either a and IROB, respectively. Bits CRA-1 and CRB-1 determine peripheral interface register (PIR) or the DDR when the active transition of the interrupt input signals the proper register select signals are applied to RSo (see Table 31. and RS1. Peripheral control Line Control Bits Interrupt Flag Control Bits (CRA-6, CRA-7, CRB-6, CRB-7) (CRA-3, CRA-4, CRA-5, CRB-3, CRB-4, CRB-5) The four interrupt flag bits are set by active transitions of Bits 3, 4, and 5 of the two control registers are used to control signals on the four interrupt and peripheral control lines the CA 2 and CB 2 peripheral contro'l lines. These bits when those lines are programmed to be input lines. These determine if the control lines act as interrupt inputs or as bits cannot be set directly from the MPU data bus and are control outputs. If bit CRA-5 (CRB-51 is LOW, CA 2 (CB 21is reset indirectly by a read peripheral data operation on the an interrupt input line similar to CA 1 (CB 11 (see Table 41. appropriate section. When CRA-5 (CRB-51 is HIGH, CA 2 (CB21 becomes an output that may be used to control peripheral data transfers. Interrupnnput Line Control Bits (CRA-O, CRA-1, CRB-O, When in the output mode, CA 2 and CB 2 have slightly CRB-1) different characteristics (see Table 5 and Table 6). The two lowest-order bits of the control registers are used to control interrupt input lines CA1 and CB1. Bits CRA-O Table 5 Control of CA 2 as an Output CA2 CRA-5 CRA-4 CRA-3 Cleared Set 1 0 0 LOW on the negative transition of E after an HIGH when interrupt flag bit CRA-? is set by an MPU read data register A operation. active transition of the CA1 signal. 1 0 1 LOW on the negative transition of E after an HIGH on the negative edge of the first E pulse that MPU read data register A operation. occurs while the device is deselected. 1 1 0 LOW when CRA"3 goes LOW a~ a result of Always LOW as long as CRA-3 is LOW. Goes an MPU write control register A operation. HIGH on an MPU write control register A operation that changes CRA-3 to 1. 1 1 1 Always HIGH as long as CRA-3 is HIGH. HIGH when CRA-3 goes HIGH as a result of an Cleared on an MPU write control register A MPU write control register Aoperation. operation that clears CRA-3 to O. Table 6 Control of CB 2 as an Output CB 2 CRB-5 CflB-4 CRB~ Cleared Set 1 0 0 LOW on the positive transition of the first E HIGH when interrupt flag bit CRB-7 is set by an pulse following an MPU wri.te data register active transition of the CB1 signal. B operation. '. 1 0 1 LOW on the positive transition of the first E HIGH on the positive edge of the first E pulse pulse after an MPU write data register B following an E pulse that occurred while the operation. device was deselected. 1 1 0 LOW when CRB-3 goes LOW as a result of an Always LOW as long as CRB-3 is LOW. Goes . ~PU write control registerS operation. HIGH on an MPU write control register B operation that changes CR B-3 to 1. 1 1 1 Always HIGH as long as CRB-3 is HIGH. HIGH when CRB-3 goes HIGH as a result of an Cleared when an MPU write control reg- MPU write control register B operation. ister B operation results in clearing CRB-3 to O. '. 5-108 F6821/F68A21/F68B21 Absolute Maximum Ratings These are stress ratings only, and functional operation at these ratings, or under any conditions above those indicated in this data sheet, is not implied. Supply Voltage -0.3 V. +7.0 V Exposure to the absolute maximum rating conditions for extended periods of Input Voltage -0.3 V. +7.0 V time may affect device reliability, and exposure to stresses greater than those Operating Temperature - TL to TH listed may cause permanent damage to the device. F6821. F68A21. F68B21 O°C. +70°C F6821 C. F68A21 C -40° C. +85° C F6821OM -55°C. +125°C Storage Temperature Range -55°C. +150°C Thermal Resistance 82.5°C/W DC Characteristics Vee = 5.0 V ±5%. Vss = O. TA = TL to TH. unless otherwise noted. Symbol I Characteristic Min I Typ Max Unit Condition . Bus Control Inputs (R/W. RESET. RSo RS1. CSo. CS 1 • ~2) • VIH Input HIGH Voltage Vss + 2.0 Vee V VIL Input LOW Voltage Vss - 0.3 Vss + 0.8 V liN Input Leakage Current 1.0 2.5 p.A VIN = 0 to 5.25 V CIN Capacitance 7.5 pF VIN = O. TA = 25° C. f = 1.0 MHz Interrupt Outputs (IROA. IROB) VOL Output LOW Voltage Vss + 0.4 V ILoad = 3.2 mA ILOH Output Leakage Current I o FF-State I 1.0 10 p.A VOH = 2.4 V COUT Capacitance 5.0 pF VIN = 0, T A = 25° C, f = 1.0 MHz Data Bus (00-07) VIH Input HIGH Voltage Vss + 2.0 Vee V VIL Input LOW Voltage Vss - 0.3 Vss + 0.8 V ITSI 3-State (OFF-State) Input Current 2.0 10 p.A VIN = 0.4 to 2.4 V VOH Output HIGH Voltage Vss + 2.4 V ILOAD = -205 p.A VOL Output LOW Voltage Vss + 0.4 V ILOAD = 1.6 mA CIN Capacitance 12.5 pF VIN = O. TA = 25°C. f = 1.0 MHz Peripheral Bus (PAo-PA7. PB o-PB7. CAl. CA2. CB 1• CB 2) liN Input Leakage Current CA1, CB1 1.0 2.5 p.A VIN = 0 to 5.25 V ITSI 3-State (OFF-State) Input Current 2.0 10 p.A VIN = 0.4 to 2.4 V PBo-PB7, CB2 IIH Input HIGH Current PAo-PA7. CA2 -200 -400 p.A VIH = 2.4 V IOH Darlington Dr. Curro PBo-PB7. CB2 -1.0 -10 mA Vo = 1.5 V IlL Input LOW Current PAo-PA7, CA2 -1.3 -2.4 mA VIL = 0.4 V VOH Output HIGH Voltage V PAo-PA7, PBo-PB7, CA2, CB2 Vss +2.4 ILoad = -200 p.A PAo-PAl, CA2 Vee-1.0 ILoad = -10 p.A VOL Output LOW Voltage Vss + 0.4 V ILoad = 3.2 mA CIN Capacitance 10 pF VIN = 0, TA = 25°C, f = 1.0 MHz Power ReqUirements PD Power Dissipation 550 mW 5·109 F6821/F68A21/F68B21 Enable Signal Timing Characteristics Vee = 5.0 V ±5%, Vss = 0, TA = TL to TH, unless otherwise noted. F6821 F68A21 F68B21 Symbol Characteristic Min Max 'Min Max Min Max Unit Figure teyeE Enable Cycle Time 1000 666 500 ns 2 PWEH Enable Pulse Width, HIGH 450 280 220 ns 2 PWEL Enable Pulse Width, LOW 430 280 210 ns 2 tEr, tEt Enable Pulse Rise and Fall Times 25 25 25 ns 2 Fig. 2 Enable Signal Timing Characteristics 'E, 0.8 V Bus Timing Characteristics Vee = 5.0 V ±5%, Vss = 0, TA = TL to TH, unless otherwise noted. F6821 F68A21 F68B21 Symbol Characteristic Min Max Min Max Min Max Unit Figures Set-Up Time. Address and R/W tAS 160 140 70 ns 3, 4 Valid to Enable Positive Transition tAH Address Hold Time 10 10 10 ns 3, 4 tOOR Data Delay Time, Read 320 220 180 ns 3, 5 tOHR Data Hold Time, Read 10 10 10 ns 3, 5 tosw Data Set-Up Time, Write 19q 80 60 ns 4, 5 tOHW Data Hold Time, Write 10 10 10 ns 4, 5 Fig. 3 Bus Timing Characteristics (Read from PIA) Fig. 4 Bus Timing Characteristics (Write to PIA) II 2.0V A.2'0.V _ _ _ _--J fO:8V 0.8 V •• s~ DATA BUS 2.0 V 0.8 V DATA BUS 2.4 V 0.4 V 5·110 F6821/F68A21/F68B21 Peripheral Timing Characteristics Vcc = 5.0 V ±5%, Vss = 0, TA = TL to TH, unless otherwise noted. F6821 F68A21 F68821 Symbol Characteristic Min Max Min Max Min Max Unit Figures tpDSU Peripheral Data Set, Up Time 200 135 100 ns 9 tPDH Peripheral Data Hold Time 0 0 0 ns 9 tCA2 Delay Time, Enable Negative Tran- 1.0 0.670 0.500 !,s 6,10,11 sition to CA2 Negative Transition tRS, Delay Time, Enable Negative Tran- 1.0 0.670 0.500 !,s 6, 10 sition to CA2 Positive Transition tr, tf Rise and Fall for CAl and CA2 1.0 1.0 1.0 !,s 6,11 Input Signals tRS2 tPDW Delay Time from CAl Active Tran- sition to CA2 Positive Transition Delay Time, Enable Negative Tran- 2.0 1.0 1.35 0.670 1.0 0.5 !,s !,s 6,11 6,12,13 &I sition to Peripheral Data Valid tCMOS Delay Time, Enable Negative Tran- sition to Peripheral CMOS Data 2.0 1.35 1.0 !,s 7, 12 Valid PAo-PAl, CA2 tCB2 Delay Time, Enable Positive Tran- 1.0 0.670 0.5 !,s 6, 14, 15 sition to CB2 Negative Transition tDC Delay Time, Peripheral Data Valid 20 20 20 ns 6, 13 to CB2 Negative Transition tRS, Delay Time, Enable Positive Tran- 1.0 0.670 0.5 !,s 6,14 sition to CB2 Positive Transition PWCT Peripheral Control Output Pulse 550 550 550 ns 6, 10, 14 Width, CA2/CB2 tr, tf Rise and Fall Time for CB, and 1.0 1.0 1.0 !,s 15 CB2 Input Signals tRS2 Delay Time, CB, Active Transition 2.0 1.35 1.0 !,s 6,15 to CB2 Positive Transition tlR Interrupt Release Time, 1.60 1.10 0.85 !,s 8,17 IROA and IROB tRS3 Interrupt Response Time 1.0 1.0 1.0 !,s 8, 16 PW, Interrupt Input Pulse Width 500 500 500 ns 16 tRL Reset LOW Time' 1.0 0.66 0.5 !,s 18 ~The RESET line must be HIGH a minimum of 1.0 J.1.$ before addressing the PIA. 5·111 F6821/F68A21/F68B21 Fig. 5 Bus Timing Test Load Fig. 9 Peripheral Data Set-Up and Hold Times (Read (00-07) Mode) 5.0 V 2.0 V 0.8 V TEST POINT - .....-~-KII-.. 1-.• 31:' j IpDSU IpDH C i:-- 12 V - - 130 pF IN914 _ _ _ _ _ _ _ _ _-J. 0.8V OR EQUIVALENT Fig. 10 CA 2 Delay Time (Read Mode; CRA-5 = CRA-3 = 1; CRA-4.= 0) ~CA' '~""~-.,/ ~~IR'" Fig. 6 TTL Equivalent Test Load Vcc ...,..-"..,.,._--P-W-C-T----,_:",' : 2.' V TEST POINT -..---.~(}-...... 0.4 V C . Assumes Rart was deselected dunng the prevIous E pulse. IN91. OR EQUIVALENT Fig. 11 CA 2 Delay Time (Read Mode; CRA-5 = 1; CRA-3 = CRA-4 = 0) c ~ 40 pF. R~ 12 k Adjust RL so that I, ~ 3.2 mA wilh V, ~ 0,4 V and Vee ~ 5.25 V -1 [_1"1, ----f-----~ ~:-----:lix~:"'-·.:-:-_- Fig. 7 CMOS Equivalent Test Load TESTPOINT~ (PAo·PA7. CA.) 130 PF C_A_' CA, -'~=\1 O.~ '"~ 1--1_ _ _ _ _ _- ' r Fig. 12 Peripheral CMOS Data Delay Times (Write Mode; CRA-5 = CRA-3 = 1; CRA-4 = 0) Fig. 8 NMOS Equivalent Test !-oad (iiiQ ONLY) !:.:V TESTPOINT~ 100 PF J F6821 IF68A21 IF68B21 Fig. 13 Peripheral Data and CB 2 Delay Times (Write Mode; Fig. 16 Interrupt Pulse Width and IRQ Response CRB-5 = CRB-3 = 1; CRB-4 = 0) \ O.BV I_i----------------- Ipow / Note: CB2 goes LOW as a result of the positive ~20V ~..:O..:.B..:V___________.....;~ IIV-- transition ------------~ of the E pulse. IRQA/B CB, -'~~ 0.4 V ~ Assumes interrupt enable bits are set. Fig. 14 CB 2 Delay Time (Write Mode; CRB-5 = CRB-3 = 1; CRB-4 = 0) Fig. 17 IRQ Release Time II CB, ~ ... . . - tCB2 \ PWCT ~ -~-: .. '''--j _______________-J;I'~,2-.. -V---- • Assumes part was deselected during the prevIOUs E pulse Fig. 18 RESET LOW Time I~.------IRL------<.. ·I Fig. 15 CB2 Delay Time (Write Mode; CRB-5 = 1; CRB-3 = CRB-4 = 0) RESET 'iO.BV y *The RESET line must be at VIH for a minimum of 1.0 JiS before addressing the PIA. -I I-I,. If , -CB --+-----tl-:~:'.::X~_ Ordering Information _ICB',I IRo, __ 1 fr.v Speed 1.0 MHz Order Code F6821P, S Temperature Range O°C t6 +70°C ~~2"V CB, F6821CP, CS _40° C to +85° C F6821DM -55°C to +125°C 0.' V 1.5 MHz F68A21P, S O°C to +70°C • Assumes part was deselected during F68A21 CP, CS -40° C to +85° C any previous E pulse. 2.0 MHz F68B21P, S P = Plastic package, S := Ceramic package 5·113 F6821 IF68A21 IF68821 5-114 F6840/F68A40/F68840 Programmable Timer (PTM) Microprocessor Product Description Logic Symbol The F68AO is a programmable subsystem component of 25 24 23 22 21 20 19 18 17 28 4 7 the F6800 family designed to provide variable system time intervals. 15 The F6840 has three 16-bit binary counters, three 16 corresponding control registers and a status register. 10 These counters are under software control and may be 11 IRQ used to cause system interrupts and/or generate output 12 0, 27 signals. The F6840 may be utilized for such tasks as 13 0, frequency measurements, event counting, interval 0, measuring and similar tasks. The device may be used 26 for square wave generation, gated delay signals, single pulses of controlled duration, and pulse width modu- • lation, as well as system interrupts. Vee ~ Pin 14 • Operates From a Single +5V Power Supply vss ~ Pin 1 • Fully TTL-Compatible • Single System Clock Required (Enable) • Selectable Prescaler on Timer 3 Capable of 4 MHz for the F6840. 6 MHz for the F68A40. and 8 MHz for the F68B40 Connection Diagram • Programmable Interrupt (IRQ) Output to MPU 28-Pin DIP • Readable Down Counter Indicates Counts to Go to Time-Out V,, <:, • Selectable Gating for Frequency or Pulse-Width G, 0, Comparison 0, G, .~Input <:, Do • Three Asynchronous External Clock and Gate/Trigger Inputs Internally Synchronized G, 0, • Three Maskable Outputs 0, 0, C, 0, Pin Names ~ 00-07 Bidirectional Data Lines IRQ Os CSO-CS1 Chip Select Input RSo 06 R/W Read/Write Input RS, 0, E Enable (Systems Clock 2) until one of several predetermined independently to operate in modes which fit a wide conditions causes it to halt or recycle. The timers are variety of applications. The device is fully bus- thus programmable, cyclic in nature, controllable by compatible with F6800 systems and is accessed by load external inputs or the MPU program, and accessible by and store operations from the MPU in much the same the MPU at any time. manner as a memory device. In a typical application, a timer will be loaded by storing two bytes of data into Bus Interface an associated counter latch. This data then is transferred The programmable timer module I PTM) interfaces to the into the counter during a counter initialization F6800 bus with an 8-bit bidirectional data bus, two Chip cycle. The counter decrements on each subsequent Select lines, a Read/Write line, an Enable (System <1>2) 5·116 F6840/F68A40/F68B40 line, an Interrupt Request line, an external RESET line, Interrupt Request (IRQ) and three Register Select lines. These signals, in The active LOW Interrupt Request signal is normally conjunction with the F6800 VMA output, permit the MPU tied directly (or through priority interrupt circuitry) to to control the PTM. VMA should be utilized in the IRQ input of the MPU. This is an open drain output conjunction with the MPU address line into a Chip (no load device on the chip) which permits other Select of the PTM. similar Interrupt Request lines to be tied together in a wired-OR configuration. Bidirectional Data (00-07) The bidirectional Data Lines (00-07) allow the transfer of The IRQ line is activated if, and only if, the composite data between the MPU and the PTM. The data bus output interrupt flag (bit 7 of the internal status register) is drivers are 3-state devices which remain in the high- asserted. The conditions under which the IRQ line is impedance (OFF) state except when the MPU performs a activated are discussed in conjunction with the PTM read operation (Read/Write and Enable lines HIGH status register. and PTM Chip Selects activated). External RESET Chip Select (CSo, CS1) A LOW level at this input is clocked into the PTM by the • These two signals are used to activate the data bus Enable (System <1>2) input. Two Enable pulses are required interface and allow transfer of data from the PTM. With to synchronize and process the signal. The PTM then CSo = "0" and CS1 = "1 ", the device is selected and recognizes the activE! LOW or inactive HIGH on the third data transfer will occur. Enable pulse. If the RESET signal is asynchronous, an additional Enable period is required if set-up times are not Read/Write (R/W) met. The RESET input must be stable HIGH/LOW for the This signal is generated by the MPU to control the minimum time stated in the AC Characteristics table. direction of data transfer on the data bus. With the PTM selected, a LOW state on the PTM RiiN line Recognition of a LOW level at this input by the PTM enables the input buffers and data is transferred from causes the following action to occur: the MPU to the PTM on the trailing edge of the a. All counter latches are preset to their maximal Enable (System <1>2) signal. Alternately (under the same count values. conditions), R/iN = "1" and Enable HIGH allows data in the b. All control reg ister bits are cleared with the exception PTM to be read by the MPU. of CR10 (internal reset bit), which is set. c. All counters are preset to the contents of the latches. Enable (E, System <1>2) d. All counter outputs are reset and all counter clocks This signal synchronizes data transfer between the MPU and are disabled. the PTM. It also performs an equivalent synchronization e. All status register bits (interrupt flags) are cleared. function on the external Clock, RESET, and Gate inputs of the PTM. Table 1 Register Selection Register Select Inputs Operations RS2 RS1 RSo R/W = "0" R/W = "1" 0 0 0 CR20 = "0" Write Control Register 3 No Operation CR20 = "1" Write Control Register 1 0 0 1 Write Control Register 2 Read Status Register 0 1 0 Write MSB Buffer Register Read Timer 1 Counter 0 1 1 Write Timer 1 Latches Read LSB Buffer Register 1 0 0 Write MSB Buffer Register Read Timer 2 Counter 1 0 1 Write Timer 2 Latches Read LSB Buffer Register 1 1 0 Write MSB Buffer Register Read Timer 3 Counter 1 1 1 Write Timer 3 Latches Read LSB Buffer Register 5·117 F6840/F68A40/F68B40 Register Select Lines (RSo, RS" RS2) control register bits (except CR1o) are cleared. These inputs are used in conjunction with the R/Vii line Therefore, one may write in the sequence to select the internal registers, ·counters and latches as CR3, CR2, CR,. shown in Table 1. The least significant bit of control register 1 is used as It has been stated previously that the PTM is accessed an internal reset bit. When this bit is a logic "0", all via MPU load and store operations in much the same timers are allowed to operate in the modes prescribed manner as a memory device. The instructions available by the remaining bits of the control registers. Writing a with the F6800 family of MPUs which perform "1" into CR10 causes all counters to be preset with the operations directly on memory should not be used contents of the corresponding counter latches, all when the PTM is accessed. These instructions actually counter clocks to be disabled, and the timer outputs fetch a byte from memory, perform an operation, then and interrupt flags (status register) to be reset. Counter restore it to the same address location. Since the PTM latches and control registers are undisturbed by an uses the R/Vii line as an additional register select input, internal reset and may be written into regardless of· the the modified data may not be restored to the same state of CR10. register if these instructions are used. The least significant bit of control register 3 is used Control Register as a selector for a +8 prescaler, which is available with Three write-only registers in the F6840 are used to timer 3 only. The prescaler, if selected, is effectively modify timer operation to suit a variety of applications. placed between the clock input circuitry and the input Control register 2 has a unique address space to counter 3. It therefore can be used with either the (RSo="1", RS, ="0", RS2="0") and therefore may be internal clock (Enable) or an external clock source. written into any time. The remaining control registers (1 and 3) share the address space selected by a The functions depicted in the foregoing discussions logic "0" on all register select inputs. The least are tabulated on the first row in Table 2 for ease significant bit of control register 2 (CR2o) is used as an of reference. additional addressing bit for control registers 1 and 3. Thus, with all Register Selects and R/Vii inputs at Control register bits CR10, CR20 and CR30 are unique in logic "0", control register 1 will be written into if CR20 that each selects a different function. The remaining bits is a logic "0". Control register 3 can also be written into (1 through 7) of each control register select common after a reset LOW condition has occurred, since all functions, with a particular control register affecting only Table 2 Control Register Bits CR10 Internal Reset Bit CR20 Control Register Address Bit CR30 Timer 3 Clock Control o All timers allowed to operate o CR3 may be written o T3 Clock is not prescaled 1 All ti mers held in preset state 1 CR1 may be written 1 T3 Clock is prescaled by +8 CRX,' Timer X Clock Source o TX uses external clock source on CX input TX uses Enable clock CRX2 Timer X Counting Mode Control o TX configured for normal (16-bit) counting mode 1 TX configured for dual 8-bit counting mode CRX3 CRX4 CRXs Timer X Counter Mode and Interrupt Control (See Table 3) CRX6 Timer X Interrupt Enable· . o Interrupt Flag masked on iRQ 1 Interrupt Flag enabled to IRQ CRX7 Timer X counter Output Enable o TX Output masked on output OX 1 TX Output enabled on output OX * Control Register for timer 1. 2 ·_or 3, Bit 1. 5·118 F6840/F68A40/F68B40 its corresponding timer. For example, bit 1 of control An individual interrupt flag is also cleared by a write register 1 (CR1,) selects whether an internal or external timer latches (WI command or a counter initialization clock source is to be used with timer 1. Similarly, CR2, (CII seq uence, provided that W or CI affects the timer selects the clock source for timer 2, and CR3, performs corresponding to the individual interrupt flag. this function for timer 3. The function of each bit of control register "X" can therefore be defined as shown Counter Latch Initiali~ation in the remaining section of Table 2. Each of the three independent timers consists of a 16-bit addressable counter and 16 bits of addressable Control register bit 2 selects whether the binary latches. The counters are preset to the binary numbers information contained in the counter latches land stored in the latches. Counter initialization results in the subsequently loaded into the counter) is to be treated transfer of the latch contents to the counter. See the as a single 16-bit word or two 8-bit bytes. In the single notes in Table 5 regarding the binary number N, L or M 16-bit counter mode (CR2 = "0"), the counter will placed into the latches and their relationship to the decrement to zero after N + 1 enabled I G = "0") clock output waveforms and counter time outs. periods, where N is defined as the 16-bit number in the counter latches. With CRX2 = "1 ", a similar time-out will Since the PTM data bus is 8 bits wide and the counters • occur after I L + 1 ) . 1M + 11 enabled clock periods, where are 16 bits wide, a temporary register I MSB buffer Land M, respectively, refer to the LSB and MSB bytes register) is provided. This write-only register is for .the in the counter latches. most significant byte of the desired latch data. Three addresses are provided for the MSB buffer register las Control register bits 3, 4, and 5 are explained in detail in indicated in Table 11, but they all lead to the same the Timer Operating Modes section. Bit 6 is an interrupt buffer. Data from the MSB buffer will be transferred mask bit which will be explained more fully in automatically into the most significant byte of timer X conjunction with the status register, and bit 7 is used to when a write timer X latches command is performed. So enable the corresponding timer output. A summary of it can be seen that the F6840 has been designed to control register programming modes is shown in allow transfer of two bytes of data into the counter Table 3. latches provided that the MSB is transferred first. Status Register/Interrupt Flags In the many applications, the source of the data will be The F6840 has an internal read-only status register which an F6800 MPU. It should be noted that the 16-bit store contains four interrupt flags. (The remaining four bits of the operations of F6800 family microprocessors ISTS register are not used, and default to "Os" when being read). and STXI transfer data in the order required by the Bits 0, 1, and 2 are assigned to timers 1, 2, and 3, PTM. A store index register instruction, for example, respectively, as individual flag bits, while bit 7 is a results in the MSB of the X register being transferred to compOSite interrupt flag. This flag bit will be asserted if any the selected address, then the LSB of the X register of the individual flag bits is set while bit 6 of the being written into the next higher location. Thus, either corresponding control register is at a logic "1 ". The the index register or stack pointer may be transferred conditions for asserting the compOSite interrupt flag bit can directly into a selected counter latch with a single therefore be .expressed as: instruction. INT = I, . CR16 + i2 • CR26 + 13 • CR36 A logic "0" at the RESET input also initializes the counter where INT = CompOSite Interrupt Flag I Bit 71 latches. In this case, all latches will assume a maximum h = Timer 1 Interrupt Flag I Bit 01 count of 65,53610. It is important to note that an internal 12 = Timer 2 Interrupt Flag (Bit 11 reset (bit zero of control register 1 set) has no effect on 13 = Timer 3 Interrupt Flag IBit 21 the counter latches. An interrupt flag is cleared by a timer reset condition; Counter Initialization i.e., external RESET = "0" or internal reset bit ICR101 = "1 ". Counter initialization is defined as the transfer of data It will also be cleared by a read timer counter command, from the latches to the counter with subsequent clearing provided that the status register has previously been of the individual interrupt flag associated with the read while the interrupt flag was set. This condition on counter. Counter initialization always occurs when a the read status register-read timer counter IRS-RTI reset condition (RESET) = "0" or CR10 = "1" is recognized. sequence is designed to prevent missing interrupts It can also occur - depending on timer mode - with a which might occur after the status register is read, but write timer latches command or recognition of a prior to reading the timer counter. negative transition of the gate input. 5·119 F6840/F68A40/F68840 Table 3 Control Register Programming Register 1 Register 2 Register 3 o All timers operate Reg #3 may be written T3 Clk + 1 All ti mers preset Reg #1 may be written T3 Clk+ a o External Clock (CX In'put) Internal Clock (Enable) o Normal (16-Bit) Count Mode Dual a-Bit Count Mode Continuous Operating Mode: Gate j or Write to latches or Reset Causes Counter Initialization Frequency Comparison Mode: Interrupt if Gate U + i S < Counter Time-Out Continuous Operating Mode: Gate j or Reset Causes Counter Initialization Pulse Width Comparison Mode: Interrupt if Gate ~is < Counter Time-Out Single Shot Mode: Gate j or Write to latches or Reset Causes Counter Initialization Frequency Comparison Mode: Interrupt if Gate L n i s > Counter Time-Out Single Shot Mode: Gate j or Reset Causes Counter Initialization Pulse Width Comparison Mode: Interrupt if Gate L---1 is > Counter Time-Out o Interrupt Flag Masked (iRQ) Interrupt Flag Enabled (IRQ) o Timer Output Masked Timer Output Enabled Note Reset is Hardware or Software Reset (RESET)::::; 0 or CR1O::::; 11. 5-120 F6840/F68A40/F68B40 Counter recycling or re-initialization occurs when a cycle, and not recognized the next cycle, or vice versa. negative transition of the clock input is recognized after the counter has reached an all-"O" state. In this case, E INPUT data is transferred from the latches. to the counter. Ca-~-....,=:.::..::II---"" ~~r--- Asynchronous Input/Output Lines PTM I I RECOGNIZES .. PTM OR 10 PTM THIS EOGE Each of the three timers within the PTM has external clock and gate inputs as well as a counter output line. The inputs are high impedance, TTL-compatible lines External clock input 153 represents a special case when and outputs are capable of driving two standard timer 3 is programmed to utilize its optional +8 prescaler TTL loads. mode. The maximum input frequency and allowable duty cycles for this case are specified in the AC Characteristics Clock Inputs (e" C2 and C3) table. The output of the +8 prescaler is treated in the same Input pins C" C2 and C3 will accept asynchronous TTL manner as the previously discussed clock inputs. That is, it voltage level signals to decrement timers 1, 2 and 3, is clocked into the counter by Enable pulses, is .recognized respectively. The HIGH and .LOW levels of the external on the fourth Enable pulse (provided set-up and hold time clocks must e,ach be stable for at least one system requirements are rnet), and must produce an output pulse clock period plus the sum of the set-up and hold times at least as wide as the sum of an enable period, set-up and for the inputs. Theasynch.ronous clock rate can vary, hold times. from dc to the limit imposed by Enable (System cf>2) set-up and hold time. Gate Inputs (G1, G2, (3) Input lines G" G2 and G3 accept asynchronous The external clock inputs are clocked in by Enable TTL-compatible signals which are used as triggers or (System 2) pulses. Three enable periods are used to clock gating functions to timers 1, 2 and 3, respectively. synchronize and process the external clock. The fourth The gating inputs are clocked into the PTM by the Enable pulse decrements the internal counter. This does Enable (System 2) signal in the same manner as the not affect the input frequency', it merely creates a delay previously discussed Clock inputs. That is, a Gate between a clock input transition and internal recognition transition is recognized by the PTM on the fourth of that transition by the PTM. All references to C inputs Enable pulse (provided set-up and hold time require- in this document relate to internal recognition of the ments are met), and the HIGH or LOW levels of the input transition. Note that a clock HIGH or LOW level Gate input must be stable for at least one system clock which does not meet set-up and hold time specifications period plus' the sum of the set-up and hold times. All may require an additional Enable pulse for recognition. references to G transition in this document relate to When observing recurring events, a lack of synchroni- internal recognition of the input transition. zation will result in jitter being observed on the output of the PTM when using asynchronous clocks and gate The Gate inputs of all timers dire.,£tly affect the internal input signals. There are two types of jitter. System 16-bit counter. The operation of G3 is therefore jitter is the result of the input signals being out of independent of the +8 prescaler selection. synchronization with the Enable input (System 2), permitting signals with marginal set-up and hold time to be Timer Outputs (0" 02, 03) recognized by either the bit time nearest the 'input Time~ outputs 0" 02 and 03 are capable of driving up transition or the subsequent bit time. to two TTL loads and produce a defined output waveform for either continuous or single-shot timer E INPUT modes. Output waveform definition is accomplished by selecting either single 16-bit or dual 8-bit operating :.:-u~G~r- SYSTEM modes. The single 16-bit mode will produce a square- t--BIT TIME EITHER - - - ' ' - - OR HERE I JITTER wave output in the continuous timer mode and will HERE produce a single pulse in the single-shot timer mode. The dual 8-bit mode will produce a variable duty cycle OUTPUT----------~sr-L-J pulse in both the continuous and single shot timer modes. One bit of each control register (CRX7) is used Input jitter can be as great as the time between input to enable the corresponding output. If this bit is cleared, signal negative going transitions plus the system jitter, if the output will remain LOW (VoLl regardless of the the first transition is recognized during one system operating mode. 5-121 F6840/F68A40/F68B40 The continuous and single-shot timer modes are the timers. These modes are outlined in Table 4. only ones for which output response is defined. Signals appear at the outputs (unless CRX7 = "0") during In addition to the four timer modes in Table 4, the frequency and pulse width comparison modes, but the remaining control register bit is used to modify counter actual waveform is not predictable in typical applications. initialization and enabling or interrupt conditions. Timer Operating Modes Continuous Operating Mode (Table 5) Any of the timers in the PTM may be programmed to The F6840 has been designed to operate effectively in a operate in a continuous mode by writinQ "Os" into wide variety of applications. This is accomplished by bits 3 and 5 of the corresponding control register. using three bits of each control register (CRX3, CRX4 Assuming that the timer output is enabled (CRX7 = "1"), and CRX5) to define different operating modes of the either a square wave or a variable duty cycle waveform will be generated at the timer output, OX. The type of Table 4 Operating Modes output is selected via control register bit 2. Control Register Either a timer reset (C·RX10 = "1" or External RESET = "0") condition or internai recognition of a CRX3 CRX4 CRX5 Timer Operating Mode 0 . 0 Continuous negative transition of the Gate input results in counter initialization. A write timer latches command can be 0 . 1 Single-Shot selected as a counter initialization signal by 1 0 . Frequency C()mparison clearing CRX4. 1 1 . Pulse Width Comparison In the dual 8-bit mode (CRX2 = "1") Irefer to the example in Figure 11 the MSB decrements once for ~Defines additional timer functions every full countdown of the LSB + 1. When the Table 5 Continuous Operating Modes, (CRX3 = "0", CRX5 = "0") Control Register Initialization/Output Waveforms CRX2 CRX4 Counter Initialization "Timer Output (OX) (CRX7 = "1") 0 0 GI + W + R r(N + I ) ( T ) TN + I ) ( T TN + I)(T1 ,-VOH I I I -VOL 0 1 GI + R I TO TO . TOI to r ( L + I)(M + I ) ( T ) T ( L + I)(M + I)(T)....1 1 0 131 + W + R ~-VOH -VOL 1 1 131 +R I 10 -..l I.- .-..1 I.- (L)(T) TO (L)(T) TO' 131 = Negative tranSition of Gate input M= 8-Bit Number in MSB Counter Latch W = Write Timer Latches Command T = Clock Input Negative Transitions to Counter R = Timer Reset (CR10 = "1" or External RESET = "0") to = Counter Initialization Cycle N = 16-Bit Number in Counter Latch TO ,= Counter Time-Out (All "0" Condition) L =.8-Bit Number in LSB Counter Latch 'Io AII time'i~tervals shown above assume the Gate (GI and Clock ,CI signals are synchronized to Enable {System q,21 with the specified set~up and hold time requirements. 5-122 F6840/F68A40/F68B40 Fig. 1 Timer Output Waveforms Example 'TIME OUT (M + 1)(L + 1) =0 Period EXAMPLE: CONTENTS OF MS8 03 M MIL + 1) + 1 = LOW portion of period CONTENTS OF lSB 04 L + L = Pulse width I"".. r - - - - - - - - M I L + t) • 1 - - - - - - - -..........1-0__- L_ *Preset LSB and MSB to Respective Latches on the negative transition ---, ALGEBRAIC EXPRESSION I" of the Enable COUNTERI' 03(04 + 1) + 1 = 16 E I 1l1 _ _ _ _-+____ 2.4 V "Preset LSB to LSB Latches and OODm , : I 0.4 V Decrement MSB by one on the negative ~--------~--------~--------~~ I transition of the Enable I E I ISYSTEM .2) I I I 1 +L _ t . - - , + L-........~Ii"".._ - 1 + L-.....i • SE I SE I SE I PULSES I PULSES I PULSES I I I I I I I~ \+EL I I I I I PULSES I I I I I I I (M+,I(L+~.,) I I I I 1-, I I •• I I_I I .. I I_I I •• I I_I I • I ALGEBRAIC EXPRESSION . (04 + 1)(03 + 1) ~ 20 E OR EXTERNAL CLOCK PULSES LSB = "0", the MSB is unchanged; on the next clock output, if enabled, goes LOW during the counter pulse the LSB is reset to the count in the LSB latches initialization cycle and reverses state at each time-out. and the MSB is decremented by 1 (one I. The output, if The counter remains cyclical (is re-initialized at each enabled, remains LOW during and after initialization and time·outl and the individual interrupt flag is set when will remain LOW until the counter MSB is all "Os". The time·out occurs. If M = L = "0", the internal counters do output will go HIGH at the beginning of the next clock not change, but the output toggles at a rate of 112 the pulse. The output remains HIGH until both the LSB and clock frequency. MSB of the counter are all "Os". At the beginning of· the next clock pulse the defined time-out (TOI will occur and The discussion of the continous mode has assumed that the output will go LOW. In the normal 16-bit mode the application requires an output signal. It should be the period of the output of the example in Figure 1 noted that the timer operates in the same manner with would span 1546 clock pulses as opposed to the the output disabled I CRX7 = "0"1. A read timer counter 20 clock pulses using the dual 8-bit mode. command is valid regardless of the state of CRX7. The counter is enabled by an absence of a timer reset Single-Shot Timer Mode condition and a logic "0" at the Gate input. The counter This mode is identical to the continuous mode with three will then decrement on the first clock signal recognized exceptions. The first of these is obvious from the during or after the counter initialization cycle. It name - the output returns to a LOW level after the continues to decrement on each clock signal so long as initial time-out and remains LOW until another counter G remains LOW and no reset condition exists. A initialization cycle occurs. The waveforms available are counter time·out (the first clock after all counter shown in Table 6. bits = "0" I results in the individual interrupt flag being set and re·initialization of the counter. As indicated in Table 6, the internal counting mechanism remains cyclical in the Single-shot mode. Each time-out A special condition exists for the dual 8-bit mode of the counter results in the setting of an individual I CRX2 = "1" I if L = "0". In this case, the counter will interrupt flag and re-initialization of the.counter. revert to a mode similar to the single 16-bit mode, except time-out occurs after M + 1 clock pulses. The 5·123 F6840/F68A40/F68B40 Table 6 Single-Shot Operating Modes, (CRX3 = "0", CRX7 = "1", CRXs = "1") Control Register Initialization/Output Waveforms CRX2 CRX4 Counter Initialization Timer Output .(OX) 0 0 0 1 G! + W + R G! + R rt" "~=t" ",ml ~ r(N)(T) I r'·."""'1=" '",.·""'l to TO TO 1 0 G! + W + R i(L)(T) 1 1 G! + R to ! lTO TO Symbols are as defined in Table 5 The second major difference between the single-shot Time Interval Modes and continuous modes is that the internal counter The time interval modes are provided for those enable is not dependent on the Gate input level applications which require more flexibility of interrupt remaining in the LOW state for the single-shot mode. generation and counter initialization. Individual interrupt flags are set in these modes as a function of both Another special condition is introduced in the single- counter time-out and transitions of the Gate input. shot mode. If L = M = "0" (Dual B-bit) or N = "0" (Single Counter initialization is also affected by interrupt 16-biti, the output goes LOW on the first clock received flag status. during or after counter initialization. The output remains LOW until the operating mode is changed or non-"O" The output signal is not defined in any of these modes, data is written into the counter latches. Time-outs but the counter does operate in either single 16-bit or continue to occur at the end of each clock period. dual B-bit modes as programmed by CRX2. Other features of the time interval modes are outlined The three differences between single-shot and in Table 7. continuous timer modes can be summarized as attributes of the single-shot mode: If CRXs = "0", as shown in Table 7 and Table 8, an interrupt is generated if the Gate input returns LOW prior to 1. Output is enabled for only one pulse until it is reinitialized. a time-out. If counter time-out occurs first, the counter 2. Counter Enable is independent of Gate. is recycled and continues to decrement. A bit is set 3. L = M = "0" or N = "0" disables output. within the timer on the initial time-out which precludes further individual interrupt generation until a new Aside from these differences, the two modes counter initiafization cycle has been completed. When are identical. this internal bit is set, a negative transition of the Gate input starts a new counter initialization cycle. (The Frequency Comparison or Period Measurement Mode condition of GJ· T· TO is satisfied, since a time-out has (CRX3 = "1", CRX4 = "0") occurred and no individual interrupt has The frequency comparison mode with CRXs = "1" is been generated.) straightforward. If time-out occurs prior to the first negative transition of the Gate input after a counter Any of the timers within the PTM may be programmed initialization cycle, an individual interrupt flag is set. to compare the period of a pulse (giving the frequency The counter is disabled, and a counter initialization after calculations) at the Gate input with the time period cycle cannot begin until the interrupt flag is cleared required for counter time-out. A negative transition of and a negative transition on G is detected. the Gate input enables the counter and starts.a counter 5·124 F6840/F68A40/F68B40 Table 7 Timer Interval Modes, CRX3 = "1" CRX4 CRXs Application Condition for Se"lng Individual Interrupt Flag 0 0 Frequency Comparison Interrupt Generated if Gate Input Period (1/F) is less than Counter Time-Out (TO) 0 1 Frequency Comparison Interrupt Generated if Gate Input Period (1/F) is greater than Counter Time-Out (TO) 1 0 Pulse Width Comparison Interrupt Generated if Gate Input "Down Time" is less than Counter Time-Out (TO) 1 1 Pulse Width Comparison Interrupt Generated if Gate Input "Down Time" is greater thEm Counter Time-Out (TO) • Table 8 Frequency Comparison Mode, CRX3 = "1", CRX4 = "0" Control Register Counter Counter Enable Counter Enable Interrupt Flag Bit 5 (CRXs) Initialization Flip-Flop Set (CE) Flip-Flop Reset (CE) Set (1) 0 GI • T· (CE + TO • CE) + R GI· W· R· I W+R+I GI Before TO 1 GI· 1+ R GI· W· R· I W+R+I TO Before GI -I represents the interrupt for a given timer. Table 9 Pulse Width Comparison Mode, CRX3 = "1", CRX4 = "1" Control Register Counter Counter Enable Counter Enable Interrupt Flag Bit 5 (CRXs) Initialization Flip-Flop Set (CE) Flip-Flop Reset (CE) Set (I) 0 GI· I + R GI· W· R·I W+R+I+G Gt Before TO 1 GI· 1+ R GI· W·'R·I W+R+I+G TO Before Gt G = Level sensitive recognition of Gate Input initialization cycle - provided that other conditions as Pulse Width Comparison Mode noted in Table 8 are satisfied. The counter decrements (CRX3 = "1", CRX4 = "1") on each clock signal recognized during or after counter This mode is similar to the frequency comparison mode initialization until an interrupt is generated, a write timer except that a positive, rather than negative, transition of latches command is issued,. or a Timer Reset condition the Gate input terminates the counf With CRXs = "0", an occurs. It can be seen from Table 8 that an interrupt individual interru~ flag will be generated if the "0" level condition will be generated if CRXs = "0" and the period pulse applied to the Gate input is less than the time of the pulse (single pulse or separately measured period required for counter time-out. With CRXs = "1", repetitive pulses) at the Gate input is less than the the interrupt is generated when the reverse condition counter time-out period. If CRXs = "1", an interrupt is is true. generated if the reverse is true. As can be seen in Table 9, a positive transition of the Assume now with CRXs = "1" that a counter initialization Gate input disables the counter. With CRXs = "0", -it is has occurred and that the Gate input has returned LOW therefore possible to obtain directly the width of any prior to counter time out. Since there is no individual pulse causing an interrupt. Similar data for other time interrupt flag generated, this automatically starts a new interval modes and conditions can be obtained, if two counter initialization cycle. The process will continue sections of the PTM are dedicated to the purpose. with frequency comparison being performed on each Gate input cycle until the mode is changed, or a cycle is determined to be above the predetermined limit. 5·125 F6840/F68A40/F68B40 Absolute Maximum Ratings Supply Voltage -0.3 V, +7.0 V Input Voltage -0.3 V, +7.0 V Operating Temperature Range - TL to TH F6840P,S/F68A40P,S/F68B40P,S . 0° C, +70° C Fa840CP,CS/F68A40CP,CS -40° C, +85° C F68400L -55° C, +85° C F68400M -55° C, +125° C Storage Temperature Range -55° C, +150° C Thermal Resistance Plastic Package 115° C/W Ceramic Package 60°C/W Stresses greater than those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functiona:l operation of the device at these or any other conditions above those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. DC Characteristics Vee = 5.0 V ±S%, Vss = 0, TA = TL to TH, unless otherwise noted. Symbol Characteristic Signal Min Typ Max Unit Test Condition VIH Input HIGH Voltage 2.0 V VIL Input LOW Voltage -0.4 0.8 V liN I nput Leakage Current 1.0 2.5 p.A VIN = 0 to 5.25 V ITsl 3-State (OFF State) 00-07 2.0 10 p.A VIN = 0.4 to 2.4 V Input Current VOH Output HIGH Voltage DO-07 2.4 V ILoad = -205 p.A, Other Outputs 2.4 ILoad = 200 p.A VOL Output LOW Voltage DO-07 0.4 V ILoad = 1.6 rnA, 01-03, IRQ 0.4 ILoad = 3.2 rnA ILOH Output Leakage Current IIRQI 1.0 10 p.A VOH = 2.4 V (OFF State) Po Power Dissipation 470 700 mW CIN Input Capacitance VIN = 0, TA = 25°C, 00-D7 12.5 f = 1.0 MHz All Other Inputs 7.5 pF COUT Output Capacitance 01,02,03 10 VIN = 0, TA = 25°C, f = 1.0 MHz IRQ 5.0 pF 5·126 F6840/F68A40/F68B40 Bus Timing Characteristics Read (Figure 2) F6840 F68A40 F68B40 Symbol Characteristic Min Max Min Max Min Max Unit tcycE Enable Cycle Time 1.0 10 0.666 10 0.5 10 Jls PWEH Enable Pulse Width, HIGH 0.45 4.5 0.280 4.5 0.22 4.5 Jls PWEL Enable Pulse Width, LOW 0.43 0.280 0.21 Jls tAS Set-up Time, Address and R/W valid to enable positive transition 160 140 70 ns tOOR Data Delay Time 320 220 180 ns tH Data Hold Time 10 10 10 ns tAH tEr, tEl Address Hold Time Rise and Fall Time for Enable input 10 25 10 25 10 25 ns ns II Write (Figure 3) tcycE Enable Cycle Time 1.0 10 0.666 10 0.50 10 Jls PWEH Enable Pulse Width, HIGH 0.45 4.5 0.280 4.5 0.22 4.5 Jls PWEL Enable Pulse Width, LOW 0.43 0.280 0.21 Jls tAS Set-up Time, Address and R/W valid to enable positive transition 160 140 70 ns tosw Data Set-up Time 195 80 60 ns tH Data Hold Time 10 10 10 ns tAH Address Hold Time 10 10 10 ns tEr, tEl Rise and Fall Time for Enable input 25 25 25 ns Fig.2 Bus Read Timing Characteristics Fig.3 Bus Write Timing Characteristics (Read Information from PTM) (Write Information into PTM) 1+----Ic"'E---~ RS,C:S.RiW DATA BUS 5·127 F6840/F68A40/F68B40 AC Characteristics (Figures 4- 8) F6840 F68A40 F68B40 Symbol Characteristic Min Max Min Max Min Max Unit tr, Ii Input Rise and Fall Times C,G and RESET 1.0" 0.666" 0.500" IJs PWL Input Pulse Width LOW C,G and RESET tcycE tcycE tcycE ns +tsu +tsu +tsu +thd +thd +thd PWH Input Pulse Width HIGH C,G tcycE tcycE tcycE ns +tsu +tsu +tsu +thd +thd +thd tsu Input Set-up Time C,G and RESET 200 120 75 ns (Synchronous Model C3 (+8 Prescaler Mode onlYI thd Input Hold Time C,G and RESET 50 50 50 ns (Synchronous Model C3 (+8 Pres caler Mode only I Output Delay, 01-03 tco (VOH = 2.4 V, Load BI TTL 700 460 340 ns tcm (VOH = 2.4 V, Load D) MOS 450 450 340 ns tcmos (VOH = 0.7 Vee, Load D) CMOS 2.0 1.35 1.0 IJs tlR Interrupt Release Time 1.2 0.9 0.7 IJS " tr and tf :5 1 x Pulse Width or 1.0 P.s, whichever is smaller. Fig. 4 Input Pulse Width Low Fig. 7 Output Delay c,--e; a.-a. mET PWL '--1'" \ teo, fcm, tcmos 0,-0. Flg.S Input Pulse Width High Ci.e; 0,-0, Fig. 8 fiiiQ Release Time PWH Fig. 6 Input Set-up and Hold Times fRO '1:-") . , 2 . 4Y 5-128 F6840/F68A40/F68B40 Fig.9 Bus Timing Test Loads Ordering Information Load A (00.0 ,) Speed Order Code Temperature Range 5.0 V 1.0 MHz F6840P,S O°C to +70°C F6840CP,CS -40° C to +85° C Rl = 2.5 k F6840DL -55° C to +85°C F6840DM -55°C to +125°C TEST POINT ----Ip-......-K~-.. 1.5 MHz F68A40P,S O°C to +70°C 130 pF F68A40CP,CS -40° C to +85° C 2.0 MHz F68B40P,S O°C to +70°C P ~ Plaslic package. S ~ Ceramic package • Load B (0,,0,,03) vcc OF DEVICE UNOER TEST AL=1.25k IN914 TEST POINT -4_.....-~ OR EOUIV. 40 pF 11.7 k Load C (iRQ Only) 5.0 V TESTPOINT~ t 3k 100pF I Load 0 (CMOS Load) TEST POINT 1 1 30PF ·5·129 F6840/F68A40/~68B40 5-130 F6844 Direct Memory Access Controller Microprocessor Product Description Connection Diagram 40·Pin DIP The F6844 Direct Memory Access Controller (DMAC) transfers data directly between memory and peripheral Vss device controllers. In bus·organized systems, such as CSIT.AKB liE! those based on the F6800 microprocessor, the DMAC, RIW DORNT rather than the MPU, controls the address and !maT data buses. InIml T.AKA The DMAC bus interface includes select, read/write, TiSTIi interrupt, transfer request/grant, and bus interface logic 1IR!/1!EIill! to permit data transfer over an 8·bit bidirectional data TxROO bus. The F6844 functional configuration is programmed TxR01 through the data bus. The internal structure provides for • T.RO. control and handling of four individual channels, each of TxRC3 which is separately configured. Programmable control registers provide control for the transfer location and Do length, individual channel control and transfer mode 0, configuration, priority of servicing, data chaining, and D. interrupt control. Status and control lines serve the 03 peripheral controllers. D. Os The mode of transfer for each channel can be 0, programmed as cycle·stealing or burst transfer. 0, (Top View) Typical applications include use with the F6856 Synchronous Protocol Communications Controller, the F6854 Advanced Data Link Controller, and the F68488 F6844 Signal Functions IEEE·488 Bus Controller. • • Four DMA Channels, Each Having a 16·Bit Address Register and a 16·Bit Byte Count Register 2M Byte/Sec Maximum Data Transfer Rate - Ao A, A. CSIT.AKB DORNT DROH A, DROT • Selection of Fixed or Rotating Priority Service Control A. IRO/DEND • Separate Control Bits for Each Channel A. E • Data Chain Function A. RES • Address Increment or Decrement Update A, RtW • Programmable Interrupts and DMA End to Peripheral ADDRESS A. TxAKA Controllers A. T'ROo A10 TxRO, All TxRQ2 F6844 A,. TxRQ3 A13 T.mi A,. A,. DO VDO 0, v.s D. 03 DATA D. Os D. D, 5·131 F6844 Functional Description (DEN D) signal is directed to the peripheral controller and an interrupt request (IRQ) goes to the MPU. The interrupt The DMAC has 15 addressable. registers, of which eight control register enables these interrupts; the IRQ/DEND are 16 bits in length (see Figure 1). Each channel has a flag bit is read from this register. separate address register and a byte count register, each of which is 16 bits. There are four channel control Chaining of data transfers is controlled by the data chain registers with three common general control registers register. Whenenabled,the contents of the address and (priority, Interrupt, and data chain). byte count registers for channel 3 are put into the registers of the channel selected for chaining as its byte To prepare a channel for direct memory access (DMA), count register becomes zero. This allows for repetitively the address registers must be loaded with the starting reading or writing a block of memory. memory address and the byte count register loaded with the number of bytes to be transferred. The bits in the During the DMA mode, the DMAC controls the address channel control register establish the direction of the bus and data bus for the system as well as provides the transfer, the mode, and the address Increment or R/W line and a signal to be used as valid memory decrement after each cycle. Each channel can be set for address (VMA). When a peripheral device controller one of three transfer modes: three-state control (TSC) desires a DMA transfer, it issues a transfer request. steal, halt steal, or halt burst. Two read-only status bits Assuming this request is enabled and meets the test of in the channel control register indicate when the channel highest priority, the DMAC issues a DMA request. When is busy transferring data and when the DMA transfer the DMACreceives the DMA grant (DGRNn input, it is complete. gives a transfer acknowledge (TxAKA or TxAKB) to the peripheral device controller, at which time the data is The priority control register enables the transfer requests transferred. When the channel byte count register equals from the peripheral controllers and establishes either a zero, the transfer is complete, a DEND is given to the fixed priority or rotating priority scheme of servicing peripheral device controller, and an IRQ is given these requests. When the DMA transfer for a channel is to the MPU. complete (the byte count register is'zero), a DMA end 5·132 F6844 Fig. 1 Block Diagram RIW Ao A, A. A2 Ao Ao lie A7 lie lie A,. Au A12 A13 A,. A,. iIillIl5!Im 3 4 5 8 7 8 9 10 11 12 13 14 15 18 17 18 19 33 csrr. AK8 2 _---+-........ 0.28 0,27 0.28 0.25 0.24 D.23 CHANNEL CONTROL 0.22 REGISTERS flO 0721 32T.RQo 31 T.RQ, TRANSFER DiiliH 38 REQUESTI ACKNOW· 29 T.RQ. PRIORITY CONTROL mmT37 REQUEST, REGISTER ~-----------~ LEDGE DGRNT38 GRANT, 35 TxAKA TIMING CONTROL RES 39 Vss=PIN 1 E40 VDD=PIN 20 5·133 F6844 Signal Descriptions The F6844 input and output signals are described in Table 1. Table 1 F6844 Signal Functions Mnemonic Pin No. Name Description Address Ao-A4 4-8 Address In the MPU mode, the signals are high-impedance inputs used to address the DMAC registers. In the DMA mode, these outputs are set to the contents of the address register for the channel being processed. A5-A 15 9:-19 Address These output lines are in the high-impedance state during the MPU mode. In the DMA mode, these lines are outputs that are I set to the contents of the address register for the channel being processed. Data 00-0 7 28-21 Bidirectional Data the eight bidirectional lines provide data transfer between the . DMACand the MPU. The data bus output drivers are three-state devices that remain in the high-impedance state except when the MPU performs DMAC read operations. Control CS/TxAKB 2 Chip Selectl This !lignal is an output in the four-channel mode during the Transfer DMA transfer. At all oth.er times, it is a high-impedance, TTL- Acknowledge B compatible input used to address the DMAC. The DMAC is selected when CS/TxAKB is low. Valid memory address (VMA) must be used·in generating this input to prevent false selects. Transfers of data to and from the DMAC are then confrolled by the E, read/write, and Ao-A4 address lines. In the four-channel mode, when TxAKB is needed, the CS gate must have an open- collector output (a pull-up resistor should not be used). In the two-channel mode, CS/TxAKS is always an input. DGRNT 38 DMA Grant A high-impedance input signal to the DMAC, providing control of the system buses. In the three-state control (TSC) steal mode, the signal comes from the system clock drive circuit (DMA grant), indicating that the clock is being stretched. For the halt steal or halt burst mode, this signal is the bus available (SA) from the MPU, indicating that the MPU has halted and transferred control of its buses to the DMAC. For a design involving TSC steal and halt mode transfers, this input must be the logical OR of the clock-driven DMA grant and the MPU BA. DRQH 36 DMA Request This active-lOW output requests a DMA transfer for a channel Halt Steal programmed for the halt steal or halt burst transfer mode. The signal is connected directly to the MPU HALT input and remains low until the last byte transfer has begun. 5-134 F6844 Table 1 F6844 Signal Functions (Cont.) Mnemonic Pin No. Name Description 37 DMA Request This active-low output requests a DMA transfer for a channel Three-State configured for the TSC steal transfer mode. The signal is Control Steal connected to the system clock driver, requesting a <1>1 clock stretch. It remains in the low state until the transfer has begun. E 40 Direct Memory The DMAC register I/O transfers, channel request line sampling, Access and gating of other control signals to the system are done internally in conjunction with the E high-impedance input. This input must be the system memory clock (a nonstretched E clock). • 33 Interrupt Request/ A TIL-compatible, active-low output used to interrupt the MPU DMA End and to signal the peripheral controller that the data block transfer has ended. If the interrupt has been enabled, the IRQ/DEND line goes low after the last DMA cycle of a transfer. An open-collector gate must be connected to DGRNT and IRQ/DEND to prevent false interrupts from the DEND signal when interrupts are not enabled. 39 Reset The ~ input resets the DMAC from an external source. In the low state, the RES input causes all registers, except address and byte count, to be reset to the logic 0 state. This disables all transfer requests, masks all interrupts, disables the data chain function, and puts each channel control register into the condition of memory write, halt steal transfer mode, and address increment. R/W 3 Read/Write A TIL-compatible signal that is a high-impedance input in the MPU mode and an output in the DMA mode. In the MPU mode, it controls the direction of data flow through the DMAC input/output data bus interface. When read/write is high (MPU read cycle) and the chip is selected, DMAC data output buffers are turned on and a selected register is read. When it is low, the DMAC output drivers are turned off and the MPU writes into a selected register. In the DMA mode, read/write is an output to drive the memory and peripheral controllers. Its state is determined by bit 0 of the channel control register for the channel being serviced. When read/write is high, the memory Is written into the peripheral controller. When it is low, the peripheral controller is read and its data stored in the memory. In the DMA mode, the DMAC data buffers are off, so data is not available on the data bus (Do-D7)' 5-135 F6844 Table 1 F6844 Signal Functions (Cont ) Mnemonic Pin No. Name Description TxAKA 35 Transfer This signal is a TIL·compatible output used in conjunction with Acknowledge A the CS/TxAKB line to select the channel to be strobed for transfer, and to give the DMA end signal. In the two·channel mode, only TxAKA Is used to select channel 0 or 1, and CSlTxAKB is always an input. TxRQo-TxRQ3 32-29 Transfer Request Each of the four channels has its own hlgh·impedance input request for transfer line. The peripheral controller requests a transfer by setting its TxRQ line high (a logic 1). The lines are sampled according to the priority and enabling established in the priority control register. In the. halt staal mode, and the first byte of the halt burst mode, the TxRQ signals are tested on the positive edge of E and the highest priority channel is strobed. Once strobed, the TxRQs are not tested again until that channel's data transfer is finished. In the succeeding bytes of the halt burst mode transfer, the TxRQ Is tested on the negative edge of E, and data is transferred on the next E cycle if the TxRQ signal is high. TxSTB 34 Transfer Strobe This output signal is an acknowledgement to the peripheral controller, and controls transfer of data to or from memory. The tran.sfer strobe is also used as the VMA signal in the DMA mode. In a one-channel system, TxSTB can be inverted and run to the peripheral controller acknowledge input. In a two· or four· channel system, TxSTB enables the depode of TxAKA and CSlTxAKB to select the device controller to be acknowledged. Power Voo 20 Power Supply Nominal +5 Vdc Vss 1 Ground Common power and signal return 5·136 F6844 DMAC Register Descriptions Bit 3, Address UplDown- Bit 3 controls the change in the address register for each DMA cycle. If this bit is The 15 registers in the DMAC are read/write registers, low, the address register is incremented each time the although some of the bits are read-only status bits. byte count register decrements. If the bit Is high, the address register is decremented. Address Registers Each channel has its own individual 16-bit address Bit 8, Busy/Ready Flag-The busy/ready flag is a read- register. Before a DMA transfer Is begun, the starting only status bit that indicates a DMA transfer Is in address for the transfer must be loaded into the address process on that channel. This bit goes high at the register. Depending on the state of bit 3 of the channel beginning of the transfer and remains high until the control register, the address register Is decremented or IRQ/DEND has been low for one cycle (DMA end). The bit incremented after each byte transfer. is then reset and the channel can again be configured for transfer. Byte Count Registers Each channel also has its own byte count register. Bit 7 DMA End (DEND) Flag- The DEND bit indicates Before the DMA transfer, this register must be loaded that a DMA block transfer has ended. This bit Is set at with the number of bytes to be transferred. Since it is 16 the same time the busy/ready flag is reset. The DEND bit bits in length, the transfer can be up to 65,536 bytes of is reset by the MPU reading the channel control.register. data. The byte count register is decremented at the This bit causes an interrupt if enabled In the Interrupt beginning of each DMA cycle. control register. Channel Control Registers Priority Control Register The control of each channel's DMA transfer is The priority control register establishes priority and programmed into its channel control register. Bits 4 and enables the transfer requests. Bits 4, 5, and 6 5 are unused. are unused. Bit 0, ReadlWrlte (RIW)- The direction of the DMA Bits 0-3, Request Enable (REo_3) - The four channels are transfer is controlled by this bit. When It Is high, the individually enabled by setting the respective RE bit high. peripheral controller reads the memory. When it is low, A low on any of these bits disables recognition of the the transfer is in the opposite direction, thus writing into transfer request for that channel. The bit number the memory. The system RlW line is in the same state as represents the channel number; e.g., bit 2 is channel 2. this RIW bit in the DMA mode. The device controller must change the sense of its RiW input during the Bit 7, Rotate Control- The DMAC priority service routine DMA mode. is selected by this rotate control bit. When it is low, the fixed mode Is selected. Channel 0 has the highest Bit 1, BurstiSteal- This bit, along with bit 2, selects the priority, channel 1 the next highest, etc. When this bit is mode of the DMA transfer. With bit 1 high, the burst high, a rotating routine is used: initially, It Is the same as mode is selected. A low selects the steal mode. in the fixed mode, but once a channel has been serviced, it moves to the lowest priority and those that were below B2, TSC/Halt- This bit helps select the mode of DMA It advance to the next higher priority. transfer. When the bit is high, the TSC mode Is selected. When low, the halt mode is selected. A TSC burst mode Interrupt Control Register is Illegal for F6800-family processors due to restrictions An Interrupt Is caused by a channel completing its DMA on 1 clock stretching for these products. block transfer. The DEND (channel control register bit 7) flags this condition for each channel. Bits 4, 5, and 6 The mode selection for bits 1 and 2 is as follows: are unused. Blt2 Bit 1 DMA Transfer Mode Bits 0-3, iRO/DEND Enable (DIEo_3)-Each channel is o o Halt Steal 0 separately enabled to cause the interrupt. A high enables o 1 Halt Burst an interrupt from the channel; a low masks the interrupt. 1 o TSC Steal The bit number corresponds to the channel number; e.g., 1 1 (Illegal) bit 2 is channel 2. 5-137 F6844 Bit 7, iRO/DEND Flag-This read-only bit Indicates an CS/TxAKB becomes a chip select in the MPU mode and a IRQ is requested of the MPU when the signal is high_ If transfer acknowledge B in the DMA mode. With bit 3 low, the Interrupt Is enabled (DIE Is a 1) when a channel's the two-channel mode is selected, and the CS/TxAKB DEND flag (channel control register bit 7) goes high, the line is always a chip select, both for the MPU and the IRQ/DEND flag bit also goes high_ It is reset by the MPU DMA mode. reading the channel control register that caused the interrupt. Initialization During a power-on sequence, the DMAC'is reset through Data Chain Register the RES input. All registers, except the address and byte Repetitive reading or writing of a block of memory can count, are set to a logic 0 state. This disables all be done in the data chain function. A DMA transfer requests and the data chain function, while masking all cannot be active on channel 3 during the data chain. Bits interrupts. The address, byte count, and channel control 4 through 7 are unused. registers must be programmed before the respective transfer request bit is enabled in the priority Bit 0, Data Chain Enable (DCE)- The data chain function control register. Is enabled when this bit is high. Transfer Modes Bits 1 and 2, Data Chain Channel Select A, B (DCA, Three methods are used for a DMA transfer, determined DCB)- The channel updated by data chaining Is selected by the data transfer rate required, the number of by bits 1 and 2 as follows: channels attached, and the hardware complexity allowable. Refer to Figure 2 (TSC Steal Mode), Figure 3 DCB Bit2 DCABit1 Channel #I (Halt Steal Mode), and Figure 4 (Halt Burst Mode) for an illustration of the three DMA transfer methods. 0 0 0 0 1 1 Two of the modes, TSC steal and halt steal, are 1 0 2 accomplished by cycle stealing from the MPU. Cycle 1 1 (Illegal) stealing, in the TSC steal mode, is initiated by the DMAC bringing the DRQT line low. This line goes to the system The data chain function is performed by transferring the clock driver, which returns a high on DGRNT on the contents of channel 3 address and byte count registers rising edge of the system 1 clock. The DGRNT signal into the respective registers of the. channel selected by must cause the address control and data lines ·to go to bits 1 and 2. The transfer occurs during the cycle of E the high-impedance state, at wtiich time the DMAC following the byte count register having decremented supplies the address from the address register of the to zero. requesting channel. It also supplies the RIW signal as determined from the channel control register. After one Bit 3, Two/Four Channel Select (2/4)- Bit 3 configures byte is transferred, control is restored to the MPU. This the DMAC to handle two or four channels. When high, method stretches the 1 and 2 clocks while the DMAC this bit selects the four-channel mode, in which the uses the memory (see Figure 5). 5-138 F6844 Fig. 2 TSC Steal Mode Timing E MPU TxRQ _ _miil.'il.iJii.tmV DGANT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- J TxAKA • TxAKB Ao·A1S. RJ\jj-----------------\..~------~>--------------------- Ao.A4.RftN_~~_ _ _ __l~______~--_t------r_-~'----~~------L~----~~ 5·139 F6844 Fig. 3 Halt Steal Mode Timing E DMA ~~~ TxAQ DGANT TxAKA / \ TxAKB ,. \ / X X X / \ X X X X X X X \ ... _-- ~/ \ ... _----------- 5·140 F6844 Fig. 4 Halt Burst Mode Timing TxRQ DGRNT TxAKA • ------'---+----+---+----+---"--- TxAKB A Ao- 15,RtW -------------------1c===lx===t===j::>--------- Ao·A•• RJW ===============}---1~-'---+----t-----1-----~C=== The second mode employing cycle stealing is the halt activity and is removed from the system while the DMAC steal mode. This method actually halts the MPU instead uses the memory. of stretching the rJ>1 clock for the transfer period. This mode Is initiated by the DMAC bringing the DRQH line The third mode of transfer Is the halt burst. This mode is low. This line connects to the MPU HAIT input. The MPU similar to the halt steal mode, except that the transfer bus available (BA) line is the DGRNT input to the DMAC. does not stop with one byte. The MPU is halted while an While the MPU is halted, its address bus, data bus, and entire block of data is transferred. When the channel RlW lines are In the high-Impedance state. The DMAC byte count register equals zero, the transfer IS complete supplies the address and Rm line. After one byte is and control Is returned to the MPU. This mode gives the transferred, the HALT line Is returned high and the MPU highest data transfer rate, at the expense of the MPU regains control. In this mode, the MPU stops internal being Inactive during the transfer period. 5-141 _. _.- . - ----~. F6844 Fig. 5 Flowchart of DMAC Operation WAIT FOR TxRQ INPUT CHECKEDES WAIT FOR r-~----I TxRQ INPUT BURST MODE 5·142 F6844 DMAC Programming Model The following programming model outlines channel preparation for DMA transfer, request enabling, data chain register programming, and register descriptions (see Table 2). Table 2 DMAC Programming Model Address Register Content Register (Hex) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Channel 1x· DMA End Busy/Ready Not Not Address TSCI Burstl Read/Write Control (DEND) Flag Used Used Up/Down Halt Steal (R/W) Flag Priority 14 Rotate Not Not Not Request Request Request Request • Control Control Used Used Used Enable #3 Enable #2 Enable #1 Enable #0 (RE 3) (RE2l (RE 1) (REo) Interrupt 15 IRQIDEND Not Not Not IRQ/DEND IRQ/DEND IRQ/DEND IRQ/DEND Control Flag Used Used Used Enable #3 Enable #2 Enable #1 Enable #0 (DIE 3l (DIE2l (DIE 1) (OlEo) Data Chain 16 Not Not Not Not Two/Four Data Chain Data Chain Data Chain Used Used Used Used Channel Channel Channel Enable Select (214) Select B Select A 'The x represents the binary equivalent of the channel desired. Channel Control Register RE o_3 Bits 0-3-High=enable transfer request for the channel; low = request disabled. Bit 7 - Is set at end of DMA block transfer; reset by MPU reading the channel Interrupt Control Register control register. IRQIDEND Bit 7- This flag is set by DEND in channel Busy/Ready Bit 6- Status bit set when in transfer; Flag control registers when enabled; Flag cleared after DMA end. reset by reading the register that caused it to be set. Address Bit 3- High = decrement address register UplDown for each byte; low = increment. DIE O_3 Bits 0-3- High = enable IRQ by DEND for the channel; low= IRQ masked. TSC/Halt Bit 2- High = select TSC mode; low = halt modes. Data Chain Register Burst/Steal Bit 1- High = select burst mode; Two/Four Bit 3- High = 4-channel mode; low = 2- low = steal modes. Channel channel. Bit 0- High = device controller reads Data Chain Bits 2, 1- Binary equivalent of channel to memory; low = write into memory. Channel be updated by chaining. Select Priority Control Register Data Chain Bit 0- High = enable data chain function; Rotate Bit 7 - High = use rotate routine; Enable low = disabled. Control low = fixed: 0, 1, 2. 3 priority. 5-143 F6844 Preparation of a channel for a DMA transfer requires: The two B·bit bytes that form the registers in Table.3 are placed in consecutive memory locations, making it 1. Load the starting address into the address register. very easy to use the MPU index register in programming 2. Load the number of bytes into the byte count register. them. . 3. Program the channel control register for the transfer characteristics: direction (bit 0), mode (bits 1 and 2), Table 3 Address and Byte Count Registers and the address update (bit 3). Register Channel Address (Hex) The channel is now configured. To enable the transfer Address High 0 0 request, set the appropriate enable bit (bits 0-3) of the Address Low 0 1 priority control register, as well as the rotate control bit. Byte Count High o. 2 Byte Count Low 0 3 If an Interrupt on DEND is desired, the enable bit (bits Address High 1 4 0-3) of the Interrupt control register must be set. Address Low 1 5 Byte Count High 1 6 If data chaining for the channel Is necessary, It Is Byte Count Low 1 7 programmed into the data chain register and the Address High 2 B appropriate data must be written into the address and Address Low 2 9 byte count registers for channel 3. Byte Count High 2 A Byte Count Low 2 B A comparison of the response times and maximum transfer rates Is shown below. The values shown are for Address High 3 C a system clock rate of 1 MHz. Address Low 3 D Byte Count High 3 E Maximum Byte Count Low 3 F Response Time Transfer Rate Mode (,is) (,is/byte) Halt Burst 3.5-15.5' 1 Halt Steal 3.5-15.5' 5-15' TSC Steal 2.5-3.5 4 'These values depend upon the cycle In process. 5·144 F6844 System Description Fig. 6 One-channel Operation IRQ (OPEN COLLECTOR) The DMAC hardware configuration is designed for a one-, two-, or four-channel system. IRQ, DEND, TxAK Generation Derivation of the IRQ, DEND, and TxAK signals for one-, DGRNT ~>-I>o-...J two-, and four-channel DMA is shown in Figures 6, 7, and 8. The IRQ signal, if enabled, is asserted by the DMA to DEND, interrupt the MPU whenever a DMA block transfer is T,5TB I--~I>o---+--==-_ T,AKa completed. The TxAK signal is asserted during each DMA cycle and is used to handshake with a peripheral controller each time a DMA byte transfer occurs. The TxAKA NC DEND signal is used to handshake with a peripheral • controller each time a DMA block transfer is complete. Each circuit uses DMA GRANT to demultiplex the IRQIDEND DMAC output to ensure that the system IRQ Fig. 7 Two-channel System is asserted at the proper time, only during M PU operation. Whenever DMA GRANT is high, IRQ ii\Q (OPEN COLLECTOR) is negated. The circuits also generate DEND and TxAK for the proper channel, gated by TxSTB. DGRNT DEND, The one-channel DMA mode requires no channel IRQIDEND DEND, decoding, so for this mode TxAK is derived from TxSTB TxSTB TxAKo directly, and TxSTB is used to demultiplex thl? IRQIDEND output for DEND generation. TxAK1 T,AKA The two-channel mode circuit is similar to the one- CSrrxAKB cs channel circuit but uses TxAKA to identify the active channel and generate the appropriate channel signal. Fig. 8 Four-channel System IRQ (OPEN COLLECTOR) DGRNT IO--t:)o-......- - - i - - f - - + - T , A K , T,AKA\----4-J IO--t::)o------ :J: Z !.. U::::i ~ :I: ~ ~ :3 (/) ~ ~ ~ ~ 0:1 ."....~ 5ii: ~ ::! DISPLAY PERIOD ii: ~ u. ~ o u. a: o w ffi ; II> ::> ~ z z L L TOTAL SCAN LINE ADJUST (Nadj) VERTICAL RETRACE PERIOD 5-159 "TI G c Cil CD o a :J: o ::l. ~ HORIZONTAL TOTAL (RO) 1 4 t : - - - - - - - - - - - - - -....: ( N h I + l ) X l , - - - - - - - - - - - - - - - - - - - I : 1 Ii Fie -, HORIZONTAL DISPLAY (Rl)N.. x t, HORIZONTAL RETRACE :! 3 :r ra ClK , I I MAO-MAW ~~~~~~--~--~--~ , , ,, ., Nhd- 1 , , , CHARACTER iI ! 0 ~"""'I-N-hd---l .....;--.;---i-~ ;-!-N- .. Nh.p -1, Nh,p ~ ~ Nh. , I 14 HS PULSE WIDTH (R3)-.j I I HORIZONTAl SYNC POSITION (R2) I Nhsw x Ie I ~ HS' , FRONT PORCH (SYNC DELAy) BACK PORCH (SCAN DELAy) g ,- ., "TI E DISI'ENI ~~~------, en "~----~ Nota Timing is shown for first displayed scan row only. The initial MA is determined by the contents of start address register R1ZR13. Timing is shown for R1ZR 13 = O. F6845 Figure 9 CRTC Vertical Timing IF =(Nyt ~~~~ 'fI~:.dl )( t~1 j . - - - - - - - - - - - - - - - - - - V E R T I c A L TOTAL (R4) + VERTICAL TOTAL ADJUST ( R S ) - - - - - - - - - - - - - - - - - . j VERTICAL R E T R A C E - - - - - - - - - - - - - + i RAO·RA4 "I" SINTERL~CJ~--~r-~~~~~~-u----~~-,r---~~r-u----u----~~-,r---~~r-u---~~~~--~~---u~r-'r----u SVNC AND vlg~~ ~,~~~ ~1-=-~~~-';I....--~~~~=~-'Ir_~,....~~~..1~,....--'\'_."...,...II-''r_.I\..--..J'-~~....",,,_~.4,,_...III....--+_,...J'-......J\----~ I MAO·MA13*· I I I (N"'d-1r)(Nhd+~ht I VERTICAL SCAN DELA V I I vs I I (Even Field) I I • \ •i •i I I Vs l I I I r- .4 r- "~1I (Odd Flold) I I I I i , , i I i I •i I I I I I I DISPL~~ ENABLE h.r~~1 ~ •i •, * , , '"> • Nht must be an odd number for both interlace modes. ··Inltlal MA is determined by Rl21R13 (start address register), which Is zero in this timing example. •• oN sl must be an odd number for Interlace sync and video mode. Not••: 1. Refer to Figure 2 • The odd field Is offset V. horizontal scan time. 2. Timing values are described In Table 9. 3. Vertical sync pulse width can be programmed from 1 to 16 scan line times for the MC6645 1. * 5-161 F6845 Horizontal Total Register (RO)· This 8·bit write·only register Horizontal Timing Summary· The difference between RO and determines the horizontal sync (HSYNC) frequency by defin· R1 is the horizontal blanking interval (refer to figure 8). This ing the period in character times. It is the total of the interval in the horizontal scan period allows the beam to displayed characters plus the nondisplayed character times return (retrace) to the left side of the screen. The retrace (retrace) minus one. time is determined by the monitor's horizontal scan com- ponents. Retrace time is less than the horizontal blanking Horizontal Displayed Register (R1)· This 8·bit write-only interval. register determines the number of displayed characters per line. Any 8-bit number can be programmed so long as the A good rule of thumb is to make the horizontal blanking contents of RO are greater than the contents of R1. about 20% of the total horizontal scanning period for a CRT. In inexpensive TV receivers, the beam overscans the Horizontal Sync Position Register (R2) ·.This 8-bit write·only display screen so that aging of parts does not result in register controls the horizontal sync position, which defines underscannlng. Because of this, the retrace time should be the horizontal sync delay (Front Porch) and the horizontal about one-third the horizontal scanning period. The horizon- scan delay (Back Porch). When the. programmed value of tal sync delay, HS pulse width, and horizontal scan delay this register is increased, the display on the CRT screen is are typically programmed with a 1:2:2 ratio. shifted to the left. When the programmed value is decreas- ed, the display is shifted to the right. Any 8·bit number can Vertical Total Register (R4) and Vertical Total Adjust be programmed if the sum of the contents of R1, R2, and Register (RS) - The frequency of the VS pulse is determined R3 is less than the contents of RO. by both the R4 and R5 registers. The calculated number of character line times is usually an integer plus a fraction to Sync Width Register (R3)· This 8-bit write-only register deter- get exactly a 50 or 60 Hz vertical refresh rate. The integer mines the width of the vertical sync pulse and the horizon- number of character line times minus one is programmed tal sync pulse for the F6845A CRTC. The vertical sync pulse in the 7-bit write-only vertical total register (R4). The fraction width is fixed at 16 scan line times for the F6845, and the of character line times is programmed in the 5·bit write-only upper four bits of this register are treated as "don't cares". vertical total adjust register (R5) as a number of scan line times. The F6845A allows control of the VS pulse width for one to sixteen scan line times. Programming the upper four bits Vertical Displayed Register (R6) - This 7-~it write-only register for one to fifteen selects pulse widths from one to fifteen specifies the number of displayed character rows on the scan line times. Programming the upper four bits as zeros CRT screen and is programmed in character row times. Any selects a VS pulse width of 16 scan line times, allowing number smaller than the contents of the R4 register can be compatibility with the F6845. programmed into the R6 register. For both the F6845 and the F6845A, the HS pulse width can Vertical Sync Position Register (Rn· This 7-bit write-only be programmed from one to fifteen character clock periods, register controls the position of vertical sync with respect thus allowing compatibility with the HS pulse width to the reference. It is programmed in character row times. specifications of many different monitors. If zero is written The value programmed in the register is one less than the into this register, then no horizontal sync is provided. number of computed character line times. When the pro- grammed value of this register is increased, the display This horizontal width must be programmed because, were it position of the CRT screen is shifted up. When the pro- fixed as an integral of character times, it would vary with grammed value is decreased, the display position is shifted the character rate and be out of tolerance for certain down. Any number equal to or less than the vertical total monitors. (register R4) can be used. Table 3 Cursor and DE Skew Control Table 4 Interlace Mode Register Value Skew Bit 1 Bit 0 Mode 00 No Character Skew 0 0 Normal Sync Mode (Non-Interlace) 01 One Character Skew 1 0 Normal Sync Mode (Non-Interlace) 10 Two Character Skew 0 1 Interlace Sync Mode 11 Not Available 1 1 Interlace Sync and Video Mode 5-162 F6845 Figure 10 Interlace Control SCAN LINE ADDRESS SCAN LINE ADDRESS SCAN LINE ADDRESS 0--------------- --------0 0_-& _ _ _ _ -&_1 0 0 1 0 0 2 0 0 2 -~----3"- 1 --&-----&-3 0 0 --&-----&-2 4 _~~-O-~~- 5 0 0 o --&-----&- 3 0 o 0 --&-----&- 7 0 0 0 0 0 4 0<>000 0 0 5 - -& ~ --o---G- -& - 4 0 -& --------1 0 0 6 --&-----&- 5 0 0 --------3 0 0 7-~----~-6 --------5 --&-----&-7 --------7 EVEN ODD EVEN ODD FIELD FIELD FIELD FIELD • (a) NORMAL SYNC (b) INTERLACE SYNC (e) INTERFACE SYNC AND VIDEO Interlace Mode and Skew Register (R8) . The F6845 only In addition, the programming of the CRTC registers for allows control of the interlace modes as programmed by interlace operation has the following restrictions. the low order two bits of this write·only register. The F6845A controls the interlace modes and allows a program· F6845 Programming Restrictions mabie delay of zero to two character clock times for the 1. The horizontal total register value, RO, must be odd display enable (DE) and cursor outputs. Table 3 describes (i.e., an even number of character times). operation of the cursor and DE skew bits. Cursor skew is controlled by bits 6 and 7 of Register RB, while DE skew is 2. For interlace sync and video mode only, the max- controlled by bits 4 and 5. Table 4 shows the available in· imumscan line address, R9, must be odd (i.e., an terlace modes; these modes are selected using the two low even number of scan lines). order bits of this 6·bit write·only register. In the normal sync mode (non·interlace), only one field is available, as shown in 3. For interlace sync and video mode only, the vertical figures 1 and 10 (a). Each scan line is refreshed at the displayed register, R6, must be even. The program· VSYNC frequency (e.g., 50 or 60 Hz). med number, Nvd, must be one-half the actual number required. The even-numbered scan lines are Two interlace modes are available, as shown in figures 2, 10 displayed in the even field and the odd-numbered (b) and 10 (c). The frame time is divided between even and scan lines are displayed in the odd field. odd alternating fields. The· horizontal and vertical timing relationship VSYNC delay.ed by one·half scan line time) 4. For interlace sync and video mode only, the cursor results in the displacement of scan lines in the odd field start register, R10, and cursor end register, R11, must with respect to the even field. both be even or odd, depending in which field the cursor is to be displayed. In the interlace sync mode, the same information is painted in both fields, as shown in figure 10 (b). This is a useful F6845A Programming Restrictions mode for filling in a character to enhance readability. 1. The horizontal total register value, RO, must be odd (i.e., an even number of character times). In the interlace sync and video mode, shown in figure 10 (c), alternating lines of the character are displayed in the even 2. For the interlace sync and video mode only, the ver- field and the odd field. This effectively doubles the given tical displayed register, R6, must be even. The pro· bandwidth of the CRT monitor. grammed number, Nvd, must be one-half the actual number required. To avoid an apparent flicker effect, care must be taken when using either interlace mode. This flicker effect is due Maximum Scan Line Address Register (R9) . This 5-bit write· to the doubling of the refresh time for all scan lines, since only register determines the number of scan lines per each field is displayed alaernately and can be minimized character row, including the spacing, thus control· with proper monitor design (e.g., longer perSistence ling operation of the row address counter. The programmed phosphors). value is a maximum address and is one less than the number of scan lines. 5·163 F6845 Figure 11 Cursor Control Table 5 Cursor Start Register ION I I OFF I I ON I Bit 6 Bit 5 Cursor Display Mode 0 0 Non-blink -...: :'-BLINK PERIOD= I I 16 OR 32 TIMES 0 1 Cursor Non-clisplay FIELD PERIOD 1 0 Blink, 1116 Field Rate 1 1 Blink, 1/32 Field Rate !- !- Example of Cursor DIsplay Mode t. t. 11 CURSOR START ADR. =9 CURSOR END ADR. = 9 11 CURSOR START ADR.=9 CURSOR END ADR. = 10 CURSOR START ADR.=1 CURSOR END ADR. = 5 Cursor Control Registers-Cursor movement is controlled by Start Address and Light Pen Registers the following four registers. The following 14·bit registers control the start address and Cursor Start Register (R10) and Cursor End Register light pen. (R11) - These registers allow a cursor of up to 32 scan lines in height to be placed on any scan line of the character Start Address Register (R12·H. R13-L) - This 14·bit write- block, as shown in figure 11. Register R10 Is a 7-bit write- only register pair controls the first address by the CRTC only register used to define the start scan line and the cur- after vertical blanking. It consists of an 8-blt low order sor blink rate. Bits 5 and 6 of the cursor start address (MAO - MA7) register and a 6·bit high order (MAs - MA13) register control the cursor operation, as shown in table 5. register. The start address register determines which por- Non-clisplay, display, and two blink modes (16 times or 32 tion of the refresh RAM is displayed on the' CRT screen. times the field period) are available. Register R11 is a 5·bit Because the CRTC linear address generator counts from write-only reglsterthat defines the last scan line of the this beginning count, the displayed portion of the screen cursor. may be a window on any continuous string of characters within a 16 block of refresh memory. Hardware scrOlling by Bit 5 is the blink timing control; when it is low, the blink characters, line, or page can be accomplished by centering frequency Is 1/16 of the vertical field rate, and when It is the R121R13 pointer in the middle of the available high, the blink frequency is 1132 of the vertical field rate. Bit memory space. 6 is used to enable a blink The cursor start scan line Is set by the lower five bits. Light Pen Register (R16-H, R17·L)· This 14-bit read-only register pair captures the refresh address output by the When an external blink feature on characters is required, it CRTC on the positive edge of a pulse input to the LPSTB may be necessary to perform cursor blink externally so that pin. It consists of an 8-blt low order (MAo-M~) register and both blink rates are synchronized. Note that an In- a 6·blt high order (MAo-MA1:Y register. Since the light pen vertinonlnvert cursor is easily implemented by programming pulse is aynchronous with respect to refresh· address tim· the CRTC for a blinking cursor and externally Inverting the ing, an internal synchronizer is designed into the CRTC. video signal with an excluslve-OR gate. Due to delays in this circuit, the value of R16 and R17 need to be corrected in software. (See the bus timing diagram in Cursor Register (R14-H, R15-L) - This 14-blt readlwrite the Timing Characteristics section). Figure 12 shows an register pair is programmed to position the cursor anywhere interrupt-driven approach, although a polling routine could in the refresh RAM area, thus allowing hardware paging and be'used. scrolling through memory without loss of the original cur- sor position. It consists of an 8-bit low order (MAo - MA7) register and a 6-blt high order (MAs - MA1:Y register. 5-164 F6845 Figure 12 Light Pen Interface MPU CRTC LIGHT PEN CRTC Initialization The bus timing test load is shown in figure 16; figure 17 il- lustrates the CRTC timing, and figure 18 illustrates the II Registers RO-R15 must be initialized after the system power CRTC clock, memory addressing, and light pen timing. All is turned on. The processor normally loads the CRTC signal timing characteristics are given in the "Timing register file sequentially from a firmware table, after which, Characteristics" section of this data sheet. in most systems, RO-R11 are not changed. The worksheet of table 6 is useful in computing proper register values for Additional CRTC Applications the CRTC. Table 6 shows the worksheet completed for an 80 x 24 configuration using a 7 x 9 character generator, The foremost system function that can be performed by the and figure 13 shows an F6800 program that could be used CRTC is the refreshing of dynamic RAM. This is quite to program the CRT controller. The programmed values simple, as the refresh addresses run continually. allow use of either an F6845 or an F6845A CRTC. Note that the LPSTB input signal can be used to support The CRTC registers have an initial value at power up. When additional system function other than a light pen. A digital- using a direct drive monitor (without horizontal oscillator), to-analog converter (DAC) and comparator could be con- these initial values can result in out-of-tolerance operation. figured to use the refresh addresses as a reference to a The CTRC programming should be done immediately after DAC composed of a resistive adder network connected to a power up, especially in this type of system. comparator. The output of the comparator generates the LPSTB input signal, signifying a match between the refresh CRT Interface Signal Timing address analog level and the unknown voltage. Timing charts of CRT interface signals are illustrated with The light pen strobe input could also be used asa the aid of a programmed example of the CRTC. When character strobe to allow the. CRTC refresh addresses to values listed in table 7 are programmed into the CRTC con- decode a keyboard matrix. Debouncing would need to be trol registers, the device provides the outputs as shown in done in software. the timing diagrams (figure 8, 9, 14, and 15). The screen for- mat of this example is shown in figure 7, which illustrates Both the VS and HS signal outputs can be used as a real- the relation between refresh memory address (MAQ-MA13), time clock. Once programmed, the CRTC provides a stable row address (RAQ-RA4), and the position on the screen. In reference frequency. this example, the start address is assumed to be zero. 5-165 F6845 Table 6 Worksheet for 80 x 24 Formal Display Formal Worksheet I. Displayed Characters per Row 80 Char. 2. Displayed Character Rows per Screen 24 Rows 3. Character Matrix a. Columns 7 Columns b.Rows 9 Rows 4. Character Block a. Columns 9 Columns b.Rows 11 Rows 5. Frame Refresh Rate 60 Hz 6. Horizontal Oscillator Frequency 16,600 Hz 7. Active Scan Lines (Line 2 x Line 4b) 264 Lines 8. Total Scan Lines (Line 6 + Line 5) 310 Lines 9. Total Rows Per Screen (Line 8 + Line 4b) 28 Rows and 2 Lines 10. Vertical Sync Delay (Character Rows) Rows 11. Vertical Sync Width (Scan Lines, 16) 16 Lines 12. Horizontal Sync Delay (Character Times) 6 Character Times 13. Horizontal Sync Width (Character Times) 9 Character Times 14. Horizontal Scan Delay (Character Times) 7 Character Times 15. Totai Character Times (Lines 1 + 12 + 13 + 14) 102 Character Times 16. Character Rate (Line 6 times 15) 1.8972 M MHz 17. Dot Clock Rate (Line 4a times 16) 17.075 M MHz CRTC Registers Oeclmat Hex RO Horizontal Total (Line 15 minus 1) 101 65 R1 Horizontal Displayed (Line 1) 80 50 R2 HOrizontal Sync Position (Line 1 + Line 12) 86 56 R3 Horizontal Sync Width (Line 13) 9 9 R4 < Vertical Total (Line 9 minus 1) 24 18 R5 Vertical Adjust (Line 9 Lines) 10 OA R6 Vertical Displayed (Line 2) 24 18 R7 Vertical Sync Position (Line 2 + Line 10) 24 18 R8 Interlace (00 Normal, 01 Interlace o 03 Interlace, and Vidio) R9 Max. Scan Line Add (Line 4b minus 1) 11 B R10 Cursor Start o o R11 CurSor End 11 B R12, R13 Start Address (H and L) 128 00 80 R14, R15 Cursor (H and L) 128 00 80 5·166 F6845 Figure 13 F6800 Program for CRTC Initialization Page 001 CRTC INIT. SA:O F6845/F6845·1 CTRC Initialization program 00001 NAM F6845 00002 TIL F6845·1 CRTC initialization program 00003 OPT G,S,llE=85 print FCB's, FOB's & XREF table 00004 ****************************************** 00005 "Assign CRTC addresses 00006 00007 CRTCAO EQU $9000 Address Register 00008 CRTCRG EQU CRTCAO + 1 Data Register 00009 00010 ****************************************** " Initialization program 00011 oo012A 0000 00013A 0000 5F 00014A 0001 CE 1020 A oo015A 0004 F7 9000 A CRTC1 ORG ClRB lOX STAB 0 #CRTIAB CRTCAO a place to start clear counter table pOinter load address register II 00016A 0007 A6 00 A lOAA O,X get register value from table ooo17A 0009 B7 9001 A STAA CRTCRG program register oo018A OOOC 08 INX increment counters ooo19A 0000 5C INCB 00020A oooE C1 10 A CMPB $10 finished? ooo21A 0010 26 F2 0004 BNE CRTC1 no: take branch oo022A 0012 3F SWI yes: call monitor 00023 00024 ****************************************** " CRTC register initialization table 00025 00026A 1020 ORG $1020 start of table 00027A 1020 65 A CRTIAB FCB $65,$50 RO, R1 . total & H displayed A 1021 50 A 00028A 1022 56 A FCB $56,$09 R2, R3 • pos. & HS width A 1023 09 A 00029A 1024 18 A FCB $18,$OA R4, R5 . V total & V total adj. A 1025 OA A 00030A 1026 18 A FCB $18,$18 R6, R7 . V displayed & VS pos. A 1027 18 A 00031A 1028 00 A FCB $OO,$OB R8, R9· Interlace & Max scan line A 1029 OB A 00032A 102A 00 A FCB $OO,$OB R10,R11 . Cursor start & end A 102B OB A oo033A 102C 0080 A FOB $0080 R12,R13 • Start Address 00034A 102E 0080 A FOB $0080 R14,R15· Cursor Address 00035 END Total Errors 00000-00000 CRTCl 0004 CRTCAO 9000 CRTCRG 9001 CRTIAB 1020 5·167 F6845 Table 7 Values Programmed Into CRTC Registers Reg,,, Register Name Value Programmed Value Ra Horizontal Total Nht +1 Nht R1 Horizontal Displayed N hd N hd R2 Horizontal Sync Position N hsp N hsP R3 Horizontal Sync Width N hsw N hsw R4 Vertical Total N vt + 1 N vt R5 Vertical Scan Line Adjust Nsdj Nadj R6 Vertical Displayed Nvd N vd R7 Vertical Sync Position Nvsp Nvsp RS Interlace Mode R9 Max. Scan Line Address Nsl Nsl R1a Cursor Start 1 R11 Cursor End 3 R12 Start Address (H) a R13 Start Address (L) a R14 Cursor (H) a R15 Cursor (L) 2 R16 Light Pen (H) R17 Light Pen (L) Figure 14 Cursor Timing Diagram RAO·RA4' ~,-_ _ _~_ _ _ _~~_ _ _ _-:--_ _ _ _I~I_ _ _ _~_----', 1 1 1 1 1 1 I Nhd+1 I Nhd+2 I 1 1 1 I 1 1 CHARACTER ROW. ~I--+---1I--+--+-+--+-~I--+--+--+--+:--t-:_-+:__I-~ 1 1 I I 1 CHARACTER. r-i -,...----;-.1 --j-J.": i ":ri--';"'-"'--;.i---i-'i~ I......:---I--:---!-I~2-f-J":r-'-~Nht--'--:--'""""":--+-~2-!-'1": Nht 1 2 1~ 1 1 1 I 1 I 1 1 CURSOR --_.... ~ ______~r-l r-l~ ____ "Timing Is shown for non·lnterlace and interlace sync modes. Example shown has cursor programmed as Cursor Register = N hd + 2 Cursor Start = 1 Cursor End =3 "The initial MA is determined by the contents of start address register, RI2JRI3. Timi·ng is shown for R12/13 =0 5·168 F6845 Figure 15 Refresh Memory Addressing (MAo - MA1:V Timing Diagram a: ~ w u §r_----------------~H~O~R='Z=O~NT~A=L~O~IS=P~~~y~----------------_.r_--------HO~R~I~ZO~N~T~A~L_R~ET~R~A~CE~IN_o_n._.;~sp_'a~YI~______, "hxo ~I~ ua: 01 r0 1 . Nhd -1 Nfd . Nf' N. I o Nh. 1 Nhd + 1 •· Nhd -1 2XN~d 1 Nhd 2XNhd .• Nhl Nhd + Nht >- ~ '1 N. I o Nhd 2X1hd Nhd+ 1 2XNhd + 1 .... 2XN~d 1 3XNhd 1 2XNhd 3Xrhd .· Nhd + Nhl 2Nhd + Nht !!l ...c 2\ Ns I 2XNj,d + 1 .. . 2Nhd + Nht "~ 2XNhd 3XNhd - 1 3XNhd I I I I I • ffi > (Nvd -1) )( Nhd (Nvd 1»( Nhd+ 1 . Nyd x Nhd+ 1 Nvd)( Nhd . (Nvd - 1) )( Nhd + Nht .• ·. N,.-11 Ns I (Nvd 1) x Nhd (Nyd 1»( Nhd + 1 Nvd + Nhd 1 Nvd xNhd (Nvd 1) )( "Nhd + Nht > o Nvd)( Nhd Nyd x Nhd + 1 (Nvd + 1) .x Nhd 1 Nvd +~»)( Nhd Nyd x Nhd + Nht ~ · · N,.{ '"c Ns I Nyd ~ Nhd Nyt)( Nhd + 1 (Nvd + l)x Nhd-1 (Nvt + 1°) )( Nhd Nyd )( Nhd + Nht :;i: 0 g. w ~ N y !)( Nhd Nvt)( Nhd + 1 (NIII + 1»( Nhd - 1 (NYI +?)( Nhd Ny! x Nhd + Nhl ~ (NYl + 1) ~ Nhd - 1 ... Ny! ~ Nhd (NYl + 1) x Nhd Nyt )( Nj,d + Nht " u ffi NV! + 1 > I 0 Nadj (Ny! + It )( Nhd (Nyt + 1) )( Nhd (NYl + 1) r + Nhd (Nyt + 1) ~ Nhd + 1 1 (N yt +2»( N hd -1 (Nyt+ 2»( Nhd-1 (Nyt + 2) )( Nhd (Nyt + 2) )( Nhd (Ny 1)Nh:d + Nht (Ny 1)Nhd + Nht -1 Note 1: The initial MA is determined by the contents of start register, R12/R13. Timing is shown for R12/R13~0. Only non-interlace and interlace sync modes are shown. Figure 16 CRTC Bus Timing Test Load 5.0V RL =2.4kll TEST POINTo------1"--""""1r-lKI--t C R 1N914 OR EQUIVALENT C= 130 pF for 00-07 30 pF for MAO-MA 13, RAO-RA4, DE, HS, VS, and CURSOR R= 11 kQ for 00-07 24 for All Other Outputs 5-169 F6845 Figure 17 CRTC Timing Dlagrem ClK RAO-RA4 DE HS VS CURSOR Nole: Timing measurements are referenced to and from a low Yoltage of 0.8 yolts and a high Yoltage of 2.0 Yolts unless otherwise noted. Figure 18 CRTC Clock, Memory Addressing, and Light Pen Timing Diagrem 1·........- - - 1 / 1 c - - - -...·~1 ClK MAO-MA13 M M + 2 lPSTB _ _ _---------+-"""'~ l ~~ When the CRTC detects the rising edge of LDSTB in this period; the CATC sets the refresh memory address 'M + 2' into the LIGHT PEN REGISTER. tlPD1,tlPD2: Period of uncertainty for the refresh memory address. Nole: Timing measurements are referenced to and from a low Yoltage of 0.8 volts, and a high voltage of 2.0 volts, unless otherwise noted. 5·170 F6845 Timing Characteristics The signal timing for the CRTC bus is shown in figure 19; ac characteristics for the bus timing are given in table 8, and for the CRTC timing in table 9. Figura 19 CRTC Bus Timing Diagram • Read Data ::jj=~:---___.......!~.!!!df;:=:===3t=====ti=~ Writ. Data :~~:)~_ _ _ _ _ _ _-!MP~U~W~ri~t.~D~.t~._ _ _ _ _ _ _~::::::;t::~ Notes: 1. Voltage levels shown are VL"'0.4 V, VH ;'2.4 V. unless otherwise specified. 2. Measurement points shown are 0.8 V and 2.0 V. unless otherwise specified. Table 8 CRTC Bus Timing Characteristics Ident. F68451 F68A45I F68B451 Unit Number Characteristic Symbol F8845A F68A45A F68B45A Min Max Min Max Min Max 1 Cycle Time t eve 1.0 10 0.67 10 0.5 10 '"'s 2 Pulse Width, E Low PWEL 430 9500 260 9500 210 9500 ns 3 Pulse Width, E High PW"t- 450 9500 260 9500 20 500 ns 4 Clock Rise and Fall Time trotl - 25 - 25 - 20 ns 9 Address Hold Time (RS) tAH 10 - 10 - 10 - ns 13 RS Setup Time Before E t AS 60 - 60 - 40 - ns 14 R/W and CS Setup Time Before E tcs 60 - 60 - 40 - ns 15 R/W and CS Hold Time tcH 10 - 10 - 10 - ns 18 Read Data Hold Time tnHR 20 50- 20 so- 20 SO- ns 21 Write Data Hold Time tnHw 10 - 10 - 10 - ns 30 Peripheral Output Data Delay Time tDDR - 290 - 160 0 150 ns 31 Peripheral Input Data Setup Time tDSIIII 165 - 60 - 60 - ns - The data bus output buffers are no longer sourcing or sinking current by tOHR max (high impedance). 5·171 F6845 Table 9 CRTC Timing Characteristics Characteristic Symbol Min Max. Unit Minimum Clock Pulse Width, Low PWCL 160 - ns Minimum Clock Pulse Width, High PwCH 200 - ns Clock Frequency Ie - 2.5 MHz Rise and Fall lor Clock Input tor,tof - 20 ns Memory Address Delay Time tMAO - 160 ns Raster Address Delay Time tRAO - 160 ns Display Timing Delay Time tOTO - 300 ns Horizontal Sync Delay Time tHSO - 300 ns Vertical Sync Delay Time tvso - 300 ns Cursor Display Timing Delay Time tcoo - 300 ns Light Pen Strobe Minimum Pulse Width PWLPH 100 - ns Light Pen Strobe Disable Time tlPOl - 120 ns tLP02 - 0 ns NoIe: The light pen strobe must fall to low level before the VSYNC.pulse rises. DC Characteristics The DC characteristics lor the F6845 CRTC are presented in table 10. Table 10 CRTC DC Characteristics (Vcc = 5.0 V :!:: 5%, Vss = O·C to 70·C, unless otherwise noted.) Symbol Characteristic Min Typ Max Unit Condition VIH Input High Voltage 2.0 - Vce V Vil Input Low Voltage -0.3 - 0.8 V liN Input Leakage Current - 1.0 2.5 jAA ITSI Three-State (Vce = 5;25 V) -10 2.0 .19 jAA /Vi" =0.4 to 2.4 V) VOH Output High Voltage V (iload =- = 205 jAA) 2.4 - - 00·07 (iload -100 jAA) 2.4 - - Other. Outputs VOL Output Low Voltage - - 0.4 V (iload = 1.6 rnA) Po Power Dissipation - 600 - mW CIN Input Capacitance pF - - 12.5 00·07 - - 10 Ali others CoUT Output Capacitance - - 10 pF All Outputs 5·172 F6845 Absolute Maximum Ratings Stresses greater than those indicated may cause perma· nent damage to the device. These stress ratings only, and functional operation of the F6845 under these or any other conditions above those indicated in this data sheet is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Supply Voltage - 0.3 V, + 7.0 V Input Voltage - 0.3 V, + 7.0 V Operating Temperature O·C, +70·C Storage Temperature - 55·C, + 150·C Ordering Information Speed 1.0 MHz Order Code F6845P,S F6845AP,S F6845CP,CS F6845ACP,CS Temperature Range O·C to + 70·C -40·C to +85·C • 1.5 MHz F68A45P,S O·C to +70·C F68A45AP,S F68A45CP,CS -40·Cto +85·C F68A45ACP,CS 2.0 MHz F68B45P,S O·C to + 70·C F68B45AP,S 5·173 F6845 5-174 F6846 ROM-I/O-Timer Microprocessor Product Description logic Symbol The F6846 combination chip provides the means, in conjunction with the F6802, to develop a basic 2-chip microcomputer system. The F6846 consists of 2048 bytes of mask-programmable Read Only Memory (ROM), C50 an 8-bit bidirectional data port with control lines, and a CS, 16-bit programmable timer-counter. RiW eTO - 0 CTG F6846 This device is capable of interfacing with the F6802 CTC (basic F6800, clock and 128 bytes of RAM) as well as the - 0 RESET IRQ F6800 if desired. No external logic is required to E interface with most peripheral devices. cp, • 2048 8-Bit Bytes of Mask-Programmable ROM • 8-Bit Bidirectional Data Port for Parallel Interface Plus vcc= Pin 29 Two Control Lines • Programmable Interval Timer·Counter Functions • Programmable 1/0 Peripheral Data, Control, and _V_SS_=_p_in_1_____________________________________ J;IIII Direction Registers • Compatible with the Complete F6800 Microcomputer Connection Diagram Product Family 40-Pin DIP • TTL-Compatible Data and Peripheral Lines • Single 5 V Power Supply Vss A. A7 A. Pin Names A6 AlO E Enable (Clock System <1>2) Input As RESET Ao-A10 Address Inputs A4 IRQ CSo, CS1 Chip Select Inputs C50 CP2 RIW ReadIWrite Input CTG Counter Gate Input RiW cp, CTC External Clock Input Do Ao RESET Reset Input 0, A, CP1 Peripheral Interrupt Input CP2 Bidirectional Peripheral Control 02 A2 00-07 Bidirectional Data Lines D, 11 A, PO-P7 Bidirectional Peripheral Data Lines D. Vee CTO Counter Timer Output IRQ Interrupt Request Output D, PI D. P. D1 p, CS, Po CTG p, CTC P2 CTO p, 21 Po (Top View) 5-175 F6846 Typical Microcomputer Vee Vee Vee Vee F6846 IRQ ROM·I/O TIMER MR CSO I-4-'V;.;;M;;;.A'-_ _ _-1 VMA CLOCK E 2K BYTES ROM 10110 LINES RIW F6802 3 TIMER LINES MPU 00-07 XTAL D Ao-A1S Ao-A15 XTAL -= Block Diagram RIW R/W AND iRa E TIMING RESET CONTROL Do 0, 0, 0, DATA BUS D. BUFFERS Os 0, 0, COMPOSITE STATUS 'CSo REGISTER 'CS, Ao A, A, CHIP SELECT, A, MODE & A. ADDRESS INPUTS Cp, AND LOGIC Cp, p, p, P, VSS~ 2048 P. VCC~ BYTE Ps ROM P, p, • Mask Programmable 5·176 F6846 Functional Description Peripheral Control (CP2) may be programmed to act as an interrupt input (setCSR2) or as a Peripheral The F6846 combination chip may be partitioned into Control output. three functional operating sections: programmed storage, timer-counter functions, and a parallel 110 port. Pin Functions Programmed Storage The mask-programmable ROM section is similar to other Bus Interface, ROM products of the F6800 family. The ROM is The F6846 interfaces to the F6800, bus via an 8-bit organized in a 2048 by 8-bit array to provide read-only bidirectional data bus, two chip select lines, a readlwrite storage for a minimum microcomputer system. Two line, and 11 address lines. These Signals, in conjunction mask-programmable chip selects are available for user with the F6800 VMA Output, permit the MPU to control. definition. the F6846. Address inputs Ao-A10 allow any of the 2048 bytes of Bidirec,tional Data Bus (00-07) ROM to be uniquely addressed. Bidirectional data lines The bidirectional data lines (00-07) allow the transfer CIt (00-07) allow the transfer of data between the MPU al")d data between the MPU and the F6846., The data bus the F6846. output drivers are 3-state devices that remain in the high- impedance (OFF) state except when the MPU performs Timer-Counter Functions an F6846 register or ROM read (RMi HIGH and 110 Under software control, this 16-bit binary counter may be registers or ROM selected). " programmed to count events, measure frequencies and time intervals, or similar tasks. It may also be used for Chip Select (CSo. CS1) square wave generation, single pulses of control The CSo and CSl inputs are used to select the ROM or duration and gated delayed Signals. Interrupts may be 110 timer of the F6846. They are mask programmed to be generated)rom a number of conditions selectable by active HIGH or active l-OWas specified by th,e user. software programming. Address ,(Ao-Al0) The TimerlCounter Control Register allows control of the The Address inputs allow any Of th~,2048 bytes' of ROM interrupt enable, output enable and selection of an to be uniquely selected when the circuit is operating i,n internal or external clock source, a divide-by-eight the ROM mode. In the liD-Timer mode, Address inputs prescaler, and operating mode. The Counter-Timer Clock Ao, Al and A2 select the proper 110 register, while A3 (CTC) will accept an asynchronous pulse to decrement through Al0 (together with CSo and CS1) can be, used, as the internal register for the counter-timer. If the divide- additional qualifiers in the ItO select circuitry. (See the by-eight prescaler is used, the maximum clock rate can section on liD-Timer SEllect Circuitry for additional be four times the master clock frequency with an details.) , , absolute maximum of 4 HMz. Counter Gate input (CTG) accepts an asynchronous TTL-compatible signal that Reset (RESET) , " may be used as a trigger or gating function to the The active LOWstate of the RESET input is used to counter-timer. The Counter Timer Output (CTO) is also initialize all register,bits in the 1/0;section of the device available and is under software control, being dependent to their proper values. (See the section on Initialization on the timer control register, the gate input, and the for timer and peripheral register reset cO,nditi,ons.) clock source. Enable (E) Parallel 1/0 Port This signal synchroniies data transfer between the, MPU The parallel bidirectional 110 port has functional and the F6846. It also performs an equivalent ' characteristics similar to the B port on the F6821 PIA. synchronization function on the External Clock. RESET ' This includes eight bidirectional data lines and two and ,Counter Gate inputs of the F6846 timer section. handshake control signals. The control and operation of these lines are completely software programmable. Read/Write (RIW) Internal registers associated with the 110 functions may This signal is generated by the MPU and is used to be selected with Ao, Al and A2. control the direction of data transfer on the bidirectional data Ijnes. A LOW level on the R/W input enables the, The Peripheral Interrupt input (CP1) will set the interrupt F684EHnput bUffers and data is transferred to the circuit flag (CSR1) of the Composite Status Register. The during the <1>2 pulse when the, part has bee,n selected. A 5-177 F6846 HIGH level on the RIW input enables the output buffers Control Register, the Counter Gate input, and the clock and data is transferred to the MPU during 2 when the source. The output is TTL compatible. part is selected. External Clock (CTC) Interrupt Request (IRQ) CTC will accept asynchronous TTL voltage level signals The active LOW IRQ output acts to interrupt the MPU to be used as a clock to decrement the timer. The HIGH through logic included on the F6846. This output utilizes and LOW levels of the external clock must be stable for an open drain configuration and permits Interrupt at least one system clock period plus the sum of the set- request outputs from other circuits to be connected in a up and hold times for the inputs. The asynchronous wire-OR configuration. clock rate can vary from dc to the limit imposed by system 2, set·up and hold times. Peripheral Data (PO·P7) The Peripheral Data lines can be individually The External Clock input is clocked In by enable (system programmed as either inputs or outputs via the 2) pulses. Three enable periods are used to synchronize Peripheral Data Direction Register. When programmed as and process the external clock. The fourth enable pulse outputs, these lines will drive two standard TIL loads decrements the internal counter. This does not affect the (3.2 mAl. They are also capable of sourcing up to 1.0 mA input frequency; it merely creates a delay between a at 1.5 V (logic HIGH output). clock input transition and Internal recognition of that transition by the F6846. All references to CTC inputs in When programmed as inputs, the output drivers this document relate to internal recognition of the input associated with these lines enter a 3·state (high- transition. Note that a clock transition that does not impedanoe) mode. Since there is no internal pull-up for meet set·up and hold·time specifications may require an these lines, they represent a maximum 10 p.A load to the additional enable pulse for recognition. circuitry driving them, regardless of logic state. When observing recurring events, a lack of synchroni· A logic LOW at the RESET Input forces the Peripheral zation will result in either system jitter or input jitter Data lines to the input configuration by clearing the being observed on the output of the F6846 when using Peripheral Data Direction Register. This allows the an asynchronous clock and gate input signal. System system designer to preclude the possibility of having a jitter is the result of input signals out of synchronization peripheral data output connected to an external driver with the system 2 clock (Enable), permitting signals output during power-up sequence. with marginal set-up and hold time to be recognized within either the bit·time nearest the input transition or Peripheral Interrupt (CP1) subsequent bit-time. Peripheral Interrupt input CP1 sets the interrupt flags of the Composite Status Register. The active transition for Input jitter can be as great as the time between input thiS signal is programmed by the Peripheral Control signal negative·going transitions plus the system jitter if Register for the parallel port. CP1 may also act as a the first transition is recognized during one system strobe for the Peripheral Data Register when it is used cycle, and not recognized the next cycle or vice·versa. as an input latch. Details for programming CP1 are in the INPUT section on the parallel peripheral port. Peripheral Control (CP2) Peripheral Conltol CP2 may be programmed to act as an eTC INPUT ~L-_ _"" interrupt input or Peripheral Control output. As an Input, , this line has high impedance and is compatible with ~~~~; I---~ l standard TTL voltage levels. As an output, it is TIL· I compatible and may be used asa source of 1 mA at EITHERJ \ . . OR HERE HERE 1.5 V to directly drive the base of a Darlington transistor switch. CP2 is programmed by the Peripheral Control OUTPUT Register. Counter Timer (CTO) ~ f-~ BIT TIME eTe INPUT SYSTEM The Counter Timer output is softWare programmed by JITTER salected bits in the CounterlTimer Control Register. The REeOG~ mode of operation is dependent on the CounterlTimer INPUT ---1 ___ ...i 5-178 F6846 Counter Gate (CTG) Memory mapping the I/O can be accomplished by using CTG accepts an asynchronous TTL-compatible signal one of the CS inputs to select between ROM and I/O, which is used as a trigger or a clock-gating function to applying the F6802 VMA output to the other CS the timer. The gating input is clocked into the F6846 by (programmed active HIGH) and using the Address lines the Enable (system q,2) signal in the same manner as the to decode Address fields. previously discussed clock inputs. A CTG transition is recognized on the fourth enable pulse, provided set-up and hold time requirements are met. The HIGH or LOW levels of the CTG input must be stable for at least one o I/O (0200) F6a50 CSo CSo 110(0100) F8820 system clock period plus the sum of set-up and hold F6802 times. All references to CTG transition in this document relate to internal recognition of the input transition. The CTG input of the timer directly affects the internal VMAI---_+--l-----..... 16-bit counter. The operation of CTG is therefore RAM (000Q.0075) CSo Active HIGH independent of the divide-by-eight prescaler selection. I/O ROM ROM (8000) F8820 CO) I/O (OXBO) CS1 L H I/OF:!e AI Active HIGH As Active HIGH Functional Select Circuitry I/O-Timer Select Circuitry CSo and CSt are user programmable. Any of the four Internal Addrel!sing binary combinations of CSo and CSt can be used to Seven I/O register locations within the F6846 are select the ROM. Likewise, any other combination can be accessible to the MPU data bus. Selection of these used to select the I/O-Timer. In addition, several Address registers is controlled by Ao, At, and A2 as shown in lines are used as qualifiers for the I/O-Timer. Tab/e 1, provided the I/O timer is selected. CSo and CSt Specifically, A3= A4 = = A5 logic L. A6 can be must be in the I/O state and the proper register address programmed to anH, L, or don't care (X). A7 = As = Ag must be applied to access a particular register. The = Ato = don't care or one line only may be programmed Composite Status Register is read only, where all other to a logic H. The available chip select options are registers are read/write. diagramed below. Table 1 Internal Register Addresses CS1-r~~----~~o- __________~~ Register Selected A1 Ao I/O A2 SELECT Composite Status Register L L L CSo _-1:>0-------0- Peripheral Control Register L L H Peripheral Data Direction Register L H L Peripheral Data Register L H H CompOSite Status Register H L L A.--o H r CounterlTimer Control Register H L A,---O CounterlTimer MSB Register H H L CounterlTimer LSB Register H H H Aa ROM Address X X X L LOW Voltage Level As r H X = HIGH Voltage Level Don't Care A. A3 5-179 F6846 Initialization conditions causes it to halt or recycle. Thus the timer is When the RESET input has accepted a LOW signal, all programmable, cyclic in nature, controllable by external registers are i'nitialized to the reset state. The Peripheral inputs or MPU program, and accessib.le to the MPU at Data Direction and Peripheral Data Registers are any time. cleared. The Peripheral Control Register is cleared except for bit 7 (the reset bit). This forces the parallel Counter Latch Initialization port to the input mode with interrupts disabled. To The timer consists of a 16-bit addressable counter and remove the reset condition from the parallel port, an L two 8-bit addressable latches. The latches store a binary must be written into the Peripheral Control Register equivalent of the desired count value minus one. Counter bit 7 (PCR7). initialization results in the transfer of the latch contents to the counter. It should be noted that data transfer to During initialization the counter latches are preset to the counters is always accomplished via the latches. their maximal count, the CounterlTimer Control Register Thus, the counter latches may be accurately described bits are reset to L except for bit 0 (TCRo is set), the as a 16-bit counter initialization data storage register. counter output is cleared, and the counter clock disabled. This state forces the timer counter to remain in In some modes of operation, the initialization of the an inactive state. The Composite Status Register is latches will cause simultaneous counter initialization cleared of all interrupt flags. During timer initialization (i.e., immediate transfer of the new latch data into the the reset bit (TCRo) must be cleared. counters). It is, therefore, necessary to insure that all 16 bits of the latches are updated simultaneously. Since the ROM Select Circuitry F6846 data bus is eight bits wide, a temporary register The mask-programmable ROM section is similar in (MSB buffer register) is provided for the most significant operation to other ROM products of the F6800 micro- byte of the desired latch data. This is a write-only processor family. The ROM is organized as 2048 words register selected via Address lines Ao, A1 and A2. Data is of 8-bits to provide read-only storage for a minimum transferred directly from the data bus to the MSB buffer microcomputer system. The ROM is active when when the chip is selected, RNV is LOW, and the timer selected by the unique combination of the chip MSB register is selected (Ao "" L; A1 "" A2 "" H). select inputs. The lower eight bits of the counter latch can also be The active levels of CSo and CSdor ROM and 1/0 select referred to as a write-only register. Data bus information are a user programmable option. Either CSo and CS1 may will be transferred directly to the LSB of a counter latch be programmed active HIGH or active LOW, but different when the chip is selected, R/IN is LOW and the Counterl codes must be used for ROM or 1/0 select. CSo and CS1 Timer LSB Register is selected (Ao = A1 = A2 "" H). are mask programmed simultaneously with the ROM Data from the MSB buffer will be transferred pattern. The ROM select circuitry is shown below. automatically into the most significant byte of the counter latches simultaneously with the transfer of the data bus information to the least significant byte of the counter latch. For brevity, the conditions of this operation will be referred to henceforth as a write-timer- latches command. The F6846 has been designed to allow transfer of two Timer Operation bytes of data into the counter latches from any source, provided that the MSB is transferred first. In many The timer may be programmed to operate in modes applications, the source of the data will be an F6800 which fit a wide variety of applications. The device is M PU. It shou Id therefore be noted that the 16-bit store fully bus compatible with the F6800 system, and is operations of the F6800 family microprocessbrs (STS accessed by load and store operations from the MPU. and STX) transfer data in the order required by the F6846. A store index register instruction, for example, In a typical application, the timer will be loaded by results in the MSB of the X register being transferred to storing two bytes of data into the counter latch. This the selected address, then the LSB of the X register data is then transferred into the counter during a counter being written into the next higher location. Thus, either initialization cycle. The counter decrements on each the index register or stack pOinter contents may be subsequent clock cycle (which may be system 1>2 or an transferred directly into either 8-bit latch with a single external clock) until one of several predetermined instruction. 5-180 F6846 A logic L at the RESET input also initializes the counter TCR3, TCR4, and TCR5 select the timer operating mode, latches. All latches will assume maximum count (65,536) and are discussed in the next section. values. It is important to note that an internal reset (bit zero of the CounterlTimer Control Register set) has no CounterlTimer Control Register bit 6 (TCRs) is used to effect on the counter latches. mask or enable the timer interrupt request. When TCRs = L, the interrupt flag is masked from the timer. Counter Initialization When TCRs = H, the interrupt flag is enabled into bit 7 Counter initialization is defined as the transfer of data of the Composite Status Register (composite IRQ bit), from the latches to the counter with attendant clearing which appears on the IRQ output. of the individual interrupt flag associated with the counter. Counter initialization always occurs when a CounterlTimer Control Register bit 7 (TCR7) has a speCial reset condition (external RESET = L or TCRo = H) is function when the timer is in the cascaded single-shot recognized. It can also occur depending on the timer mode. (This function is explained in detail in the section mode with a write·timer-Iatches command or recognition describing the mode.) In all other modes, TCR7 merely of a negative transition of the CTG input. acts as an output enable bit. If TCR7 = L, the Counter Timer Output (CTO) is forced LOW. Writing a logic L into Counter recycling or reinitialization occurs when a clock TCR7 enables CTO. input is recognized after the counter has reached an all L state. In this case, data is transferred from the latches Table 2 CounterlTimer Control Register Format to the counter, but the interrupt flag is unaffected. .Control Register Bit State CounterlTimer Control Register State Definition Definition Bit The CounterlTimer Control Register (see Table 2) in the F6846 is used to modify timer operation to suit a variety TCRo L Internal Reset Timer Enabled of applications. The CounterlTimer Control 'Register has H Timer in Preset State a unique address space (Ao = H, A1 = L, A2 =. H) and TCR1 L Clock Source Timer uses External therefore may be written into at any time. The least Clock (CTC) significant bit of this control register is used as an Timer uses <1>2 System internal reset bit. When this bit is a logic L, all timers are H Clock allowed to operate in the modes prescribed by the remaining bits of the control registers. TCR2 L + 8 Prescaler Clock is not Enabler Prescaled Writing H into CounterlTimer Control Register bit 0 Clock is Pre.scaled by (TCRo) causes the counter to be preset with the contents H +8 Counter of the counter latches, all counter clocks to be disabled, TCR3 . X Operating Mode See Table 3 and the timer output and interrupt flag (status register) TCR4 X Selection to be reset. The counter latch and CounterlTimer Control TCR5 X Register are undisturbed by an internal reset and may be written into regar.dless of the state of TCRo. TCRs L Timer Interrupt IRQ Masked from Enable Timer CounterlTimer Control Register bit 1 (TCR1) is used to H IRQ Enabled·from select the clock source. When TCR1 = L, the external Timer clock input CTC is selected, and when TCR1 = H, the TCR7 L Timer Output Counter Output timer uses system <1>2. Enable (CTO) Set LOW H Counter Output CounterlTimer Control Register bit 2 (TCR2) enables the Enabled divide·by-eight prescaler (TCR2= H). In this mode, the clock frequency is divided by eight before being applied to the counter. When TCR2 = L the clock is applied directly to the counter. 5-181 F6846 Table 3 CounterlTimer Control Register CSR, I CSRe I CSR. I I CSR. I CSR. I I CSR2 I CSR, I CSRo I J I Interrupt Enable Ilnt.rnal R.s.t L = IRQ Masked L = Timer Enabled H = IRQ Enabled H = Reset Stale I Timer Output Enable Clock Source L = Output Ol•• bl.d (LOW) L = ,External Clock (CTC) = Output Enabled H = Int.rn.1 Clock (¢2) ----------------- H For Cascaded Single-shot l + 8 Preseale Enable L = Output Goes Low at Time·out L = Clock Not Prasealed H = Output Go•• High at Tima-out H = Clock Pr.s•• led ( + 8) TCR. TCR4 TCR. Timer Operating Mode I Counter Initialization Int.rrupt Flag Sot L . L L Continuous CTGI+W+R T.O. L L H Ca ••aded Singi. Shot CTGI+R T.O. L H L Continuous CTG I + R T.O. L H H Norm.1 Singi •.Shot CTGI +R T.O. H L L CTG I • I • (W + T.O.) + R CTa I S.'ore T.O. Frequen.cy Comparlsoll H L H CTGI·' .... A T.O. Before CTG I H H L CTG I Belore T.O. Puis. Width Comparison CiiiI'I+R H H H T.O. B.fore CTa t Timer Operating Modes timer output is enabled (TCR7 = H), a square wave will be generated at the Counter Timer Output CTO (see The F6846 has been designed to operate effectively in a Table 5). wide variety of applications. This is accomplished by using three bits of the CounterlTimer Control Register .Table 5 Continuous Operating Modes (TCR3, TCR4 and TCRs) to define different operating (TCR3 = L, TCR7 H, TCRs = L) = modes of the timer, outlined in Table 4. Control Register Initialization/Output Waveforms Table 4 Operating Modes TCR2 TCR4 Counter Timer Output (2X) Control Register (n + 11m In + llm(n + 11{T) L L Initialization 1· -1- -1- -I TCR3 L . TCR4 TCRs L Timer Operating Mode Continuous L H G+ W + R G + R . ~-VOII I I 1.0. . I T.O- 1.0. I -VOL L L H Single· I Cas.caded Single-shot G Negative transition of CTG input H shot I Normal Single-shot w Write·tlmer-Iatches command R Timer Reset (TCRO' = H or External RESEi' = L) H L * Frequency Comparison N 16-bit number in Counter Latch T PeriOd of Clock input to Counter H H * Pulse Width Comparison to Counter initialization cycle 'Defines Additional Timer Functions T.O. Counter Time·out (all L condition) Note Continuous Operating Mode (TCR3 L, TCRs L) = = All time intervals shown above assume that the em and eTC signals are The timer may be programmed to operate in a synchronized to system <1>2 with the specified set-up and hold time continuous counting mode by writing L into bits 3 and 5 requirements. of the CounterlTimer Control Register. Assuming that the 5-182 F6846 Either a Timer Reset (TCRo = H or External Reset L) = The second difference is the method used to change the condition or internal recognition of a negative transition output level. Counter/Timer Control Register bit 7 (TCR7) of the CTG input results in counter initialization. A write- has a special function in this mode. The Counter Timer timer-latches command can be selected as a counter Output (CTO) is equal to TCR7 clocked by time-out. At initialization signal by clearing TCR4. every time-out the content of TCR7 is clocked to and held at the CTO. Thus, output pulses of length greater The discussion of the continuous mode has assumed than one timer cycle can be generated by cascading that the application requires an output signal. It should timer cycles and counting time-outs with a software be noted that the timer operates in the same manner program. with the output disabled (TCR7 = L). A read· timer- counter command is valid regardless of the state An interrupt is generated at each time-out. To cascade of TCR7. timer cycles, the MPU would need an interrupt routine to: 1) count each time-out and determine when to change Single-shot Timer Mode TCR7; 2) write into TCR7 the state corresponding to the (TCR3 = L, TCR4 = H, TCRs H) = next desired state of the output waveform (only This mode is identical to the continuous mode with two necessary during the last timer cycle before the output exce'ptions. The first of these is obvious from the is to change state); and 3) clear the Interrupt flag by name-the output returns to a LOW level after the initial reading the CompOSite Status Register followed by the time-out and remains LOW until another counter read timer MSB. It is also possible, if desired, to change initialization cycle occurs. The internal counting the length of the timer cycle by reinitializing the timer mechanism remains cyclical in the single-shot mode. latches. This allows more flexibility for obtaining Each time-out of the counter results in the setting of an desired times. individual interrupt flag and reinitialization of the counter. Cascaded Single-shot Mode Output Waveform The second major difference between the single-shot and continuous modes is that the internal counter enable is not dependent on the CTG input level remaining in the LOW state for the single-shot mode. J j.--(n + 1 ) - + - ( n + 1)--+-(n + 1 ) - + - ( n + 1)-.\ r T,O, T,O, T'F- Normal Single-Shot Mode Output Waveform t I t0 tl H = Write an "H" into TCR7 to ~1 .1. n~!-_--;.-_-: L = Write an "L" into TCR7 Note All time intervals shown above assume the CTG and CTC signals are I... 1... ( n + 1 ) - - - -....0-(n + 1 ) - + - ( n + 1)-.\ synchronized to system 2 with the specified set·up and hold time requirements. H = Write an "H" into TCR7 L = Write an "L" into TCR7 Note Time Interval Modes (TCR3 = H) All time intervals shown above assume the CrG and CTC signals are synchronized to system 2 with the specified set·up and hold time requirements. The time interval modes are provided for applications requiring more flexibility of interrupt generation and counter initialization. The interrupt flag is set in these Cascaded Single-shot Mode modes as a function of both counter time-out and CTG (TCR3 = L, TCR4 = L, TCRs L) = input transition. Counter initialization is also affected by This mode is identical to the single-shot mode with two interrupt flag status. The output signal is not defined in exceptions. First, the output waveform does not return to any of these modes. Other features of the time interval LOW level and remain LOW after time-out. Instead, the modes are outlined in Tab/e 6. output level remains at its initialized level until it is reprogrammed and changed by time-out. The output level may be changed at any time-out or may have any number of time-outs between changes. 5-183 F6846 Table 6 Timer Interval Modes (TCR3 = H) condition will be generated if TCRs = L and the period of the pulse (single pulse or measured separately Conditi.on for Setting repetitive pulses) at the CTG input is less than the TCR4 TCRs Application Individual Interrupt Flag counter time-out period. If TCR5 = H, an interrupt is L L Frequency Interrupt generated if CTG generated if the pulse period is greater than the Comparison input period (1/F) is less time-out period. than counter time-out (T.O.) L H Frequency Interrupt generated if CTG Assume now with TCRs = H that a counter initialization Comparison input period (1/F) is greater has occurred and that the CTG input has returned LOW than counter time-out (T.O.) prior to counter time-out. Since there is no iildividual interrupt flag generated, this automatically starts a new H L Pulse Width Interrupt generated if CTG counter initialization cycle. The process will continue Comparison input down time is less with frequency comparison being performed on each than counter time-out (T.O.) CTG input cycle until the mode is changed, or a cycle is H H Pulse Width Interrupt generated if CTG determined to be above the predetermined limit. Comparison input down time is greater than counter time-out (T.O.) Pulse Width Comparison Mode (TCR3 = H, TCR4 = H) This mode is similar to the frequency comparison mode except for the limiting factor being a positive, rather Frequency Comparison Mode (TCR3 H, TCR4= L) = than a negative, transition of the CTG input. With The timer within the F6846 may be programmed to TCRs = L, an individual interrupt flag will be generated compare the period of a pulse (giving the frequency after if the L level pulse applied to the CTG input is less than calculations) at the CTG input with the time period the time period required for counter time-out. With required for counter time·out. A negative transition of the TCRs = H, the interrupt is generated when the reverse CTG input enables the counter and starts a counter condition is true. initialization cycle-provided that other conditions as noted in Table 7 are satisfied. The counter decrements As can be seen in Table 8, a positive transition of the on each clock signal recognized during or after counter CTG input disables the counter. With TCRs = L, it is initialization until an interrupt is generated, a write-timer- therefore possible to directly obtain the width of any latches command is issued, or a timer reset condition pulse causing an interrupt. occurs. It can be seen from Table 7 that an interrupt Table 7 Frequency Comparison Mode TCR3 = H, TCR4 = L Counter Enable Counter Enable Control Reg Interrupt Flag Counter Initialization Flip-Flop Set Flip-Flop Reset Bit 5 (TCRs) (CE) (CE) Set (I) L G I • I • (CE + TO • CE) + R GIW·R.I W + R +1 G I before TO H G I •I + R GIW·R.I W + R + I TO before G I i repref;ients the interrupt for a given timer. Table 8 Pulse Width Comparison Mode TCR3 = H, TCR4 = H Control Reg Counter Enable Counter Enable Interrupt .Flag Counter Initialization Bit 5 (TCRs) Flip-Flop Set (CE) Flip-Flop Reset (CE) Set (I) L GI.I+R GI.w.R.T W+ R + 1+ G G I before TO H GI.T+R GIIW.R.I W+R+I+G TO before G I 5-184 F6846 Differences Between the F6840 and the F6846 Timers 1. Timer Reset-Internal Reset bit (TCRo = H) or 1. Control Registers 1 and 3 are buried (access through External Reset L = Control Register 2 only) in the F6840 timer. In the F6846 all registers are directly accessible. 2. Any Counter Initialization condition 2. The F6840 has a dual 8-bit continuous mode for 3. A write-timer-Iatches command if time interval modes generating non-symmetrical waveforms. The F6846 (TCR3 =H) are being used. has a cascaded one-shot mode which can accomplish the same function, but also allows the user to 4. A read-timer-counter command, provided this is generate waveforms longer than one time-out. preceded by a read Composite Status Register while CSRo is set. This latter condition prevents missing an 3. Because of the different modes, there is a difference interrupt request generated after reading the status in the control registers between the F6840 and the register and prior to reading the counter. F6846. (See Table 9). The remaining bits of the Composite Status Register Composite Status Register (CSR3-CSRe) are unused. They default to a logic L The Composite Status Register (CSR) is a read-only when read. register which is shared by the timer and the peripheral data port of the F6846. Three individual Interrupt flags in Composite Status Register and Associated Logic the register are set directly via the appropriate conditions in the timer or peripheral port. The composite interrupt flag, and the IRQ output, respond to these individual interrupts only if corresponding enable bits are set in the appropriate control registers. The sequence of assertion is not detected. Setting TCRe while CSRo is HIGH will cause CSR7 to be set, for example. ")-.....-Do-~ IRQ The composite interrupt flag (CSR7) is clear only if all enabled individual interrupt flags are clear. The conditions for clearing CSR1 and CSR2 are detailed in a later section. The timer interrupt flag (CSRo) is cleared under the following conditions: Table 9 F6840 and F6846 Control Register Comparison Control Register Bit F6840 F6846 2 16-bit or dual 8-bit mode control + 8 prescale enable 7 Output enable (all modes) Output next state (cascaded one-shot mode only), output enable all other modes o R1 internal reset R2 control register select Internal reset R3 timer 3 clock control Table 10 Composite Status Register Format I CSR, I CSR,-CSR. Not Used Delault to L When Read I CSR. I CSR. 1 CSR. J 1 COlI'\pollte Interrupt, Flag L == No Enabled Interrupt Fl." Set H =- One or More Enabled Interrupt Flaga Set* l = CP2 Interrupt Flag L No Int Req H = Int Requoated J I == Timor Interrupt Flag L H No Int Req Int Requested I Inverse 01 This Bit Appears at IRQ Output I ·Status of This Bit can be Expressed II: CP1 Interrupt = CSR, • CSRo - TCR. + CSR •• PCR. + CSR. + PCR. L Nolnt Req H = Int Requested 1 5-185 F6846 I/O Operation Peripheral Data Regi.ster This 8-bit register is used for transferring data between Parallel Peripheral Port the peripheral data port and the MPU. Any bit The peripheral port of the F6846 contains eight corresponding to an output line will be used to drive the Peripheral Data lines (PO-P7), two peripheral control lines output buffer associated with that line. Data in these (CP1 and CP2), a Peripheral Data Direction Register, a output bits are normally provided by an MPU write Peripheral Data Register, and a Peripheral Control function. (Input bits, those associated with input lines, Register. The port also directly affects two bits (CSR1 are unchanged by a write command.) Any input bit will and CSR2) of the Composite Status Register. reflect the state of the associated input line if the input latch function is deselected. If the Peripheral Control The peripheral port is similar to the "B" side of a PIA Register is programmed to provide input latching, the (F6821) with the following exceptions: input bit will retain the state at the time. CP1 was activated until the Peripheral Data Register is read by 1. All registers are directly accessible in the F6846. Data the MPU. direction and peripheral data in the F6821 are located at the same address, with bit 2 of the control register Peripheral Control Register used for register selection. This 8-bit register is used to control the reset function· as well as for selection of optional functions of the two 2. Peripheral Control Register bit 2 (PCR2) of the F6846 peripheral control lines (CP1 and CP2). The Peripheral is used to select an optional input latch function. This Control Register functions are outlined in Tab/e 11. option is not available with F6821 PIAs. Peripheral Port Reset (PCR7) 3. Interrupt flags are located in the F6846 Composite Bit 7 of the Peripheral Control Register (PCR7) may be Status Register rather than bits 6 and 7 of the control used to initialize the peripheral section of the F6846. register as used in the F6821. When this bit is set HIGH, the Peripheral Data Register, the Peripheral Data Direction Register, and the interrupt 4. Interrupt flags are cleared in the F6821 by reading flags associated with the periphe(al port (CSR1 and data from the Peripheral Data Register. F6846 CSR2) are all cleared. Other bits in the Peripheral Control interrupt flags are cleared by either reading or writing Register are not affected by PCR7. to the Peripheral Data Registerprovided that this sequence is followed: a. flag set, b. read Composite PCR7 is set by either a logic L at the external RESET Status Register, c. read/write Peripheral Data input or under program control by writing an H into the Register. location. In any case, PCR7 may be cleared only by writing an L into the location while RESET is HIGH. The 5. Bit 6 of the F6846 Peripheral Control Register is not bit must be cleared. to activate the port. used. Bit 7 (PCR7) is an internal reset bit not available on the F6821. Control of Peripheral Interrupt Line (CP1) CP1 may be used as an interrupt request to the F6846, 6. The Peripheral Data lines (and CP2) of the F6846 as a strobe to allow latching of input data, or both. In feature internal current limiting which allows them to any case, the .input can be programmed to be activated directly drive the base of Darlington npn transistors. by either a positive or negative transition of the signal. These options are selected via Peripheral Control Peripheral Data Direction Register Register bits PCRo, PCR1 and PCR2. The M PU can write directly to this 8-bit register to configure the Peripheral Data lines as either inputs or Peripheral Control Register bit 0 (PCRo) is used to enable outputs. A particular bit within the register (DDRn) is the interrupt transfer circuitry of the F6846. Regardless used to control the corresponding Peripheral Data line of the state of PCRo, an active transition of CP1 causes (Pn). With DDRn = L, Pn becomes an input; if DDRn = H, the Composite Status Register bit 1 (CSR1) to be set. If Pn is an output. For example, writing Hex $OF into the PCRo = H, this interrupt will be reflected in the Peripheral Data Direction Registeuesults in Po through composite interrupt flag (CSR7), and thus at the IRQ P3 becoming outputs and P4 through P7 inputs. Hex $55 output. CSR1 is c:leared by a peripheral port reset in the Peripheral Data Direction Register results in condition or by either reading or writing to the Peripheral alternate output and inputs at the parallel port. Data Register after the Composite Status Register is 5-186 F6846 Table 11 Peripheral Control Register Format (Expanded) PCR, I PCR. I PCR. I PCR4 PCR. I PCRo I PCR, I PCR. I I I I I I CP2 Direction Control Cp, Int. Enable L = CP2 Is Input L = CPt Int. Masked H = CP2 Is Output H = CP, Int. Enabled I CP, Actl.e Edge Select Reset (Set by Ext. Resat = L or Writing L = Negatl.o (I) Edge H Into Location; Cleared by Writing L to This Location) H = Pooltl.e (I) Edge ~---------------- L = Normal Operation I CP1 Input Latch Control H = Reset Condition (Clears Perlph L = Input Data Not Latched Data and Data Direction Reg ± CSR1 I: CSR2) H = Input Data Latched on Active CP1 I I ICPo I. Input (PCR. = "0'11 PCR. PCR. CPo Is Output (PCR. = H Interrupt Acknowledge I PCR, I PCR. I L L II L H Input/Output Acknowledge I I CPo Actl.o Edge Select CPo Int. Enable Programmable Output L = Negative (I) Edge L = CP2 Int. Masked H LorH (CP2 Reflects Data H = Pooiti.o (I) Edge H = CPolnt. Enabled Written into PCR3) read. The latter alternative is conditional; CSR1 must Control of Peripheral Control Line (CP2) have a logic H when the Composite Status Register was CP2 may be used as an input by writing an L into PCR5. last read. This preculudes inadvertent clearing of In this configuration, CP2 becomes a dual of CP1 in interrupt flags generated between the time the regard to generation of interrupts. An active transition Composite Status Register is read and the manipulation (as selected by PCR4) causes bit 2 of the Composite of peripheral data. Status Register to be set. PCR3 is then used to select whether the CP2 transition is to cause CSR? to be set Peripheral Control Register bit 1 (PCR1) is used to select and, thereby, cause IRQ to go LOW. CP2 has no effect on the edge which activates CP1. When PCR1 = H, CP1 is the input latch function of the F6846. active on negative transitions (HIGH-to·LOW). LOW-to- HIGH transitions are sensed by CP1 when PCR1 = H. Writing an H into PCR5 causes CP2 to function as an output. PCR4 then determines whether CP2 is to be used In addition to its use as an interrupt input, CP1 can be in a handshake or programmable output mode. With used as a strobe to capture input data in an internal PCR4 = H, CP2 will merely reflect the data written into latch. This option is selected by writing a HIGH into PCR3. Since this can readily be changed under program Peripheral Control Register bit 2 (PCR2). In operation, the control, this mode allows CP2 to be a programmable data at the pins deSignated by the Peripheral Data output line in much the same manner as those lines Direction Register as inputs will be captured by an selected as outputs by the Peripheral Data Direction active transition of CP1. An MPU read of the Peripheral Register. Data Register will result in the captured data being transferred to the MPU; it also releases the latch to The handshaking mode (PCR5 = H, PCR4 = L) allows allow capture of new data. Note that successive active CP2 to perform one of two functions as selected by transitions with no read·peripheral-data command PCR3. With PCR3 = H, CP2 will go LOW on the first between does not update the input latch. Also, it should Enable (system q,2) positive transition after a read or be noted that use of the input latch function (which can write to the Peripheral Data Register. This input/output be deselected by writing an L into PCR2) has no effect acknowledge signal is released (returns HIGH) on the on output data. It also does not affect interrupt function next positive transition of the enable signal. of CP1. 5-187 F6846 In the interrupt acknowledge mode (PCR5 H, = PCR4 = PCR3 = L), CP2 is set when CSR2 is set by an active transition of CPl. It is relea.sed (goes LOW) on the first positive transition of Enable after CSRI has been cleared via an MPU read or write to the Peripheral Data Register. (Note that the previously described conditions for clearing CSRI still apply.) Restart Sequence A typical restart sequence for the F6846 will include initialization of both the Peripheral Control and Peripheral Data Direction Registers of the parallel port. It Is necessary to set up the Peripheral Control Register first, since PCR7 = L is a condition for writing data into the Peripheral Data Direction Register. (A logic L at the external RESET input automatically sets PCR7). Absolute Maximum Ratings Supply Voltage, Vee -0.3 V, + 7.0 V Input Voltage, VIN - 0.3 V, + 7.0 V Operating Temperature, TA O·C, +70·C Storage Temperature, Tstg -55·C, +150·C Thermal Resistance, e second 2 .pulse • Fig. 5 IRQ Release Time Fig. 2 Bus Write Timing (Write Information from MPU) Fig. 6 Peripheral Port Set·up Time PO-P7 :?J . 2.0V 0.8 V ~ ~ .. Fr-,.iO""","V- - - - . , ' - - _ Fig. 3 Peripheral Port Latch Set·up and Hold Time Fig. 7 CP2 Delay Time = L) X 2.0 V 2.0 V Po-P, ) 0.8 V 0.8 V (PCRs = H, PCR4 L, PCR3 tpsu tPDH E ~I [2.0 V ''-----I F------I! L ~ 2.0 V cp, Ip',lpl 0.8 V cp, I 1-------- ~ { ... Fh-:: -:;-V- - CPo k,f-!___ ..I. i4 5-191 F6846 Fig. 8 Input Pulse Widths· Custom .ROM Programming Information The customer's unique program code pattern may be tPWL submitted to Fairchild in several methods. The most con- venient and readily verifiable is in·the form of 2708, 2716 or 2732 EPROMs. Program code patterns may also be CTC OR CTll submitted on Fairchild Formulator MKIII floppy disks or O.BY i'---....tt on HP cassette tape in Formulator or MIKBUG* format. Customer Company Name ____________ Customer Contact Name Fig. 9 Input Set·up and Hold Times' Customer Part No. Address Phone No. Fairchild Part No. _ _ _ _ _ _ _ _ _ _ _ _ _ __ I ::'- eTC ffi ~~ ~)C:0 v O.B v Fairchild Use Only SLNo. Bid Control No. Note Field Sales Engineer This mode is valid only for sYr)chronous ·operation. Date Sent Fig. 10 Output Delay Customer Input Media o 2708 EPROM o 2716 EPROM o 2732 EPROM E o H P Cassette o Formulator Format CTO Request for Return Media o Listing . D EPROM (include blank EPROMs) Fig. 11 Bus Timing Test Loads Rom Select" CSo Load A Load B (Do-D" CTO, CPo, ""-P,) (IRQ Only) CS1 5.0 V 1/0 Select" CSo TEST POINT - . - -......-i(II---+ C R RL =2.5k 1N914 OR TESTPOINT~ T· CS1 A6 _______~__________________ (maybeunused Location Select (Select 1 only) o A7 HIGH EQUIV o As HIGH 100 P F·r . o Ag HIGH o A10 HIGH o Not used C = 130 pF for 00-07 'ROM and 1/0 Selects must be different. = 30 pF for CTO, CP2, Po-P7 H = HIGH to Select R = 11.7 k[Jfor Oo-D7 L = LOW to Select = 24 k[J for CTO, CP2, PO-P7 5·192 F6846 Formulator Format __0~1__ '~1__2~1_3~1_4~1~5~_6~1__7_1~8~_9~1_'_0~1_"~~{~(~I_M_-6~I_M_-5~I_M-_4~I_M_-3~I_M_-2~I_M-_'~I_M__ SOA L, La A3 A2 A, Ao T, To 001 000 0" 0(n-l)10(n_l)0 Dnl Dno CK, eKe SOR Start of record defined to be a colon(:) T1 To Type field. L1 Lo Length field defined to be the number 001 Doo ... D(n)1 D(n)O Data field. of packed data bytes per record. Each CK, CKo Checksum field defined to be nega- record is (2 • L) + 11 characters in tive modulo 256 summation of all length inclusive of start of record bytes since start of record. A Length 0 implies end of relocatable summation of all characters in a module. record, including the checksum, will result in zero. Address Field All characters other than SOR are ASCII hexadecimal (0-9, A-F). II MIKBUG Format I Lead., (Null,) (CA) CC 30 CC ~ 31 CC 39 (LF) Header Data End-ol-file (NULL) Record Record Record Frame Frame 1. Start-ol-Record 53 S 53 53 2. Type of Record 30 39 9 . . rof-l 3. 31 30 Byte Count 12 16 G3 4. 32 33 5. 30 30 6. 30 30 Address/Size 0000 1100 0000 7. 30 30 F .. me, ot Tape Checksum 8. 30 30 9. 46 48-11 98 Fe (Checksum) 10 10. 43 Byte Count ·2 44~O 32 Data n (Checksum) S Start of record Byte Count Two frames equal one byte. Frames 3 CC Type of record through n are hexadecimal digits (in 7-bit ASCII) which are converted to BCD. Two BCD digits are combined to make one 8-bit byte. The checksum is the ones complement of the summation of 8-bit bytes. 5-193 F6846 Ordering Information Speed Order Code Temperature Range 1.0 MHz F6846P, S O·G to + 70 G D P = Plastic Package; S = Ceramic Package 5·194 F6847 Video Display Generator Microprocessor Product Description Logic Symbol The Fairchild F6847 Video Display Generator (VDG) provides a 12 27 29 30 31 32 33 34 35 39 means of interfacing the Fairchild F6800 microprocessor family (or similar products) to a commercially available color or MS GM 2 GM 1 GM o INT/EXT lNV elK AfS NG ess black-and-white television receiver. Applications of the VDG 21 DA12 include video games, bioengineering displays, education, 20 OA ll communications, and any instance in which graphics DO, 40 19 DAlo are required. DO, 18 DAg 16 DA, DDs The VDG reads data from memory and produces a composite 15 DA7 video signal that allows the generation of alphanumeric or 004 14 DA, F6847 graphic displays. The generated composite video may be 13 003 DAs up-modulated to either channel 3 or 4 by using a suitable rf DO, 26 DA4 modulator. The up-modulated signal is suitable for application • 25 DA3 DO, to the antenna of a color TV. Figure 1 illustrates a typical TV 24 DA, game application. 23 DA, 00 0 22 DAo • Generates Four Different Alphanumeric Display Modes y RP FS HS and Eight Graphic Display Modes • Compatible With the F6800 Family VSS ~ Pin 1 Vee ~ Pin 17 10 11 28 36 37 38 • The Alphanumeric Modes Display 32 Characters per Line by 16 Lines. • An Internal Multiplexer Allows the Use of Either the Connection Diagram Internal ROM or an External Character Generator. 40-Pin DIP • An External Character Generator Can Be Used to Extend vss 40 DO, the Internal Character Set for "Limited Graphic" Shapes. • One Display Mode Offers 8-Color 64 x 32 Density DO, 39 css Graphics in an Alphanumeric Display Mode. 000 38 HS • One Display Mode Offers 4-Color 64 x 48 Density Graphics in an Alphanumeric Display Mode. DO, 37 FS • All Alphanumeric Modes Have a Selectable Video DO, 36 Ai' Inverse. • Generates Full Video Signal 003 35 AlG • Generates R-Y and B-Y Signals for External Color DO, 34 AlS Modulator DDs 33 CLK • Full Graphic Modes Offer 64 x 64, 128 x 64, 128 x 96,128 x 192, or 256 x 192 Densities. CHB 32 INV • Full Graphic Modes Allow 2-Color or 4-Color Data $B 10 31 iN'f/EXT Structures. • Full Graphic Modes Use One of Two 4-Color Sets or One $A 11 30 GMo of Two 2-Color Sets. 12 29 MS GM, DAs 13 28 Y CA6 . 14 27 GM, DA, 15 26 DA4 DA, 16 25 DA3 Vee 17 24 DA, DAg 18 23 DA, DA10 19 22 DAo DAl1 20 21 OA12 (Top View) 5·195 F6847 Fig. 1. Block Diagram of Use of the VDG in a TV Game . MS elK ¢B ¢A Y 3.58 MHz D RF Modulator RFto TV Pin Functions Vee +5 V INV Inverts video in all alpha modes Vss Ground INT/EXT Switches to external ROM in alpha mode and ClK Color burst clock 3.58 MHz (input) between alpha semigraphic-4 and alpha DAo - DA12 Address lines to display memory, high semigraphic-6 in semigraphics mode impedance during memory select (MS) A/S Alpha/Semigraphics; selects between alpha and 000 - 005 Data from display memory RAM or ROM semigraphics in alpha mode 006, DO? Data from display memory in graphic mode; Memory Select; forces VDG address buffers to data also in alpha external mode; color data in high-impedance state alpha semigraphic-4 or -6 mode A/G Switches between alpha and graphic modes cbA,cbB,Y Chrominance and luminance analog (R-Y, B-Y, FS Field Synchronization; goes low at bottom of Y) output to rf modulator active display area CHB Chroma Bias; reference A and B levels CSS Color Set Select; selects between two alpha RP Row Preset; output to provide timing for external display colors or between two color sets in character generator semigraphics-6 and full graphics mode Horizontal Sync; output to provide timing for Graphic Mode Select; selects one of eight external character generator graphic modes 5-196 F6847 VDG Signal Descriptions Address Outputs (DAO - DA12) Synchronizing Outputs (FS. HS. RP) Thirteen address lines are used by the VDG to scan the display Three TTL-compatible outputs provide circuits exterior to the memory. The starting address of the display memory is located VDG with timing references to the following internal VDG at the upper left corner of the display screen. As the television states: sweeps from left to right and top to bottom, the VDG Field Sync (FS) - The HIGH-to-LOW transition of the FS increments the RAM display address. These lines are output coincides with the end of active display area. During TTL-compatible and may be forced into a high-impedance state this time interval, an MPU may have total access to the whenever the MS pin goes LOW. display RAM without causing undesired flicker on the Data Inputs (000 - 007) screen. The LOW-to-HIGH transition of FS coincides with Eight TTL-compatible data lines are used to input data from the the trailing edge of the vertical synchronization pulse. RAM to be processed by the VDG. The data is interpreted and Horizontal Sync (HS) - The HIGH-to-LOW transition of the transformed into luminance Y (pin 28) and color outputs q,A HS output coincides with the leading edge of the horizontal • and q,B (pin 11 and pin 10). snyc pulse portion of the VDG luminance (Y) output. Power Inputs Row Preset (RP) - I! desired, an external character Vee requires +5 volts. VSS requires zero volts and is normally generator ROM may be used with the VDG. In this ground. (The tolerance and current requirements of the VDG configuration, an external 4-bit counter, used to supply row are specified in the DC Characteristics table.) selection, is clocked by HS and cleared by the RP signal. Video Outputs (q,A. B. Y. CHB) Mode Control Inputs (A/G. A/s. INT/EXT. GMo• GM1• GM2 • These four analog outputs are used to transfer luminance and CSS.INV) color information to a standard NTSC color television receiver, Eight TTL-compatible inputs are used to control the operating either via the rf modulator or directly into Y, q,A, and q,B mode of the VDG. Ais, INT/EXT, CSS and INV may be television video inputs. changed on a character-by-character basis. The CSS pin is used to select between two possible alphanumeric colors when luminance (y) - This six-level analog output contains the VDG is in the alphanumeric mode and between two color composite sync, blanking, and four levels of video sets when the VDG is in the semigraphics-6 and full graphic luminance. mode. Table 1 illustrates the various modes that can be obtained using the mode contollines. A - This three-level analog output is used in combination with the q,B and Y outputs to specify one of eight colors. Display Modes B - This four-level analog output is used in combination The VDG is capable of generating 12 distinct display modes. with the q,A and Y outputs to specify one of eight colors. The color set selection (CSS) and invert (INV) pins allow Additionally, one analog level is used to specify the time of variations on certain modes. The VDG displays two the color burst reference signal. alphanumeric modes with two compatible semigraphic modes or one of eight full graphic modes. A detailed description of the Chroma Bias (CHB) - This pin is an analog output and various modes of operation follows. A summary of major provides a dc reference corresponding to the quiescent modes can be found in Table 2, and a detailed description of value of q,A and B. CHB is used to guarantee good VDG modes can be found in Table 3. thermal tracking and minimize the variation between the Alphanumeric Display Modes parts. All alphanumeric modes occupy an 8 x 12 dot character matrix box; there are 32 x 16 character boxes per TV frame. Each Synchronizing Inputs (MS. ClK) horizontal dot (dot-clock) corresponds to one-hal! the period Three-State Control (MS) - This is a TTL-compatible input duration of the 3.58 MHz clock, and each vertical dot is one that, when LOW, forces the VDG address lines into a scan line. One of two colors for the lighted dots may be high-impedance state. This may be done to allow other selected by the color set select pin. devices (such as an MPU) to address the display memory Internal Alphanumeric Mode - In the internal RAM. alphanumeric mode, an internal ROM will generate 64 ASCII Clock (ClK) - The VDG clock input (CLK) requires a display characters in a standard 5 x 7 box. Six bits of the 3.579545 MHz (standard) TV crystal frequency square 8-bit data word are used for the ASCII character generator; wave. The duty cycle of this clock must be between 45 and the two bits not used can be used to implement inverse video 55 percent since it controls the width of alternate dots on the or color switching on a character-by-character basis. A television screen. 512-word display memory is required for this class of display. 5-197 F6847 External Alphanumeric Mode - In the external selected by using the color set select pin. A 1K x 8 display alphanumeric mode, an. external character generator may be memory is required. Each pictel equals two dot-clocks by used to generate custom character sets of up to 256 three scan lines. separate 8 x 12 dot characters, each defined by an 8-bit data The 128 x 64 Color Graphics Mode (Graphics Two C) - word. If fewer than eight bits are used for character The 128 x 64 color graphics mode generates a display matrix definition, the remaining bits may be used for inverse video 128 elements wide by 64 elements high. Each element may selection or color switching on a character-by-character be one of four colors. A 2K x 8 display memory is required. basis. This display mode also requires a 512-word display Each pictel equals two dot-clocks by three scan lines. memory. The 128 x 96 Graphics Mode (Graphics Two R) - The 128 Alpha Semigraphic-4 Mode - The alpha semigraphic-4 x 96 graphics mode generates a display matrix 128 elements mode translates bits 0 through 3 into a 4 x 6 dot element in wide by 96 elements high. Each element may be either On or the standard 8 x 12 dot box. Three data bits may be used to Off. However, the entire display may be one of two colors, select one of eight colors for the entire character box. The selected by using the color set select pin. A 2K x 8 display extra bit is available to implement mode switching on-the-fly. memory is required. Each pictel equals two dot-clocks by two A 512-word display memory is required. A density of 64 x 32 scan lines. elements is available in the display area. The element area is four dot-clocks wide by six lines high. The 128 x 96 Color Graphics Mode (Graphics Three C) - Alpha Semigraphic-6 Mode - The alpha semigraphic-6 The 128 x 96 color graphics mode generates a display 128 mode maps six 4 x 4 dot elements into the standard 8 x 12 elements wide by 96 elements high. Each element may be dot alphanumeric box, pro'!iding a screen density of 64 x 48 one of four colors. A 3K x 8 display memory is required. elements. Six bits are used to generate this map and two Each pictel equals two dot-clocks by two scan lines. data bits may be used to select one of four colors in the The 128x 192 Graphics Mode (Graphics Three R) - The display box. The element area is four dot-clocks wide by four 128 x 192 graphics mode generates a display matrix 128 lines high. elements wide by 192 elements high. Each element may be Full QraphicMode either On or Off, but the On elements may be one of two· There are eight full graphic modes available from the VDG. colors, selected with the color set select pin. A 3K x 8 display These modes require 1K to 6K bytes of memory. The eight full memory is required. Each pictel equals two dot-clocks by graphic modes include an outside color border in one of two one scan line. colors, depending upon the color set select (CSS) pin. The 128 x 192 Color Graphics Mode (Graphics Six C) - The CSS pin selects one of two sets of four colors in the four color 128 x 192 color graphics mode generaies a display 128 graphic modes. elements wide by 192 element high. Each element may be The 64 x 64 Color Graphics Mode (Graphics One C) - one of four colors. A 6K x 8 display memory is required. The 64 x 64 color graphics mode generates a display matrix Each pictel equals two dot-clocks by one scan line. 64 elements wide by 64 elements high. Each element may The 256 x 192 Graphics Mode (Graphics Six R) - The be one of four colors. A 1K x 8 display memory is required. 256 x 192 graphics mode generates a display 256 elements Each pictel equals four dot-clocks by three scan lines. wide by 192 elements high. Each element may be either On The 128 x 64 Graphics Mode (Graphics One R) - The 128 or Off, but the On elements may be one of two colors, x 64 graphics mode generates a matrix 128 elements wide selected with the color set select pin. A 6K x 8 display by 64 elements high. Each element may be either On or Off. memory is required. Each pictel equals on·e dot-clock by one However, the entire display may be one of two colors, scan line. 5·198 F6847 Table 1 Mode Control Inputs A/G A/S INT/EXT INV GM2 GM1 GMo Alpha/Graphic Mode Selected 0 0 0 0 X X X Internal Alphanumeric 0 0 0 1 X X X Internal Alphanumeric Inverted 0 0 1 0 X X X External Alphanumeric 0 0 1 1 X X X External Alphanumeric Inverted 0 1 0 X X X X Alpha Semigraphic-4 0 1 1 X X X X Alpha Semigraphic-6 1 X X X 0 0 0 64 x 64 Color Graphic 1 X X X 0 0 1 128 x 64 Graphic 1 X X X 0 1 0 128 x 64 Color Graphic 1 X X X 0 1 1 128 x 96 Graphic 1 X X X 1 0 0 128 x 96 Color Graphic • 1 X X X 1 0 1 128 x 192 Graphic 1 X X X 1 1 0 128 x 192 Color Graphic 1 X X X 1 1 1 256 x 192 Graphic Table 2 Summary of Major Modes Title Memory Colors Display Elements Alphanumeric (Internal) 512 x 8 2 Alphanumeric '(External) 512 x 8 2 Alpha Semigraphic-4 512 x 8 8 Box----m---Element Alpha Semigraphic-6 512 x 8 4 Box ---§}--Element Matrix 64 x 64 64 x 64 Color Graphic 1K x 8 4 Elements 128 x 64 Graphic' 1K x 8 2 Matrix 128 Elements Wide by 128 x 64 Color Graphic 2K x 8 4 64 Elements High 128 x 96 Graphic' 1.5K x 8 2 Matrix 128 Elements Wide by 128 x 96 Color Graphic 3K x 8 4 96 Elements High 128 x 192 Graphic' 3K x 8 2 Matrix 128 Elements Wide by 128 x 192 Color Graphic 6K x 8 4 192 Elements High Matrix 256 256 x 192 Graphic' 6K x 8 2 Elements Wide by 192 Elements High -Graphic mode turns each element on or off. The color may be one of two. 5·199 Table 3 Detailed Description of VDG Modes VDG Pins Color MS AlG AlS INT/&XT GM2 GMt GMO ess INV Character Color ! Background Border 0 0 Green I Black Black Black t I Green 1 0 0 0 X X X ------t----- , - - - - t 0 Orange I Black Black t Black I Orange I 0 0 Green I Black Black t Black I Green 1 0 0 t X X X --- --L ____ 1 - - - - - 0 I Orange Black t t Black I Orange Black I L, C2 Ct Co Color 0 X X X Black 1 0 0 0 Green 1 0 0 t Yellow t 0 t 0 X X X X X t 0 t 0 Blue Black 1 0 t 1 Red 1 t 0 0 Buff t t 0 t Cyan t 1 t 0 Magenta 1 t 1 t Orange L, C, Co Color 0 X X Black 0 1 0 0 Green 1 0 1 Yellow 1 t 0 Blue t 0 t 1 X X X X 1 t t Red Black 0 X X Black t 0 0 Buff t t 0 t Cyan t t 0 Magenta t t 1 Orange Ct Co Color 0 0 0 Green Green 0 t Yellow 1 0 Blue t 1 X X 0 0 0 X t 1 Red 1----- 0 0 Buff 0 t Cyan t t 0 Magenta Buff t 1 Orange L, Color 0 Black Green 0 1 Green t 1 X X 0 0 t X 1------------ 1----- 1 0 Black Buff t Buff 0 Green 1 t X X 0 t 0 X Same Color as Graphics One C r----- 1 Bulf 0 Green Same Color as 1 1 X X 0 t t X ----- Graphics One A t Buff 0 Green 1 t X X t 0 0 X Same Color as Graphics One C ----- t Buff 0 Green Same Color as t t X X t 0 t X Graphics One R ----- t Buff 0 Green Same Color as 1 t X X t t 0 X Graphics One C ----- t Bulf 0 Green Same Color as t t X X t 1 t X Graphics One R f----- t Buff 5-200 Table 3 Detailed Description of VDG Modes (Cont.) TV Screen VOG Data Bus Comments Display Mode Detail The mternal alphanumeric mode uses an Internal 8 Dots --1 I- character generator that contains the followmg 32 Characters in Columns 16 Characters '-[g-- ~ 120015 ~", _ Extra ASCII Code five dot by seven dol characters: @ ABCDEF GHIJKLMNOPQRSTUVWXYZ [ !"#$%&'0·+,-.I0123456789:;<=>? The 6·bit I 1 - SP ASCII code leaves two bits free; these may be In Rows >--s externally connected to the mode pins (AtG, AlS, INT/EXT, GM2. GM1. GMO. CSS or lNV), . .•.. ... 32 Characters The external alphanumeric mode uses an exter- in Columns nal character generator as well as a row counter. Thus, custom character fonts are graphic symbol One Row of 16 Characters sets with up to 256 dtfferent 8 dot X 12 dot Custom Characters In Rows "characters" that may be displayed, The semigraphic-4 mode uses an internal 64 Display Elements "coarse graphics" generator in which a rectangle In Columns • (8 dots by 12 dots) is divided into four equal parts. One 32 Display Elements The luminance of each part is determined by a Element in Rows corresponding bit on the VOG data bus. The color of illuminated parts is determined by three bits 64 Display Elements The semigraphic-6 mode is similar to the Ls L, m Columns semigraphic-4 mode with the following differ- L3 L2 I c, I col Lsi L,I L31 L21 Ll I Lol ences. The 8 dot by 12 dot rectangle tS dtvtded 48 Dtsplay Elements into StX equal parts. Color tS determined by the In Rows Ll Lo two remaining bits. 64 Display Elements in Columns Tne graphics one C mode uses a maximum of 1024 bytes of display RAM i~ whicn one pair of 64 Display Elements bits speCifies one picture element in Rows 128 Display Elements in Columns The graphics one R mode uses a maximum of 1024 bytes at display RAM in which one bit 64 Oisplay Elements specifies one picture element. in Rows 128 Display Elements The graphics two C mode uses a maximum of in Columns 2048 bytes of display RAM in which one pair of btt 64 Display Elements speCifies one picture element. in Rows 128 Display Elements The graphics two R mode uses a maximum of in Columns 1536 bytes of display RAM in which one bit 96 Display Elements specifies one picture element in Rows 128 Display Elements The graphics three C mode uses a maximum of in Columns I E31 E21 E, I Eo I 3072 bytes of display RAM In which one pair of 96 Display Elements bytes specifies one picture element. in Rows 128 Display Elements The graphics three R mode uses a maximum of in Columns 3072 bytes of display RAM in which one bit 192 Display Elements specifies on picture element In Rows 128 Display Elements The graphiCS six C mode uses a maximum of 6144 in Columns bytes of display RAM in which one pair of bit 192 Display Elements specifies one picture element in Rows 256 Display Elements The graphics six R mode uses a maximum 016144 in Columns bytes of display RAM In which one bit specifies 192 Display Elements one picture element. in Rows 5·201 F6847 Absolute Maximum Ratings Stresses greater than those listed may cause permanent damage Supply Voltage, Vee -0.3 V, + 7.0 V to the device. This is a stress rating only, and functional operation of tae device under these or any other conditions above those indicated in the operational Input Voltage, any Pin, VIN -0.3 V, + 7.0 V sections of this data sheet is not implied. Exposure to absolute maximum Operating Temperature Range, TA O°C, +70°C rating conditions for extended periods may affect device reliability. Storage Temperature Range, TSTG -65°C, +150°C Power Dissipation, PD 945 mW DC Characteristics Vee = 5.0 V ±5%, VSS = 0.0 V, TA = O°C to + 70°C, unless otherwise noted Symbol Characteristic Min Typ Max Unit Conditions Input HIGH Voltage VIH CLK VSS + 2.4 Vee Vdc Other Inputs VSS + 2.0 Vee Input LOW Voltage VIL CLK VSS - 0.3 VSS + 0.4 Vdc Other Inputs VSS - 0.3 VSS + 0.8 Input Leakage Current lin CLK, GMO-GM2, INV, INT/EXT, MS, 2.5 !L Adc VSS, DDO-DD7, AlS, A/G Three-State (OFF State) Input ILO 10 !L Adc Current DAo-DA12 Outp~HIGH Voltage CLoad = 30 pF VOH 2.4 Vdc RP, HS, FS ILoad = -100 !LA Output HIGH Voltage CLoad = 55 pF VOH 2.4 Vdc DAo-DA12 ILoad = -100 !LA Output LOW Voltage CLoad = 30 pF VOL VSS + 0.4 Vdc RP, HS, FS, ILoad = 1.6 mA Output LOW Voltage CLoad = 55 pF VOL VSS + 0.4 Vdc DAO-DA12 ILoad = 1.6 mA Output HIGH Current (Sourcing) IOH All Outputs (Except cPA, cPB, Y, -100 !LAdc VOH= 2.4V and CHB) Output LOW Current (Sinking) IOL All Outputs (Except cPA, cPB, Y, 1.6 mAdc VOL = 0.4 Vdc and CHB VIN = 0 Input Capacitance CIN 7.5 pF TA = 25°C All Inputs f = 1.0 MHz CLoad = 20 pF VR Chroma Bias Voltage 0.3 Vee Vdc RLoad = 200 k!1 Vec = 4.75 - 5.25 V Icc Supply Current 90 114 mAdc 5-202 F6847 DC Characteristics (Cont.) Symbol Characteristic Min Typ Max Unit Conditions VCepA Chroma 1>A Voltage VHI VR + 0.1 VCC CLoad = 20 pF Vo VR Vdc RLoad = 200 kn VLO VR - 0.1 VCC See Figure 2 VCepB Chroma 1>B Voltage VR + 0.1 Vce CLoad = 20 pF Vo VR Vdc RLoad = 200 kn VBurst VR - 0.05 Vee See Figure 2 VLO VR - 0.1 Vee Vy luminance Y Voltage CLoad = 20 pF Vs 0.2 Vee Vdc RLoad = 200 kn VBLANK 0.75 Vs VWL VWM VBLAeK Voltage White low Voltage White Medium .. ~ 0.7 Vs 0.62 0.5 Vs Vdc See Figure 2 See Figure 2 II VWH Voltage White High 0.38 Vs AC Characteristics Vee = 5.0 V ±5%, TA = O°C to 70°C Symbol Characteristic Min Typ Max Unit Conditions f ClK Frequency 3.579535 3.579545 3.579555 MHz ClKdc ClK Duty Cycle 45% 50% 55% Chroma Phase Delay (Measured with Respect to Y Output) See Figure 3C tVA 1>A 200 ns tYB 1>B 200 ns try Luminance Rise Time 60 ns See Figure 3D tty luminance Fall Time 50 ns Chroma Rise and Fall Times t rC1>A 1>A Rise Time 60 ns ttC1>A 1>A Fall Time 60 ns See Figure 3D t rC1>B 1>B Rise Time 60 ns ttC1>B 1>B Fall Time 60 ns tWFS Field Sync (FS) Pulse Width 14.6 ms See Figure 3A Row Preset (RP) tWRP 0.98 iJ-s Pulse Width See Figure 38 tHSRP 0.98 iJ-S Delay from HS tWHS Horizontal Sync (HS) 4.9 iJ-s See Figure 38 5·203 F6847 Fig. 2 Video and Chrominance Relationships Output Waveform Lett Border Right Border ~ _______________________ A~~;:!~eo ______________________ ~ Sync Blank AIG Black v Sync AIG + A/G - CSS II o ~_;s· L--I ....L...I_ _ .......II "B L(Bur.'i. Removed for AJG • CSS • GMO) Fig. 3 Timing Diagrams a. Field Sync b. Row Preset Leading Edge of t WHS Vert. Blanking FS---, HS----.. ~----------'WFS----------~ c. Chroma Phase Delay d. Video and Fall Times Level #2 v - -_ _ _ _ _ _....J v Level #2 "A _________-+_J "B "B --------' 5·204 F6847 Ordering Information Order Code Temperature Range F6847P, S P = Plastic Package S = Ceramic Package II 5·205 F6847 5-206 F6850/F68A50/F68B50 Asynchronous Communications Interface Adapter (ACIA) Microprocessor Product Description Logic Symbol The F6850 Asynchronous Communications Interface Adapter 22 21 20 19 18 17 16 15 (ACIA) provides the data formatting and control to interface serial asynchronous data communications information to bus-organized systems, such as the F6800 microprocessing unit (MPU). CSo The bus interface of the F6850 includes select, enable read/write, 10 CS, interrupt, and bus interface logic to allow data transfer over an F6850 CS. 7 8-bit bidirectional data bus. The parallel data of the bus system is 11 RS 23 serially transmitted and received by the asynchronous data interface, with proper formatting and error checking. The functional configuration of the ACIA is programmed via the data bus during system initialization. A programmable control register provides variable word lengths, clock division ratios, transmit 24 14 13 II control, receive control, and interrupt control. For peripheral or modem operation, three control lines are provided. These lines Vee = Pin 12 Vss = Pin 1 allow the ACIA to interface directly with a 0-600 bps modem. • 8- and 9-Bit Transmission • Optional Even and Odd Parity Connection Diagram • Parity, Overrun, and Framing Error Checking 24-Pin DIP • Programmable Control Register • Optional +1, +16, and +64 Clock Modes Vss CTS • Up to 1.0 Mbps Transmission Rx DATA DCD • False Start Bit Deletion • Peripheral/Modem Control Functions Rx ClK Do • Double Buffered Tx ClK D, • One or Two Stop Bit Operation RTS D. Pin Functions Tx DATA D3 00- 0 7 Bidirectional Data Lines iiffi D4 Rx DATA Receive Data Input CSo D. Rx CLK Receive Clock Input Tx CLK Transmit Clock Input CS. D6 CSo, CS1, CS2 Chip Select Inputs CS, D7 RS Register Select Input RS CTS Clear-to-Send Input E Enable Input Vee RiW Riw Read/Write Input RTS Request-to-Send Output (Top View) Tx DATA Transmit Data Output IRQ Interrupt Request Output DCD Data Carrier Detect Output 5·207 F6850/F68A50/F68B50 Block Diagram TRANSMIT CLOCK (Tx CLK) - - - - - - - - - , ENABLE (E) - - - ""'.,+'----.Il________ ..------ READIWRITE (RIW) _ CHIP CHIP SELECT 0 (CSO) - SELECT CHIP SELECT 1 ( CS 1) - REA~~~RITE CHIP SELECT 2 (Cs2) - CONTROL REGISTER SELECT (RS) _ 1.J~~!!!'j-----" TRANSMIT DATA (Tx DATA) Do- '-___J'••• r---- CLEAR-TO-SENO (ffi) D.- 01- o.- 0._ DATA BUS BUFFERS 1--_ _ _ > INTERRUPT REQUEST (IRQ) ' - - - - -.....- - - - - _ DATA CARRIER DETECT (OCO) 05- 06- r-..J...-"1-__ +--±-_____. . . REQUEST-TO-SENO (RTS) 0-, - RECEIVE CLOCK (Rx CLK) - - - - - - - - - - - - - _ Functional Description Transmit At the bus interface, the ACIA appears as two addressable A typical transmitting sequence consists of reading the ACIA memory locations. Internally, there are four registers: two status register either as a result of an interrupt or in turn in a read-only and two write-only. The read-only registers are status polling sequence. A character may be written into the transmit and receive data; the write-only registers are control and data register if the status read operation has indicated that the transmit data. The serial interface consists of serial input and transmit data register is empty. This character is transferred to output lines with independent clocks, and three a shift register, where it is serialized and transmitted from the peripheral/modem control lines. transmit data (Tx DATA) output preceded by a start bit and followed by one or two stop bits. Internal parity (odd or even) Power On/Master Reset can be optionally added to the character, and occurs between The master reset (CRo, CR1) should be set during system the last data bit and the first stop bit. After the first character is initialization to ensure the reset condition and prepare for written in the data register, the status register can be read programming the ACIA functional configuration when the again to check for a transmit data register empty condition and communications channel is required. Control bits CRs and CR6 current peripheral status. If the register is empty, another should also be programmed to define the state of the character can be loaded for transmission even though the first request-to-send (RTS) output whenever master reset is character is in the process of being transmitted (because of utilized. The ACIA also contains internal power-on reset logic to double buffering). The second character is transferred detect the power line turn-on transition and hold the chip in a automatically into the shift register when the first character reset state to prevent erroneous output transitions prior to transmission is completed. This seq'uence continues until all initialization. This circuitry depends on clean power turn-on the characters have been transmitted. transitions. The power-on reset is released by means of the bus-programmed master reset, which must be applied prior to Receive operating the ACIA. After master resetting the ACIA, the Data is received from a peripheral by means of the receive data programmable control register can be set for a number of (Rx DATA) input. A divide-by-one clock ratio is provided for an options, such as variable clock divider ratios, variable word externally synchronized clock (to its data) while the divide-by-16 length, one or two stop bits, and parity (even, odd, or none). and -64 ratios are provided for internal synchronization. Bit 5-208 F6850/F68A50/F68B50 synchronization in the divide-by-16 and -64 modes is initiated by Chip Select (CSO. CS1. CS2) the detection of 8 or 32 LOW samples, respectively, on the These three high-impedance, TTL-compatible input lines are receive data line. False start bit deletion capability ensures that a used to address the ACIA. The ACIA is selected when CSo and full half bit of a start bit has been received before the internal clock CS1 are HIGH and CS2 is LOW. Transfers 01 data to and from is synchronized to the bit time. As a character is being received, the ACIA are then performed under the control of the E, R/W, parity (odd or even) is checked and the error indication made and RS signals. available in the status register along with framing error, overrun error, and receive data register full. In a typical receiving Register Select (RS) sequence, the status register is read to determine if a character The register select line is a high-impedance input that is has been received from a peripheral.lflhe receive data is full, the TTL-compatible. A HIGH level is used to select the character is placed on the 8-bit ACIA bus when a read data transmit/receive data registers and a LOW level the command is received from the MPU. When parity has been control/status registers. The R/W signal line is used in selected for an 8-bit word (seven bits plus parity), the receiver conjunction with RS to select the read-only or write-only strips the parity bit (07 = 0) so that data alone is transferred to the register in each register pair. MPU. This feature reduces MPU programming. The status register can be read again to determine when another character Interrupt Request (IRQ) 5 is available in the receive data register. The receiver is also Interrupt request is a TTL-compatible, open-drain (no internal double buffered so that a character can be read from the data pull-up), active-LOW output that is used to interrupt the MPU. register as another character is being received in the shift The iRQ output remains LOW as long as the cause of the register. The above sequence continues until all characters have interrupt is present and the appropriate interrupt enable within been received. the ACIA is set. The IRQ status bit, when HIGH, indicates that the IRQ output is in the active state. Input/Output Functions The ACIA interfaces to the F6800 MPU through an 8-bit Interrupts result from conditions in both the transmitter and bidirectional data bus, three chip select lines, a register select receiver sections of the ACIA. The transmitter section causes line, an interrupt request line, read/write line, and enable line. an interrupt when the transmitter interrupt enabled condition is These signals, in conjunction with F6800 VMA output, permit selected (CRs • CRS), and the transmit data register empty the MPU to have complete control over the ACIA. (TORE) status bit is HIGH. The TORE status bit indicates the current status of the transmitter data register except when ACIA Bidirectional Data (Do - 07) inhibited by the CTS line being HIGH or the ACIA being The bidirectional data lines (00-07) allow for data transfer maintained in the reset condition. The interrupt is cleared by between the ACIA and the MPU. The data bus output drivers writing data into the transmit data register. The interrupt is are 3-state devices that remain in the high-impedance (OFF) masked by disabling the transmitter interrupt via CRs or CRs, state except when the MPU performs an ACIA read operation. or by the loss of CTS, which inhibits the TORE status bit. The receiver section causes an interrupt when the receiver interrupt ACIA Enable (E) enable is set and the receive data register full (RORF) status The enable signal (E) is a high-impedance, TTL-compatible bit is HIGH, an overrun has occurred, or the data carrier detect input that enables the bus input/output data buffers and clocks (OCO) line has gone HIGH. An interrupt resulting from the data to and from the ACIA. This signal normally is a derivative RORF status bit can be cleared by reading data or resetting the of the F6800 <1>2 clock. ACIA: Interrupts caused by overrun or loss of oeo are cleared by reading the status register after the error condition has Read/Write (R/W) occurred and then reading the receive data register or resetting The read/write line is a high-impedance input that is the ACIA. The receiver interrupt is masked by resetting the TTL-compatible and is used to control the direction of data flow receiver interrupt enable. through the ACIA input/output data bus interface. When R/W is HIGH (MPU read cycle), ACIA output drivers are turned on and Clock Inputs a selected register is read. When it is LOW, the ACIA output Separate high-impedance, TTL-compatible inputs are provided drivers are turned off and the MPU writes into a selected for clocking of transmitted and received data. Clock register. Therefore, the Riw signal is used to select read-only frequencies of 1, 16, or 64 times the data rate may be selected. or write-only registers within the ACIA. Transmit Clock (Tx ClK) The transmit clock input is used for the clocking of transmitted data. The transmitter initiates data on the negative transition of the clock. 5-209 F6850/F68A50/F68B50 Receive Clock (Rx ClK) Transmit Data Register (TOR) The receive clock input is used for synchronization of received Data is written into the transmit data register during the data. (In the + 1 mode, the clock and data must be negative transition of the E (Enable) pulse when the ACIA has synchronized externally.) The receiver samples the data on the been addressed with RS HIGH and .R/W LOW. Writing data positive transition of the clock. into the register causes the TDRE bit in the status register to go LOW. Data can then be transmitted. If the transmitter is Serial Input/Output lines idling and no character is being transmitted, the transfer takes place within one bit time of the trailing edge of the write Receive Data (Rx DATA) command. If a character is being transmitted, the new data The receive data line is a high-impedance, TTL-compatible input character commences as soon as the previous character is through which data is received in a serial format. Synchronization complete. The transfer of data causes the TDRE bit to indicate with a clock for detection of data is accomplished internally when empty. clock rates of 16 or 64 times the bit rate are used. Receive Data Register (RDR) Transmit Data (Tx DATA) Data is automatically transferred to the empty receive data The transmit data output line transfers serial data to a modem or register (RDR) from the receiver deserializer (a shift register) other peripheral. upon receiving a complete character. This event causes the receive data register full (RDRF) bit in the status buffer to go Peripheral/Modem Control HIGH (full). Data may then be read through the bus by The ACIA includes several functions that permit limited control of addressing the ACIA and selecting the RDR with RS and R/W a peripheral or modem. The functions included are clear-to-send, HIGH when the ACIA is enabled. The non-destructive read request-to-send and data carrier detect. cycle causes the RDRF bit to be cleared to empty although the data is retained in the RDR. The status is maintained by the Clear-te-Send (ill) RDRF bit to indicate whether or not the data is current. When This high~impedance, TTL-compatible input provides automatic the receive data register is full, the automatic transfer of data control of the transmitting end of a communications link via the from the receiver shift register to the data register is inhibited modem clear-to-send active-LOW output by inhibiting the and the RDR contents remain valid, with its current status transmit data register empty (TDRE) status bit. stored in the status register. Request-to-Send (RTS) Control Register The request-to-send output enables the MPU to control a The ACIA control register consists of eight bits of write-only peripheral or modem via the data bus. The RTS output buffer that are selected when RS and R/Ware LOW. This corresponds to the state of control register bits CR5 and CRa. register controls the function of the receiver, transmitter, When CRa == 0 or both CR5 and CRa = 1, the RTS output is LOW interrupt enables, and the request-to-send peripheral/modem (the active state.) This output can also be used for data terminal control output. ready (DTR). . Data Carrier Detect (DCD) Counter Divide Select Bits (CRo and CR1) , This high-impedance, TTL-compatible input provides automatic The counter divide select bits (CRo and CRt) determine the control, such as in the receiving end of a communications link, by divide ratios utilized in both the transmitter and receiver means of a modem Data Carrier Detect output. The DCD input sections of the ACIA. Additionally, these bits are used to inhibits and initializes the receiver section of the ACIA when provide a master reset for the ACIA that clears the status HIGH. A LOW-to-HIGH transition of DCD initiates an interruptto register (except for external conditions'on CTS and DCD) and the MPU to indicate the occurrence of a loss of carrier when the initializes both the receiver and transmitter. Master reset does receive interrupt enable bit is set. The RxCLK must be running for not affect other control register bits. Note that after power-on or proper DCD operation. a power fail/start, these bits must be set HIGH to reset the ACIA. After resetting, the clock divide ratio may be selected, ACIA Registers The block diagram for the ACIA indicates the internal registers on the chip that are used for the status, control, receiving, and transmitting of data. The content of each of the registers is summarized in Table 1. 5-210 F6850/F68A50/F68B50 Table 1 Definition of ACIA Register Contents Buffer Address RS· R/W RS·R/W -- Transmit Data Receive Data RS· R/W RS·R/W Data Register Register Control Register Status Register Bus Line Number (Write Only) (Read Only) (Write Only) (Read Only) 0 Data Bit 0' Data Bit 0 Counter Divide Select 1 (CRa) Receive Data Register Full (RDRF) 1 Data Bit 1 Data Bit 1 Counter Divide Select 2 (CR,) Transmit Data Register Empty (TORE) 2 Data Bit 2 Data Bit 2 Word Select 1 (CR2) Data Carrier Detect (DCD) 3 Data Bit 3 Data Bit 3 Word Select 2 (CR3) Clear-to-Send (CTS) 4 Data Bit 4 Data Bit 4 Word Select 3 (CR4) Framing Error (FE) 5 6 7 Data Bit 5 Data Bit 6 Data Bit r" Data Bit 5 Data Bit 6 Data Bit 7" Transmit Control 1 (CR s) Transmit Control 2 (CRe) Receive Interrupt Enable (CR 7 ) Receiver Overrun (OVRN) Parity Error (PE) Interrupt Request (IRQ) II 'Leading bit ~ LSB ~ Bit a "Data bit is zero in 7-bit plus parity modes. "-Data bit is "don't care" in 7-bit plus parity modes. These counter select bits provide for the following clock divide request-to-send (RTS) output, and the transmission of a break ratios: level (space). The following encoding format is used: CR1 CRo Function CR6 CRS Function 0 0 -i-1 o 0 RTS = LOW, Transmitting Interrupt Disabled 0 -i-16 o 1 RTS = LOW, Transmitting Interrupt Enabled 0 -i-64 o RTS = HIGH, Transmitting Interrupt Disabled Master Reset RTS = LOW, Transmits a Break Level on the Transmit Data Output. Transmitting Interrupt Disabled. Word Select Bits (CR2. CR3 and CR4) The word select bits are used to select word length, parity, and the number of stop bits. The encoding format is as follows: Receive Interrupt Enable Bit (CR7) The following interrupts are enabled by a HIGH level in bit position 7 of the control register (CRl): receive data register CR4 CR3 CR2 Function full, overrun, or a LOW-to-HIGH transition on the data carrier detect (DCD) signal line. 0 0 0 7 Bits + Even Parity + 2 Stop Bits 0 0 1 7 Bits + Odd Parity + 2 Stop Bits Status Register 0 1 0 7 Bits + Even Parity + 1 Stop Bit Information on the status of the ACIA is available to the MPU 0 1 1 7 Bits + Odd Parity + 1 Stop Bit by reading the ACIA status register. This read-only register is 1 0 0 8 Bits + 2 Stop Bits selected when RS is LOW and Riw is HIGH. Information 1 0 1 8 Bits + 1 Stop Bit stored in this register indicates the status of the transmit data 1 1 0 8 Bits + Even Parity + 1 Stop Bit register, the receive data register and error logic, and the 1 1 1 8 Bits + Odd Parity + 1 Stop Bit peripheral/modem status inputs of the ACIA. Word length, parity select, and stop bit changes are not Receive Data Register Full (RDRF). Bit 0 buffered and therefore become effective immediately. Receive data register full indicates that received data has been transferred to the receive data register. The RDRF bit is Transmitter Control Bits (CRs and CR6) cleared after an MPU read of the receive data register or by a Two transmitter control bits provide for the control of the master reset. The cleared or empty state indicates that the interrupt from the transmit data register empty condition, the 5·211 F6850/F68A50/F68B50 contents of the receive data register are not current. Data Parity Error (PE). Bit 6 carrier detect being HIGH also causes RDRF to indicate empty. The parity error flag indicates that the number of HIGHs (l's) in the character does not agree with the preselected odd or even Transmit Data Register Empty (TORE). Bit 1 parity. Odd parity is defined to be when the total nu mber of The transmit data register empty bit being set HIGH indicates ones is odd. The parity error indication is present as long as that the transmit dataregister contents have been transferred the data character is in the RDA. If no parity is selected, both and that new data may be entered. The LOW state indicates the transmitter parity generator output and the receiver parity that the register is full and that transmission of a new character check results are inhibited. has not begun since the last write data command. Interrupt Request (IRQ). Bit 7 Data Carrier Detect (DCD). Bit 2 The IRQ bit indicates the state of the I RQ output. Any interrupt The data carrier detect bit is HIGH when the DCD input from a condition with its applicable enable is indicated in this status modem has gone HIGH to indicate that a carrier is not present. bit. Any time the IRQ output is LOW, the IRQ bit is HIGH to This bit going HIGH causes an interrupt request to be indicate the interrupt or service request status. The IRQ bit is generated when the receive interrupt enable is set. It remains cleared by a read operation to the receive data register or a HIGH after the DCD input is returned LOW until cleared by write operation to the transmit data register. reading first the status register and then the data register, or until a master reset occurs. If the DCD input remains HIGH after read status and read data or master reset has occurred, the interrupt is cleared, and the DCD status bit remains HIGH and will follow the DCD input. Clear-to-Send (CTS). Bit 3 The clear-to-send bit indicates the state of the clear-to-send input from a modem. A LOW CTS indicates that there is a clear-to-send from the modem. In the HIGH state, the transmit data register empty bit is inhibited and the clear-to-send status bit is HIGH. Master reset does not affect the clear-to-send status bit. Framing Error (FE). Bit 4 Framing error indicates that the received character is improperly framed by a start and a stop bit and is detected by the absence of the first stop bit. This error indicates a synchronization error, faulty transmission, or a break condition. The framing error flag is set or reset during the receive data transfer titne. Therefore, this error indicator is present throughout the time that the associated character is available. Receiver Overrun (OVRN). Bit 5 Overrun is an error flag that indicates that one or more characters in the data stream were lost. That is, a character or a number of characters were received but not read from the receive data register (RDR) prior to subsequent characters being received; The overrun condition begins at the midpoint of the last bit of the second character received in su,;cession without a read of the RDR having occurred. The overrun does not occur in the status register until the valid character prior to overrun has been read. The RDRF bit remains set until the overrun is reset. Character synchronization is maintained during the overrun condition. The overrun indication is reset after the reading of data from the receive data register or by a master reset. 5-212 F6850/F68A50/F68B50 Absolute Maximum Ratings This device contains circuitry to protect the inputs against damage due to high static voltages or electrical fields; however it is advised that normal precautions be taken I Supply Voltage -0.3 V, +7.0 V to avoid application of any voltage higher than maximum rated voltages to this high- Input Voltage -0.3 V, +7.0 V impedance circuit. Operating Temperature - TL, TH F6850, F68A50, F68B50 O"C, +70'C F6850C, F68A50C -40"C, +85'C F6850Dl -5SC, +85'C F6850DM -55'C, +125'C Storage Temperature Range -55'C, +150'C Thermal Resistance Ceramic 60"C/W Plastic 120"C/W DC Characteristics Vee = 5.0 V ±5%, VSS = 0, TA = TL to TH, unless otherwise noted Symbol Characteristic Signal Min Typ Max Unit Condition VIH Input HIGH Voltage 2.0 Vee V VIL Input lOW Voltage -0.3 0.8 V liN Input leakage Current R/W, CSo, CS1, CS2, RS, 1.0 2.5 p.,A VIN = 0 to 5.25 V Rx DATA, Rx ClK, CTS, DCD ITSI 3-State Input Current 00- 0 7 2.0 10 p.,A VIN = 0.4 to 2.4 V (OFF State) VOH Output HIGH Voltage 00- 0 7 2.4 V ILoad = -205 p.,A, Enable Pulse Width < 25 p.,s Tx DATA, RTS 2.4 ILoad = -100 p.,A, Enable Pulse Width < 25 p.,s VOL Output lOW Voltage 0.4 V ILoad = 1.6 mA, Enable Pulse Width < 25 p.,s ILOH Output leakage Current IRQ 1.0 10 p.,A VOH = 2.4 V Po Power Dissipation 300 525 mW CIN Input Capacitance 00- 0 7 10 12.5 pF VIN = 0, TA = 25°C, E, Tx ClK, Rx ClK, R/W, 7.0 7.5 f = 1.0 MHz RS, Rx DATA, CSo, CS1, CS2, CTS, DCD COUT Output Capacitance RTS, Tx DATA 10 pF VIN = 0, TA = 25'C, IRQ 5.0 f = 1.0 MHz 5-213 F6850/F68A50/F68B50 AC Characteristics Vcc = 5.0 V ±5%, Vss = 0, TA = TL to TH, unless otherwise noted F68S0 F68ASO F68BSO Symbol Characteristic Min Max Min Max Min Max Unit Condition Minimum Clock Pulse Width, LOW PWCL 600 450 280 ns Figure 1 +16, +64 Modes Minimum Clock Pulse Width, HIGH PWCH 600 450 280 ns Figure 2 +16, +64 Modes fc Clock Frequency +1 Mode 500 750 1000 kHz +16, +64 Modes 800 1000 1500 tTDO Clock-to-Data Delay for Transmitter 600 540 460 ns Figure 3 tROS Receive Data Set-up Time +1 Mode 250 100 30 ns Figure 4 IROH Receive Data Hold Time +1 Mode 250 100 30 ns Figure 5 tlR Interrupt Request Release Time 1.2 0.9 0.7 IJ-S Figure 6 tRTS Request-to-Send Delay Time 560 480 400 ns Figure 6 tr, tl Input Transition Times (Except Enable) 1.0 0.5 0.25 IJ-s Note Note 1.0 p.8 or 10% of the pulse wid1h, whichever is smailer Bus Timing Characteristics Read (Figures 7 and 9) F68S0 F68ASO F68BSO Symbol Characteristic Min Max Min Max Min Max Unit lcycE Enable Cycle Time 1.0 0.666 0.500 IJ-S PWEH Enable Pulse Width, HIGH 0.45 25 0.28 25 0.22 25 IJ-S PWEL Enable Pulse Width, LOW 0.43 0.28 0.21 IJ-S Set-up Time, Address, and R/W Valid to tAS 160 140 70 ns Enable· Positive Transition tOOR Data Delay Time 320 220 180 ns IH Data Hold Time 10 10 10 ns tAH Address Hold Time 10 10 10 ns tEr, tEl Rise and Fall Time for Enable Input 25 25 25 ns Write (Figures 8 and 9) lcycE Enable Cycle Time 1.0 0.666 0.500 IJ-s PWEH Enable Pulse Width, HIGH 0.45 25 0.28 25 0.22 25 IJ-S PWEL Enable Pulse Width, LOW 0.43 0.28 0.21 IJ-s Set-up Time, Address, and R/W Valid to tAS 160 140 70 ns Enable Positive Transition tosw Data Set-up Time 195 80 60 ns IH Data Hold Time 10 10 10 ns tAH Address Hold Time .10 10 10 ns tEr, tEl Rise and Fall Time for Enable Input 25 25 25 ns 5-214 F6850/F68A50/F68B50 Fig. 1 Clock Pulse Width, LOW State Fig. 5 Receive Data Hold Time (+1 Mode) TX elK OR RXCl~1 ~-------' t 2.0 v RX eLK ~ Fig.2 Clock Pulse Width, HIGH State - - - : - 2. RX OATA .,..,.,...;OVX,---- l-tRDH 0.8 V TX elK Fig. 6 Request-to-Send Delay and Interrupt Request OR RX elK Release Times PWCH E\~08V _ Fig. 3 Transmit Data Output Delay X 2.4 V • ---'"--r- ____~~J _____________ ~O~4~V 2.4 V TX DATA Fig. 7 Bus Read Timing Characteristics Fig.4 Receive Data Set-up Time (+1 Mode) (Read Information from ACIA) ~2.0V RXDATA~~o~.•~v______________________ E --I t---- tRDSU RX ClK RS,ES,RiW 0 •• V DATA BUS 5·215 F6850/F68A50/F68B50 Fig. 8 Bus Write Timing Characteristics Fig. 9 Bus Timing Test Loads (Write Information into ACIA) Load A (00-07. RTS. Tx DATA) 1 - - - - - 'cyce -----+I 5.0 v TEST POINT C R = C 130 pF FOR~-o., C ,= 30 pF FOR RTS AND Tx DATA R = 11,7 kIl FOR~-o., R = 24 kIl FOR RTS AND Tx DATA -::- I! Load B (IRQ Only) 5.0 V TEST POINT d''·'1" F6850/F68A50/F68B50 Ordering Information Speed Order Code Temperature Range 1.0 MHz F6850P,S O°C to +70°C F6850CP,CS -40°C to +85°C F6850DL -55°C to +85°C F6850DM -55°C to +125°C 1.5 MHz F68A50P,S O°C to +70°C F68A50CP,CS -40°C to +85°C 2.0 MHz F68B50P,S O°C to +70°C P :::: Plastic package, S = Ceramic package 5·217 F6850/F68A50/F68B50 5-218 F68521F68A52/F68B52 Synchronous Serial Data Adapter Microprocessor Product Description Logic Symbol The F6852 Synchronous Serial Data Adapter (SSDA) 10 11 14 13 provides a bidirectional serial interface for synchronous data information interchange. It contains interface logic for simultaneously transmitting and receiving Ax DATA standard synchronous communications characters Rx elK Tx DATA in bus-organized systems, such as the F6800 micro- Tx elK IRQ processor systems. RESET TUF 24 eTS SM/D'ffi The bus interface of the F6852 includes Select, Enable, 23 oeD Read/Write, Interrupt, and bus interface logic to allow data transfer over an 8-bit bidirectional data bus. The parallel data of the bus system is transmitted serially 22 21 20 19 18 17 16 15 and received by the synchronous data interface with synchronization, fill character insertion/deletion, and error checking. The functional configuration of the Vss=Pin' • SSDA is programmed via the data bus during system _V_c_C_=_p_i_n_'_2_______________________________________ initialization. Programmable control registers provide control for variable word lengths, transmit control, receive control, synchronization control, and interrupt Connection Diagram control. Status, timing, and control lines provide 24-Pln DIP peripheral or modem control. Vss Typical applications include floppy disk controllers, Rx DATA cassette or cartridge tape controllers, data communi- cations terminals, and numerical control systems. Rx elK Tx elK SM/OTR • Programmable Interrupts from Transmitter, Receiver, and Error Detection Logic Tx DATA • Character Synchronization on 1 or 2 SYNC Codes • External Synchronization Available for Parallel-Serial Operation TUF 05 • Available Speeds: 1.0 MHz for the F6852, 1.5 MHz for iiESET 06 the F68A52, and 2.0 MHz for the F68B52 • Programmable SYNC Code Register • Up to 600K BPS Transmission RS • Peripheral/Modem Control Functions Vee My • 3 Bytes of FIFO Buffering on Both Transmit and Receive (Top View) • 7-, 8-, or 9-Bit Transmission • Optional Even and Odd Parity • Parity, Overrun, and Underflow Status 5·219 F6852/F68A52/F68B52 Pin Names Rx DATA Receive Data Input Rx ClK Receive Clock Input Tx ClK Transmit Clock Input SM/DTR Sync Match/Data Terminal Ready Output Tx DATA Transmit Data Output IRQ Interrupt Request Output TUF Transmitter Underflow Output RESET Reset Input CS Chip Select Input RS Register Select Input CTS Clear-to-Send Input DCD Data Carrier Detect Input 00-07 Bidirectional Data Lines E Enable (System <1>2 Clock) Input R/W Read/Write Input Vss Ground Input Vee +5 V Power Supply Input Block Diagram ENABLE READ/Wii'ifE: CHIP SELECT 1----------- 6~~~SMIT r~J:1~:;~-------~---o~ TRANSMITTER REGISTER SELECT UNDERFLOW ~;---------- CLEAR-TO-SEND ~=~3~~E==~===::r;:;;;;;;;;:;;;;, 5'ETECT Do 0, DATA CARRIER INTERRUPT INTERRUPT LOGIC REQUEST I'~~~~~::::::::::~~::::~ .. r.~~;;;-' '+~~~~---l--- RECEIVE 1........-+--+-+_______ DATA RECEIVE ~~-r--~ CLOCK SYNC 1-----..... MATCHI DATA TERMINAL READY 5·220 F6852/F68A52/F68852 Device Operation ITUF). The transmitter and receiver each have individual At the bus interface, the SSDA appears as two clock inputs, allowing simultaneous operation under addressable memory locations. Internally, ther·e are separate clock control. Signals to the microprocessor seven registers: two read-only and five write-only are the data bus and Interrupt Request (IRQ). registers. The read-only registers are status and receive data; the write-only registers are control 1, control 2, Initialization control 3, sync code, and transmit data. The serial During a power-on sequence, the SSDA is reset via the interface consists of serial input and output lines with RESET input and internally latched in a' reset condition to independent clocks, and four peripheral/modem prevent erroneous output transitions. The sync code control lines. register, control register 2, and control register 3 should be programmed prior to the programmed release of the Data to be transmitted is transferred directly into the transmitter and/or receiver reset bits; these bits in 3-byte transmit data first-in, first-out (FIFO) register from control register 1 should be cleared after the RESET line the data bus. Availability of the input to the FIFO is has gone HIGH. indicated by a bit in the status register; once data is entered, it moves through the FIFO to the last empty Transmitter Operation • location. Data at the output of the FIFO is automatically Data is transferred to the transmitter section in parallel transferred from the FIFO to the transmitter shift register form by means of the data bus and transmit data FIFO. as the shift register becomes available to transmit the The transmit data FIFO is a 3-byte register whose status next character. If data is not available from the FIFO is indicated by the transmitter data register available (underflow condition), the transmitter shift register is (TDRA) status bit and its associated interrupt enable bit. automatically loaded with either a sync code or an all- Data is transferred through the FIFO on negative edges "1s" character. The transmit section may be pro- of Enable IE) pulses. Two data transfer modes are grammed to append even, odd, or no parity to the provided in the SSDA. The 1-byte transfer mode transmitted word. An external Clear-to-Send (CTS) control provides for writing data to the transmitter section I and line is provided to inhibit the transmitter without reading from the receiver section) one byte at a time. clearing the FIFO. The 2-byte transfer mode provides for writing two data characters in succession. Serial data is accumulated in the receiver based on the synchronization mode selected. In the external sync Data will automaiically transfer from the last register mode, used for parallel-serial operation, the receiver is location in the transmit data FIFO Iwhen it contains synchronized by the Data Carrier Detect I DCD) input data) to the transmitter shift register during the last half and transfers successive bytes of data to the input of of the last bit of t,he previous character. A character is the receiver FIFO. The single-sync-character mode transferred into the shift register by the Transmit Clock. requires that a match occur between the sync code Data is transmitted LS8 first, and odd or even parity register and one incoming character before data transfer can be optionally appended. The unused bit positions in to the FIFO begins. The two-sync-character mode short word length characters from the data bus are requires that two sync codes be received in sequence to "don't cares". I Note: The data bus inputs may be establish synchronization. Subsequent to synchronization reversed for applications requiring the MSB to be in any mode, data is accumulated in the shift register transferred first, e.g., IBM format for floppy disks; and parity is optionally checked. An indication of parity however, care must be taken to program th.e control error is carried through the receiver FIFO with each registers properly - Table 1 will have its bit character to the last empty location. Availability of a positions reversed.). word at the FIFO output is indicated by a bit in the status register, as is a parity error. When the shift register becomes empty, and data is not available for transfer from the transmit data FIFO, an The SS DA and its internal registers are selected by the underflow occurs, and a character is inserted into the address bus, Read/Write (R/Vil), and Enable control lines. transmitter data stream to maintain character synchroni- To configure the SSDA, control registers are selected zation. The character transmitted on underflow will be and the appropriate bits set. The status register is either a mark (all "1s") or the contents of the sync addressable for reading status. code register, depending upon the state of the transmit sync code on underf.low control bit. The underflow Other I/O lines, in addition to Clear-to-Send ICTS) and condition is indicated by a pulse (= Tx ClK HIGH period) Data Carrier Detect IDCD), include Sync Match/Data on the Transmitter Underflow output (when in Tx Sync Terminal Ready I SM/DTR) and Transmitter Underflow on underflow mode). The Transmitter Underflow output 5·221 F6852/F68A52/F68B52 occurs coincident with the transfer of the last half of the code detection techniques require custom logic external last bit preceding the underflow character. The underflow to the SSDA for character synchronization and use of status bit is set until cleared by means of the clear the parallel-to-serial I external sync I mode. I Note: The underflow control bit. This output may be used in floppy receiver shift register is set to "1 s" when resel.i disk systems to synchronize write operations and for appending CRCC. Synchronization The SSDA provides three operating modes with respect Transmission is initiated by clearing the transmitter reset to character synchronization: one-sync-character mode, bit in control register 1. When the transmitter reset bit is two-sync-character mode, and external sync mode. The cleared, the first full positive half-cycle of the Transmit external sync mode requires synchronization and control Clock will initiate the transmit cycle, with the of the receiving section through the Data Carrier Detect transmission of data or underflow characters beginning IDCD) input Isee Figure 7). This external synchroni- on the negative edge of the Transmit Clock pulse that zation could consist of direct line control from the started the cycle. If the transmit data FI FO was not transmitting end of the serial data link or from external loaded, an underflow character will be transmitted logic designed to detect the start of the message block. (see Figure 41. The one-sync-character mode searches on a bit-by-bit basis until a match is achieved between the data in the The Clear-to-Send (CTS) input provides for automatic shift register and the sync code register. The match control of the transmitter by means of external system indicates character synchronization is complete and will hardware; e.g., the modem CTS output provides the be retained for message block. In the two-sync- control in a data communications system. The CTS character mode, the receiver searches for the first sync input resets and inhibits the transmitter section when code match on abit-by-bit basis and then looks for a HIGH, but does not reset the transmit data FIFO. The second successive sync code character prior to TDRA status bit is inhibited by CTS being HIGH in establishing character synchronization. If the second either the one-sync-character or two-sync-character sync code character is not received, the bit-by-bit mode of operation. In the external sync mode, TDRA is search for the first sync code is resumed. unaffected by CTS in order to provide transmit data FIFO status for preloading and operating the transmitter Sync codes received prior to the completion of under the control of the CTS input. When the synchronization (one or two characters) are not transmitter reset bit (Tx Rs) is set, the transmit data transferred to the receive data FIFO. Redundant sync FIFO is cleared and the TDRA status bit is cleared. codes during the preamble or sync codes that occur After one E clock has occurred, the transmit data FIFO as "fill characters" can be automatically stripped from becomes available for new data with TDRA inhibited. the data, when the strip sync control bit is set, to minimize system loading. The character synchronization Receiver Operation will be retained until cleared by means of the clear sync Data and a presynchronized clock are provided to the bit, which also inhibits synchronization search when set. SSDA receiver section by means of the Receive Data (Rx DATA, and Receive Clock IRx ClKI inputs. The data Receiving Data is a continuous stream of binary data bits without Once synchronization has been achieved, subsequent means for identifying character boundaries within the characters are automatically transferred into the receive stream. It is, therefore, necessary to achieve character data FIFO and clocked through the FIFO to the last synchronization for the data at the beginning of the data empty location by E pulses (MPU system q,2).The block. Once synchronization is achieved, it is assumed receiver data available (RDA) status bit indicates when to be retained for all successive characters within data is available to be read from the last FI FO location the block. I No. 31 when in the I-byte transfer mode. The 2-byte transfer mode causes the RDA status bit to indicate data Data communication systems utilize the detection of is available when the last two FI FO register locations sync codes during the initial portion of the preamble to are full. Data being available in the receive data FIFO establish character synchronization. This requires the causes an interrupt request if the receiver interrupt detection of a single code or two successive sync enable (RIEl bit is set. The MPU will then read the codes. Floppy disk and cartridge tape units require SSDA status register, which will indicate that data is 16 bits of defined preamble and cassettes require eight available for the MPU read from the receive data FIFO bits of preamble to establish the reference for the start register. The IRQ and RDA status bits are reset by a of record. All three are functionally equivalent to the read from the FIFO. If more than one character has detection of sync codes. Systems that do not utilize been received and is resident in the receive data FIFO, 5-222 F68521F68A52/F68B52 subsequent E clocks will cause the FIFO to update, and Enable (E) the ROA and IRQ status bits will be set again. The read The Enable (E) signal is a high-impedance, TTL- data operation for the 2-byte transfer mode requires an compatible input that enables the bus input/output data intervening E clock between reads to allow the FIFO buffers, clocks data to and from the SSDA, and moves data to shift. Optional parity is automatically checked as data through the FIFO registers. This Signal is normally data is received, and the parity status condition is the continuous F6800 system <1>2 clock, so that incoming maintained with each character until the data is read data characters are shifted throLigh the FIFO. from the receive data FIFO. Parity errors will cause an interrupt request if the error interrupt enable (EIE) has Read/Write (RiW) been set. The parity bit is not transferred to the data The Read/Write line is a high-impedance input that is bus but must be checked in the status register. Note: In TTL-compatible and is used to control the direction of the 2-byte transfer mode, parity should be checked prior data flow through the SSDAs input/output data bus to reading the second byte, since a FIFO read clears the interface. When Read/Write is HIGH (MPU read cycle), error bit. SSOA output drivers are turned on if the device is selected and a selected register is read. When it is Other status bits that pertain to the receiver section LOW, the SSOA output drivers are turned off and the 5 are receiver overrun and data carrier detect (DCD). The MPU writes into a selected register. The Read/Write overrun status bit is automatically set when a transfer of signal is also used to select read-only or write-only a character to the receive data FIFO occurs and the first registers within the SSOA. register of the receive data FIFO is full. Overrun causes Chip Select (CS) an interrupt if error interrupt enable (EIE) has been set. This high-impedance, TTL-compatible input line is used The transfer of the overrunning character into the FIFO to address the SSOA. The SSOA is selected when CS is causes the previous character in the FI FO input register LOW. VMA should be used in generating the CS input location to be lost. The overrun status bit is cleared by to insure that false selects will not occur. Transfers of reading the status register 1when the overrun condition data to and from the SSOA are then performed under is present), followed by a receive data FIFO register the control of the Enable signal, Read/Write, and read. Overrun cannot occur and be cleared without Register Select. providing an opportunity to detect the occurrence via the status register. Register Select (RS) The Register Select line is a high-impedance input that A positive transition on the OCO input causes an is TTL-compatible. A HIGH level is used to select interrupt if the EIE control bit has been set. The control registers C2 and C3, the sync code register, and interrupt caused by OCO is cleared by reading the the transmit/receive data registers. A LOW level selects status register when the OCD status bit is HIGH, the control 1 and status registers (see Table 1). followed by a receive data FIFO read. The OCO status bit will subsequently follow the state of the OCO input Interrupt Request (IRQ) when it goes LOW. Interupt Request is a TTL-compatible, open-drain (no internal pull-up), active-LOW output that is used to SSOA Interface Signals for MPU interrupt the MPU. The Interrupt Request remains LOW until cleared by the MPU. The SSOA interfaces to the F6800 MPU with an 8-bit bidirectional data bus. a Chip Select line. a Register Reset Input (RESET) Select line, an Interrupt Request line, a Read/Write line, The Reset input provides a means of resetting the SSOA an Enable line, and a Reset line. These Signals, in from an external source .. In the LOW state, the Reset conjunction with the F6800 VMA output, permit the MPU input causes the following: to have complete control over the SSOA. 1. Receiver reset IRx Rs) and transmitter reset ITx Rs) Bidirectional Oata Bus (00-07) bits are set, causing both the receiver and transmitter sections to be held in a reset condition. The bidirectional data lines 100-07) allow for data transfer between the SSOA and the MPU. The data bus 2. Peripheral control bits PC1 and PC2 are reset to "0", causing the SM/OTR output to be HIGH. output drivers are 3-state devices that remain in the 3. The error interrupt enable (EIE) bit is reset. high-impedance (OFF) state except when the MPU 4. An internal synchronization mode is selected. performs an SSOA read operation. 5. The transmitter data register available (TORA) status bit is cleared and inhibited. 5-223 F6852/F68A52/F68B52 When RESET returns HIGH (the inactive state), the the system. The stored CTS information and its transmitter and receiver sections will remain in the reset associated IRQ (if enabled) are cleared by writing a "1" state until the receiver reset and transmitter reset bits in the CTS bit in control register 3 or in the transmitter are cleared via the bus under software control. The reset bit. The CTS status bit subsequently follows the control register bit affected by RESET (Rx Rs, Tx Rs, CTS input when it goes lOW. PC1, PC2, EIE, and E/l Synci cannot be changed when RESET is lOW. The CTS input provides character timing for transmitter data when in the external sync mode. Transmission is Clock Inputs initiated on the negative transition of the first full positive clock pulse of the Transmit Clock (Tx ClK) after Separate high-impedance, TTL-compatible inputs are the release of CTS. See Figure 6. provided for clocking of transmitted and received data. Data Carrier Detect (DCD) Transmit Clock (Tx ClK) The DCD input provides a real-time inhibit to the The Transmit Clock input is used for the clocking of receiver section (the Rx FI FO is not disturbed). A transmitted data. The transmitter shifts data on the positive DCD transition resets and inhibits the receiver negative transition of the clock. section except for the receive FIFO and the RDRA status bit and its associated IRQ. Receive Clock (Rx ClK) The Receive Clock input is used for clocking in received The positive transition of DCD is stored within the data. The clock and data must be synchronized SSDA to insure that its occurrence will be acknowl- externally. The receiver samples the data on the positive edged by the system. The stored DCD information and transition of the clock. its associated IRQ (if enabled) are cleared by reading the status register and then the receive FIFO, or by Serial Input/Output lines writing a "1" into the receiver reset bit. The DCD status bit subsequently follows the DCD input when it goes Receive Data (Rx DATA) lOW. The DCD input provides character synchronization The Receive Data line is a high-impedance, TTl- timing for the receiver during the external sync mode of compatible input through which data is received in a operation. The receiver will be initialized and data will serial format. Data rates are from 0 to 600K bps. be sampled on the positive transition of the first full Receive Clock cycle after release of DCD. See Figure 7. Transmit Data (Tx DATA) The Transmit Data output line transfers serial data to a Sync Match/Data Terminal Ready (SM/i5TR) modem or other peripheral. Data rates are from The SM/DTR output provides four functions depending o to 600K bps. on the state of the PC1 and PC2 control bits. When the Sync Match mode is selected (PC1 = "1", PC2 = "0"), Peripheral/Modem Control the output provides a one-bit-wide pulse when a sync code is detected. This pulse occurs for each sync code The SSDA includes several functions that permit limited match even if the receiver has already attained control of a peripheral or modem. The functions synchronization. The SM output is inhibited when included are Clear-to-Send, Sync Match/Data Terminal PC2 = "1". The DTR mode (PC1 = "0") provides an Ready, Data Carrier Detect, and Transmitter Underflow. output level corresponding to the complement of PC2 (DTR = "0" when PC2 = "1"). See Table 1. Clear-to-Send (CTS) The CTS input provides a real-time inhibit to the Transmitter Underflow (TUF) transmitter section (the transmit data FIFO is not The Transmitter Underflow output indicates the occurrence disturbed ).A positive CTS transition resets the of a transfer of a "fill character" to the transmitter shift transmitter shift register and inhibits the TDRA status bit register when the last location (No.3) in the transmit and its a~sociated interrupt in both the one-sync- data FIFO is empty. The Transmitter Underflow output character and two-sync-character modes of operation. pulse is approximately a Tx ClK HIGH period wide and TDRA is not affected by the CTS input in the external occurs during the last half of the last bit of the character sync mode. preceding the underflow. See Figure 4. The Transmitter Underflow output pulse does not occur when the Tx Sync The positive transition of CTS is stored within the SSDA bit is in the reset state. to insure that its occurrence will be acknowledged by 5-224 F6852/F68A521F68B52 SSDA Registers inhibiting resynchronization. The clear sync bit is set to Seven registers in the SSDA can be accessed by means clear and inhibit receiver synchronization in a/l modes of the bus. The registers are defined as a read-only or and is reset to "0" to enable resynchronization. write-only according to the direction of information flow The Register Select input (RS) selects two registers in Transmitter Interrupt Enable (TIE). Cl Bit 4 each state, one being read-only and the other write- TIE enables both the Interrupt Request output (IRQ) and only. The Read/Write input (R/W) defines which of the interrupt request status bit to indicate a transmitter two selected registers will actually be accessed. Four service request. When TIE is set and the TDRA status registers (two read-only and two write-only) can be bit is HIGH, the IRQ output will go lOW (the active addressed via the bus at any particular time. These state) and the IRQ status bit will go HIGH. registers and the required addressing are defined in Table 1. Receiver Interrupt Enable (RIE). Cl Bit 5 RIE enables both the Interrupt Request output (IRQ) Control Register 1 (Cl) and the interrupt request status bit to indicate a receiver service request. When RII; is set and the RDA status is Control register 1 is an a-bit, write-only register that can HIGH, the IRQ output will go lOW (the active state) • be addressed directly from the data bus. Control and the IRQ status bit will go HIGH. register 1 is addressed when RS = "0" and R/W = "0". Address Control 1 (AC1) and Address Control 2 (AC2). Receiver Reset (Rx Rs). Cl. Bit 0 Cl Bits 6 and 7 The receiver reset control bit provides both a reset and ACl and AC2 select one of the write-only registers- inhibit function to the receiver section. When Rx Rs is control 2, .control 3, sync code, or transmit data set, it clears the receiver control logic, sync logic, error FIFO-as shown in Table 1, when RS="l" and logic, Rx Data FIFO control, parity error status bit, and R/W= "0". DCD interrupt. The receiver shift register is set to "1 s". The Rx Rs bit must be cleared after the occurrence of.a Control Register 2 (C2) lOW level on RESET in order to enable the receiver section of the SSDA. Control register 2 is an a-bit, write-only register that can be programmed from the bus when the address Transmitter Reset (Tx Rs). Cl Bit 1 control bits in control register 1 (ACl and AC2) are The transmitter reset control bit provides both a reset reset, RS = "1" and R/iN = "0". and inhibit to the transmitter section. When Tx Rs is set, it clears the transmitter control section, transmitter shift Peripheral Control 1 (PC1) and Peripheral Control 2 (PC2). register, Tx Data FIFO (which can be reloaded after one C2 Bits 0 and 1 E clock pulse), the transmitter underflow status bit, and Two control bits, PCl and PC2, determine the operating the CTS interrupt, and inhibits the TDRA status bit (in characteristics of the Sync Match/DTR output. PC1, the one-sync-character and two-sync-character modes). when HIGH, selects the Sync Match mode. PC2 The Tx Rs bit must be cleared after the occurrence of a provides the inhibit/enable control for the SM/DTR lOW level on RESET in order to enable the transmitter output in the sync match mode. A one-bitcwide pulse is section of the SSDA. If the Tx FIFO is not preloaded, it generated at the output when PC2 is "0", and a match must be loaded immediately after the Tx Rs release to occurs between the contents of the sync code register prevent a transmitter underflow condition. and th.e incoming data even if sync is inhibited (Clear Sync bit = "1".) The sync match pulse is referenced to Strip Synchronization Characters (Strip Sync). Cl Bit 2 the negative edge of Rx ClK pulse causing the match. If the strip sync bit is set, the SSDA will automatically See Figure 3. strip all received characters that match the contents of the sync code register. The characters used for The Data Terminal Ready (DTR) mode is selected when synchronization (one or two characters of sync) are PCl is lOW. When PC2 = "1", the SM/DTR output = "0", always stripped from the received data stream. and vice versa. The operation of PC2 and PCl is summarized in Table 1. Clear Synchronization (Clear Sync). Cl Bit 3 The clear sync control bit provides the capability of dropping receiver character synchronization and 5-225 F6852/F68A521F68852 1-Byte/2-Byte Transfer (1-Byte/2-Byte), C2 Bit 2 External/Internal Sync Mode Control (E/I Sync), C3 Bit 0 When 1-Byte/2-Byte is set, the TDRAand RDA status When the E/I sync mode bit is HIGH, the SSDA is in bits will indicate the availability of their respective data the external sync mode and the receiver synchronization FIFO register for a single -byte data transfer. Alternately, logic is disabled. Synchronization can be achieved by if ,-Byte/2-Byte is reset, the TDRA and RDA status bits means of the DCD input or by starting Rx ClK at the indicate when two bytes of data can be moved without midpoint of data bit 0 of a character with DCD lOW. a second status read. An intervening Enable pulse must Both the transmitter and receiver sections operate as occur between data transfers. parallel- serial converters in the external sync mode. The clear sync bit in control register 1 acts as a receiver Word Length Selects (WS1, WS2, WS3), C2 Bits 3, 4, 5 sync inhibit when HIGH to provide a bus-controllable Word length select bits WS1, WS2, and WS3 select word inhibit. The sync code register can serve as a length of seven, eight, or nine bits, including parity, as transmitter fill character register and a receiver match shown in Table 1. register in this mode. A lOW on the RESET input resets the E/I sync mode bit, placing the SSDA in the internal Transmit Sync Code on Underflow (Tx Sync), C2 Bit 6 sync mode. When Tx Sync is set, the transmitter will automatically send a sync character when data is not available for One-Sync-Character/Two-Sync-Character Mode Control transmission. If Tx Sync is reset, the transmitter will (1-Sync/2-Sync), C3 Bit 1 transmit a mark char/icter (including the parity bit When the 1-Sync/2-Sync bit is set, the SSDA will position) on underflow. When the underflow is detected, synchronize on a single match between the received a pulse approximately a Tx ClK HIGH period wide will data and the contents of the sync code register. When occur on the underflow output if the Tx Sync bit is set. the 1-Sync/2-Sync bit is reset, two successive sync Internal parity generation is inhibited during underflow characters must be received prior to receiver synchroni- except for sync code fill character transmission in 8-bit zation. If the second sync character is not detected, the pi us parity word lengths. bit-by-bit search resumes from the first bit in the second character. See the description of the sync code register Error Interrupt Enable (EIE), C2 Bit 7 for more details. When EIE is set, the IRQ status bit will go HIGH and Clear CTS Status (Clear CTS), C3 Bit 2 the IRQ output will go lOW if: When a "1" is written into the CTS bit, the stored status ·1. A receiver overrun occurs. The interrupt is cleared and interrupt are cleared. Subsequently, the CTS status by reading the status register and reading the bit reflects the state of the CT~ut. The Clear CTS Rx Data FIFO. control bit does not affect the CTS input nor its inhibit 2. i5CiS input has gone to a "1". The interrupt is of the transmitter section. The Clear CTS command bit cleared by reading the status register and reading the is self-clearing, and writing "0" into this bit is a Rx Data FIFO. nonfunctional operation. 3. A parity error exists for the character in the last location (No.3) of the Rx Data FIFO. The interrupt is cleared by Clear Transmit Underflow Status (CTUF), C3 Bit 3 reading the Rx Data FIFO. When a "1" is written into the CTUF status bit, the 4. The CTS input has gone to a "1 ". The interrupt is cleared CTUF bit and its associated interrupt are reset. The by writing a "1" in the Clear CTS bit, C3 bit 2, or by CTUF command bit is self-clearing and writing a "0" Tx Reset. into this bit is a nonfunctional operation. 5. The transmitter has underflowed (in the Tx Sync on underflow mode). The interrupt is cleared by writing a Sync Code Register "1" into the clear underflow, C3 bit 3, or Tx Reset. The sync code register is an 8-bit register for storing When EIE is a "0", the IRQ status bit and the IRQ the programmable sync code required for received data output are disabled for the above error conditions. A character synchronization in the one-sync-character and lOW level on the RESET input resets EIE to "0". two-sync-character modes. The sync code register also provides for stripping the sync/fill characters from the Control Register 3 (C3) received data (a programmable option I as well as automatic insertion of fill characters in the transmitted Control Register 3 is a 4-bit, write-only register that can be data stream. The sync code register is not utilized for programmmed from the bus when RS = "1" and R/W = "0", receiver character synchronization in the external sync and address control bit AC1 = "1" and AC2 = "0". mode; however, it provides storage of receiver match and transmit fill characters. 5·226 F6852/F68A52/F68852 The sync code register can be loaded when AC2 and WSO-WS2 AC1 are a "1" and "0", respectively, and RiiN = "0" and Strip Sync (Data Format) RS = "1". (C1 Bit 2) (C2 Bit 3-5) The sync code register may be changed after the 1 X No transfer of sync code. No detection of a match with the received data (the first parity check of sync code. sync code having been detected) to synchronize with a 'Transfer data and sync 0 With double-word sync pattern. (This sync code change must Parity codes. Parity check. occur prior to the completion of the second character.) The sync match (SM) output can be used to interrupt 0 Without 'Transfer data and sync the MPU system to indicate that the first eight bits have Parity codes. No parity check. matched. The service routine would then change the * Subsequent to synchronization. sync match register to the second half of the pattern. Alternately, the one-sync-character mode can be used It is necessary to pay attention to the selected sync for sync codes for 16 or more bits by using software to character in the following cases: check the second and subsequent bytes after reading them from the FIFO. 1. Data format is (6 + parity), (7 + parity). • 2. Strip sync is not selected (LOW). The detection of the sync code can be programmed to 3. After synchronization when sync code is used as appear on the Sync Match/DTR output by writing a "1" a fill character. in PC1 (C2 bit 0) and a "0" in PC2 (C2 bit 1). The Sync Match output will go HIGH for one bit time beginning at The transmitter sends the sync character without parity, but the character interface between the- sync code and the the receiver checks the parity as if it is normal data. next character (see Figure 3). Therefore, the sync character should be chosen to match the parity check selected for the receiver in this Parity lor Sync Character special case. Transmitter Receive Data First-In First-Out Register (Rx Data FIFO) The transmitter does not generate parity for the sync character except in the 9-bit mode. The receiVe data FIFO register consists of three 8-bit registers that are used for buffer storage of received 9-bit (8-bit + parity) 8-bit sync character + parity data. Each 8-bit register has an internal status bit that 8-bit (7-bit + parity) . 8-bit sync character (no parity) monitors its full or empty condition. Data is always 7-bit (6-bit + parity) . 8-bit sync character (no parity) transferred from a full register to an adjacent empty register. The transfer from register to register occurs on E pulses. The RDA status bit will be HIGH when data is Receiver available in the last location of the Rx Data FIFO. At Synchronization In an overrun condition, the overrunning character will The receiver automatically strips the sync character(s). (two be transferred into the full first stage of the FIFO sync characters if 2-sync mode is selected) that is used register and will cause the loss of that data character. to establish synchronization. Parity is not checked for Successive overruns continue to overwrite the first these sync characters. register of the FIFO. This destruction of data is indicated by means of the overrun status bit. The Alter Synchronization is Established overrun bit will be set when the overrun occurs and When strip-sync bit is selected, the sync characters (fill remains set until the status register is read, followed by characters) are stripped and parity is not checked for a read of the Rx Data FI FO. the stripped sync (Iill) characters. When strip-sync bit is not selected (LOW), the sync character is assumed to Unused data bits for short word lengths (including the be normal data and it is transferred into FIFO after parity bit) will appear as "Os" on the data bus when parity checking. (When non-parity format is selected, Rx Data FIFO is read. parity is not checked.) 5-227 F68521F68A52/F68B52 Transmit Oats First-In First-Out Register(Tx Data FIFO) mode. The Tx ,Data FIFO can be loaded with two bytes without an intervening status read; however, one E pulse The transmit data FIFO register consists of three 'S-bit must occur between loads. TDRA is inhibited by the registers that are used for buffer storage of data to be Tx Reset or RESET. When Tx Reset is set. the Tx Data transmitted. Each S-bit register has an internal status bit FIFO is cleared and then released on the next E clock that monitors its full or empty condition. Data is always pulse. The Tx Data FIFO can then be loaded with up to transferred from a full register to an adjacent empty three characters of data, even though TDRA is inhibited. register. The transfer is clocked by E pulses. This feature allows preloading data prior ,to the release of Tx Aeset. A HIGH level on the CTS input inhibits the The TDRA status bit will be HIGH if'the Tx Data FIFO is TDRA status bit in either sync mode of operation (one- available for data. sync-character or two-sync-character). CTS does not affect TDRA in the external sync mode. This enables the Unused data bits for short word lengths will be handled SSDA to operate under the control of the CTS input, as "don't cares'~. The parity bit is not transferred with TDRA indicating the status of the Tx Data FIFO. over the data bus, since the SSDA generates parity at The CTS input does not clear the Tx Data FIFO in any I I transmission. ' operating mode. I When an underflow occurs, the underflOW character will Data Carrier Detect (DCD), S Bit 2 be either the contents of the sync code register or an A positive transition on the DCD input is stored in the all-"15" character. The underflow will be stored in the SSDA until cleared by reading both status and Rx Data status register until cleared and will appear'on the under- , FIFO. A "1" written into Rx Rs also clears the stored flow output as a pulse approximately a Tx ClK HIGH i5C5 status. The 5Ci5 status bit. when set, indicates period wide. that the 5CD input has gone HIGH. The reading of bot~ status and receive data FIFO allows bit 2 of subsequent Status Register status reads to indicate the state of the DCD input until the next positive transition. The status register is an S-bit, read-only register that provides the real-time status of the SSDA and the Clear-to-Send (CTS), S Bit 3 associated serial data chan nel. Reading' ttie status A positive transition on the CTS input is stored in the register is a non-destructive process. The method of SSDA until cleared by writing a "1" into the Clear CTS clearing status bits depends upon the function each bit control bit or the Tx Rs bit. The CTS status bit, when represents and is discussed for each bit in the register. set, indicates that the ffi input has gone HIGH. The Clear ffi command (a "1" into C3 bit 2) allows bit 3 of Receiver Data Available (RDA), S Bit 0 $ubsequent status reads to indicate the state of the CTS The receiver data available status bilindicates when input until the next positive transition. receiver d'ata can be read from the Rx Data FIFO. The receiver data being prese!)t in the last register (No.3) of Transmitter Underflow (TUF), S Bit 4 the FIFO causes RDA to be HIGH for the 1-byte transfer When data is not available for the transmitter, an mode. The RDA bit being HIGH indicates that the last underflow occurs and is so indicated in the status two registers (No.2 and No.3) are full when in the register (in the Tx Sync on underflow mode), The 2-byte transfer mode. The second character can be read underflow status bit is cleared by writing a "1" into the without a second status read (to determine that the clear underflow (CTUF) control bit or the Tx Rs bit. character is"available). An E pulse m'ust occur between TUF indicates that a sync character will be transmitted reads of the Rx Data FIFO to allow the FIFO to shift. as the next character. A TUF is indicated on the output Status must be read on a word-by-word basis if receiver only when the contents of the sync code register are to data error checking is important. The ADA status bit is be transferred (,transmit sync code on underflow = "1"). reset automatically when data is not avail,able. Receiver Overrun (Rx Ovrn), S Bit 5 Transmitter Data Register Available (TDRA), S Bit 1 Overq.m indicates data has been received when the The TDRAstatus bit indicates that data can be'loaded Rx Data FIFO is full. resulting in data 1055. The Rx Ovrn into the Tx Data FIFO register. The first register (No.1) status' bit is set when overrun occurs. The RI< Ovrn of the Tx Data FIFO being empty will be indicated by a status bit is cleared by reading status foll()wed by HIGH level of the TDRA status bit in the 1-byte transfer reading the Rx Data FIFO or by setting the Rx Rs mode. The first two registers (No.1 and No.2) must be control bit. empty for TDRA to be HIGH when in the 2-byte transfer 5-22S F6852/F68A521F68B52 Receiver Parity Error (PE), S Bit 6 Interrupt Request (IRQ), S Bit 7 The parity error status bit indicates that parity for the The interrupt request status bit indicates when the IRQ character in the last register of the Rx Data FIFO did output is in the active state (IRQ output = "0"). The IRQ not agree with selected parity. The parity error is status bit is subject to the same interrupt enables (RIE, cleared when the character to which it pertains is read TIE, and EIE) as the IRQ output. The IRQ status bit from the Rx Data FIFO or when Rx Rs occurs. The simplifies status inquiries for polling systems by OeD input does not clear the parity error or Rx Data providing single-bit indication of service requests. FIFO status bits. Table 1 SSDA Programming Model Control Address Register Inputl Control Regllter Content RS R/W AC2 AC1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Status IS) Control 1 0 C1 0 0 1 X X X X Interrupt Request IIRQ) Address Control 2 IAC2) Receiver Parity Error (PE) Address Control 1 IAC1) Receiver Overrun (Rx Ovrn) Receiver Interrupt Enable (RIE) Transmitter Clear-to- Underflow Send (TUF) Transmitter Clear Interrupt Enable ITIE) (CTS) Sync Data Carrier Transmitter, Receiver Detect (DCD) Strip Sync Characters (Strip Sync) Data Register Available (TDRA) Transmitter Reset (Tx Rs) Data Available (RDA) Receiver Reset (Rx Rs) • Receive 1 1 X X D7 Os Os 04 D3 D2 0, Do Data FIFO Control 2 1 0 0 0 Error Transmit Word Word Word 1-Bytel Peripheral Peripheral (C2) Interrupt Sync Length Length Length 2-Byte Control 2 Control 1 Enable Code on Select 3 Select 2 Select 1 Transfer (PC2) (PC1) (EIE) Underflow IWS3) (WS2) IWS1) 11-Bytel (Tx Sync) 2-Byte) Control 3 1 0 0 1 Not Used Not Used Not Used Not Used Clear Clear CTS One-Sync- External! (C3) Transmitter Status Characterl Internal Underflow (Clear CTS) Two-Sync- Sync Mode Status Character Control ICTUF) Mode (Ell Sync Control (1-Syncl 2-Sync) Sync 1 0 1 0 D7 Os Os 04 D3 D2 0, Do Code Transmit 1 0 1 1 D7 Os 05 04 D3 02 0, Do Data FIFO x = Don't Care 5-229 F6852/F68A52/F68B52 Status Register IRQ Bit 7 The IRQ flag is cleared when the source of the IRQ is cleared. The source is determined by the enables in the control registers: TIE, RIE, EIE. Bits 6-0 Indicate the SSDA status at a point in time, and can be reset as follows: PE Bit 6 Read Rx Data FIFO, or a "1" into Rx Rs (C1 bit 0). Rx Ovrn Bit 5 Read status and then Rx Data FIFO, or a "1" into Rx Rs (C1 bit 0). TUF Bit 4 A "1" into CTUF (C3 bit 3) or into Tx Rs (C1 bit 1) CTS Bit 3 A "1" into CTS (C3 bit 2) or a "1" into Tx Rs (C1 bit 1). DCD Bit 2 Read status and then Rx Data FIFO or a "1" into Rx Rs (C1 bit 0). TDRA Bit 1 Write into Tx Data FIFO. RDA Bit 0 Read Rx Data FIFO. Control Register 1 AC2, AC1 Bits 7, 6 Used to access other registers, as shown above. RIE Bit 5 When "1", enables interrupt on RDA (S bit 0). TIE Bit 4 When "1", enables interrupt on TDRA (S bit 1). Clear Sync Bit 3 When "1", clears receiver character synchronization Strip Sync Bit 2 When "1", strips all sync codes from the received data stream. Tx Rs Bit 1 When "1", resets and inhibits the transmitter section. Rx Rs Bit 0 When "1", resets and inhibits the receiver section. Con.trol Register 2 EIE Bit 7 When "1", enables the PE, Rx Ovrn, TUF, CTS, and 5C5 interrupt flags (S bits 6 through 21. Tx Sync Bit 6 When "1", allows sync code content to be transferred on underflow, and enables the TUF status bit and output. When "0", an all-mark character is transmitted on underflow. WS3, 2, 1 Bits 5-3 Word Length Select Bit 5 Bit 4 Bit 3 WS3 WS2 WS1 Word Length 0 0 0 6 Bits + Even parity 0 0 1 6 Bits + Odd Parity 0 1 0 7 Bits 0 1 1 8 Bits 1 0 0 7 Bits + Even Parity 1 0 1 7 Bits + Odd Parity 1 1 0 8 Bits + Even Parity 1 1 1 8 Bits + Odd Parity 5·230 ·F6852/F68A52/F68B52 1-Byte/2-Byte Bit 2 When "1", enables the TDRA and RDA bi.ts to indicate when a 1-byte transfer can occur; when "0", the TDRA and RDA bits indicate when a 2-byte transfer can occur. PC2, PC1 Bits 1-0 SM/DTR Output Control Bit 1 Bit 0 PC2 PC1 SM/i)'i'R Output at Pin 5 0 0 1 0 1 Pulse .J""L , 1-Bit Wide, on SM 1 0 0 1 1 SM Inhibited, 0 Control Register 3 CTUF Clear CTS 1-Sync/2-Sync Ell Sync Bit 3 Bit 2 Bit 1 Bit 0 When "1", clears TUF (5 bit 4)and IRQ, if enabled. When "1", clears CTs (S bit 3) and IRQ, if enabled. When "1", selects the one-sync-character mode; when "0", selects the two-sync-character mode. When "1", selects the external sync mode; when "0", selects the internal sync mode. • Notes When the SSDA is used in applications requiring the MSB of data to be received and transmitted first, the data bus inputs to the SSDA may be reversed (DO to 07. etc.l. Caution must be used when this is done, since the bit positions in this table will be reversed, and the parity should not be selected. Absolute Maximum Ratings Supply Voltage -0.3 V, +7.0 V Stresses greater than those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only Input Voltage -0.3 V, +7.0 V and functional operation of the device at these or any other conditions Operating Temperature Range above those indicated in the operational sections of this specification is F6852P,S, F68A52P, S, F68B52P, S O·C, +70°C not implied. Exposure to absolute maximum rating conditions for F6852CP, CS, F68A52CP, CS -40°C, +85°C extended periods may affect device reliability. F6852DLQB -55° C, +85° C F6852DMQB -55°C, +125·C Storage Temperature Range -55°C, +150·C Thermal Resistance Plastic Package Ceramic Package 5·231 F68521F68A521F68B52 DC Characteristics Vee = 5.0 V ± 5%, Vss = 0, TA = 0 to 70·C unless otherwise noted Symbol. Characteristic Signal Min Typ Max Unit Test Conditions VIH Input HIGH Voltage 2.0 V VIL Input lOW Voltage 0.8 V liN Input leakage Current Tx ClK,Rx ClK, 1.0 2.5 p.A VIN = 0 to 5.25 V . Rx DATA, Enable, RESET, RS, R/W, CS, DCD,~ Irsl 3-State (OFF State) Do-D7 2.0 10 p.A VIN = 0.4 to 2.4 V, Input Current Vee = 5.25 V VOH Output HIGH Voltage Do-D7 2.4 V ILoad = -205 p.A, Enable Pulse Width <25 p's ILoad = -100 p.A, Enable Pulse Width <25 P.s Tx DATA, DTR, TUF 2.4 VOL Output lOW Voltage 0.4 V ILo~d = 1.6 rnA, Enable Pulse Width <25 P.s ILOH Output leakage Current (lRO) 1.0 10 p.A VOH = 2.4 V (OFF State) Po Power Dissipation 300 525 mW CIN Input Capacitance pF VIN = 0, TA = 25·C, Do-D7 12.5 f = 1.0 MHz All Other Inputs. 7.5 COUT Output Capacitance Tx DATA, SM/D'fR, 10 pF VIN = 0, TA = 25°C, TUF f = 1.0 MHz IRO 5.0 5-232 F68521F68A521F68B52 AC Characteristics Vcc = 5.0 V ± 5%, Vss = 0, TA = O°C to +70°C unless otherwise noted. F6852 F68A52 F68B52 Symbol Characteristic Min Max Min Max Min Max Unit Test Condition PWCL Minimum Clock Pulse Width, 700 400 280 ns LOW (Figure 1) PWCH Minimum Clock Pulse Width, 700 400 280 ns HIGH (Figure 2) fc Clock Frequency 600 1000 1500 kHz tAOSU Receive Data Set-up Time 350 200 160 ns (Figures 3, 7) tAOH Receive Data Hold Time 350 200 160 ns (Figure 3) tSM Sync Match Delay Time 1.0 0.666 0.500 ",s (Figure 3) tTOO Clock-to-Data Delay for 1.0 0.666 0.500 ",s Transmitter (Figure 4) trUF Transmitter Underflow 1.0 0.666 0.500 ",s (Figure 4, 6) tOTA DTR Delay Time (Figure 5) 1.0 0.666 0.500 ",s tlA Interrupt Request Release Time 1.2 0.800 0.600 ",s (Figure 5) tAes RESET Minimum Pulse Width 1.0 0.666 0.500 ",s tCTS CTS Set-up Time (Figure 6) 200 150 120 ns toco DCD Set-up Time (Figure 7) 500 350 250 ns tr, tf Input Rise and Fall Times 1.0· 1.0· 1.0· ",s 0.8 V to 2.0 V (except Enable) ·1.0 ~s or 10% of the pulse width. whichever is smalier. 5·233 --~ ------ F68521F68A52/F68B52 Bus Timing Characteristics Read (Figures 8 and 10) F6852 F68A52 F68B52 Symbol Characteristic Min Max Min Max Min Max Unit tcycE Enable Cycle Time 1.0 0.666 0.5 p,s PWEH Enable Pulse Width. HIGH 0.45 25 0.28 25 0.22 25 p,s PWEL Enable Pulse Width. LOW 0.43 0.28 0.21 p,s tAS Set-up Time. Address and R/W valid to 160 140 70 ns Enable positive transition tOOR Data Delay Time 320 220 180 ns tH Data Hold Time 10 10 10 ns tAH Address Hold Time 10 10 10 ns tEr. tEl Rise and Fall Time for Enable input 25 25 25 ns . Write (Figures 9 and. 10) tcycE Enable Cycle Time 1.0 0.666 0.5 p,s PWEH Enable Pulse Width. HIGH 0.45 25 0.28 25 0.22 25 p,s PWEL Enable Pulse Width. LOW 0.43 0.28 0.21 p,s tAs Set-up Time. Address and R/W valid to 160 140 70 ns Enable positive transition tosw Data Set-up Time 195 80 60 ns tH Data Hold Time 10 10 10 ns tAH Address Hold Time 10 10 10 ns tEr. tEl Rise and Fall Time for Enable input 25 25 25 ns Fig. 1 Clock Pulse Width, Low-State Fig. 2 Clock Pulse Width, High-State Tx eLK OR Rx elK -:£:Y- 0.8 Y WCL - Tx elK - y OR Rx elK =t=}-.o ...-PWCH 5-234 F6852/F68A52/F68B52 Fig. 3 Receive Data Set-up and Hold Times and Sync Match Delay Time Dn~ 1 0, DO Rx elK Rx DATA SYNC MATCH -------------------------------C,. . ~. ,~.O.- _ _ _I~ n = Number of bits in character 0.4 V • ~ = Don't care Fig. 4 Transmit Data Output Delay and Fig. 5 Data Terminal Ready and Transmitter Underflow Delay Time Interrupt Request Release Times Tx ClK 2.0,'("\ O.BV _______ _ _ _ _ _- J ~~ tTDD~ -- ~tDTR Tx DATA ---- IrUF 0, DTR ________-r__ )( Jl~0.~4~V -"R 2.4 V I ______________ )"2:-:.4:-:V:O-------- TUF _ _ _ _ _ _ _ _ _ _ _ _..1 IRQ _ _ _ _ _ _ _ _ _ _..J n = Number of bits in character 5-235 F68521F68A52/F68852 Fig. 6 Clear-to-Send Set-up Time Fig. 9 Bus Write Timing. Characteristics (Write Information Into SSDA) CTi~ Tx ClK ]f---\::""-j ---~Jc.: - _____...Jr RS, ca, R/W r-rroo DATA BUS Tx DATA _ _ _ _ _ _ _ _ _ _ _. . . . I ¥ D O Fig. 10 Bus Timing Test Loads Fig. 7 Deta Carrier Detect Set-up Time Load A (00-07, D'fR, Tx DATA, TUF) 5.0 V TEST POINT - _.......-Kl-... Rx ClK C lN914 CIROSU OR EQUIVALENT )f2.0V Rx DATA -------J'"to.!1l Do c = 130 pF for 00-07 = 30 pF for OTR, Tx OATA, and TUF Fig. 8 Bus Read Timing Characteristics R = 11.7 kll for 00-07 = 24 kll for OTR, Tx OATA, and TUF (Read Information from SSDA) Load B (IRQ Only) 5.0 V ~ --:l..J,100 pF 3k Rx, ea, RtW TEST POINT DATA BUS 5-236 F6852/F68A52/F68B52 Ordering Information Speed Order Code Temperature Range 1.0 MHz F6852 P,S O°C to 70°C F6852 CP,CS -40° C to +85° C F6852DLQB -55° C to +85° C F6852DMQB -55°C to +125°C 1.5 MHz F68A52 P,S O°C to 70°C F68A52 CP,CS -40° C to +85° C 2.0 MHz F68B52 P,S O°C to 70°C P = Plastic package; S = Ceramic package • 5-237 F68521F68A52/F68B52 5-238 F6854/F68A54/F68B54 Advanced Data Link Controller (ADLC) Microprocessor Product Description Logic Symbol The F6854/F68A54/F68B54 Advanced Data Link Controllers (ADLC) perform the complex MPU/data communication link function for the Advanced Data Communication Control Procedure (ADCCP), High-level Data Link Control Rx Data FLAG DET (HDLC) and Synchronous Data Link Control (SDLC) standards. The ADLC provides key interface requirements F6854 RESET with improved software efficiency. The ADLC is designed to LOC/OTR provide the data communications interface for both primary ROSR TOSR and secondary stations in stand-alone, polling and loop configurations. Vcc=Pin 14 • F6800 Compatible Vss=Pin1 • Protocol Features • • Automatic Flag Detection and Synchronization • Zero Insertion and Deletion • Automatic Address Field Extension (Optional) Connection Diagram • Extended Control Field (Optional) 28-Pin DIP • Auto Extendable Logic Control Field (Optional) • Variable Word Length Information Field CTS 5-, 6-, 7-, or 8-Bit RTS OCO • Automatic Frame Check Sequence RxData LOC/OTR Generation and Check RxC FLAG OET • Abort Detection and Transmission TOSR TxC • Idle Detection and Transmission TxData ROSR • Modem/Data Channel Control Lines IRQ 00 • Loop Mode RESET 0, • Single 5 V Power Supply • Enhanced Speed Options 02 F6854-1.0 MHz 03 F68A54-1.5 MHz RS, 0, F68B54-2.0 MHz 05 06 Pin Names 07 RxData Receiver Serial Data Input (Top View) RxC Receiver Data Timing Clock Input TxC Transmitter Data Timing Clock Input RESET Chip Master Reset Input CS Chip Select Input RSo, RS, Register Addressing Select Inputs Riw Read/Write Input E System Control Clock Input DCD Data Carrier Detect Input CTS Clear-to-Send Input Do - 07 Bidirectional Data I/O Lines RTS Request-to-Send Output TxData Transmitter Serial Data Output IRQ Interrupt Request Output RDSR Receiver Data Service Request Output TDSR Transmitter Data Service Request Output FLAG DET Flag Detect Output LOC!DTR Loop On-line Control/Data Terminal Ready Output Vss Ground Vee +5 V Power Supply 5-239 F6854/F68A54/F68B54 Block Diagram RM cs RSo RSl i i i i I CONTROL CONTROL CONTROL I- REGISTER 2 REGISTER 3 REGISTER 4 CHIP SELECT ( DCD ;>. lt t RxC - RECEIVER DATA AFO RECEIVER ZERO DELETION I RxDala REGISTER 1 (3 BYTES) I 2 3 I ~ - f - STATUS - f - REGISTER 2 l - Fes CHECK I II 'FLAG/ABORTliOLE DETECT <= - DATA A DATA BUS BUS 00-07 INTERFACE c.. STATUS - REGISTER 1 l- TRANSMIT r- I Fes GENERATOR .1] I FLAG/ABORT GENERATOR I rr DATA FIFO t =) REGISTER 1 (3 BYTES) TRANSMlnER ZERO INSERTION L TxOala I t 2 3 4 TxC ill CONTROL REGISTER 1 ~ CONTROL I LOC/OTR iffii " + ( iiil:i TDSR ROSR Operation Transmitter Operation The Transmitter Data FIFO Register (Tx FIFO) cannot be Initialization pre-loaded when the transmitter section is in a reset state. During a power-on sequence, the ADLC is reset via the After the reset release, the Flag/Mark Idle Select control bit Reset (RESET) input and internally latched in a reset (F/M Idle) selects either the mark idle state (inactive idle) condition to prevent erroneous output transitions. The four or the flag time fill (active idle) state. Thi.s active or inactive Control Registers must be programmed prior to the release mark idle state will continue until data is loaded into the of the reset condition. The release of the reset condition is Tx FIFO. performed via software by writing a LOW into the Receiver Reset (RxRS) control bit and/or Transmitter Reset (TxRS) The availability of the Tx FIFO is indicated by the control bit. The release of the reset condition will be done Transmitter Data Available/Frame Complete (TDRAlFC) after FiESET has gone HIGH. status bit under the control of the 2-Byte/1-Byte Transfer (2/1-Byte) control bit. TDRA status is inhibited by the At any time during operation, writing a HIGH into the TxRS control bit or Clear-to-Send (CTS) input being RxRS control bit or TxRS control bit causes the reset HIGH. When the 1-byte mode is selected, one byte of the condition of the receiver or transmitter section. Tx FIFO is available for data transfer when TDRA/FC goes 5·240 F6854/F68A54/F68B54 HIGH. When the 2-byte mode is selected, two successive The frame is terminated by one of two methods. The most bytes can be transferred when TDRA/FC goes HIGH. efficient way to terminate the frame from a software standpoint is to write the last data character into the The first byte (address field) should be written into the Tx FIFO frame-terminate address (RS1, RSo = HH) rather Tx FIFO at the frame-continue address. Then the trans- than the Tx FIFO frame-continue address (RS1, RSo = HL). mission of a frame automatically starts. If the Transmitter is An alternate method is to follow the last write of data in the in a mark idle state, the transfer of an address causes an Tx FI FO frame-continue address with the setting of the opening flag within two or three transmitter clock cycles. If Transmit Last Data (Tx Last) control bit. Either method the Transmitter has been in a time fill state, the current time causes the last character to be transmitted and the Frame fill flag being transmitted is assumed as an opening flag Check Sequence (FCS) field to be appended automatically and the address field will follow it. along with a closing flag. Data for a new frame can be loaded into the Tx FIFO immediately after the old frame A frame continues as long as data is written into the data if TDRA/FC is HIGH. The closing flag can serve as Tx FIFO at the frame-continue address. The ADLC the opening flag of the next frame, or separate opening and internally keeps track of the field sequence in the frame. closing flags may be transmitted. If a new frame is not The frame format is described in the Frame Format section. ready to be transmitted, the ADLC will automatically trans- • mit the active (flag) or inactive (mark) idle condition. ADLC Transmitter State Diagram (Cibi refers to Control Register bit) Data Being Transmitted· LC = logical control (optional) F = flag I = information A = address FCS = frame check sequence C = (link) control ABT = abort 5-241 F6854/F68A54/F68B54 If the Tx FIFO'becomes empty at any time during frame register (Register 3) for the 1-byte transfer mode. The transmission (the Tx FIFO has no data to transfer into the. 2-byte transfer mode causes the RDA status bit to indicate transmitter shift register during transmission of the last half data is available when the last two Rx FIFO register of the next-to-Iast bit of a word), an underrun will occur locations (Registers 2.and ;3) lire full. If the data character and the Transmitter automatically terminates the frame by present in the Rx FIFO is an address octet, Status Register transmitting an abort. The underrun state is indicated by 1 will exhibit an address present status. condition. Data the Transmitter Underrun (TxUJ status bit. being available in the Rx FIFO causes an interrupt to be initiated (assuming the Receiver Interrupt Enable (RIE) Any time the Transmit Abort (ABT) control bit is set, the control bit is enabled, RIE="1"). The MPU will read the Transmitter immediately aborts the frame (transmits at least ADLC status rE!gisters as a result of the interrupt or in its eight consecutive 1s) and clears the Tx FIFO. If the Abort turn in a polling sequence. The Receiver Data Available Extend (ABTEX) control bit is set at the time, an idle (at (RDA) or Address Present (AP) status bits will indicate that least 16 consecutive 1s) is transmitted. An abort or idle in receiver data is available and the MPU should subsequently an out-of-frame condition can be useful to gain eight or 16 read the Rx FIFO. The Interrupt Request (IRQ) and RDA bits of delay. (For an example see Programming Consider- status bits will then be reset automatically. If more than one ations.) character is received and is resident in the Rx FIFO, subsequent E clocks will cause the Rx FIFO to update The CTS input and Request-to-Send (RTS) output and the RDA and IRQ status bits will again be set. In the are provided for a modem or other hardware interface. 2-byte transfer mode both data bytes may be read on consecutive E cycles. The AP status bit provides for 1-byte The TDRA/FC status bit (when selected to be frame-com- transfers only. plete status) can cause an interrupt upon frame completion (I.e., a flag or abort completion). The sequence of each field in the received frame is automatically handled by the ADLC. The frame format is Details regarding the pin functions, Tx FIFO operation, and described in the Frame Format section. control and status registers are described in their respective sections. When a closing flag is received, the frame is terminated. The 16 bits preceding the closing flag are regarded as Receiver Operation the FCS and are not transferred to the MPU. Whatever Data and a pre-synchronized clock are provided to the data is present in the most significant byte portion of the ADLC re6eiver section by means of the Receiver Serial Data receiver buffer register is right justified and transferred to (RxData) and Receiver Data Timing Clock (RxC) inputs. the Rx FIFO. The frame boundary pointer, explained in the The data is a continuous strl'lam of binary bits with the Rx FIFO Register section, is set Simultaneously in characteristic that a maximum of five 1s can occur in the Rx FIFO. The frame boundary pOinter sets the Frame succession unless abort, flag, or idling conditions occu( Valid (FV) status bit (when the frame was completed with The Receiver continuously (on a bit-by-bit basis) searches no error) or the Frame Check Sequence/Invalid Frame for flags and aborts. Error (ERR) status bit (when the frame was completed with error) when the last byte of the frame appears at the last When a flag is detected, the Receiver establishes frame location of the Rx FIFO. As long as the FV or ERR status synchronization to the flag timing. If a .series of flags is bit is set, the data transfer from the second location of the received, the Receiver resynchrooizes to each flag. Rx FIFO to the last location of the Rx FIFO is inhibited. If the frame is terminated before the internal buffer time Any time the Rx Frame Discontinue (DISCONTINUE) expires (the frame data is less than 25 bits after an control bit is set, the ADLC discards the current frame data opening flag), the frame is simply ignored. Noise on in the ADLC without dropping flag synchronization. This RxData during time fill can cause this kind of feature can be used to ignore a frame which is addressed invalid frame. to another station. Once synchronization has been achieved and the internal The reception of an abort or idle is explained in the Frame buffer time (24 bit-times) expires, data will automatically Format section. The details regarding the pin functions, transfer to the Receiver Data FIFO Register (RxFIFO). The Rx FI FO· operation, and control and status registers are Rx FIFO is clocked by System Control Clock (E) input to described in their respective sections. cause received data to move through the Rx FIFO to the last empty register .Iocation. The Receiver Data Available (RDA) status bit indicates when data is present in the last 5·242 F6854/F68A54/F68B54 ADLC Receiver State Diagram • 'Out-of-frame Abort (No IRQ) Loop Mode Operation Fig. 1 Typical Loop Configuration In the loop mode the ADLC not only transmits and receives data frames in the manner previously described, but also has additional features for gaining and relinquish- ing loop control. In Figure 1, a configuration is shown which depicts loop mode operation. The system configura- tion shows a primary station and several secondary stations. The loop is always under control of the primary station. When the primary wants to receive data, it transmits SECONDARY STATIONS (A,B,C,D) a poll sequence and allows frame transmission to OPERATE IN lOOP MODE secondary stations on the loop. Each secondary is in series and adds one bit of delay to the loop. Secondary A in the figure receives data from the primary via the RxData input, delays the data one bit, and transmits it to secondary B via the Transmitter Serial Data (TxData) output. Secondaries B, C, and D operate in a similar manner. Therefore, data passes through each secondary and is received back by the primary controller. 5-243 F6854/F68A54/F68B54 Certain protocol rules must be followed that establish the on RxData. The ADlC can recognize the necessary manner by which the secondary station places itself sequences in the data stream to automatically go on/off the on-loop (connects TxData to the loop), goes active on the loop and to insert its own station data. This procedure is loop (starts transmitting data on the loop), and goes off summarized in Table 1. the loop (disconnects TxData). Otherwise, loop data to other stations down-loop would be interrupted. The data 1. Go On-loop - When the ADlC powers up, the stream always flows the same way; the order in which terminal station will be off line. The first task is to secondary terminals are serviced is determined by the become an active terminal on the loop. The ADlC must hardware configuration. The primary controller times the be connected to a loop link via an external switch as delay through the loop. Should it exceed n + 1 bit-times, shown in Figure 2. After a hardware reset, the ADlC where n is the number of secondary terminals on the loop, loop On-line Control/Data Terminal Ready (lOC/DTR) it will indicate a loop failure. Control is transferred to a output will be in the HIGH state and the up-loop receive secondary by transmitting a go-ahead signal following the data repeated through gate A to the down-loop stations. closing flag of a polling frame (request for a response from Any up-loop transmission will be received by the ADlC. the secondary) from the primary station. The go-ahead The loop/Non-loop Mode (lOOP) control bit must be from the primary is a 0 and seven 1s followed by mark set to place the ADlC in the loop mode. The ADlC now idling. The primary can abort its response request by monitors its RxData input for a string of seven consecu- interrupting its idle with flags. The secondary should tive 1s which will allow a station to go on line. The immediately stop transmission and return control to the loop operation may be monitored by use of the loop primary. When the secondary completes its frame, a closing Status (lOOP) status bit. After power-up and reset, this flag is transmitted followed by all 1s. The primary detects bit is a lOW. When seven consecutive 1s are received the final 01111111 (go-ahead to the primary) and resumes by the ADlC, the lOC/DTR output will go to a lOW control. Note that if a down-loop secondary (e.g., station D) level, disabling gate A (refer to Figure 2), enabling needs to insert information following an up-loop station gate B and connecting the ADlC TxData output to the (e.g., station A), the go-ahead to station 0 is the last 0 of down-loop stations. The up-loop data is now repeated the closing flag from station A followed by 1s. to the down-loop stations via the ADlC. A 1-bit delay is inserted in the data (in NRZI mode, there will be a 2-bit The ADlC in the primary station should operate in a delay) as it circulates through the ADlC. The ADlC is non-loop, full-duplex mode. The ADlC in the secondaries now oncline and the lOOP status bit will be at a HIGH. should operate in a loop mode, monitoring up-loop data Table 1 Summary of Loop Mode Operation Receiver Transm itter lOOP State (Rx) Section (Tx) Section Status Bit Off-loop Rx section receives data from loop and· searches Inactive L for seven 1s (when the LOC/DTR control bit 1. NRZ Mode TxData output is maintained set) to goon-loop. HIGH (mark). 2. NRZI Mode TxData output reflects the RxData input state delayed by one bit-time. (Not normally connected to loop.) The NRZI data is internally decoded to provide error-free transitions to on-loop mode. On-loop 1. When GAP/TST control bit is set, Rx section Inactive H searches for 01111111 pattern (the EOP 1. NRZ Mode TxData output reflects RxData or go-ahead) to become the active terminal input state delayed one bit-time. on the loop. 2. NRZI Mode TxData output reflects RxData 2. When the LOC/DTR control bit is reset, Rx input state delayed two bit-times. section searches for eight 1s to go off-loop. Active Rx section searches for flag (an interrupt from TxData originates within ADLC until GAP/TST L the loop controller) at RxData input. control bit is reset and a flag or abort is Received flag causes FLAG DET output to go completed, then returns to on-loop Slate. LOW. IRQ is generated if the RIE and FDSE control bits are set. 5·244 F6854/F68A54/F68B54 Fig. 2 External Loop Logic 4. Go Off-loop - The ADLC can drop off the loop (go ADLC off-line) similar to the way it went on-line. When the ,-------1 Loop On-line Control/DTR Control (LOC/DTR) control I ,....-::-:-:::::-0"--1-----« UP·LOOP Da'. bit is reset, the ADLC receiver section looks for eight successive "1s" before allowing the LOC/DTR output to RxOata ~~~==~~}--±-r~ DOWN-lOOP Data return HIGH (the inactive state). Gate A in Figure 2 will I be enabled and gate B disabled allowing the loop to TxOela I--''-I---.-jr-, maintain continuity without disturbance. The LOOP I status bit will show an off-line condition (logic HIGH). I L _______ J Pin Functions 2. Go Active after Poll - The receiver section will All inputs of the ADLC are high-impedance and monitor the up-link data for a general or addressed TTL-level compatible. All outputs of the ADLC are com- • poll command; the Tx FIFO should be loaded with patible with standard TTL. Interrupt Request (IRQ), data so that when the go-ahead sequence of a 0 however, is an open-drain output (no internal pull-up). followed by seven 1s (01111111--) is detected, transmission can be initiated immediately. When the Interface for MPU polling frame is detected, the Go Active On PolllTest Bidirectional Data 110 Lines (00-07) (GAP/TST) control bit must be set. A minimum of seven These data bus I/O ports allow the data transfer between bit-times are available to set this control bit after the ADLC and system bus. The data bus drivers are 3-state closing flag of the poll. When the go-ahead is detected devices that remain in the high-impedance (OFF) state by the Receiver, the ADLC will automatically change the except when the MPU performs an ADLC Read operation. seventh 1 to a 0 so that the repeated sequence out gate B in Figure 2 is now an opening flag sequence System Control Clock (E) (01111110). Transmission now continues from the Tx FIFO E activates the address inputs (CS, RSo and RS,) and with data (address, control, etc.) as previously described. Read/Write input (RIW) and enables the data transfer on When the ADLC has gone active-on-poll, the LOOP the data bus. E also moves data through the Tx FIFO and status bit will go to a Law. The Receiver searches for a Rx FIFO. E should be a free-running clock, such as the flag, which indicates that the primary station is interrupt- F6800 MPU system clock. ing the current operation. Chip Select (CS) 3. Go Inactive when On-loop - The GAPITST control An ADLC Read or Write operation is enabled only when the bit may be reset at any time during transmission. When CS input is LOW and the E input is HIGH (E·CS). the frame is complete (the closing flag or abort is transmitted), the loop is automatically released and the Register Addressing Select (RSo. RS,) station reverts back to being just a 1-bit delay in the When the RSo, RS, inputs are enabled by (E'CS), they loop, repeating up-link data. If the GAPITST control bit select internal registers in conjunction with the Riw input is not reset by software and the final frame is transmitted and Address Control (AC) control bit. Register addressing (F/M Idle control bit = LOW), then the Transmitter will is defined in Table 2. mark idle and will not release the loop to up-loop data. A transmitter abort command would have to be used in Read/Write (R/W) this case in order to go inactive when on the loop. Also, The R/W input controls the direction of data flow on the if the Tx FIFO was not preloaded with data (address, data bus when it is enabled by (E·CS). The bidirectional control, etc.) prior to changing the go-ahead character Data Bus Interface acts as an output driver when R/W is to a flag, the ADLC will either transmit flags (active idle HIGH, and as an input buffer when LOW. It also selects the character) until data is loaded (when the F/M Idle read-only and write-only registers within the ADLC. control bit is HIGH) or will go into an underrun condition and transmit an abort (when the F/M Idle Chip Master Reset (RESET) control bit is LOW). When an abort is transmitted, the The RESET input provides a means of resetting the ADLC GAP/TST control bit is reset automatically and the from a hardware source. In the LOW state, the RESET input ADLC reverts to its repeating mode (TxData = delayed causes the following: RxData). When the ADLC Transmitter lets go of the 1. RxRS and TxRS are set, causing both the receiver and loop, the LOOP status bit will return to a HIGH, indi- transmitter sections to be held in a reset condition. cating normal on-loop retransmission of up-loop data. 5·245 F6854/F68A54/F68B54 2. Resets the following control bits: ABT. Request-to-Send frame and there is no further data in the Tx FIFO for a new Control (RTS). LOOP. and LOC/DTR. frame. The positive transition of RTS occurs after the 3. Clears all stored status condition of the status registers. completion of a flag. an abort. or when the RTS control bit 4. The RTS and LOC/DTR ouputs go HIGH; TxData goes to is reset during a mark idling state. When the RESET input the mark state (1s are transmitted). is LOW. the RTS output goes HIGH. When RESET returns HIGH (the inactive state). the transmitter Clear-to-Send (CTS) and receiver sections wlll remain in the reset state until The CTS input provides a real-time inhibit to the TDRA/FC TxRS and RxRS are cleared via the data bus under software status bit and its associated interrupt. The positive transi- control. The control register bits affected by FiESET tion of CTS is stored within the ADLC to insure its occur- cannot be changed when RESET is LOW. rence will be acknowledged by the system. Th~ stored CTS information and its associated IRQ status bit (if enabled) Interrupt Request Output (IRQ) are cleared by writing a HIGH in the Clear Tr I CONTROL E (lID) CE "- il RECEIVER TRANSMITTER RTS Vee LOGIC AND LOGIC AND TCLK CONTROL CONTROL Vss TSQ RSOF RDA I I If RCLK RSI IRQ TBMT 5·267 F3846/F6856 Fig. 2 Receiver Data Path TEST LOOP RIB (16) CCR (16) ROA RSOF RCYR IRO CONTROL Ci (TEST LOOP) RCLK FROM TCLK TO DATA TO DATA RCR BUS (08·015) BUS (00·07) Fig. 3 Transmitter Data Path FROM DATA FROM TO DATA BUS (00·01) TCLK CTS Ci TCR BUS (00·0,) FROM RCYR LOOP REPEATER SYNC IRSI FLAG OLE TSO CGR(16) 5·268 F3846/F6856 Fig. 4 BOP Receive Flow Chart Character assembly and CRC accumulation are stopped when a closing FLAG, ABORT or GA is detected. REOM, ABGA (If the closing character was an ABORT or GA), RDLo-RDL2 (indicating length of last character) and RERR (if the accumulated CRC is incorrect) status bits are set. The last character is transferred to RDB, the FOREOM = RDA output is set HIGH and the IRQ output Is set LOW. ABORT OR GO·AHEAD The CRC accumulation includes al.1 characters following the opening FLAG through the frame check sequence (FCS). The contents of the CRC check register (CCR) are FOREOM = RSOF = 1 FLAG checked at the close of a frame if CRC 15 selected. If an error is detected, RERR status bit Is set. Neither the FCS nor the closing FLAG are assembled and passed on to the CPU. The receiver may be turned off after the status and last • characters are read by the CPU by resetting the RE bit of RCR, or it can be left active to receive additional frames. The closing FLAG of one frame may be used as the opening FLAG of the next frame. Character assembly of the next frame starts with the first non·FLAG character. If the frame was closed with an ABORT or GA, an opening FLAG must be detected before character RDA = 1 assembly of the next frame 15 started. All receiver status bits except RDA are reset after the receiver status register (RSR) is read by the CPU, The ·EOM = FLAG. ABORT RDA output and status bit are reset when RDB is read by OR GO·AHEAD the CPU. If secondary address is selected, the first non·FLAG iiili = 0 character of a frame is compared to the contents of the SYNC/Address Register (SAR). Data for the frame Is not passed on to the CPU If no address l"(Iatch occurs. When GLOBAL address is selected, ,Inall '15' address also results In address match. Loop Repeater Operation - Loop repeater mode is a special case of BOP. Receiver operation is the same as for BOP, except that the NRZI decode logic 15 disabled, frames may be terminated by a GO·AHEAD or FLAG, and received data and GA are routed to the transmitter. The RCLK and TCLK lines should be tied together in this mode. Fig. 5 BOP Message Format BISYNC Operation - A flow chart of BISYNC receiver operation is shown in Figure 6, and the BISYNC INFORMATION FIELD message format Is illustrated in Figure 7. Characters In (IF ANY) BISYNC mode may be either EBCDiC or ASCII, as programmed in the MCR. Character length defaults to 010 m BITS eight bits. The eighth bit, when ASCII 15 programmed, may be used for odd parity by the CPU. It is ignored in INCLUDED IN CRC ACCUM. the recognition of the ASCII characters. 5·269 F3846/F6856 Character assembly starts after receipt of two Fig.6a BISYNC Receive continuous SYNC characters and continues until the receiver is turned off by resetting the RE bit of RCR. Assembled characters are shifted through the RIB to the RSPR and transferred to the ROB. The ROA output and status bits are set HIGH each time a character is transferred to the ROB. All characters that match the SYNC character in non-transparent mode and OLE SYNC pairs (if not immediately preceded by an odd number of OLEs) in transparent mode are excluded from the ROB. However,the RSOF output goes HIGH for one RCLK clock period each time a SYNC character is detected. Oata must be read by the CPU each time the ROA output goes HIGH before the next character is assembled to prevent an overrun, resulting in loss of data. The IRQ output goes LOW and the ROVR status bit is set if an overrun occurs. The receiver always starts operation in the non- transparent mode. It switches to transparent mode if a OLE STXcharacter pair is received. The receiver will then remain in transparent mode until a OLE ITB, DLE ETB or OLE ETX (if not immediately preceded by an odd number of OLEs) character pair is received. CRC accumulation begins after the first non-SYNC character if the first character is an SOH or STX. It begins after the second non-SYNC character and enters transparent mode if the first two non-SYNC characters are OLE STX. SYNC characters in non-transparent mode or OLE SYNC pairs in transparent mode are excluded from the CRC accumulation. The first OLE of a OLE OLE sequence and the OLE of OLE ITB, OLE ETB or OLE ETX sequences are not included in the accumulation. The CRC is checked for 0000 remainder after receipt of an ITB, .ETB or ETX in non-transparent mode or OLE ITB, OLE ETB or OLE ETX in transparent mode. The REaM and RERR (a non-zero remainder is detected) status bits are set when the closing character is transferred to the ROB, ROA is set HIGH and IRQ is set LOW. The block check character (BCC) following the closing character is passed to the CPU as the next two characters. If the closing character was an ETB or ETX, the receiver should be reset by dropping the RE bit of RCA. If the closing character was an ITB, CRC accumulation and character assembly will start again on the first character following the BeC. All receiver status bits except ROA are reset each time RSR is read by the CPU. The ROA output and status bit are reset each time ROB is read by the CPU. 5-270 F3846/F6856 Fig. 6b BISYNC Receive Fig. 6c BISYNC Receive iiiQ = 0 RDA = 1 RDA = 1 • 5·271 F3846/F6856 Fig. 6d BISYNC Receive TRANSPARENT MODE RDA = 1 ENTER TRANSPARENT MODE EXCLUDE FROM CRC EXCLUDE FROM CRC NO RSOF= 1 RDA = 1 RIR -ROB 5·272 F3846/F6856 Fig. 7 BISYNC Message Format NO CRC SHADED AREA INCLUDED IN CRC ACCUMULATION Shaded area included In CRC accumulation. • BCP Operation - The flow diagram forBCP mode other CRC accumulation begins with the first non·SYNC than BISYNC is shown in Figure 8, and the BCP character and includes all subsequent characters if message format is illustrated in Figure 9. The SYNC SYNC strip is not programmed. The CRC accumulation character is programmed in the SAR. All characters, will include only non·SYNC characters if SYNC strip Is including the SYNC character are the length specified in programmed. The CRC accumulation is checked each the receiver control register (RCR). character time and the RERR status bit is set if the remainder does not equal "0" or reset if the remainder Character assembly starts after receipt of two equals "0". Since there is no defined end·of·message contiguous SYNC characters and continues until the (EOM) character, the REOM status bit is not set. The receiver is turned off by resetting the RE bit of RCR. CPU must determine when the end of message occurs Assembled characters are shifted through the RIB to the and check the RERR status at that time. If an error·free RSPR and transferred to the ROB. The RDA output and message has been received, RERR will be "0" for one status bit are set HIGH each time an assembled character time. RE may be dropped, thereby resetting the character is transferred to the ROB. All characters that receiver, after the last character has been read. If RE Is match the SYNC character are excluded from the ROB, if not reset, CRC accumulation and character assembly SYNC strip has been programmed. Only leading SYNC will begin again on the first character following the BCC. characters are excluded from the ROB if SYNC stripping The two characters of the BCC are output as normal has not been programmed. However, the RSOF output data characters. goes HIGH for one RCLK clock period each time a SYNC character is detected. Data must be read by the CPU each time the RDA output goes HIGH before the next character is assembled. If not, an overrun will occur resulting in loss of data. The IRQ output goes LOW and the ROVR status bit is set if an overrun occurs. . 5·273 F3846/F6856 Fig. 8a BCP Receive Fig. 8b BCP Receive RDA = 1 Fig. 9 BCP Message Format 2X CHARACTER LENGTH IF CRC SELECTED 5-274 F3846/F6856 Transmitter (programmed in MCR) are the control field. The character The mode control SYNC/address (MCSA) register must . length switches to the programmed length in TCR after be programmed prior to starting transmitter operation. the last character of the control field, unless that The CRC bit of the receiver control register must be set character was the end of message. if ORC error checking is desired. The RTS bit of the transmitter control register (TCR) must be set to turn on The CPU must set the EOM bit of TCR when loading the the transmitter. The SOM bit of TCR may also be set at last character of the message. Character length may be this time and the transmitter data buffer (TOB) loaded changed at this time to allow transmission of a residUal with the first character of the message. When RTS has last character. The character in TOB is followed by the been loaded into TCR, the RTS output goes LOW. The FCS (if CRC is selected) and a closing FLAG when EOM TSO output is held HIGH (marks) until the CTS input is set. The transmitter may be turned off by resetting goes LOW. Two SYNC or FLAG characters are then FiTs after TBMT goes HIGH or it may remain active, The· output on TSO, if SOM has been set. Otherwise, TSO will closing FLAG of one frame may be used as the opening continue to output marks until SOM is set and the first FLAG of the next frame by setting SOM and loading TOB character is loaded into TOB. Transmitter operation after after TBMT goes HIGH. If the transmitter is left active the two SYNC or FLAG characters have been output and SOM has not been set, FLAG charac,ters are depends on the mode of operation. Note that TRS and transmitted between frames if the GATO bit of TCR transmitter character length must be reloaded each time equals "0" or marks if GATO equals "1". TCR is updated until after the EOM bit has been set. Fig.10a BOP Transmit BOP Operati'On - Character length in BOP mode always starts at eight bits per character each frame. It remains eight bits until the address and control fields have been transmitted. It then switches to the programmed length TURN ON at the start of the information field, if any, until the last TRANSMITTER character has been transmitted. Character length RTS = 1 switches back to eight bits for the transmission of the frame check sequence (FCS) and the closing FLAG. A flow diagram for BOP transmitter operation is shown in Figure 10. The secondary address is transmitted after the initial two FLAGs. The secondary address comes from the SYNC/address register (SAR) if the device is programmed as a secondary station or from the TOB if the device is programmed as a primary. If the secondary address came from SAR, it is followed in the transmission by the character from TOB. Characters are transferred in parallel from SAR or TOB to the transmitter shift register (TXR) and serially shifted, LSB 80M =1 first, out the TSO output. The TBMT output and status bit are set HIGH each time data is transferred from TOB. The CPU must update TCR, If required, and load TOB with the next character. An underrun occurs if this is not done within one character time. If an underrun occurs, the TUR status bit is set and an ABORT (11111111) is transmitted. The output is held at a mark until SOM is set for a new message. A transmitter overrun occurs if TOB is updated before TBMT goes HIGH. An overrun can result in the misinterpretation or loss of the character in TOB. The TOR status bit is set when an overrun occurs. The least significant bit (LSB) of each character, starting with the secondary address is examined. The first character with an LSB = "1" denotes the last character of the address field. The next one or two characters 5-275 F3846/F6856 A message may be terminated at any time with an TUR and TOR status bits are reset whenever the ABORT by setting the TACG bit of TCA. This causes the transmitter status register (TSR) is read. The TBMT TSO output to go immediately to mark condition until output and status bit are reset when TDB is loaded. SOM is set. CRC accumulation begins with the first non·FLAG Data transmitted on the TSO output is monitored character and includes all subsequent characters up to continuously for five consecutive "1 s." A "0" is inserted and including the last data character. The accumulated in the data stream each time this condition occurs. This CRC is then transmitted as the FCS following the last insures that a data character will not be interpreted as a data character, if CRC is selected. FLAG, ABORT or GA at the received end. Fig. 10c BOP Transmit Fig. 10b BOP Transmit TACG = 1 TO ABORT iiiQ =0 5·276 F3846/F6856 Loop Repeater Operation - Loop repeater mode is a as a OLE STX command and the transmitter begins special case of BOP. The primary station in the loop transparent mode operation. The transmitter wi II remai n should be programmed for normal BOP primary in transparent mode until the end of the message. operation. The GATO bit of TCR is used to initiate a polling sequence. When this bit is set, marks are The TBMT output and status bit are set HIGH each time transmitted after the closing FLAG of a frame. The last data is transferred from TOB. The CPU should update "0" of the closing FLAG and the next seven "1s" are TCR, if required, and load TOB with the next character. interpreted down·loop as a GO-AHEAD. The end of the An underrun occurs if this is not done within one polling sequence is detected when the ABGA (received character time, and the TUR status bit is set and SYNC GA) bit of the RSR is set. characters (or OLE SYNC pairs in transparent mode) are transmitted until TOB is updated. A transmitter overrun Down-loop stations should be programmed as. BOP occurs if TOB is updated before TBMT goes HIGH. An secondary, loop repeater (LRSS = "1" in MCR). In this overrun can result in the misinterpretation or loss of the mode, data received at the RSI input is delayed one bit character in TOB. The TOR status bit is set when an time and output on TSO. When data is to be transmitted overrun occurs. in this mode, the CPU should set RTSand SOM and load the first character into TOB. The CrS input is ignored in The EOM bit of TCR, GATO (if in transparent mode) and • this mode. The transmitter waits for a received GA. TACG (if the accumulated CRC is to be transmitted as When a received GA is detected, the seventh ''1'" is the block check character) should be set when the last changed to a "0," creating a FLAG. This prevents character is loaded into TOB. The last character must be the down-loop station from receiving a GA, reserving the an ITB, ETB or ETX if CRC is used. A 16-bit BCC, if line for the transmitting station. The TBMT output and selected, is transmitted following the last character. The . status bit are set and transmitter operation proceeds in last character is followed by marks for a minimum of normal BOP operation, except that the NRZI encode one character time if no BCC is transmitted. logic is disabled. A second block of data may be transmitted immediately When the last character and FCS have been transmitted, following the BCC by setting SOMand loading TOB after the message is terminated with a GA. The TSO output TBMT goes HIGH. The transmitter may be turned off at switches back to RSI delayed one bit time. pown-Ioop this time by resetting RTS. The transmitter transmits stations may then capture the line by detecting the GA. marks following the BCC for a minimum of one character time if SOM is not set. The RCLK and TCLK lines should be tied together in this mode. CRC accumulation begins after the first non-SYNC character for non-transparent mode, or after the second BISYNC Operation - A flow diagram for BISYNC non-SYNC character if the message starts in transparent transmitter operation is shown in Figure 11. Character mode. The CRC continues up to and including the last length for BISYNC mode defaults to eight bits per character. SYNC characters or OLE SYNC pairs caused character. The transmitter always assumes non· by a transmitter underrun are not included. Forced OLE transparent mode unless forced to transparent mode by characters in transparent mode are not included. The the CPU. forced OLE of a OLE STX pair which occurs after the start of the message is included. (See Figure 7.) The message format following the initial SYNC pair depends on the action of the CPU. If the transmitter data TUR and TOR status bits are reset whenever the buffer (TOB) has not been loaded with the first character transmitter status register (TSR) is read. The TBMT of the message, SYNC characters are output on TSO output and status bit are reset when TOB is loaded. until a TOBload. This can occur only with an 8-bit data bus, since TCR and TOB are loaded simultaneously for a 16·bit data bus. The character from TOB, when available, is transferred to the transmitter shift register, (TSR) and serially shifted out the TSO output. The character in TOB is preceded by a contiguous OLE when GATO (transmit OLE) is set. The GATO bit is cancelled after it has been internally processed. The first occurrence is interpreted 5-277 F3846/F6856 Flg.11a BISYNC Transmit Fig.11b BISYNC Transmit CD Not included in CRC accumulation 5·278 F3846/F6856 Fig.11c BISYNC Transmit TRANSPARENT • CD Not included in GRG accumulation 5-279 F3846/F6856 Fig. 11d BISYNC Transmit TURN OFF XMTR 5·280 F3846/F6856 BCP Operation - The flow diagram for BCP mode other Fig. 12a BCP Transmit than BISYNC is shown in Figure 12. The SYNC character is programmed in the SYNC/address register (SAR). All characters are the length specified in the transmitter control register (TCR). TURN ON TRANSMITTER The message format following the initial SYNC pair RTS = 1 depends on the action of the CPU. If the transmitter data RTS =0 buffer has not been loaded with the first character of the message, SYNC characters are transmitted until a TOB load. This can occur only with an 8-bit data bus, since TCR and TOB are loaded simultaneously for a 16-bit data bus. The character from TOB, when available, is transferred to the Transmitter Shift Register (TXR) and • serially shifted out the TSO output. The TBMT output and status bit are set HIGH each time data is transferred from TOB. The CPU should update TCR, if required, and load TOB with the next character. An underrun occurs if this is not done within one character time, and the TUR status bit is set and SYNC characters (marks, if SYNC SOM = 1 stripping is not programmed) are transmitted until TOB is updated. A transmitter overrun occurs if TOB is updated before TBMT goes HIGH. An overrun can result in the misinterpretation or loss of the character in TOB. The TOR status bit is set when .an overrun occurs. The EOM bit of TCR and TACG (if the accumulated CRC is to be transmitted as the block check characte'r) should be set when the last character is loaded into TOB. The last character is followed by a BCC and a pad character if CRC is selected, or the pad character only if CRC is not selected. The transmitter may be turned off by resetting RTS after TBMT goes HIGH. CRC accumulation (see ErrorContro/ table) includes all non-SYNC characters. The CRC generation register (CGR) in BCP mode is defined as twice the character length. TUR and TOR status bits are reset whenever the transmitter status register (TSR) is read. The TBMT output and status bit are reset when TOB is loaded. 5-281 F3846/F6856 Fig. 12b BCP Transmit Fig. 12c BCP Transmit. iiiQ = 0 (2) Not included in CRC accumulation 5-282 F3846/F6856 Data Bus Control (F6856) The CPU uses the register address (Ao-A2), byte select (BYTE), chip enable (CE), read/write (RIW), and enable (E) inputs to control information transfer on the data bus. The byte select input specifies a 16-bit data bus when BYTE = "0" or an 8-bit data bus when BYTE = "1." For an 8-bit data bus, Do through D7 may be wired-OR with the corresponding pins, D8 through D15. A read operation (Riw = "1") is initiated on the leading edge of E. The other control inputs (Ao-A2, BYTE, CE, and RIW) must be stable before the leading edge of E (see Bus Timing Characteristics). Any unused bits in the addressed register are "0." D8-D15 contain receiver status when TSR is read using a 16-bit bus. Status bits are reset on the trailing edge of E when the appropriate register is read. Data is loaded into the addressed register on the trailing edge of E for a write (RiW = "0") operation. The other control inputs must be stable prior to the leading edge of E. TBMT is reset on the trailing edge of E when TCDR (16-bit bus) or TDB (8-bit bus) is addressed. Data Bus Control (F3846) Bus Control for the F3846 has the same characteristics as the F6856 with only RD required for read rather than both E and Riw being "1 "s, and only WR required for write rather than E being a "1" and R/W being a "0." Register Addresses R/W Ao Register RD WR BYTE = "0" X o o RSDR o 16-Bit 0 X 1 o TCDR o Data Bus 0 X o MCSA 1 o 1 X RCTSl (TSR) o 1 0 X RCTSu (RCR) o BYTE = 1 0 o o RSDRl (RDB) o 8-Bit Data 1 1 o o RSDRu (RSR) o 1 Bus Do-D7 0 0 o TCDRl (TOB) o Wired-OR 0 1 1 o TCDRu (TCR) o to D8-D15 0 0 o MCSAl (SAR) o 0 1 o MCSAu (MCR) 1 o 1 0 RCTSl (TSR) o 1 0 RCTSu (RCR) o 5-283 F3846/F6856 Programming The mode control SYNC/address (MCSA) register is a directly addressable write-only register used to configure the SPCC for the user's specific data communications environment. MCSA should be programmed after initialization and prior to initiating data transmission or reception. It may be changed at any time that both the receiver and transmitter are disabled. The default mode (after initialization) is BOP primary with one byte control field, NRZI encoding, a-bit character length, and error control using CRC-CCITT preset to "1s." The lower byte, SYNC/address, is not used in BOP primary mode. The transmitter control and data register (TCDR) is a directly addressable write-only register that controls the format of the transmitted data. The lower byte (TDB) contains the data characters to be transmitted. The upper byte (TCR) contains control information relating specifically to the data being transmitted. TCDR may be updated whenever the TBMT output is HIGH. The default mode for this register is all "Os" corresponding to transmitter disabled. The upper byte (RCR) of the receiver control and transmitter status register (RCTS) is a directly addressable write-only register that contains control information specifically related to the receipt of data and the i5'i'R and MISC general-purpose outputs. Those bits that control the received character length should not be changed while the receiver is enabled. The default value of RCR is all "Os", corresponding to receiver disabled and general-purpose outputs at a HIGH level. Specific definition of the format of the addressable registers is given in the following section. Address information is given in the Data Bus Control section. 5-284 F3846/F6856 Addressable Register Format Mode Control SYNC/Address (MCSA) Register - Write-Only 15 14 13 7 6 5 4 3 2 o PROTOCOL SYNC/SECONDARY ADDRESS SELECT Bit Name Mode Function 0-7 SAR SYNC/address register BOP Secondary address for secondary station mode BISYNC Not used • BCP SYNC character 8 EC Error control BOP o = CCITT preset to all "O"s 1 = CCITT preset to all "1 "s BISYNC o = CRC-16 preset to all "O"s 1 = CCITT preset to all "O"s BCP Same as BISYNC for 8-bit character length only 9 LOOP All Self-test loop mode, TSO loop to RSI internally 10 NRZI All o = NRZ data 1 = NRZI, zero complementing 11 CC BOP o = 1 control byte, 1 = 2 control bytes BISYNC Not used BCP Not used 12 LRSS Loop repeater/SYNC strip BOP o = Normal mode 1 = Loop repeater mode BISYNC Not used BCP o = Tx mark for FILL character (strip leading SYNCs only) 1 = Tx SYNC for FILL character (strip all SYNCs) 13-15 All Protocol select 15 14 13 o 0 0 BOP, Primary o 1 0 BOP, Secondary o 1 1 BOP, Secondary, Global 1 0 0 BCP 1 0 BISYNC - ASCII 1 1 BISYNC - EBCDIC o 0 Reserved o Reserved 5-285 F3846/F6856 Addressable Register Format (Cont'd) Transmitter Control and Data Register (TCOR) - Write-Only 15 14 13 12 11 10 9 8 7 6 5 4 3 2 o TCL2 - TCLo TRANSMITTER DATA BUFFER Bit Name Mode Function 0-7 TOB All Transmitter data buffer 8-10 TCLo-TCL2 Transmitter character length BOP/BCP 8 9 10 0 0 0 8 bits 1 0 0 1 0 1 0 2 1 1 0 3 0 0 1 4 1 0 1 5 0 1 .1 6 1 1 7 BISYNC Character length automatically 8 bits 11 RTS All Request to Se~'O" = "1" on RTS output; "1" = "0" on RTS output. 12 EOM All End of message_ "1" defines character in TBD as last data character of message. This bit is self-cancelling. 13 GATO Go-aheadltransmit OLE BOP "0" =FLAGs transmitted between frames "1" = Marks transmitted between frames BISYNC "1" =Transmit OLE character ahead of character in TDB. Enter transparent mode. BCP Not used 14 TACG Transmit abort/CRC generate BOP "1" = Transmit abort BISYNC/ "0" = No CRC on transmitted message BCP "1" = Transmit block check character after last data character 15 SOM All Start of message. Initiates start of message, causing SYNCs or FLAGs to be transmitted. This bit is self-cancelling. 5-286 F3846/F6856 Addressable Register Format (Cont'd) Receiver Control and Transmitter Status Register (RCTS) - Read/Write 15 14 13 12 11 10 9 8 7 6 5 4 3 2 o Bit Name Mode Function 0 DSR All Data set ready; equals "1" when DSR input is LOW. 1 CD All Carrier detect; equals "1" when CD input is LOW. • 2 CTS All Clear to send; equals "1" when CTS input is LOW. 3·4 Not used 5 TOR All Transmitter overrun; "1" = CPU updated TCDR before the SPCC was ready. 6 TBMT All Transmitter buffer empty; "1" = CPU may load new data and/or control information in TCDR. 7 TUR All Transmitter underrun; "1" = CPU failed to load TDB in time. Abort is transmitted in BOP mode. When TUR occurs, FILL characters are transmitted in BISYNC or BCP. TUR occurs along with a LOW level of IRQ output. 8·9 RCLo-RCL1 All Receiver character length 8 9 0 0 8-bitS 1 0 5 0 6 7 10 RE All Receiver enable; "1" enables receiver 11 CRC All "0" = No CRC (Transmit/Receive) "1" = CRC selected 12-13 Not used 14 MISC All Miscellaneous; "0" = "1" on MISC output; "1" = "0" on MISC output. 15 DTR All Data terminal ready; "0" = "1" on DTR output; "1" = "0" on DTR output. 5-287 F3846/F6856 Addressable Register Format (Cont'd) Receiver Status and Data Register (RSDR) - Read Only 14 13 12 11 10 9 8 7 6 5 4 3 2 o RDL2 - RDLo Bit Name Mode Function 0-7 ROB All Receiver data buffer 8 RERR All Received error; "1" = CRC error occurred on received message. Asserted when last character isin ROB. 9-11 RDLo-RDL2 BOP only Received last character length; corresponds to the number of pits in last character. 000 = 8 bits, 100 = 1 bit, 010 = 2 bits, etc. 12 ABGA BOP only Abort/go-ahead; corresponds to received abort if RERR = "1" or go-ahead if RERR = "0". 13 REaM Received end-of-message BOP "1" = received FLAG, abort or go-ahead BISYNC "1" = received ITB, ETB, or ETX (preceded by OLE in transparent mode). 14 RDA All Received data available. "1" indicates valid data available in ROB. 15 ROVR All Receiver overrun. "1" indicates CPU failed to read data in ROB before next character was assembled. Accompanied by a LOW on IRQ output. 5-288 F3846/F6856 Absolute Maximum Ratings Operating Temperature Ceramic -55°C, +125°C Cermet - 55°C, + 125°C Plastic O°C, + 70°C Storage Temperature -65°C, +150°C Supply Voltage -0.3 V, +7.0 V Input/Output Voltage -0.3 V, + 10 V Input Voltage -0.3 V, +15V Output Voltage -0.3 V, + 10 V This device contains circuitry to protect the inputs against damage due to high static vollages or eleclric fields; however, it is advised Ihal normal precautions be taken to avoid application of any voltage higher than maximum rated voltages. DC Characteristics Symbol Over the Operating Temperature Range Parameter Min Typ Max Unit Condition II Voo Supply Voltage 4.75 5.0 5.25 V Input Voltage VIL Input LOW -0.3 0.8 V VILC Clock LOW -0.3 0.8 V VIH Input HIGH 2.0 Voo V VIHC Clock HIGH 2.4 Voo V Output Voltage VOL Output LOW 0.4 V 10L = 1.6 mA VOH Output HIGH 2.4 V 10H = -300 p.A Leakage Current III Input Leakage 2.5 p.A ILO Output Leakage ±10 p.A 100 Supply Current 120 mA Voo = 5.25 V Capacitance CI Input 10 pF Measured at + 27"C Co Output 15 pF and 1 MHz CIO Bus In 20 pF Serial Port Timing Characteristics (Refer to Figure 13) Symbol Parameter Min Max Unit tRS RSI Set-up Time 100 ns tRH RSI Hold Time 50 ns tTSO Transmit Serial Data 200 ns tcpw Clock Pulse Width 400 ns 5-289 F3846/F6856 Bus Timing Characteristics (Refer to Figure 14) Symbol Parameter Min Max Unit Read tcycE Enable Cycle Time 1.0 ".$ PWEH Enable Pulse Width, HIGH 450 ns PWEL Enable Pulse Width, LOW 430 ns Set·up Time, Address and R/W F6856 160 ns tAS Valid to Enable Positive Transition F3846 ns 260 tOOR Data Delay Time 320 ns tH Data Hold Time 10 ns tAH Address Hold Time 10 ns tEr, tEt Rise and Fall Time for Enable Input 25 ns PWRL RD, CI Pulse Width, LOW 430 ns Write tcycE Enable Cycle Time 1.0 ".s PWEH Enable Pulse Width, HIGH 450 ns PWEL Enable Pulse Width, LOW 430 ns Set·up Time, Address and R/W F6856 160 ns tAS Valid to Enable Positive Transition F3846 260 ns tosw Data Set·up Time 195 ns tH Data Hold Time 10 ns tAH Address Hold Time 10 ns tEr, tEt Rise and Fall Time for Enable Input 25 ns PWWL WR, CI Pulse Width, LOW 430 ns Fig. 13 Clock and Serial Data RCLK RSI TCLK ~tcpw~ TSO ~I~~~---------- I· ·1 trsD 5·290 F3846/F6856 Fig.14 Read/Write Timing Diagram READ 'E_---fV-~·- ~.w" . v-- V,H VIL V,H A.·A" BYTE. ' RiW VIL ,. VOH DATA BUS VOL V,H WRITE 'E VIL VIH AO·A2, BYTE, • R/W VIL V,H DATA BUS VIL V,H Ci, tRo. tWii VIL '6856 t3840 Ordering Information Speed Order Code Temperature Range 1,0 MHz F6856P, S OOG to + 700G F6856GP, GS -40'G to +85°G F6856DL -55°G to +85°G F6856DM - 55 °G to + 125 °G 1.0 MHz F3846P, S OOG to + 700G F3846GP, GS -40oG to +85'G F3846DL -55°G to +85°G F3846DM -55°Gto +125°G P = Plastic Package S = CER·DIP Package 5-291 F3846/F6856 5·292 F38456/F68456 Multiple Protocol Communications Controller Advance Product Information Microprocessor Product Description • Byte Control Protocols: DDCMP and Other Custom BCP The Fairchild F38456/F68456 Multiple Protocol • Programmable SYNC Character Communications Controller (MPCC) is a programmable • 5· to 8·Blt Character Length microprocessor peripheral that interfaces a computer • Selectable Leading Pad Transmission (Hex 55, 55) system to a serial data communications channel with • Selectable CRC Error Detection minimum system overhead. It is designed to satisfy the • Automatic Fill Character Insertion with Selectable major interface requirements for asynchronous, Stripping synchronous bit-oriented protocols (BOP), or • CCITT, CRC·16, CRC·12, or (Odd/Even) VRC/LRC synchronous byte control protocols (BCP). The MPCC is • Directly Addressable Parameter Control Registers: well-suited for application in computer-to-computer Mode, SYNC/Address, Transmitter Control, and communication, or control of network trunk lines. Receiver Control • Separate Addressable Status and Data Registers The MPCC is organized to interface with either an 8- or for Receiver and Transmitter 16-bit bidirectional data bus, is fully TIL compatible, and • Modem Handshake Signals: RTS, CTS, DTR, DSR, operates from a single + 5 V supply. and CD • • NRZ or NRZI (Complement on Zero) Serial Data • F6800, Z80, and 8080 Bus Compatible • Full or Half·Duplex Operation • Data Rate from DC to 2M BPS • Self· Test Loop·Back Mode • Asynchronous Protocols: • 8· or 16·Bit Bidirectional 3 State Data Bus • 5- to 8·Blt Character Length • 40 Pin Ceramic or Plastic Package • Parity - Even, Odd or None • Stops Bits - 1, 1_5 or 2 • Clock Rates - 1X, 8X, 16X or 32X Baud Rate • Interrupt on Received Parity or Framing Error Connection Diagram • Blt·Oriented Line·Control Protocols - SDLC, ADCCP, HDLC • Automatic Detection and Generation of Special TSO Vee TCLK Control Sequences (e.g., Flag, Abort, Go·Ahead) RCLK • Zero Insertion and Deletion RTS RSI • Primary or Secondary Station Select e; RSOF ·R/iN • Secondary Station Address Recognition '(WR) DSR • Global Address Recognition D8 Do • Automatic Extended Address D, D, • One or Two Control Bytes D10 D2 • Data Character Length from 5· to 8·Bits with 1- to D11 D3 8·Bit Residual Last Character D, • CCITT·CRC Error Detection Ds • Interrupt on End of Message D, • IBM Retail Store Loop Mode D7 • Byte Control Protocol: IBM BISYNC Co • Special Character Generation: OLE, SYNC A2 CTS • Special Character Detection: OLE, SYNC, SOH, A, TBMT STX, ITB, ETB, ETX, ENQ Ao IRQ • ASCII or EBCDIC BYTE DTR • Normal and Transparent Text Mode ·E • 8·Bit Character Length , (AD) Mise • Automatic OLE Stuff·Stripping in Transparent Vss CE Mode • Automatic Fill Character Insertion with Selectable "F68456 Designation Stripping tF38456 Designation • Selectable Leading Pad Transmission (Hex 55, 55) • CCITT, CRC-16 or VRC/LRC Error Detection • Interrupt on End of Message 5-293 F38456/F68456 Signal Functions TSO D. D, TRANSMIT/ RSI 0, RECEIVE TCLK 03 RCLK 0, 0, 0, CD 07 m 0, MODEM STATUS eTS D. AND CONTROL DTIi 0,. 0 11 DSIi D" MJsr: CPU INTERFACE 0'3 AND CONTROL 0,. 015 RDA TRANSMITTER/RECEIVER TBMT Ao STATUS AND CONTROL A, RSOF A, E (AD) R/W (WR) CE BYTE iiiQ tI Vee Vss Block Diagram - -168IT5_ --168IT5---- ¢=) ~ MODE CONTROL RECEIVER CONTROL I/O SYNC/ADRESS TRANSMITTER STATUS 00-015 BUFFERS REGISTER REGISTER I ~~ I t MCSA RCTS if RSDR TCDR {~ Ao-A2 RECEIVER TRANSMITTER ST ATUS/DAT A CONTROUDATA ~ BYTE DATA REGISTER REGISTER r-----v R/W (WA) BUS E(AD) CE Vee CONTROL - lr RECEIVER ~> I TRANSMITTER RTS LOGIC AND LOGIC AND TCLK CONTROL CONTROL Vss TSO RSOF RDA I I It RCLK RSI IRQ TBMT 5·294 F38456/F68456 The F38456/F68456 signal functions are described in the following table. Mnemonic Pin No. Name Description Transmit/Receive TSO 1 Transmitter This output signal is the transmitted serial data. Data Serial Output changes on the positive going edge of TCLK. RSI 38 Received Serial This Input signal is the received serial data. Data changes Input on the negative going edge of RCLK. TCLK 2 Transmitter Clock Timing of the transmitter logic is provided by this input signa I. Frequency is the same as the transmitted baud rate. RCLK Modem Status/Control 39 Receiver Clock Timing for the receiver logic is provided by this input. Frequency is the same as the received baud rate. &I CD 27 Carrier Detect This input is general·purpose in nature. It can be tested by reading the transmitter status register. RTS 3 Request to Send This output is used with clear to send to enable the transmitter. It may be set low by programming the appropriat e bit of the transmitter control register. - CTS 26 Clear to Send This input signal is used with request to send to enable the transmitter. It can be tested by reading the transmitter status register. DTR 23 Data Terminal This is a general·purpose output. It can be set low by Ready programming the appropriate bit of the receiver control register. DSR 36 Data Set Ready This is a general-purpose input. It can be tested by the CPU by reading the transmitter status register. -- MISC 22 Miscellaneous This is a general·purpose input/output. It can be set low by programming the appropriate bit of the register; it can be tested by the CPU by reading the receiver control register. Transmitter/ Receiver Status/Control RDA 14 Receiver Data A high level on this output signal indicates an assembled Available character is in the receiver buffer. RDA is reset on the trailing edge of enable when the receiver buffer is read by the CPU. TBMT 25 Transmitter A high level indicates the device is ready to receive new data Buffer Empty and/or control information from the CPU. This output signal is reset on the leading edge of the first transmitter clock; it follows the trailing edge of enable when the transmitter buffe is loaded. 5-295 F38456/F68456 Mnemonic Pin No. Name Description Transmitter/ Receiver Status/Control RSOF 37 Received Sync RSOF is high for one receiver clock period when a received or Flag sync or flag character Is detected on this output signal. CPU Interface and Control 0 0 .015 6·13 Data Bus These are 16 bidirectional input/output data lines which 28·35 control information to and from the CPU. Do . 0 7 can be wired to 0 8 • 0 15 for use as an 8·bit data bus. Ao· A2 15·17 Register Address These input signals select internal data, status, and control registers. They may be selected as 8· or 16,bit registers. E 19 Enable A strobe on this input causes information transfer between (F6456) the data bus and the addressed register when the chip enable input is low. RD 19 Read Pulse A negative pulse on this input with address causes chip (F38456) enable to transfer the data bus information to the addressed register. R/W 5 Read/Write A high level on this input allows data from the addressed (F68456) register to be output to the data bus. A low level allows data from the bus to be loaded into the addressed register. - WR 5 Write Pulse A negative pulse on this input with address causes chip (F38456) enable to transfer the data bus information to the addressed register. CE 21 Chip Enable A low level on this input signal enables a data bus transfer with enable. BYTE 18 Byte A high level on this input signal indicates an 8·bit data bus. A low level indicates a 16·bit bus. IRQ 24 Interrupt Request This output goes low to indicate a change in the internal .;ldtUS of the device. The status bits linked to this output are receiver overrun (ROVR), received end·of·message (REOM) and transmitter underrun (TUR). IRQ is reset on the trailing edge 0 enable when the associated status register is read. Ci 4 Chip Initialize A low level initializes the internal control registers and timing on this input signal. Power Voo 40 Power Supply Power supply input: + 5 V ± 5% Vss 20 Ground Ground: 0 V reference 5·296 F68488 General-Purpose Interface Adapter Microprocessor Product Description Logic Symbol The F68488 General-Purpose Interface Adapter (GPIA) provides the means to interface between an IEEE-488 standard instrument bus and the F6800. The 488 instrument bus provides a means for controlling and moving data from EOI RFD DAV DAC IBo IB, IB2 IBa IB, IBs 166 IB7 complex systems of multiple instruments. CS R/W The F68488 will automatically handle all handshake protocol 37 RSo IRQ '0 needed on the instrument bus. 38 AS, ASE 39 RS2 DMA REQUEST '5 RESET F68488 SRQ 23 • Single or Dual Primary Address Recognition '9 • Secondary Address Capability DMA GRANT TRIG 2' • Complete Source and Acceptor Handshakes 26 ATN T/R1 28 2' IFC T/R2 27 • Programmable Interrupts • 22 REN • RFD HOld-Off to Prevent Data Overrun E • Operates with DMA Controller • Serial and Parallel Polling Capability • Talk-Only or Listen-Only Capability • Selectable Automatic Features to Minimize Software 8' 9 10 11 12 13 14 • Synchronization Trigger Output • F6800 Bus Compatible Vee = Pin 20 Vss = Pin 1 Pin Names DBO-DB? Bidirectional Data Lines Connection Diagram CS Chip Select Input 40-Pin DIP R/W Read/Write Input RS(j,' RS1, RS2 Register Select Inputs Vss IRQ IRQ Interrupt Request Output DMA GRANT RS 2 RESET Chip Reset Input cs RS, DMA GRANT DMATransfer in Progress Input ASE RSo DMA REQUEST DMA Transfer Ready Output R/W IBo ASE Address Switch Enable Output E IB, IBO-IB? Bidirectional ASCII Bus DBo IB2 DAC Bidirectional Data Accepted Line DB, IB3 RFD Bidirectional Ready for Data Line DB2 IB, DAV Bidirectional Data Valid Line DBa IBs ATN Attention Input DB, lB. IFC Interface Clear Input DBs IB7 SRQ Service Request Output DB. T/R, REN Remote Enable Input EOI Bidirectional End or Identify Line DB7 T/R2 TRIG Group Execute Trigger Output DMA REQUEST ATN TiR1, TiR2 Transmit/Receive Control Outputs DAV EOI E Enable Clock Input DAC TRIG Vss Ground AFD SRQ Vee +5 V Power Supply RESET REN Vee iFC (Top View) 5·297 F68488 Functional Description in the sequence can be initiated until the previous step is completed. Information transfer can proceed as fast as the The IEEE-488 instrument bus standard is a bit-parallel, devices can respond, but no faster than the slowest device byte-serial bus structure designed for communication to and presently addressed as active. This permits several devices of from intelligent instruments. Using this standard, many' . different speeds to receive the same data concurrently. instruments may be interconnected and remotely and automatically controlled or programmed. Data may be taken The GPIA is designed to work with standard 488-bus driver les from, sent to or transferred between instruments. A bus to meet the complete electrical specifications of the IEEE-488 controller dictates the role of each device by making the bus. Additionally, a powered-off instrument may be powered-on attention (ATN) line true and sending talk or listen addresses without disturbing the 488 bus. With some additional logic, the on the instrument bus data lines; those devices that have GPIA could be used with other microprocessors. matching addresses are activated. Device addresses are set into each GPIA from switches or jumpers on a pc board by a The F68488 GPIA has been designed to interface the F6800 microprocessor as a part of the initialization sequence. microprocessor with the complex protocol of the IEEE-488 instrument bus. Many instrument bus protocol functions are When the controller makes the ATN line true, instrument bus handled automatically by the GPIA and require no additional commands may also be sent to single or multiple GPIAs. MPU action. Other functions require minimum MPU response due to a large number of internal registers conveying Information is transmitted on the instrument bus data lines information on the state of the GPIA and the instrument bus. under sequential control of the three handshake lines. No step Fig. 1. Functional Diagram DATA BYTE GENERAL DATA BUS TRANSFER INTERFACE (8 LINES) CONTROL MANAGEMENT + I 2 clock. ::J( F68488-GPIAl488 Interface Bus Signals The GPIA provides a set of 18 interface signal lines between the F6800 and the IEEE-488 Standard bus. Signal Lines (1B0-187) - These bidirectional lines allow for the X SOURCE flow of 7-bit ASCII interface messages and device- dependent messages. Data appears on these lines in a SOURCE bit-parallel, byte-serial form. These lines are buffered by the VALID transceivers and applied to the 488 bus (DI01-DIOs). SOME ALL ALL ROY ROY ROY Byte Transfer Lines (DAC, RFD, DAV) - These lines allow for proper transfer of each data byte on the bus between sources and acceptors. The RFD line goes passively true to indicate that all acceptors are ready for data. A source will RFD ~~g~E~nrr=PTOR indicate the data is valid by pulling DAV LOW. Upon the SOME reception of valid data by all acceptors, DAC will go ACC ALLIACC passively true to indicate that the data has been accepted by all acceptors. Bus Management Lines (ATN,IFC, SRQ, REN, EOI) - DAC II·-rr ACCEPTOR These lines are used to manage an orderly flow of information across the interface lines. DATA DATA TRANSFER TRANSFER Attention (ATN) - The ATN signal is sent true over the BEGIN END interface to disable current talkers and listeners, freeing the 5-300 F68488 signal lines (IBO-IB7). During the ATN active state, devices command is sent allowing the device to release hold-off. This monitor the DI01-DIOs lines for addressing or an interface will delay a talker until the available information has command. Data flows on the DI01 - DIOs when A TN is been processed. inactive (HIGH). Data-In Register (Read-Only) Interface Clear (IFC) ~ The IFC signal is used to put the interface system into a known quiescent state. Service Request (SRO) ~ The SRO signal is used to indicate a DIO-DI7 ~ correspond to DI01-DIOS of the 488-1975 standard and IBo-1B7 of the F68488 need for attention in addition to requesting an interruption in the current sequence of events. This indicates to the controller that Data-Out Register R7W ~ The data-out register is an actual a device on the bus is in need of service. 8-bit storage register used to move data out of the device onto the interface bus. Reading from the data-in register has no Remote Enable (REN) ~ The REN signal is used to select one effect on the information in the data-out register. Writing to the of two alternate sources of devices programming data, local, or remote control. data-out register has no effect on the information in the • data-in register. END or Identify (EOI) ~ The EOI signal is used to signal the Data-Out Register (Write-Only) end of a multiple byte transfer sequence and, in conjunction with ATN, executes a parallel polling sequence. Transmit/Receive Control Signals (T/R1. T/R2) ~ These DOO-DO? ~ correspond to DIOt-DIOS of the 488-1975 two signals are used to control the bus transceivers that drive standard and lBo-lB? of the F68488 the interface bus. It is assumed that transceivers equivalent to the F3447 or F3448 will be used, where each transceiver has a Interrupt Mask Register ROW ~ The interrupt mask register is separate Transmit/Receive control pin. These pins can support a 7 -bit storage register used to select the particular events that one TTL load each. The outputs can then be grouped as will cause an interrupt to be sent to the MPU. The seven shown in Figure 1 with SRO hardwired HIGH to transmit. The control bits may be set independently of each other. If dsel (bit REN, IFC, and ATN lines are hardwired LOW to receive. The 7 of the address mode register) is set HIGH, CMD (bit 2) will EOI line is controlled by T/R1 through the bus transceiver, interrupt SPAS or RLC. If dsel is set LOW, CMD will interrupt allowing it to transmit or receive. The T/R1 line operates exactly on UACG, UUCG, and DCAS in addition to RLC and SPAS. as TiR2, except during the parallel polling sequence. During The command status register Rl R may then be used to parallel poll, EOI will be made an input by T/R1 while the DAV determine which command caused the interrupt. Setting GET and IBo-lB7lines are outputs. (bit 5) allows an interrupt to occur on the Group Execute Trigger Command. The END bit (bit 1) allows an interrupt to GPIA Internal Controls & Registers occur if EOI is true (LOW) and ATN is false (HIGH). The APT There are 15 locations accessible to the MPU data bus that are bit (bit 3) allows an interrupt to occur indicating that a used for transferring data to control the various functions of the secondary address is available to be examined by the MPU if device and provide current device status. Seven of these apte (bit 0 of the address mode register) is enabled, listener or registers are write-only and eight are read-only. The various talker primary address is received, and a Secondary Command registers are accessed according to the three least significant Group is received. A typical response for a valid secondary bits of the MPU address bus and the status of the Read/Write address would be to set msa (bit 3 of the auxiliary command line. One of the 15 registers is external to the device, but an register) and dacr (bit 4 of the auxiliary command register), address switch register is provided for reading the address releasing the DAC handshake. The BI bit (bit 0) indicates that a switches. Table 2 shows actual bit contents of each of data by1e is waiting in the data-in register. BI is set HIGH when the registers. the data-in register is full. The BO bit (bit 6) indicates that the data-out register is empty. BO is set when the data-out register Dlita-In Register R7R ~ The data-in register is an actual 8-bit is empty. The IRO bit (bit 7) allows any interrupt to be passed storage register used to move data from the interface bus when to the MPU. the device is a listener. Reading the register does not destroy information in the data-out register. The DAC (data accepted) Interrupt Mask Register (Write-Only) line will remain LOW tmtil the MPU removes the by1e from the data-in register. The device will automatically finish the I IRQ I BO I GET I X I APT I CMD END BI handshake by allowing DAC to go HIGH. In RFD (ready for data) hold-off mode, a new handshake is not initiated until a IRO ~ Mask bit for IRO Output 5-301 F68488 Table 2 Internal Register Contents Bit Register Name Mnemonic 7 6 5 4 3 2 1 0 Interrupt Mask Register ROW IRQ BO GET APT CMD END BI Interrupt Status Register ROR INT BO GET APT CMD END BI Command Status Register R1R UACG REM LOK RLC SPAS DCAS UUCG Unused R1W Address Status Register R2R ma to 10 ATN TACS LACS LPAS TPAS Address Mode Register R2W dsel to 10 hide hlda apte R3R Chip DAC DAV RFD msa rtl ulpa Iget Auxiliary Command Register R3W RESET rfdr leoi dacr msa rtl dacd Iget Address Switch Register R4R UD 3 UD2 UD1 AD5 AD4 AD3 AD2 AD1 Address Register R4W Isbe dal dat AD5 AD4 AD3 AD2 AD1 R5R S8 SRQS S6 S5 S4 S3 S2 S1 Serial Poll Register R5W S8 rsv S6 S5 S4 S3 S2 S1 Command Pass-through Register R6R B7 B6 B5 B4 B3 B2 B1 Bo Parallel Poll Register R6W PPRs PPR7 PPR6 PPR5 PPR4 PPR3 PPR2 PPR1 Data-In Register R7R DI7 DI6 DI5 DI4 DI3 DI2 DI1 Dlo Data-Out Register R7W D0 7 D06 D05 D04 D03 D02 D01 DOo BO - Interru pt on Byte Output BO - A byte of data has been output. GET - Interrupt on Group Execute Trigger GET - A Group Execute Trigger has occurred. APT - Interrupt on Secondary Address Pass-Through APT - An Address Pass-Through has occurred. CMD - Interrupt on SPAS + RLC + dsel (DCAS + CMD - SPAS + RLC + dsel (DCAS + UUCG + UACG) UUCG + UACG) has occurred. END - Interrupt on EOI and ATN END - An EOI has occurred with ATN = HIGH. BI - Interrupt on Byte Input BI - A byte has been input. Interrupt Status Register ROR - The interrupt status register Serial Poll Register R5R/W - The serial poll register is an is a 7-bit storage register that corresponds to the interrupt 8-bit storage register that can be both written into and read mode register with an additional bit, INT (bit 7), Except lor the from by the MPU. It is used for establishing the status byte that INT bit, the other bits in the status register are set regardless of the device sends out when it is serial poll enabled. Status may the state of the interrupt mode register when the corresponding be placed in bits 0 through 5 and bit 7. Bit 6 rsv (request for event occurs. The IRQ (MPU Interrupt) is cleared when the service) is used to drive the logic that controls the SRQ line on MPU reads from the register. The INT bit is the logical OR of the bus telling the controller that service is needed. This same the other six bits ANDed with the respective bit of ROW. logic generates the service request state (SRQS) signal that is substituted in the bit 6 position when the status byte is read by Interrupt Status Register (Read-Only) the MPU TBo-TB7. In order to initiate a,n rsv (request for service), the MPU sets bit 6 true (generating an rsv signal) and liNT I BO I GET I X I APT I CMD I END I BI I this in turn causes the device tt" "ull down the SRQ line. The SRQS signal is the same as rsv when SPAS is false. Bit 6, as INT - Logical OR of all other bits in this register ANDed read by the MPU, will be the SRQS. with the respective bits in the interrupt mask register 5-302 F68488 Serial Poll Register (Read) Address Mode Register (Write-Only) I 58 I SRQS I 56 I 55 I 54 I dsel I to I 10 I X I hdle I hdla X I apte S1-S8 Status bits dsel Configure for automatic completion of handshake sequence on occurrence of GET, SRQS - Bus is in service request status state UACG, UUCG, SDC, or DCl commands Serial Poll Register (Write) to - Set to talk-only mode 10 Set to listen-only mode [58 I rsv I 56 55 hdle Hold-off RFD on end Status bits hdla - Hold-off RFD on all data II rsv Generate a service request apte - Enable the address pass-through feature Parallel Poll Register R6W - This register will be loaded by the Address Status Register R2R - The address status register MPU, and the complement of the bits in this register will be is not a storage register, but is simply an 8-bit port used to couple internal signal modes to the MPU bus. The status flags delivered to the instrument bus (IBo-IB7) during PPAS (Parallel Poll Active State). This register powers up in the PPO (Parallel represented here are stored internally in the logic of the device. Poll No Capability) state. The reset bit (auxiliary command These status bits indicate the addressed state of the register bit 7) win clear this register to the PPO state. talker/listener as well as flags that specify whether the device is in the talk-only or listen-only mode. The ma signal is true when The parallel poll interface function is execu~ep by this device the device is in: using the PP2 subset (Omit Controller Configuration Capability). The controller cannot directly configure the parallel TACS - Talker Active State poll output of this device. This must be done by the MPU. The TADS - Talker Addressed State controller will be able to configure the parallel poll indirectly by lACS - Listener Active State issuing an addressed command that has been defined in the MPU software. lADS - Listener Addressed State SPAS - Serial Poll Active State Parallel Poll Register (Write-Only) ATN - Bit 4 contains the condition of the attention line Address Status Register (Read·Only) Bits delivered ~o bus during Parallel Poll Active State (PPAS) I rna I to I 10 I ATN I TACS I LACS I LPAS I TPAS I Register powers-up in the PPO state. ma - My address has occurred. Parallel Poll is executed using the PP2 subset. to - The talk-only mode is enabled. Address Mode Register R2W - The address mode register is 10 - The listen-only mode is enabled. a storage register with six bits for control: to, 10, hide, hlda, ATN - The Attention command is asserted. dsel, and apte. The to bit (bit 6) selects the talker/listener and addresses the device to talk only. The 10 bit (bit 5) selects the TACS - GPIA is in the Talker Active State. talkerllistener and sets the device to listen only. The apte bit lACS - GPIA is in the Listener Active State. (bit 0) is used to enable the extended addressing mode. If apte lPAS - GPIA is in the Listener Primary Address~d State. is set lOW, the device goes from the TPAS (Talker Primary Address State) directly to the TADS (Talker Addressed State). TPAS - GPIA is in the Talker Primary Addressed State. If apte is set HIGH and the secondary address is valid, set msa true. The hlda bit (bit 2) holds off RFD (Ready for Data) on all Address Switch Register R4R - The address switch register data until rfdr is set true. The hide bit (bit 3) holds off RFD on is external to the device. There is an enable line (ASE) to be EOI enabled (lOW) and ATN not enabled (HIGH). This allows used to enable 3-state drivers connected between the address the last byte in a block of data to be continually read as switches and the MPU. When the MPU addresses the address needed. Writing rfdr true (HIGH) will release the handshake. switch register, the enable line directs the switch information to 5-303 F68488 be sent to the MPU. The five least significant bits ofthis S'bit Auxiliary Command Register R3R/W - Bit 7, reset, initializes register are used to specify the bus address of the device, and the device to the following states {reset is set true by external the remaining three.bits may be used at the discretion of the RESET input pin and by writing into the register from the MPU): user. The most probable use of one or two of the bits is for controlling the listen-only or talk-only functions. SIDS - Source Idle State AIDS - Acceptor Idle State Address Switch Register (Read-Only) TIDS - Talker Idle State LIDS - Listener Idle State Device Address LACS - Listener Active State User Definable Bits PPIS - Parallel Poll Idle State PUCS - Parallel Poll Unaddressed to Configure State When this register is addressed, the ASE pin is set to allow PPO - Parallel Poll No Capability external address switch information to be read from a bus device. The rfdr (release RFD handshake) bit (bit 6) allows for completion of the handshake thai was stopped by RFD (Ready Address Register R4W The address register is an 8-bit For Data) hold-off commands hlda and hide. storage register. The purpose of this register is to carry the primary address of the device . The primary address is placed The fget (force group execute trigger) bit (bit O)has the same in the five least significant bits of the register. If external effect as the GET (Group Execute Trigger) command from the switches are used for device addressing, these are normally controller. (IEEE STD 488 p. 39.) read from the address switch register and then placed in the address register by the MPU. The rtl (return to local) bit (bit 2) allows the deviceto respond to The AD1-ADs bits (0 ~ 5) are forthe device address. The Isbe local controls and the associated device functions bit (bit 7) is set to enable the dual primary addressing mode. are operative. During this mode, the device will respond t6 two consecutive addresses; one address with AD1 equal to 0 and the other The dacr (release DAC handshake) bit (bit 4) is set HIGH to address with AD1 equal to 1. For example, if the device allow DAC to go passively true. This bit is set to indicate that address is $OF, the dual primary addressing mode would allow the MPU has examined a secondary address or an the device to be addressed at both $OF and $OE. The dal bit undefined command. (bit 6) is set to disable the listener and the dat bit (bit 5) is set to disable the talker. The ulpa (upper/lower primary address) bit (bit 1) will indicate the state of bit 0 on the D101-D108 bus lines at th.e time the This register is cleared by the RESET input only (not by the last primary address was received. This bit can be read but not reset bit of the auxiliary command register, bit 7). When ATN is written by the MPU. enabled and the primary address is received on the TBo-TIh lines, the F68488 will set bit 7 of the address status register The msa (valid secondary address) bit (bit 3) is set true (HIGH) (MA). This places the F68488 in the TPAS or LPAS. when TPAS (Talker Primary Addres.sed State) or LPAS (Listener Primary Addressed State) is true. The device will When ATN is disabled, the GPIA may go to one of three states: become addressed to listen or talk. TACS, LACS or SPAS. The primary address must have been previously received. Address Register (Write-Only) ! Isbe dal !dat ! ADs ! AD4 AD3 AD2 The HFD, DAV,and DAC (Ready for Data, Data Valid, and Data Accepted) bits assume the same state as the corresponding signal on the F68488 package pins. The MPU Isbe - Enable dual primary addressing mode may only read these bits. These signals are not synchronized dal - . Disable the li.stener with the MPU clock. dat - Disable the talker The dacd (data accept disable) bit (bit 1) set HIGH by the MPU AD1-ADs - Primary device address, usually read from will prevent automatic handshake on <;lddresses or commands. address switch register The dacr bit is used to release the handshake. Register is cleared by RESET input pin only. 5-304 F68488 The feoi (forced end or identify) bit (bit 5) tells the device to These are five major address commands. REM shows the send EOI LOW with the next data byte transmitted. The EOI remote/local state of the talkerllistener. line is then returned HIGH after the next byte is transmitted. NOTE: The following signals are not stored but revert to a The RLC bit (bit 3) is set whenever a change of state of the false (LOW) level one clock cycle (MPU <1>2) after they are set remote/local flip-flop occurs and reset when the command true (HIGH): status register is read. 1. rfdr The DC AS bit (bit 1) indicates that either the device clear or 2. feoi selected device clear has been received, activating the device 3. dacr clear function. These signals can be written but not read by the MPU. The SPAS bit (bit 2) indicates that the SPE command has been Auxiliary Command Register received, activating the device serial poll function. The UACG bit (bit 7) indicates that an undefined address command has been received and, depending on programming, • the MPU decides whether to execute or ignore it. reset - Initialize the chip to the following status: The UUCG bit (bit 0) indicates that an undefined universal command has been received. 1. All interrupts cleared 2. Following bus states are in effect: SIDS, AIDS, TIDS, Command Status Register (Read) LIDS, LOCS, PPIS, PUCS, and PPO I UACG I REM I LOK I X I RLC I SPAS I DCAS I UUCG I 3. Bit is set by RESET input pin. UACG - Undefined Address Command DAC - Corresponds to Data Accepted signal on REM - Remote Enabled F68488 package pins LOK - Local Lockout Enabled DAV - Corresponds to Data Valid signal on F68488 package pins RLC - Remote Local State Changed RFD - Corresponds to Ready For Data signal on SPAS - Serial Poll Active State is in effect. F68488 package pins DCAS - Device Clear Active State is in effect. msa - If GPIA is in LPAS or TDAS, setting msa will UUCG - Undefined Universal Command force GPIA to LADS or TADS. rtl - Return to local if local lockout is disabled Command Pass-Through Register R6R - The command pass-through register is an 8-bit port with no storage. When ulpa - State of LSB of the address received this port is addressed by MPU, it connects the instrument data on the DI01 -8 bus lines bus (fBO-IB7) to the MPU data bus DBo-DB7' This port can be fget - Force Group Execute Trigger Command from used to pass commands and secondary addresses, that are controller has occurred. not automatically interpreted, through to the MPU rfdr - Complete handshake stopped by RFD hold-off for inspection. feoi - Set EOI true, clears after next byte transmitted Command Pass-Through Register (Read Only) dacr - MPU has examined an undefined command or secondary address. BO I dacd - Prevents automatic handshake on addresses or commands An 8-bit port used to pass commands and secondary addresses to the MPU that are not automatically interpreted by Command Status Register R1 R - The command status the GPIA. register flags commands or states as they occur. These flags or states are simply coupled onto the MPU bus from internal storage nodes. 5·305 F68488 Absolute Maximum Ratings Stresses greater than those listed under "Absolute Maximum Ratings" may -0.3 V, +7.0 V cause permanent damage to the device. This is a stress rating only and Voltage 01 any pin relative to ground functional operation of the device at these or any other conditions above those Operating Temperature (Ambient) ·CONtAOL LlNES--" Archltectllre tion register to supply additional control bits during certain instructions. In addition, the control unit has a machine in- The F9445 microprocessor comprises three main blocks: struction pre-fetch mechanism which overlaps the fetching the data path, the control unit, and the timing generator. of the next instruction from memory during execution of short-cycle instructions, such as arithmetic-and-Iogic (ALU) Data Path instructions. This pre-fetch capability and the micropro- The data path is 16 bits wide and is responsi ble for all the gram pipeline give the F9445 very fast and efficient instruc- processing of data and address in the system. In many tion execution. . cases, data and address may be proceSsed simultaneously. Timing Generator The data path includes the following blocks (see Figure 1): The timing .generator produces the system timings for the Register File (ACO,.AC1, AC2, AC3, SP, FP) F9445 internal registers, memory, I/O, and console. Program Counter (PC) Program Status Word or Status Register (pSW contain- The clock is divided on-chip using a 3-bit twisted ring coun- ing: Carry, Overflow, 32KW, ETRP flags) ter. The divide ratio is 6:1 or 4:1, depending on whether a Interrupt-On Flip-Flop (INTON) short or long cycle is required. The long cycle can be Destination Mux extended indefinitely by lowering the inputs BU5GNT, Source Mux RDYA, or RDYD. These signals hold the processor in state. 16-Bit ALU 51 (using BUSGNT or ROYAl or S3 (using ROYOI until the 17-Bit Shifter inputs are raised. 5-Bit Counter (formulticycle instructions) Bus Register Mux The twisted ring counter is also used to generate all the Bus Register strobes by a combinational decode of its outputs and cer- Bus Mux and Buffer tain bits of the microprogram register. Incrementer Signal Descriptions Control Unit The operations cif the data path components are governed All F9445 inputs and outputs are TTL. by the pipelined, microprogrammed control unit. This unit comprises three main elements (see Figure 1): the PLA Information Bus (control store) to contain the microprogram, the pipeline rno through IB1S' Pins 11 through 26 -16-bit Bus - Active register (microprogram register) to latch the micro- • LOW bidirectional; iSo is most significant bit; address valid instruction executed in the current cycle, and the instruc- 6·18 F9445 with STRBA strobe; data valid with STRBD strobe; 3-state write or output operation; 3-state during data-channel cy- during data-channel and non-bus cycles. cles and short cycles (BUSREO is HIGH). Timing and Status RDYD, Pin 8 - Data Ready - Active HIGH input; used to SYN, Pin 7 - Synchronize Output - Active every cycle; synchronize external devices with the F9445 during data may be used for external synchronization of memory and transfer; a LOW level halts the processor. I/O control. RDYA, Pin 4 - Address Ready - Active HIGH input; main- STRBD, Pin 6 - Data Strobe - Active LOW output; active tains address on bus when LOW. only during memory, I/O, console, or data-channel cycles; used as strobe for data. RUN, Pin 37 - Run Status - Active HIGH output; LOW when in halt state. STRBA, Pin 5 - Strobe Memory Address Register - Active LOW output; active only during normal memory cycles; not CARRY, Pin 39 - Carry Status - Active HIGH output; copy active during write portion of read-modify-write cycles of carry bit. (DSl, ISl, STB instructions and auto-increment/decrement addressing modes); used as strobe for external address INTON, Pin 27 -Interrupt-On Status - Active HIGH out- register; active on I/O cycles when I/O instruction is output put; copy of Interrupt-On flag; HIGH when interrupts en- onto bus. abled. M, Pin 36 - Memory or I/O Function - Active LOW output. CLK, Pin 40 - Clock Input - Single-phase clock; ~ 0" Pin 35 - Memory or I/O Function - Active HIGH output. positive-edge triggered. ~ 00, Pin 34 - Memory or I/O Function - Active HIGH output; these pins indicate the type of bus transfer as shown in the Arbitration following table. BUSREQ, Pin 38 - Bus Request - Active LOW output; in- dicates that a bus cycle is required; usefulin multi- M 0,00 Function microprocessor system. 0 0 0 Instruction Fetch BUSLOCK, Pin 2 - Bus Lock - Active LOW open collector 0 0 1 Operand output; set during read portion of read-modify-write cycles Memory 0 1 0 Indirect Address (on DSl, ISl, STB, and auto-increment/decrement), reset 0 1 1 Address Save on interrupt, abort, during write portion of those cycles; used in multi- and trap microprocessor system. 1 0 0 Input or Output BUSGNT, Pin 3 - Bus Grant - Active HIGH input; used for 1 0 1 Data Channel Acknowledge multi-m'icroprocessor operation; a LOW level inhibits ad- I/O 1 1 0 Read Console Code d ress output and halts the processor. 1 1 1 Console Data Service Request If a skip is taken on an arithmetic-and-Iogic (ALU) instruc- The order of priority of requests and interrupts, from high- tion, the next instruction is fetched but not executed. In est to lowest, is as follows: MR, ABORT, DCHREQ, Stack such fetches, t.he M and 0 lines will indicate the following Overflow Interrupt, INTREQ, and CONREQ, states. MR, Pin 33- Master Reset-Active LOW input; a LOW M 0, 00 State Indicated level causes the processor to enter a wait state after com- pleting the next full cycle; if that cycle is a write, it is inhi- o 0 0 SO through S4 bited (changed to read); sets the F9445 to 32K mode with o 0 1 S5 trap enabled. During machine cycles that do not use the bus, the riA and DCHREO, Pin 29 - Data Channel Request - Active LOW o lines will be "111". BUSREQ and the bus strobes are in- input; initiates data-channel cycles while LOW after current active in these cycles. instruction. Must occur before TDRH (c). Vii, Pin 1 - Write Output -Indicates direction of data flow; CONREQ, Pin 28 - Console Request - Active LOW input; HIGH indicates a read or input operation; LOW indicates a initiates a console operation after current instruction. 6·19 F9445 INTREQ, Pin 30 - Interrupt Request - Active LOW input; Fig. 2 F9445 Register Model initiates entry to interrupt procedure, if interrupts are en- abled, after the current instruction. 15 ABORT, Pin 32 - Abort - Active LOW input; initiates abort PROGRAM COUNTER (PC) sequence in the current microcycle. PROGRAM STATUS WORD (PSW) ACCUMULATOR 0 (ACO) Power ACCUMULATOR 1 (AC1) Vee, Pin 31 - Power Supply - Requires +5 V. ACCUMULATOR 2 (AC2) GND, Pin 9 - Ground. ACCUMULATOR 3 (AC3) STACK POINTER (SP) ilNJ, Pin 10 - Injection Current Input - Operates in 200-400 mA range at approximately 1 V; requires> 350 mA FRAME POINTER (FP) for maximum speed. Register Set liNTON I INTERRUPT MON FLAG The F9445 has eight user-accessible registers (see Figure 2), including seven 16-bit registers and a program status word (PSW) containing the following four flags: carry (bit 0), 32KW (bit 1), trap enable (bit 2), and overflow (bit 15). The carry flag (C) indicates the state of the carry bit during arithmetic Fig. 3 Data Organization in a Stack (LIFO) and logiC operations. The 32KW flag indicates whether the INCREASING MEMORY ADDRESSES INCREASING MEMORY ADDRnSES processor is operating in the 32K-word ("1 ") or 64K-word ("0") mode. The trap enable/disable flag (ETRP) indicates t t whether the trap instruction is enabled ("1 ") or disabled ("0"). The overflow flag (V) indicates twos-complement overflow in arithmetic operations. SP - TOP OF STACK SP_ TOP OF STACK In addition, there is an interrupt-on (INTON) flag. The CPU responds to interrupt requests from external I/O devices when the flag is set ("1 "). When it is clear ("0"), all inter- rupt requests are ignored by the CPU. The state of the flag can be altered by the Interrupt-Enable or Interrupt-Disable instruction. FP --f--cl AC3 OLDFP - .. FP- AC3 OLDFP AC2 AC2 ACI ACI The seven 16-bit registers comprise a program counter ACO ACO (PC) that sequences the execution of instructions, four general-purpose accumulators (ACO through AC3), the stack pointer (SP) and the frame pointer (FP). The, program counter sequences the ,execution of instructions. It holds the address of the next instruction to be executed and is '--- C I AC3 '--- AC3 I automatically incremented to fetch instructions from con- secutive memory locations. A Skip, Jump, Jump-to- r-- t-- OLDFP PREVIOUS ,..-- f-- OLD'FP AC2 RETURN AC2 Subroutine, or Trap instruction, an interrupt generated by BLOCK ACI ACI an I/O device or an Abort can alter the sequential execution ACO ACO of instructions. I I The four accumulators serve as source and destination reg- I isters for 16-bit arguments in arithmetic-and-Iogic instruc- I 32K WORD MODE 64KWORDMODE tions which process the contents of the source accumu- lators and a base value for the carry flag and store the 16-bit result in the destination accumulator. The associated carry and overflow flags are set or cleared depending on 6-20 F9445 the result of the ALU operation as the base value of carry. two address ranges in which the F9445 can operate are Accumulators AC2 and AC3 also serve as index registers 128K-byte (64K-word) or 64K-byte (32K-word) logical ad- during memory addressing operations. In addition, AC3 dress space. The F9445 master resets to the 64K-byte functions as a subroutine linkage register, and the pair ACO (32K-word) address range. The 128K-byte (64K word) and AC1 are used as a 32-bit register in the multiply/divide address range can be enabled or disabled under program and the normalize and parametric double-shift instructions. control. The other two 16-bit registers serve as temporary storage 64K-Byte (32K-Word) Address Range and as the stack pOinter (SP) and frame pointer (FP) in the After the master reset is activated or the 064K instruction is stack manipulation instructions. The stack pointer contains executed, the F9445 operates in the 64K-byte (32K-word) the address of the top of the stack, i.e. the last word address range. In this mode of operation, it uses 15-bit ad- "pushed" onto the stack which is also the first word that dresses to fetch up to 32K words from the memory and may be "popped." The frame pointer contains the address uses either the least-significant sixteenth bit to select high of the highest location in a block of five words on the or low byte of the word in the byte instructions or the stack, a "frame," containing program status information most-significant sixteenth bit to specify the remaining 15 used to return from a subroutine (see Figure 3). bits of the word as an indirect address in multi-level indi- rect addreSSing instructions. The frame pointer is updated by the Save and Return in- structions which are intended to be the first and last in- In the Load-Byte (LOB) and Store-Byte (STB) instructions, a structions, respectively, executed by a subroutine. When a 16-bit accumulator is specified as the byte pOinter. The Jump-to-Subroutine instruction is executed, the value most significant 15 bits of the byte pointer are treated as PC+ 1 (and the value of the carry bit in 32K-word mode the logical address of the word containing the byte which only) is stored in AC3. The Save instruction then pushes the least significant bit specifies, selecting the high (if "0") five key words onto the stack in the following order: first, or low (if "1") byte of the word. the contents of ACO; second, the contents of AC1; third, the contents of AC2; fourth, the value of FP before the The remaining memory reference instructions specify ef- Save; and fifth, the contents of AC3. At this point, SP fective addresses of 16-bit words via various (11) addres- points to the top of the frame (which is the current top of sing modes described below. the stack), and that address becomes the new value of FP. This new value of FP is also placed in AC3. When a Return Page Zero In this mode the instruction provides instruction is executed, the five words stored in the frame an 8-bit absolute address to access referenced by FP are used to restore accumulators ACO the first 256 words (page zero) of through AC2 to their values at the time preceding the Save. memory. FPis restored to its previous value (pointing to the last previously saved five-word frame) and PC is loaded with PC Relative In this mode the instruction provides the return address which had been placed in AC3 by the an 8-bit twos-complement signed previous Jump-to-Subroutine and pushed onto the stack by number which is added to the pro- the previous Save. The restored value of FP is also placed gram counter to access 128 loca- in AC3 by the Return instruction. tions below and 127 locations above the address specified in the program Information may also be moved between SP or FP and any counter. of the four accumulators by the instructions MTFP, MFFP, MTSP, and MFSP without affecting the source register of Indexed by AC2 In these two modes the instruction the move or any of the registers not specified with the in- (or AC3) provides an 8-bit twos-complement struction. This allows setting up multiple stacks whose signed number which is added to pointers are saved in main memory when not in use. AC2 (or AC3) to access 128 locations below and 127 locations above the Addressing Ranges and Modes address specified in the accumulator. The F9445 memory reference instructions support two ad- The memory reference instruction may specify any of the dress ranges and a variety of addressing modes. These above four memory addressing modes to be either direct or modes include direct/indirect addressing which may be ab- indirect. For direct addressing, the effective address com- solute, PC-relative, or indexed by AC2 or AC3. Additional puted using the eight addre.ss bits of the instruction is the addressing modes include auto-increment, auto- final address of the target word to be stored or retrieved. decrement, and address via stack and frame pOinters. The 6·21 F9445 For indirect addressing, the effective address computed provide the displacements for the calculation of effective from the eight address bits of the instruction is used to addresses of memory locations. fetch a 16-bit word that supplies the address of the target word. If the most significant bit of this word is "0", the 15 The whole instruction set can be divided into five broad least significant bits provide the address of the target word. groups: However, if the most significant bit of this word is" 1", this specifies a further level of indirect address. In that case, Memory Reference Instructions the 15 least significant bits refer to the address of another Arithmetic-and-Logic Instructions word which could provide the final address of the target, Stack Manipulation Instructions depending on whether its most significant bit is "0" or "1". I/O Instructions Thus, multiple levels of indirect addressing continue until a Control Instructions word is fetched with a most significant bit of "0". Such multiple levels of indirect addressing are only allowed in The Memory Reference instructions modify the contents of the 32K-word address range operations. memory locations, alter program execution sequence, and move operands between the accumulators and memory lo- The next two types of addressing modes are the auto- cations. The contents of accumu lators and the carry and increment and auto-decrement modes. When locations 20 overflow flags are processed by the Arithmetic-and-Logic through 27 (octal) are indirectly addressed, the auto- instructions. The Stack instructions manipulate the regis- increment mode is activated: the contents of the specified ters and the memory in stack-associated operations. The location are first incremented and stored back and this I/O instructions effect data transfers between the accu- new value is treated as the effective address (which can, in mulators and I/O devices. The Control instructions modify turn, be either direct or indirect). Locations 30 through 37 or interrogate the state of the CPU and operator console, (octal) are used as auto-decrement locations in a similar performing such actions as controlling the status of the manner. interrupt-on flag and reading the status of the console switch register. The last type of addressing is stack addressing in which the address of the memory reference is derived from the stack pointer. 128K-Byte (64K-Word) Addressing Range After the E64K instruction is executed, the F9445 starts operating with the 128K-byte (64K-word) addressing range. In this range, the F9445 uses 16-bit addresses to fetch up to 64K words from the memory and supports all the 11 ad- dressing modes described previously. However, only one level of indirect addressing is allowed - the one specified in the instruction - since with 16-bit addresses there are no bits available in the words fetched to indicate further indirect addressing. The byte pointer is also different in the 128K-byte (64K-word) case compared to the 64K-byte (32K-word) case. The 64K-word range byte pOinter is 17 bits wide and is composed of the carry flag and the 16-bit accumulator specified in the LDB or STB instruction. The value of the least-significant bit of the 17-bit word selects the high (if "0") or low (if" 1") byte of the word to be loaded or stored. Instruction Set The F9445 has fixed-length instructions, each of which is 16 bits long and divided into several fields. The fields are used to specify the operation code and other related ac- tions, to define conditions and specify the CPU registers containing arguments, to define I/O device codes, and to 6-22 F9445 Input/Output Operations The F9445 can transfer the contents of any accumulator to an I/O device by executing a Data-Out instruction. It can Input/output devices can transfer data to the F9445-based load data from an I/O device into any accumulator by microcomputer via: executing a Data-In instruction. To test the status of an I/O device, the F9445 can execute a Skip-an-Status instruc- Programmed I/O using the I/O instructions of the F9445, tion.The I/O cycle has the same timing as the memory cycle (see Figures 13 and 14). Features of the I/O cycle are: Memory-mapped I/O using the load/store instructions of the F9445, 0 r • 250 ns (at 24 MHz system clock) minimum cycle time • Cycle time can be extended using RDYA, RDYD Direct memory access or data-channel transfers. • I/O instruction is output at address time • STRBA is used to latch the I/O instruction For programmed I/O, the device consists of up to three • STRBD is used to strobe the data (minimum one) bidirectional 16-bit device registers, de- • a lines indicate the type of cycle as follows: noted as A, B, and C, and three 1-bit flags: Busy, Done and Interrupt Disable (see Figure 4). The 2-bit status word com- M 0, 0 0 Iii prised of Busy and Done represents one of up to four pos- I/O Input Execute 1 0 0 1 sible states of the device, viz. idle, busy, partially done and Instruction Fetch 0 0 0 1 completely done (refer to Device Status Flags subsection). I/O Output Execute 1 0 0 0 The F9445 I/O instructions allow data transfers between Interrupt Save 0 0 any of the accumulators (ACO through AC3) and any of the device registers (A through C), and can test and set the • The I/O devices can interrupt the normal flow of the Busy, Done and Interrupt-Disable flags. program by using the common interrupt request line Instruction Decode An I/O instruction in the F9445 system comprises several Fig. 4 I/O Device Model fields as shown in Figure 5. This format accommodates data transfers between a CPU accumulator and anyone of up to three bidirectional registers in anyone of 621/0 de- BUSY DONE vices. Bits 10 through 15 are coded to represent device codes 00 through 76 (octal). The all "1s" device code, 77 INPUT OUTPUT octal, is reserved for CPU control instructions and should DEVICE REGISTER A DEVICE REGISTER A not be assigned to any unique I/O device; for similar rea- sons, device code 1 is also reserved; by convention, device DEVICE REGISTER B DEVICE REGISTER B code 0 is not used. DEVICE REGISTER C DEVICE REGISTER C Fig. 5 Input/Output Instruction Fields 1() 11 12 13 14 15 AC Type of Op Code Address Transfer Control Device Code 6·23 F9445 Bits 3 and 4 specify the address of any accumulator in- Device Status Flags volved in an I/O instruction. When no accumulator is in- Interrupts from a device are disabled when the interrupt- volved; both bits are ignored. The function bits 5,6, and 7 disable flag of the device is set to ".1". Interrupts are define the I/O operation to be performed. Bits 8 and 9 con- enabled when the flag is clear. Interrupt requests are gen- trol or test the status of the device busy and done flags. erated whenever the device sets the done flag. The eight standard I/O instructions were listed During programmed I/O, the interrupt-disable flag is nor- previously in the instruction set description of the mally set to disable interrupts, and the busy and done flags introduction to this section. The No-Input/Output (NIO) define the status of the device for the CPU. The busy and instruction is a "no data transfer" instruction that can done flag states are coded to represent the ind icated de- be used to set the busy and done flags as required, by vice conditions, as follows. attaching the appropriate flag-setting mnemonic. The F9445 executes a "dummy" data out transfer. The status of a device's busy and done flags Is tested by executing Busy Done Device State a Skip (SKP) instruction that causes a specific I/O device to put its busy and done flag states on lines IBo and IB1 0 0 Device idle of the common information bus. If the flag state 1 0 Device busy satisfies the condition specified by the busy/done flag- 0 1 Device completely done testing mnemonic appended to SKP, the CPU skips the Device partially done next instruction. The remaining six standard I/O instructions first move data between an accumulator and The sequence Of I/O transactions is normally dictated by anyone of the device registers A, B, or C. After the the speed at which the device can communicate with the transfer is completed, the busy/done flags are set as CPU. If the CPU operates at a higher speed than a device, it specified in the I/O instruction. enters a wait loop between each I/O transaction with the device. During execution of the loop, the CPU repeatedly There are three I/O instructions that are common to all I/O monitors the busy or done flag to determine when the de- devices: Interrupt-Acknowledge, Mask-Out, and Clear-I/O- vice is ready for the next I/O operation. Devices. Tile device code for these three instructions is 77 (octal). During an output operation, one instruction stores data in the desired device register and places the device in the When the F9445 executes the I/O instruction, the M and d busy state. The CPU then enters a wait loop which termi- lines will indicate an I/O operation ("100"). The 0 lines are nates when the device has cleared busy and set done to valid on the rising edge of SYN. The device address signal readiness for the next output operation. (bits 10-15) must be decoded by each device on the I/O bus. Transfers of in'formation to and from.the F9445 are To initiate an input transaction, the device sets the done timed with STRBD in the same way as the memory cycle. flag. One instruction reads data from the appropriate de- vice register and places the device in the busy state. The At the address time, the F9445 outputs the I/O instruction CPU then enters a wait loop which terminates when the on the information bus. This can be used to generate I/O device has cleared busy and set done to indicate that it has signals on systems without an I/O controller. STRBA is the next data ready. generated and can be used to latch the I/O instruction ex- ternally. The interrupt-disable, busy and done flags or- ganize interrupt-driven program-controlled I/O operations. The CPU controls the interrupt-disable flag. Both the CPU and the device can control the busy and done flags. 6·24 F9445 Interrupts (INTON), but the flag has no effect until the next instruction The interrupt request, INTREQ, line is common to all 1/0 begins. Thus, after the instruction that turns the interrupt devices. When the device completes an 1/0 operation, it back on, the processor always executes one more instruc- should set the done flag. Concurrently, if the device is tion (assumed to be the return to the interrupted program) enabled to interrupt, it should assert the active LOW on before another interrupt service can start. If the service the INTREQ line. The processor responds to the interrupt routine allows interrupts by higher priority devices, the request after completing execution of the current routine should turn off the interrupt, before dismissing as instruction. It then clears the interrupt-on flag so no indicated above, to prevent further interrupts during dis- further interrupts can be started, saves PC (which points missal. In dismissing, the routine should re-enable lower to the next instruction) in location 0, and executes a priority devices. "jump-indirect-to-location-1" instruction to jump to the interrupt service routine. Location 1 should contain the The interrupt request input INTREQ is negative-level address of the interrupt routine or an indirect address to sensitive and is synchronized in the processor. Externally, the routine. The F9445, when interrupted, can check for interrupt requests may be latched with the leading edge of the source of the interrupt in two ways: SYN. The interrupt request may be reset by the external I/O controller from a decode of the I/O instruction INTA. It can test the state of the done flags in the various de- vices, one by one, by executing Skip-on-Done instruc- The F9445 recognizes two other types of interrupts: tions; or Abort Interrupt - This is activated by the active LOW of the It can test the state of the I/O devices by executing the ABORT input. The processor responds by: Interrupt-Acknowledge instruction, causing the device that had sent an interrupt request to respond by placing Aborting the instruction being executed, its device code on bits 10 through 15 of the information Storing the address of the aborted instruction in loca- bus. tion 46 (octal), and Jumping indirect to location 47 (octal). As several devices can request interrupt simultaneously, device priority may be established in a daisy-chain fashion Stack Overflow interrupt-This is an internal interrupt by a physical connection of a serially propagated signal, caused when the stack overflows; i.e., when a stack Interrupt Priority. The first device requesting an interrupt operation (PSHA, PSHF, PSHR, SAVE, TOPW) writes over and having its Interrupt-Priority-In line HIGH has priority, a page boundary (mod 256). This interrupt is of higher priority than the external interrupt (I NTREQ); the and it answers the Interrupt-Acknowledge instruction, at processor responds, at completion of the current the same time blocking the propagation of the interrupt- instruction by: priority signal by putting its Interrupt-Priority-Out line in a LOW state. Clearing the interrupt-on flag (to "0"), Storing the updated program counter in location 0, and The interrupt-priority signal is generated in the device hav- Jumping indirect to location 3 (octal). ing the highest priority. The F9445 can disable the interrupt system in each I/O device by placing a mask on the infor- The interrupt-save cycle follows the interrupt. It can be ex- mation bus while executing the Mask-Out instruction. ternally detected by the code "011" on the 0 lines and used, for example, to switch an external mapper to non- Each bit in the mask is assigned to a specific device. When mapped mode. that bit is "1", the interrupt system is disabled. A "0" in that bit enables the device. The order of priority of requests and interrupts, from high- est to lowest, is as follows: MR, Ai35RT, DCHREQ, Stack After servicing a device, the routine should restore the pre- Overflow Interrupt, INTREQ, and CONREQ. interrupt states of the accumulators and carry, turn on the interrupt, and jump to the interrupted program. The instruction that enables the interrupt sets interrupt on 6-25 F9445 Data Channel 3. The processor sets the M and 0 lines to "110" (console The data channel has three methods of operation with the code in). F9445: 4. In response to the M and 0 lines being set to "110", the Data-channel cycle with F9445 controlling the memory, console logic supplies a code on the information bus Data-channel cycle with external memory control, and corresponding to the desired operation, which is Autonomous-bus cycle using bus arbitration scheme. selected onto the bus with STRBD. The sequence of events during a data-channel cycle is as 5. The console logic resets CONREQ. follows: 6. The processor executes the console operation. 1. DCHREQ is set. 7. The processor may read or write data from the console 2. F9445 responds by setting M, 0" and O. to "101" and switches or console lamps. In this case, the M and 0 BUSREQ to "1". This is recognized externally as Data- lines are set to "111" (console data). In most cases, the Channel Acknowledge and can be used to reset processor halts after the console operation by entering DCHREQ if it is the last data-channel cycle required. a Wait state. The exceptions are Continue and APL. 3. F9445 3-states the bus and sends STRBA. Console logic can be implemented in three levels of simplicity: 4. The external logic must supply an address at this time. The address time can be extended with RDYA. No Console Code - If a CONREQ is generated and no console code supplied, the default bus value ("0") will 5. F9445 outputs STRBD. cause the processor to execute APL. This sets the PC to -1, then starts normal execution. This is the minimal con- 6. The controller transmits or receives the data-channel sole operation requ ired. data and responds with RDYD, concluding the cycle. Limited Console Operation - A subset of operations can Console Operation be arranged with a 2-bit console code. These operations Console operation allows examination and modification of are APL, Test, Continue, and Halt. the F9445 internal registers without executing programs in main memory. This is very useful for system diagnostics Full Console Operation - A 9-bit code (see Figure 6) de- even when the memory or I/O part of the microcomputer fines the full set of console operations. Single-Step is not system is not fully functional. implemented directly, but can be arranged using Continue: first, the Continue operation is specified; after the first in- Upon request for console operation, the processor will struction is fetched, a new CONREQ is generated and the execute one of a number of console operations depending operation is changed to Halt. on a console code on the information bus (see Figure 6). This facilitates the connection of an external console for monitoring and test purposes. The following sequence is used to execute a console operation: 1. CONREQ is set LOW. 2. The processor finishes the current instruction. 6-26 F9445 Fig. 6 Console Codes o 2 3 4 5 6 7 8 9 o I I O§:] , I QD I I Dffi:J I I 12 3 4 , I I I I I :0 : 15 6 I 0 0 0 ACO o 0 PROGRAM LOAD 0 0 1 ACI o 1 EXAMINE/DEPOSITITEST 0 1 0 AC2 o CONTINUE 0 1 1 AC3 1 STOP 1 0 0 SP 1 0 1 FP 1 1 0 1 1 1 - Bus Arbitration is carrying address or data, respectively. The M signal The F9445 contains three signals that allow more than one (M = LOW) indicates that a memory cycle is taking place processor to share a common bus: on the bus, while the W signal indicates whether the opera- tion is a read or write. The timing of the STRBO is shorter BUSREQ-This is LOW at the beginning of every cycle In for a write operation, to allow positive hold time for the which the F9445 requires use of the bus. memories. The signal ROVO may be held LOW to stretch .. the memory cycles for slow memories. ~ BUSGNT-When LOW, it is used to halt the processor in- dicating the bus is unavailable. A typical scheme is shown in Figure 7. This diagram shows a 4K x 16 static RAM configuration (2114-type 1K x 4). The BUSLOCK-This indicates that the current bus cycle and bus is buffered by a 74240 inverting 3-state buffer. Buffering the following bus cycle from the processor must not be in- is optional and depends on fan-out requirements of the terrupted by a cycle from another processor. memories. The buffer is normally connected for output, but is connected for input when necessary by a simple decode The BUSLOCK signal has two purposes. One purpose is to of the M, Wand STRBD lines. prevent the external memory address register from being overwritten during those instructions that rely on the ad- An address latch (74533) is cloCked with STRBA. The dress remaining in this register. The other purpose is to memory address is decoded from these outputs and forms provide a method of synchronizing separate software tasks the chip-select (CS) inputs to the RAM. uSing a standard semaphore system. An external arbiter is required to determine which processor has access to A shift register (74164) provides a time delay for ROVO for the bus. slow memories. An alternative for this would be a one-shot (9602). Fast memories do not require ROVD delayed. Applications Static Memory Interface The F9445 bus structure allows easy connection of static memory. Both address and data are multiplexed onto the 16-bit information bus iB'D-,sl' The mutually exclusive sig- nals STRBA and STRBO indicate that the information bus 6-27 Fig. 7 Stalic Memory Connection Scheme MAR15 -Ao MEMORY A~RA Y 18 IBM 18 MARe_Ag "1 BUFFER/DRIVER nn iBa ,. !!!!. 2,' 748240 ~ 'D"!£. !!.! 4.5 ~' 1,.,15 IBI ~ ii, !!3.~' .!!! 5,7 8,1 l1ir '~----jO/--- R: CONNECT FOA £1 A RS232 INTERFACE A, 1 56 ! A, I+- & A, +5V STRBD 4 ~' 0, E3 +5 V DECODER! STA, RBYR, oeuux BSYR,N 110 iORST 1 7eLS11 DR-=t>03iiiiYT'SSYT, iii, 1B0 L R : J 1 2 MRES ~ MIl +5 V BUSY + {FROM RESET SWITCH) DONE FLAG LOGIC 8, elT, 74lS08 74L50B ·WnIem OiShI F9445 Fig. 8 F9445 Input/Output Connection Scheme (2 of 2) iii 101 74LS240 r---=--""" I E, I - 10, 2,3 I 2.J 18 I 18,17 IBle 'Y' .5 V iB9 4,5 i 3 I 17 16,15 1BI9 I I 1k I I »--I>~~ INTRa (9445) ii 10 6,7 IL _ _E,_ _ J I 14,13 181,0 BUFFER/DRIVER IB" 8,' - - DE, DE, 12,11 IBI'1 .5 V .5V ,. 1 1. so, 00~=Dl0 12 0, 74LS74 0, 11 ITo -4- 10 co, CP, a, 111~ CO2 10 13 STRB~ MRO 1 19 DE, OE2 - - SVN(9445) is'2 2,3 18,17 IBI'2 iB'3 4,5 74LS240 16,15 181'3 BUFFER/DRIVER ii'4 6,7 14.13 181,4 iii,s 8,' 12,11 IS I'5 I. - 101 INTA~1,19 ,., DE1,DE2 .5V-~ DATA TIME STRETCH ON 1/0: 18 181 8 .5 V .5 V 16 1819 ~ 1k 18lto ~ 14 74lS240 7405 12 .-.000--4.- ROVO o.--!. IBI" BUFFERI D- r..!!. DRIVER • 181'2 9602 ONE·SHOT ~ 7 181'3 CO ~ 5 18114 11 12 13 14 15 M-1r-----' 13 INTA CODE 0 0 1 1 0 0 0 0 0 1 TTl TTO IT 0+-'2. 3 181,5 6·31 F9445 Fig. 9 F9445 Dynamic Memory Connection Scheme Dynamic Memory Timing + 5 V - -_ _....... CLOCK ------1 STAID ADDRESS DECODER 74508 74LS138 im' D~~2~~R/O lIASo IB M 0, MEMORY ADDRESS lIAS, REGISTER SYN ,. 0, 0, A, 0 0, lIAS, Ao RAS, STRBD-t>o--=::::::::::4:;:~rt-tl Do I D,. 00 748533 ReF MUX REF LATCH +5 V CP AE AS MUK CAS ROYD ~::::::+:;~i13 A, 0,..~-------~A, ..' I - - . / - - " ADDRESS Do 0, A, Oo,...-r;--v Refresh Timing I I ~:::::::::::::;t~ I 16LS42 ADDRESS MUX Ao COT.~A ~~~:~:ESH D, 00 748533 ·5V - F -.....--..,. LATCH CLOCK STRBA +5V '5V o 1 0 0 1 0 REF MEMORY ARRAY 14K. 1. MEMORY ARRAY '5V DATA 4 BANKS 748164 CLOCK CP SHI" REGISTER BUS ,. 1:7.~~=::;t.-:!:::!:1 DIN' DOUT M REF STA8D Notes I. D'N connected to DOUT connected to Data Bus. _ _ 2. All FI6K devices have the same address lines and CAS. WE line. 3. Each bank of 16 FI6K has a separate RAS line (4 banks). 4. Each slice of 4 FI6K is connected to a separate data bus line (16slices). 6·32 F9445 The memory requires "refreshing" every 2 ms. The 9642 The Console Request is set whenever any operation switch contains a 7-bit refresh counter. Every 15.63 ms (2/128), the is pressed and is reset when the console code is read from memory controller enters "refresh" mode. This is syn- the FPLA. The circuit provides for control of two pro- chronized with SYN to avoid any conflict. Another 74164 cessors sharing the same bus. shift register controls the refresh timing which requires only an RAS strobe. After the refresh cycle, the refresh All the switches are momentary-action type except the data counter is incremented and the normal memory timing is switches and the select-processor switch. resumed. A full listing of the FPLA is shown in Table 2. The refresh cycle takes place when needed and may take place during non-memory processor cycles. In these cases, The console provides all F9445 console functions, includ- the processor is not halted, and the refresh cycle is over- ing Self-Test, plus the additional function of Single-Step, lapped. and is compact enough to be implemented with all switches, lamps, logic and connectors on a double-sided Different memory types have different speed requirements. 17V2-by-5V2-inch printed-circuit board. These requirements can be met by changing the "taps" on the 74164 shift registers. • Console Control On an application board, a minimal console is usually re- Table 2 Console PLA Listing quired. The APL (automatic program load) function can be *A LLLLLLLL easily implemented by pulsing the Console Request line *P 00 *1 -H-HHHHHHHHHL--- *F -----A-- LOW. There are no critical timing requirements since this *P 01 *1 -H-HHHHHHHHL---- *F --A--A-- signal is latched internally. The F9445 will continue to exe- *P 02 *1 -H-HHHHHHHL----- *F --AA-A-- cute APL commands until the Console Request is raised. *P 03 *1 -H-HHHHHHL---H-- *F ----AA-- Since the bus must be HIGH for the APL to execute cor- *P 04 *1 -H-HHHHHHL---L-- *F ----AA-A rectly, bits 5 and 6 of the bus may be tied to + 5 V through *P 05 *1 -H-HHHHHL------- *F --A-AA-- 3 kD resistors as pullups. *P 06 *1 -H-HHHHL-----H-- *F ---AAA-- *P 07 *1 HL-H---L-----H-- *F ---AAA-- For debugging and evaluation purposes, a console is a *P 08 *1 HL-H---L-----L-- *F ---AAA-A very useful tool. It gives complete control of the processor *P 09 *1 HL-H-----L---L-- *F ----AA-A independent of software and memory operation. *P 10 *1 HL-H-----L---H-- *F ----AA-- *P 11 *1 -H-HHHHL-----L-- *F ---AAA-A Since the console commands are microprogrammed into *P 12 *1 -H-HHHL--------- *F --AAAA-- the F9445, a full console design is fairly simple, the *P 13 *1 -H-HHL---------- *F - - - - - - - - simplest full console uses the F9470 console-controller cir- *P 14 *1 -H-HL----------- *F ------A- cuit, which drives an RS232 terminal and contains two se- *P 15 *1 - - - L - - - - - - - - - - - - *F -,----AA- rial I/O ports and a timer. The F9447 I/O controller can also *P 16 *1 HL-H------------ *F ------A- be used to provide some console functions. *P 17 *1 LL-H-----H------ *F -----AA- *P 18 *1 -H-HHHHHHHHHH--- *F -----AA- Interfacing to standard switches and lamps requires switch debouncing and encoding operations. The circuit shown in Key for Table 2: Figure 10 uses R-S latches for switch debouncing and an *A Active level of outputs FPLA (93409) for switch encoding. *P Product term number *1 Inputs An address latch is strobed on every STRBA, and a data *F Outputs latch is strobed on every STRBD except "console code Don't care read." This results in the correct display on the lamps. The H High level data switches are enabled with "console data read." L Low level A Single-Step function is included. This function requires A Active two additional latches, plus some decode logic, and im- plements a Continue followed by a Halt. 6-33 Fig. 10 F9445 Console Connection Scheme (1 of 3) ~ 10 .,A 5 1 " • 1 10 ci 51.52 a '5. A • I '.3 '5. 3' DEPACO 5 11 7 I, 1 i DEPAC1 • 10 lS279 QUAD LATCH ,. 9 I, Ao • 1 i I DEPAC. 11,12 ,. 13 7 " 1 A, C > - - - £ I DEPAC, 15 1 " 9318 ENCODEA " • I, A, .:.- 1 a i 5,,52 ',3 DEPSP SAME AS PLA PIN 1 5 b !15 1. 7 1 I, GS I • LS279 QUAD XI -10. S aE IDEPFD LATCH 10 8 I, I i DEPFLAGS 11,12 1. 13 ope ' - - lOb Za .!.- I i I DEPDC 15 " I" LS257 MULTIPLEXER Zb !- 1.5 1 tEXACO I 1 ',3 " 5,,52 a • * 10 10 I" ~c 2!... 5 7 11 r - - I" I, 1 I • LS279 QUAD IEXAC1 LATCH 10 9 ,. I, 9 Ao D0- r - - I" I t EXAC, 11,12 1. 13 A'~ 1. 1 " i I EXAC. 15 1 9318 ENCODER " • 1 • 1 5,.51 a I, A, i I EX SO ',3 ,. 5 7 • I, GS 1>-X8 1 i LS279 QUAD EXFD LATCH 10 9 3 I, 1 i I EX FLAGS 11,12 ,. 13 EXPC .. 1 " I EX-;C 15 SWITCH l -r-- 7'~05 ..... PIN 7 OF PLA DEBOUNCE XPC DPC SWITCH DECODE Fig. 10 F9445 Console Connection Scheme (2 of 3) +5v------~-+~------~----------~----------~------~------------------------1 1k 7405 1k 10 k 10 k 10 k RESET 0, 18 iio lOGIC DUAL-PROCESSOR LOGIC 10 k 02 17 ii5 STRBA~ STRBA ~ Sfi!iiO~ STRBO 22 (RUN) A--+-~." J L ______-::c==::::2::n::d~FE~T;.::C::.H:.....-----2"i0 A1S SWITCH OEBOUNCE CONSOLE CODE PLA 6-35 F9445 Fig. 10 F9445 Console Connection Scheme (3 oj 3) DATA LAMPS ADDRESS LAMPS +5 • '\ 27. -5' '\ 27. +5' iBo Do 00 iBo 1elS373 LOo '\ ii, D, 0, ii, D, OCTAL LATCH (RUN)B '\ ii2 D2 02 iiz D2 (CARRY) B .. (ION)B ii3 D, 0, ii3 • D, I. 12 . I. 11. " D. O. ii, D. (RUN)" (CARRY)A '\ I' 15 I' ii~ Ds Os iis Ds I I t" (ION)" 17 16 '\ 17 iii, D, 0, iis D, '\ II D, iir 18, LE 11 00 "::" "::" 0,-=....-...... STRBA ii 11 +5 • +5' Vi 00 iBs • LE Do 00 270 iis 27. 7CLS373 0, -~r"")>--t:~.J ii Vi II, D, 0, iii. OCTAL LATCH 11" D2 li'0 ii" D, ii11 01~Ol 74LS04 I. I. OO~Oo ii,2 D, O. ii12 74LSD4 1. 1. ii'3 Ds Os ii,) 17 17 iiu D, 0, ii14 II ii,5 D, 0, ii,s DATA SWITCHES 6-36 F9445 A Multiprocessor Scheme completely shared resources, does not give as high per- There are many ways to envision two or more processors formance as the Local and Common Memory scheme. working concurrently. The method of interconnecting the However, for certain applications and for two processors processors depends on the application and the perfor- only, this scheme can give a considerable performance in- mance objectives. Listed here are a few of the options. crease over a Single-processor system with very little hardware overhead. This scheme is described in the follow- Independent Operation ing paragraphs. For those processors which can be made to run indepen- dent tasks, this provides the most efficient scheme. Each A general scheme for two tightly coupled F9445 processor has independent memory and resources. processors is shown in Figure 11. The processors share a common bus and an arbiter selects which processor Shared I/O uses the bus and multiplexes the control lines Each processor has its own memory but shares an I/O bus. accordingly. The 1/0 arbitration scheme is very simple: This allows high-speed operation while minimizing system each processor assigns the bus to the other processor resource requirements. when it commences any cycle that does not use the bus, as long as BUS LOCK is not set. Local and Common Memory II This gives a good compromise between performance and The scheme is most efficient when the instruction mix in- resource requirements. Each processor normally runs from cludes many "long" instructions, such as Multiply, Divide, its own memory at high speed. Accesses to a common Parametric Shift and Normalize. Since only one processor memory are rarer and, because of the arbitration problems, is using the bus at any time, the synchronization signals • slower. RDYA and RDYD can be the same for both processors. However, the interrupt request (INTREQ) and data-channel Tightly Coupled request (DCHREQ) lines should be separate to avoid any Two or more processors share the same memory and I/O. conflicts in I/O handling. This scheme is easiest to implement but, because of the Fig. 11 A Possible General Multiprocessor Scheme ROYO ---11---+---1 RDYA -----<1------1 INFORMATION BUS CONTROL BUS [MOO. 0" SYN 'Ii] mmA !!TIfIm 6-37 F9445 F9445 Instruction Execution Times Execution Times Clock Instruction Cycles 16 MHz 20 MHz 24 MHz Notes COM 6 0.375 0.3 0.25 NEG 6 0.375 0.3 0.25 MOV 6 0.375 0.3 0.25 INC 6 0.375 0.3 0.25 Times for no-skip or unfulfilled .skip; ADC 6 0.375 0.3 0.25 for fulfilled skip; add 0.3 {O.25 at SUB 6 0.375 0.3 0.25 24 MHzl ADD 6 0.375 0.3 0.25 AND 6 0.375 0.3 0.2.5 OR 6 0.375 0.3 0.25 MUL 70 4.375 3.5 2.9 MULS 70 4.375 3.5 2.9 DIV (Normal I 86 5.375 4.3 3.6 DIV (Overflow') 14 0.875 0.7 0.58 DIVS (Normal) . 114 7.125 5.7 4.7 DIVS (Overfiowl 26 1.625 1.3 1.1 NORM 10 + 4n 0.625 + 0.25n 0.5 + 0.2n 0.42 + 0.17n n - number of steps needed for normalization. Time is 0.7 {O.591 if n=O. SLLD 10 +4n 0.625 + 0.25n 0.5 + 0.2n 0.42 + 0.17n n - number of shifts; SALD 10 + 4n 0.625 + 0.25n 0.5 + 0.2n 0.42 + 0.17n time is 0.710.591 if n=O. SARD 10 + 4n 0.625 + 0.25n 0.5 + 0.2n 0.42 + 0.17n SLRD 10+4n 0.625 + 0.25n 0.5 + 0.2n 0.42 + 0.17n SKNV 14 0.875 0.7 0.58 .JMP 6 0.375 0.3 0.25 Times for page-zero addressing; add JSR 6 0.375 0.3 0.25 0.310.251 for indirect; add 0.3 10.251. ISZ 22 1.375 1.1 0.92 for auto-increment/decrement; add DSZ 22 1.375 1.1 0.92 0.210.181 for indexed. LOA 12 0.75 0.6 0.5 STA 12 0.75 0.6 0.5 LOB 24 1.5 1.2 1.0 STB 26 1.625 1.3 1.1 PSHA 16 1.0 0.8 0.67 POPA 16 1.0 0.8 0.67 PSHF 16 1.0 0.8 0.67 POPF 16 1.0 0.8 0.67 POPJ 16 1.0 0.8 0.67 PSHR 16 1.0 0.8 0.67 TOPR 16 1.0 0.8 0.67 TOPW 16 1.0 0.8 0.67 MTSP 6 0.375 0.3 0.25 MTFP 6 0.375 0.3 0.25 MFSP 6 0.375 0.3 0.25 MFFP 6 0.375 0.3 0.25 SAV 60 3.75 3.0 2.5 RET 80 5.0 4.0 3.3 DSP 6 0.375 0.3 0.25 NIO 12 0.625 0.6 0.5 SKP 16 1.0 0.8 0.67 DIA/B/C 12 1.0 0.6 0.5 DOA/B/C 12 1.0 0.6 0.5 ETRP 10 0.625 0.5 0.42 DTRP 10 0.625 0.5 0.42 E64K 10 0.625 0.5 0.42 D64K 10 0.625 0.5 0.42 Note: Execution times are given for 20 MHz and 24 MHz clock. The clock may be operated from> 0 to 24 MHz within the specified temperature and voltage range. 6-38 F9445 Fig. 12 ALU Cycle Timing" SYMBOL AND (PIN It) so 51 SlA 55 so 51 SlA elK (40) SYN (7) 00 (34), 0, (35) M (36) W(1) RUN (37) --1----+----+-""1 TA(C) ABORT (32) Fig. 13 Minimum Memory Cycle Timing" SYMBOL AND (PIN II) eLK (40) 00 (34), 0, (35) M(36),W(l), BUSREQ (38) SYN (7) STRBA (5) 'iB (11-3) READ Ii (11-26) WRITE STRBD (6) 'See Timing Parameter Symbol Conventions at end of data sheet. 6·39 F9445 Fig. 14 Extended Memory Cycle Timing· WAIT ROYA GENER- WAIT ROYO SYMBOL AND FOR RECOG- ..AIL FOR RECOG- (PIN #) ROYA NIZED STRBO ROYO NIZED I I I CLK (40) SYN (7) STRBA(S) ROYA(4) iii (11-26) READ iii (11-26) WRITE STRBO(6) ROYO (8) "See Timing Parameter Symbol Conventions at end of data sheet. 6-40 F9445 Figure 15. Bus and Status Control Timing' SVMBOLAND (PIN#) so S1 S1G 52 S3 S4 55 SO ClK (40) -nSLJL.JLJLJ I:: - 1- nJILfl- - TC(S) TC(S) SYN (7) TC(SO)- 1- ~ Tc(SD)E i-TC( SO) STRBD (6) wi IR w"~' TC(SA) STiiBi(S) TBG(C)---j BUSGNT(3) - i I INT REO (3D) CoNiiEa (28) Mii (33) DCH REO (29) •• 5C'ii'REQ (29) -l TA(C) - I ~ i-TC(BG)' l :j - TA(C) TREj(C)-I_ -TDRh(C)~ i'L r - I - T C ( REQ)x • - 1I ABORT (32) _Tc(BR)] BUS REO (38) CARRY(39). - TC(CY) .1: INTON(27) -TC(R)j RUN 137) ) iiUSiOCK (2) TC(Bl)l- t: WAIT FOR BUS GNT BUS GNT RECOGNIZED ·See Timing Parameter Symbol Conventions at end of data sheet. ""If this DCH REQ set·up time is missed, it is not recognized for another complete cycle. 6·41 F9445 Guaranteed Operating Ranges Part Number Supply Voltage (Vecl Ambient Min Typ Max Temperature F9445DC 4.75 V 5.0V 5.25 V Oto + 75°C F9445DM 4.5V 5.0V 5.5V - 55 to + 125°C DC Characteristics (Over guaranteed operating ranges unless other wise noted.) I,NJ(min) = 300 mA; I'NJ(max) = 400 mA Symbol Characteristic Min Typ Max Unit Test Cqnditions V'H Input HIGH Voltage 2.0 V Guaranteed Input HIGH Voltage V," Input lOW Voltage 0.8 V Guaranteed Input lOW Voltage VeD Input Clamp Diode Voltage -0.9 -1.5 V Vee = Min, I'N = -18 mA, I'NJ = 300 mA VOH Output HIGH Voltage; RUN, CARRY, 2.4 3.4 V Vee = Min, 10H = -400 }LA, I'NJ = 300 mA INTON, SYN, STRBD, BUSREQ, STRBA, Oo,O"M VOH Output HIGH Voltage; IB(()"5" W 2.4 3.4 V Vee = Min, 10H = -1.0 mA, I'NJ = 300 mA Val Output lOW Voltage 0.25 0.5 V Vee = Min, 10l = 8.0 mA, I'NJ = 300 mA I'H Input HIGH Current; DCHREQ, INTREQ, 2.0 40 }LA Vee = Max, V'N = 2.7 V, I'NJ = 300 mA ClK, MR, RDYA, RDYD, ABORT, CONREQ,BUSGNT I'H Input HIGH Current; IB(()"5' (3-state) 5.0 100 }LA Vee = Max, V'N = 2.7 V, I'NJ - 300 mA I'H Input HIGH Current; All inputs 1.0 mA Vee = Max, V'N = 5.5 V, I'NJ = 300 mA I," Input lOW Current; All Inputs -0.21 -0.4 mA Vee = Max, V'N = 0.4 V, I'NJ = 300 mA 10zH Output O.£F State (High Impedance) 100 }LA Vee = Max, VOUT = 2.4 V, I'NJ = 300 mA Current I B,0.,5., W IOZL Output O.£F State (High Impedance) -210 -400 }LA Vee = Max, VOUT = 0.4 V, I'NJ = 300 mA Current IB,0"5 lozl Output O£.F State (High Impedance) -100 }LA Vee = Max, VOUT = 0.5 V, I'NJ = 300 mA Current; W lasH Output Short Circuit Current; All -15 -100 mA Vee = Max, VOUT = 0.0 V, I'NJ = 300 mA' Outputs Except BUS lOCK ILDH Output leakage; BUSlOCK 1.0 mA Vee = Min, VOH = 5.25 V, I'NJ = 300 mA Icc Supply Current 160 mA Vee = Max, I'NJ = 300 mA V'NJ Injector Voltage 1.3 V I'NJ = 400 mA *Not more than one output to be shorted at a time, 6·42 F9445 AC Characteristics T. = 0 to 75°C; Vee = 4.75 to 5.25 V; I'NJ = 300 mA; CL = 15 pF. Input conditioning: Rise Time = 6 ns; Fall time = 6 ns; Amplitude = Oto 3 V Refer to Symbol Conventions at the end of this data sheet for explanation of the timing parameter symbols. Symbol Characteristic Min Typ Max Unit TC(O) Propagation delay, ClK to 0 0, 0 " M 60 ns TC(S) Propagation delay, ClK to SYN 30 ns TC(W) Propagation delay, ClK to IN 70 ns TC(W)z Propagation delay, ClK to.IN going 3-state 70 ns TC(IBA) Propagation delay, ClK to IB(0"5)' address 60 ns TC(IBA)z Propagation delay, ClK to IB(0"5)' address, going 3-state (read 35 ns cycle) TC(SA) Propagation delay, ClK to STRBA 30 ns TC(IBD) Propagation delay, ClK to IB(1l-15)' data out 75 ns TC(IBD)z TC(SD) Propagation delay, ClK to I BIO• ,5), data out, going three-state Propagation delay, ClK to STRBD 35 25 ns ns II TRA(C) Setup time, RDYA to ClK 3 ns TC(RA)x Hold time, ClK to RDYA 10 ns TRD(C) Setup time, RDYD to ClK 2 ns TC(RD)x Hold time, ClK to RDYD 10 ns TIBD(C) Setup time, IB(0"5)' data in, to ClK (read or fetch cycle) 75 ns TC(IBD)x Hold time, IB(0"5)' data in, after ClK (read or fetch cycle) 25 ns TREQ(C) Setup time, INTREQ, DCHREQ, CONREQ, MR to ClK, all 15 ns are the same timing relative to S5 TC(REQ)x Hold time, INTREQ, DCHREQ, CONREQ, MR after ClK, all are 20 ns the same timing TDRh(C) Data channel (DCHREQ) off setup time from ClK (to finish 100 ns data-channel cycle) TA(C) Setup time, ABORT to ClK 30 ns TC(Bl)1 Propagation delay, ClK to BUSlOCK going lOW 35 ns TBG(C) Setup time, BUSGNT to ClK 10 ns TC(BG)x Hold time, ClK after BUSGNT 10 ns TC(R) Propagation delay, ClK to RUN 80 ns TC(CY) Propagation delay, ClK to CARRY 50 ns TC(INT) Propagation delay, ClK to INTON 50 ns TC(BR) Propagation delay, ClK to BUSREQ 40 ns 6-43 F9445 TIming Parameter Symbol Conventions The abbreviated symbols used for ac characteristic timing parameters in this data sheet are defined as follows: The timing symbol convention is: TAb(C)d The timing symbols all begin with the letter "T". The second position, represented by "A", indicates the signal node beginning the interval. The position "b" defines the direction of signal transition at the beginning node "A", if such definition is necessary; the new state of the signal may. be: I = Low; h = High; z := 3-state; x = Oon't care; v = Valid The position "C", which always appears within parentheses, indicates the signal node ending the interval. The position "d" is the same as "b" but refers to the state of the signal at the node indicated by the mnemonic in position "C". Ordering Information ORDER CODE SPEED TEMPERATURE For other temperature ranges; contact Fairchild Sales Office. F9445·24 DC 24 MHz O°C to +75°C All packages are Ceramic DIPs F9445·24 OM 24 MHz -55°C to +125°C F9445·24 DMOS 24 MHz -55°C to +125°C F9445-20 DC 20 MHz O°C to +75°C F9445-20 OM 20 MHz -55°C to +125°C F9445-20 DMOS 20 MHz -55°C to +125°C F9445-16DC 16 MHz O°C to +75°C F9445-16 OM 16 MHz -55°C to +125°C F9445-16DMOS 16 MHz -55°C to +125°C 6<44 F9446 Dynamic Memory Controller Advance Product Information Microprocessor Product Description Connection Diagram The Fairchild F9446 Dynamic Memory Controller (DMC) is designed to support a variety of memory configurations and Vee provide an interface between 16K and 64K memory chips and the .F9445 central processing unit (CPU). It provides a liAS. 16-bit memory address register (MAR), an address .. W, multiplexer for the row, column, and refresh addresses, a W. timing generator for the row and column strobe signals and I!n', the write enable signal (RAS-CAS-WE), mod.e arbitration, m and page mode logic. It is Implemented in 13 L"' bipolar w£ technology with low-power Schottky-compatible inputs es and outputs. M!lmIEll !mmmT RDYD PAll'E 16-blt Memory Address Register Ability to Accommodate a Variety of Memory Speeds I5LYlIAI ~ 16K or 64K DRAMs GND DlVEND Automatic Page Mode GND II Internal Refresh Address Counter RFSH Row/Column/Refresh Multiplexer RDYM Complete Memory Timing Signals DJ:YClj[ Thre.state Outputs for Multlport Memories WI!I'rr Internal Refresh Rate Timer elK Low-power Schottky-compatlble I/O ~ 13L Bipolar Technology mID 64-Pln DIP SPEED 1/256K Opereting Temperature Range of from SPEEDO/RMW - 55°C to + 125°C MEX TlMODE BANKS REFMODE TYPE A15 6·45 F9446 Signal Descriptions The F9446 Incorporates an address multiplexer and memory timing generator for use with both static and dynamic memories. The multiplexer selects between row and col- CLOCK umn segments of the Internal 16-bit memory address register (MAR) or an Internal refresh address counter (RAC). The upper two address bits provide bank Information, while the lower 'seven, eight, or nine address bits are multiplex- RY HANDSHAKE ed to provide row, column, and refresh address. Assertion MEMORY BUS { of the static line supresses row/column multiplexing of CONTROL MEMORY ADDRESS the memory address register outputs, which then provides the full16-bIt address. The memory timing sequence is initiated by the memory ex- ecute signal; It may be Inhibited or aborted by removal of the chip select signal. Once started, the memory timing se- quence is automatic. A choice of four speed grades accom· modates a variety of memory access times,and external ORMATION BUS controls may be used to further modify the timing. The four individual RAS lines accommodate· from one to STRAPS FOR MEMORY TYPE four banks of memory chips, with automatic satisfaction of SPEED SELECTION precharge requirements for memory access and refresh, in page mode or not, with distributed refresh or bulk refresh. OPTIONAL { Refreshes are initiated to satisfy a rate of 128 per 2 ms per DECODED INPUTS RAS bank. For short intervals, they may automatically be deferred until non memory CPU cycles; this makes them semi-transparent. A memory bus request and memory bus grant are provided to govern 3-state control of memory interface signals for multi port or DMA purposes. 6-46 F9447 110 Bus Controller Advance Product Information Microprocessor Product Description • Interfaces Directly to the F9445 • Controls Standard and Hlgh·Speed NOVA·Compatible ~ The F9447 1/0 Bus Controller (IOC) is used with the Data Channels F9445 13 L'" 16-Bit Bipolar Microprocessor to demultiplex • NOVA·Compatible or F9445 1/0 and Data Channel the 1/0 instruction and data of the information bus (IB)_ It Timing provides all the timing and decode signals required for • Complete NOVA·Compatible 110 Bus Interface programmed or data channel (DCH) inputloutput to • Automatic Program Load peripheral device controllers. In the NOVA'" -compatible • Power·Up Reset Delay mode, the F9447 provides all the timing and signals • Console Interface required by that 1/0 bus. For DCH transfers, address • Local Busy/Done/Interrupt Logic generation and handshake can be handled by the F9449 • Low-Power Schottky·Compatible 110 Multiple Data Channel Controller. • 64·Pin DIP or Optional Chip Carrier Package • 13L Technology • Operating Temperature Range of from - 55°C to + 125°C Signal Functions Connection Diagram CLOCK 1 - CLK - II 10PRI Vee CPU HANDSHAKE 1_ DIA [jf1! ClK CONEN (MSKBiT) ~ CLEAR 1m: }INPUT iNTA (INTPOUT) .(Ji[EIiI START SKP (BUSY)~ ~ DOA PROGRAMMED (DONE) CONCD DOA DOij I/O DOC }OUTPUT STROBES RQENB DOij 10RST DOC GLOBAL MSKO ill. START CLEAR PULSE I CONTROL liS" M Vi ills f1!7 (STRBDN) CONm 186 11/0 HANDSHAKE IlII iSs (INTPIN) AI'l:SW fOim' DCHI DCHO DeHMO IDATA CHANNEL HANDSHAKE (STRBSY)~ GND MRCAP SKP INTA GND RQENB I/O SYNCHRONIZATION MSKO DCHA DIEN DCHO DiA } DATA BUFFER CONTROL DOEN DCHI DIB lilC ! DIEN DCHREQ 10EX CONSOLE DCHMO STRBD CONTROL OUTPUT 10CS SYN DOEN STRBA DSEN RDYD 1- -------- Vee 11NJ OND 10BSY RYDA ~iRK:~~ RDYM O. GLOBAL =L 110 PORT STATUS INPUT - STRBDN iI/O PORT STATUS OUTPUT DCHEX 0, - INTPIN 10ENA w. ME W, t Vee IINJ GND INJ W2 • )'L is a registered trademark of Fairchild Camera and Instrument Corp. • NOVA is a trademark of Data General Corporation. 6-47 F9447 The F9447 110 controller Is a decoder and timing generator for programmed 110 instructions and data channel transfers. The timing sequence is selected via a three-bit control code, WO-W2 • Additional logic is . included to Implement either the basic console interface or a busy/donelinterrupt function. A hysteresis circuit for deriving a power-on-reset, from an external capacitor to ground, is also included. Figure 1 is a typical block diagram of the F9447 I/O controller. Figure 2 shows how the F9447 can be used with the F9445 system. Signal Description Table 1 describes the F9447 signals. Figure 1 F9447 Block Diagram PERIPHERAL CONTROL BUS F9445 CONTROL BUS ----y BUSY/DONE/ BUSY/DONE/ INTERRUPT INTERRUPT OR CONSOLE OR CONSOLE INPUT OUTPUT GLOBAL------------' 6-48 F9447 Figure 2 System Configuration Vee USER OPTION 1 DEY. CODE II RISETEOoo- ~~------------I OTHER { 1000- CONSOLE SWITCHES 0-- STEP 0-- APL 0-- 'OPEN COLLECTOR OUTPUTS, REQUIRE PULL·UP RESISTORS. 6·49 F9447 Table 1 F9447 Signal Descriptions Mnemonic pIn No. Name Description Clock ClK 2 Clock A synchronizing input signal primarily for timing non-F9445 mode intervals through a state counter clock on alternate positive edges. CPU Handshake SYN 41 Synchronize An input signal from the CPU that maintains system timing. STRBA 40 Strobe Address An active low input signal that indicates an address portion of the CPU cycle (and instruction during I/O execute). RDYA 38 Ready Address An active high open-collector output signal that allows the CPU to continue beyond the address portion of the cycle. S'i'RBfj 42 Strobe Data An active low input signal that indicates the data portion of the CPU cycle. RDYD 39 Ready Data An active high open-collector output signal that allows the CPU to continue beyond the data portion of the cycle. Memory Handshake RDYM 28 Ready Memory A bidirectional, open collector signal; an active high input during a data channel output cycle indicates that the memory has fetched the data. An active high output during a data channel input cycle indicates to memory that the input data is valid and a write may proceed. ME 31 Memory Enable An active low output that modifies the memory controller to respond 'for CPU memory accesses or for data channel cycles (ME=M+0 1.°0), CPU Cycle Type M 10 Memory An active low input from the CPU that indicates a memory type of cycle. ° Lines °0°1 36 A pair of input signals from the CPU to indicate the type of 37 cycle. W 11 Write An active low input signal from the F9445 that indicates a cycle during which data is to be written to a memory or I/O device. 6-50 F9447 Mnemonic Pin No. Name Description Cycle Enable 10PRI 1 1/0 Priority An active high input that enables the F9447 to begin an I/O or data channel cycle. 10CS 24 1/0 Chip Select An active high input enables strobes for busy and done, as well as 1/0 control decodes. D'S77 9 Device Select 77 An active low input signal that indicates a decode of iB 1O -iB '5 all active, a device code 77 (CPU class) 1/0 instruction. 10ENA 30 1/0 Enable An active high input that, when low, inhibits response by the F9447 to any F9445-programmed 1/0 cycle. Used with multiple F9447s to allow disables. DCHREQ 22 Data Channel An active low input that indicates there is a data channel Request request. • Peripheral Timing Mode Select W2 33 Timing Options A three-bit input code; the decodes provide a selection of W, 34 timing for 1/0 and data channel cycles. Wo 35 1/0 Instruction Field iB5-iB9 52-56 Information Bus Active low input signals from the F9445 containing 1/0 instruction bits 5 through 9 during address phase of 110 execute cycles. Reset MR 13 Master System An open-collector bidirectional pin that, when pulled low, Reset initializes the F9447 and activates i5RSf. Also an output generated by a low level on MRCAP. MRCAP 17 Capacitive Reset An active low input with an internal resistive pullup of 10K ohms to Vee . • The F9447 does not modify the F9445 timing for the following control instructions: READS, ION, APL, HAI-T. 6-51 F9447 Table 1 F9447 Signal Descriptions (Cont'd.) Mnemonic Pin No. Name Description Console 1/0 Select GLOBAL 8 Global (Local) An input that selects one of two uses of the global and local modes. Programmed 1/0 Strobes i5iA 46 Data-In-A Active low timing strobe outputs that indicate execution of DIB 45 Data-In-B data input instructions. DIC. 44 Data-In-C iN'i'A 49 Interrupt Acknowledge SKP 50 Skip DOA 59 Data-Out-A Timing strobe outputs (all active low except active high DOB 58 Data-Out-B MSKO) that indicate execution of data output instructions. DOC 57 Data-Out-C 10RST 51 110 Reset An active low output that indicates either a decode of the execution.£f..!!!!LlORST instruction or a system reset caused by MR or MRCAP active. MSKO 47 Mask Out S'fARi' 61 Start Active-low control outputs that indicate decode and time of CLEAR 62 Clear start, clear, and pulse control functions during programmed PULSE 60 Pulse 1/0 execution. 110 Handshake DSEN 26 Device Select An active low output that enables device select. Enable 10EX 43 1/0 Execute An active low output indicating that the F9447 is involved in the execution of a programmed 1/0 cycle. 10BSY 27 1/0 Busy An active low input indicating that another source is using the 1/0 bus. An active low output is provided when the F9447 is about to or is executing an 110 cycle. i5CHEX 29 Data Channel An active low output indicating that a data channel transfer Execute is in progress. Data·Channel Handshake DCHA 18 Data Channel An active low timing strobe output that defines address Address transfer time of a data channel cycle. DCHI 20 Data Channel In An active low timing strobe output that defines data transfer in (write to memory) of a data channel cycle. 6-52 F9447 Mnemonic Pin No. Name Description DCHO 19 Data Channel Out An active low timing strobe that is output during data transfer out (write to peripheral) of a data channel. DCHMO 23 Data Channel An active high input results in data channel output cycles. Mode Out 1/0 Synchronization RQENB 7 Request Enable A timing output that synchronizes interrupt and data-channel priorities. Data Buffer Control -- OlEN 21 Data In Enable An active low output that enables peripheral data onto the F9445 information bus during programmed 1/0 or data-channel input cycles. DOEN 25 Data Out Enable An active low output that enables information bus data onto the peripheral data bus during programmed 1/0 or data- channel output cycles. Console Control Input --- CONSW 15 Console Switch An active low input with internal 2.4K-ohm pullup resistor to Vcc and digital delay of approximately 3 ms to eliminate contact bounce. CONSTP 12 Console Step An active low input with characteristics of CONSW that initiates a console request lasting for two console code cycles of the F9445. APLSW 14 Auto Program An active low input with characteristics ofCONSW and Load Switch CONSTP that initiates a console request cycle with APL enable active. Console Control Output --- CONEN 63 Console Enable An active low output to enable a console to provide information to the IB of the F9445 during a read or write operation. CONREQ 5 Console Request An active low output to theF9445 to request console service. C5NCi5 6 Console Code An active low output to enable the console code onto the IB of the F9445 in response to a console code cycle of the F9445. --- APLEN 4 Auto Program An active low output initiated by an APLSW input or the Load Enable execution of (DOA ac, CPU) instruction and terminated by the execution of a (DOAP ac, CPU) instruction or system reset. --- CONLD 3 Console Load An active low output to enable the console to latch data from the IB of the F9445. 6-53 F9447 Table 1 F9447 Signal Descriptions, Cont'd. Mnemonic Pin No. Name Description itO Port Status Input MsKeii' 63 Mask Bit The local logic contains an Interrupt disable flag loaded from a select bit of the F9445 Information bus during the execution of a mask out instruction. The MSKBIT signal is driven by that selected bit of the IB; a low level at the beginning of MSKO execution sets the Interrupt disable flag. STRBSY 15 Strobe Busy A negative·going input edge that strobes the BUSY flag to the clear state. STRBDN 12 Strobe Done A negative·going input edge that strobes the DONE flag to the true state. INTPIN 14 Interrupt Priority In An active high input that determines which peripheral device may interrupt. ItO Port Status Output BUSY 5 Busy Flag An active high output of a flip·flop is set by the execution of an 1I0·Start cycle with 110 Chip Select (IOCS) high; and cleared by a similar 1/0·Clear cycle, by a negative transition on STRBSY, by execution of an 10RST instruction, or by a low level on MR. DONE 6 Done Flag An active high output of a flip·flop Is set by a negative transition on STRBDN; cleared by the execution of an 1I0-8tart or 1I0·Clear while 110 Chip Select (IOCS) Is high, by the_ execution of an 10RST instruction, or by a low level on MR. INTPOUT 4 Interrupt An active high output that determines which peripheral device Priority Out may Interrupt. CONLD 3 Console Load An active low output that enables the console to latch data from the F9445 information bus. Power Vee 64 Power Supply Nominal + 5 V DC. III~J 32 Injection Current Constant current (80 mAl obtained by using a dropping resistor from Vee (nominal V1NJ = 1.3 V). Use of bypass capacitor to GND is desirable. GND 16,48 Ground Common power and signal return. 6·54 F9448 Programmable Multiport Interface Advance Product Information Microprocessor Product Description • Compatibility with Many Industry·Standard Interfaces • Ability to Implement F9445·Programmed 1/0 The F9448 Programmable Multiport Interface (PMI) is 64 Flags pin bipolar 13L device that facilitates the interface • Interrupt Arbitration and Response Handling between an F9445 16·bit bipolar microprocessor and • Fabricated in 13 L® Bipolar VLSI Technology many industry·standard inputloutput (110) devices. It • Operating Temperature Range - 55· to + 125·C decodes 110 instructions and memory addresses from • 64-Pin Package the central processing unit (CPU) to communicate with • Low-Power Schottky Compatible I/O devices tied to its four external ports. When used with the F9449 Multiple Data Channel Controller, it handles The F9448 PMI ties the F9445 CPU to many industry· peripheral selection and timing during data channel standard microprocessor interfaces. It easily links 1/0 cycles. Some of the features of the F9448 are: devices designed for the F6800 or 8080 buses and those directly suitable for the F9445 110 bus. The system • Four Independent 1/0 Ports configuration in figure 1 shows how the F9448 can be • Memory·Mapped and Programmed 110 used to interface F6800, 8086 family 110 devices or the • Interface with Serial, Parallel, DMA, and Other F3870 to the F9445 system. Speclal·Purpose Devices ~ I'L Is a registered trademark of Fairchild Camera and Instrument • Programmable Peripheral Timing Corp. } DATA BUFFER/LATCHES CONTROL • } READY PERIPHERAL PERIPHERAL PORT CONTROL F9448 Figure 1 System Configuration r;:=::=:::::::;::===:========~rrw~ ~_ii,-ii" Y c c - All?'"' LI 1 FI44IPMI ENA 01" I USER OPTION _ClC, ---.. C~ BUFENAI-----' _ csc, "'.HI-------' OUT.~-----...... .J Ne ~ RDVM OUTI~-----.......J 110 - ii15 iiCHiiEQ OUT.~-----.......J i! -- OUT3~-----.......J ~ ~ I Vi ~ I-- Vi OUT2 1------......-I OUT,I--------~ a a ~ iiI-- I--- M OUTDI-------· f I 0.1--- 1---0. i! ~ ~ ..... 0, I--- 0, "DVPI-- MICROPAOCESSOA BYN I-- IL- I~ BVH !i fiiiii I-- I--- mii sm::f- ~ Ci =~ ~I l2' D:r~E ROYA I - - ~ miD I-- I--;- ifIiiiD I I-- ROYD f- CLK I-'- AOYD ~ ilii ~~~l:= ~ CLK CLK b . ~ CciNiiEQ iiifRiQ 'fiR f - Pi, STR88Zs r---- IE CB A "0 DEVICE mmm.1-- r lK ~.f- ~ D xx Pi,1---------I~ Vee S . .! 1--;:-, Ci __ b~l::Y:B D~~E mm.f- 1--:-''' 110 ::::I-~_____,-- .~ vcc- 8 ! 1- INTPIN i! I I ~ il- INTPOUT i =: DCHiCK, f.-- ~ ~r- A 0 D~~?CE 0.0, DECODER I .,. I Cs, cs, Fl... DATA CHANNEL IOENI'--t--+-' - CONTROLLER - ~ DcHiiEQ _iii MARENI+-+--+---' S'Iii OUTsciiDI _Vi ~I'--t--+----l _iI -0. DCHACK,. t--- ::t:::=U~SE;'.;:;O~PT:!.!IO"'H'-___ =::~A:~~ -0, :-1- _ BV. ..."AM" I -mii DIACONnl-------- c..J\,. MEMOOV I-- ~ ~ :::= .,.!.. ROYA iii. 1+-------. D:;~ :~e ADDRESS A l--iToiii I--- CLK USER OPTION I---ilii f--=-ii HC _ _ DlRINT f.-- 1--...;'":;,,...-;;'0,;::'------1 III W ·OPEN COLLECTOR OUTPUTS viToiii AlaUIRE PULL·UP REIIITOR 6-56 F9448 Registers 11-bit memory-base address register used in conjuction with memory-mapped 1/0. Figure 2 shows the F9448 Each port has a 16-blt configuration register and busy, program-accessible registers. done, and interrupt-disable flags. Port 4 also has an Figure 2 F9448 Software Model PORT4 CR(4) 1 FORMAT 1 TIMING 1 MASK BIT • 0 I 1 I 2 • 3 1 4 I 5 6 1 7 I 8 I II" I 10 I a 4K 512 32 PORT3 CR(3) 1 FORMAT 1 TIMING 1 6 7 MASK BIT 8 9 1 10 I L·-0-+1--1~'~2-L~3~1--4-L'~5~~6~1~7~'~8-'~9-+~1~0~'~11-L'~1~2+1-1~3-L'~14~'~1~5~ 1 DEVICE CODE I • PORT2 C'R(2) 'I - 0 FORMAT 1 1 ' 2 - I TIMING 3 1 4'56 I MASK BIT 1 7'6'9 I 10 I 11 ' 12 DEVICE CODE I 13 ' 14 ' 15 1 PORT1 3 TIMING I 4 I 5' I 6 MASK BIT I 7 I 8 I 9 11 DEVICE CODE ! 12 I 13 ! 14 1 15 I PORn CR(O) I Po PORT ENABLES P, P~ P, p. 1 BLOCK SIZE IMMP 1 ~ 1= 0 4K ; 7 = 321' '1 ~ I P, PULSE ENABLE p. P, p. N! I ~ ~0~-1~~2-L~3~~4~~5~~6~~7~-8~~9~~1~0~~11~~12~~1~3-L~14~~1~5~ 6·57 F9448 1/0 Ports Transactions between the F9448 and peripheral devices are organized using several select, address, and timing The F9448 performs selecting and handshaking with signals. Out 0- 6 signals are shared by all ports, while connected peripheral devices. It has five bidirectional each set of Peripheral Port Controls is associated with a ports numbered 0 through 4. Port 0 is used as a specific port. bootstrap port by the F9445 to read and write, address and configuration registers inside the F9448; ports 1 Signal Descriptions through 4 are used to communiate with external peripheral devices. Ports 0 through 3 respond only to Table 1 describes the signals for the F9448. programmed 1/0 instructions; port 4 responds to either 1/0 instructions or memory cycles. This latter feature enables a block of up to 4096 memory addresses to be used for memory-mapped 1/0. Table 1 F9448 Signal Descriptions Mnemonic Pin No. Name Description Clock ClK 45 Clock Input signal from the positive-edge-triggered master clock from which all F9448 timing is generated. CPU Handshake SYN 40 Synchronize An input signal from the F9445 for synchronizing the F9445 with external devices. Active during every CPU cycle. STRBA 38 Strobe Address An input Signal generated by the F9445 during external bus cycles. STRBD 39 Strobe Data An input signal generated by the F9445 during data transfer time and used by F9448 to organize transfers. RDYD 52 Data Ready An active high open collector output signal synchronizing F9448 with F9445 during data transfers. A low level stalls the F9445 until the peripheral is ready. Ready Memory RDYM 53 Memory Ready Handshake between the memory controller and F9448 during data-channel cycles. Input to F9448 during data-channel read from memory; output from F9448 during data-channel write to memory. CPU Cycle Type M 49 Memory Input status lines from the F9445 indicating the type of bus 01 50 O-Line cycle. 00 51 O-Line W 37 Write An input signal indicating the direction of data transfer on the lB. ABORT 46 Abort A low input signal from the Memory Management and Protection Unit that prevents the F9448 from starting another cycle but allows completion of the current cycle. 6·58 F9448 Table 1 F9448 Signal Descriptions (Cont'd.) Mnemonic Pin No. Name Description Device Code Jumpers CSCO·CSC2 22·24 Chip Select Code Input signals tied to Vce , GND, SYN, or SYN to define a 6·blt device code, DS 10 through DS 15 for port 0 of F9448. Information Bus iBo·iB15 56-63, 1·8 Information Bus A 16·bit, three·state address and data bus for transmitting information between the F9445 and external devices. Interrupt Priority Chain INTPIN 43 Interrupt An input for determining which peripheral device will respond Priority Input to an INTA instruction. INTPOUT Interrupt A priority·signal output from the F9448 to lower·priority • 44 Priority Output devices for determining which peripheral device may interrupt. Master Reset MR 55 Master Reset An input signal that initializes the F9448 by clearing all F9448 user·accessible registers to 0 and clearing all busy, done, and interrupt·disable flags. Data Bufferl Latches Control LE 47 Latch Enable An output signal that may be used to load the data from the F9445 on the IB into peripheral data bus latches. BUFENA 41 Buffer Enable An active low output during memory, I/O, or data channel cycles to enable IB transceivers or latches if data is to be transferred between the IB and a device controlled by the F9448. DIRN 42 Direction An output signal controlling the direction of any bus transceivers on the IB bus between the F9445 and the F9448 or of any data latches/transceivers between the IB bus and a peripheral data bus. Peripheral Control And Address Bus OUTo·OUTs 25·31 Outputs A 7·bit peripheral output control bus that is to be shared by al peripheral devices controlled by F9448. Ready Peripheral RDYP 54 Ready Peripheral Open·collector handshake input signal from peripherals to the F9448. 6-59 F9448 Table 1 F9448 Signal Descriptions (Cont'd.) Mnemonic Pin No. Name Description Peripheral Port Control 'l5S1,PS4 21,18,14,11 Port Select Outputs for selecting the devices being controlled by ports 1 through 4 of the F9448. STRBBZ1 • 20,17,13,10 Strobe Busy A low·to·high transition on the S'fRi3BZ input signal clears th e STRBBZ4 associated port's busy flag. STRBDN 1· 19, 15, 12,9 Strobe Done A low·to·high transition on the STRBBiii input sets the STRBDN 4 associated port's done flag. DCHACK1 • 33·36 Data Channel Active low select inputs from the F9449 data channel DCHACK4 Acknowledge controller. Power Vee 64 Power Supply Nominal + 5 V DC. GND 16, 48 Ground Ground for both supply and signals. IINJ 32 Injection Current A constant current obtainable by use of a dropping reSistor from Vee (V INJ ",13 V) supply. Use of a bypass capacitor to GND is desirable. 6·60 F9449 Multiple Data Channel Controller Microprocessor Product Description Connection Diagram The F9449 Multiple Data Channel Controller is a 4-port controller that is used with the Fairchild F9445 16-Bit vee Bipolar Microprocessor, and either an F9447 1/0 Bus Controller or an F9448 Programmable Multiport Interface, iii. to control direct data transfer to and from memory by iii, 1 peripheral devices. It contains four pairs of program- iB13 controlled address and word count registers that are multiplexed to control four fully independent data iii" channels (DCHs) through which data transfers can occur. SYN Data channel transfers are similar to direct memory OCHREO access (DMA) channel transfers, except that the F9445 architecture time-shares its information bus (IB). Me STR ClK • Provides Control of Four Independent Channels MAREN M • Has Separate Word Count and Memory Address 10EN 0, Registers for Each Channel • • Supports Byte- or Word-mode Operation on Each 00 Channel . REO, • Performs Internal Priority Arbitration RE02 • Supports Memory-to·Memory Transfers • Implemented in 13 L® Technology, with Low·power REQ3 Schottky TTL·compatlble Input and Output REO. • Available In a 64·Pln Package. ONO • Operating Temperature Range of from - 55°C to + 125°C OCHMO. OCHMO. OCHACK2 OlEN BM, BM2 OCHPOUT BM. OCHPIN BM. OCHMO, TC, TC2 OIRINT ii14 ii10 ® 13L Is a registered trademark of Fairchild Camera & Instrument Corp. 6-61 F9449 F9449 Signal Functions F9449 iii" (LSB) 8M. DCHMO. PERIPHERAL PORT CONTROL iiCHAci<2 INFORMATION BUS IB, OCHM02 REQ, iii2 8M, iiio(MSB) DCHMO, DCHPIN DCHPOUT } REGISTER DCHREQ CONTROL SIGNALS DATA BUFFER CONTROL OlEN Mii DCH DIRECTION CONTROL 6-62 F9449 Fig. 1 F9449 Block Diagram MSB DCHMO, DCHMO, MSB DCHMO, BIT 0 DCHMO. t-----TC, DIRINT _ _ _oJ I------TC, t-----TC, ~- ~TC4 6-63 F9449 Register Operation F$l449 I/O Cycle The eight F9449 registers (MA1-4' WC1-4), shown in The F9449 registers are under software control. They are figure 1, provide four fully independent data channels, loaded with starting address and word count information numbered 1 to 4, each of which is capable of trans- through F9445 programmed output instructions, which ferring up to 32K 8-bit bytes or 16-bit words, depending are decoded by the F9447 I/O controller or F9448 upon whether it is strapped for byte-mode or word-mode multiport interface. The F9445 also generates the clock operation. Figure 2 Illustrates the data formats of these (ClK), synchronize (SYN), address strobe (STRBA), and registers. data strobe (STRBD) bus timing signals. (Figure 5 illustrates the I/O cycle timing; refer to the "Timing A word count (WC) register associated with each Characteristics" section for a description of the cycle channel contains the number of bytes or words to be characteristics and specifications.) transferred by that channel. The WC registers, which are loaded with the twos complement of the number of bytes The F9447 or F9448 selects the register to be loaded by or words, are automatically incremented after each DCH generating the appropriate port select (PS) signal, cycle (I.e., after every byte or word transfer), regardless ~ther with input/output enable (IOEN) and strobe of operating mode. When a WC register increments from (STR) signals, as shown in table 1. The low-to-high all ones to zero, a terminal count (TC) signal for that port transition of the STR signal during the write time loads is set by the F9449. This is normally wired to the F9447 the addressed port WC or MA register, selected by the bus controller or F9448 multiport interface to generate memory address enable (MAREN) signal, with data from an interrupt to the F9445. (Figures 3 and 4 Illustrate th.e information bus. system configurations using the F9447 and F9448, respectively.) The TC signal can optionally be used to All eight registers are cleared when master reset (MR) terminate any further requests from that peripheral goes low to allow hardware implementation of auto channel. load/bootstrap routines (I.e., to fill the memory beginning at address 0). Figure 2 Register Data Formats The F9445 can read the contents of any register by means of a programmed input instruction, which is o 15 decoded by the F9447 or F9448 in the same manner as the output instruction. IwI MSB Word Count (Twos Complement) lSB I F9449 DCH Cycle Format for word- or byte-count register load A peripheral device requests service by asserting its (MAREN = 0). Word count range is from -2 15 to 1 request (REO n) line to the F9449, which then determines (loaded with twos complement). Vii is an internal priority and generates a data channel request (DCHREO) direction bit: 0 is from peripheral to memory; 1 is from signal to the F9445. After completing its current program memory to peripheral. instruction, the F9445 responds to the DCHREO or data channel request performing a DCH cycle, which is a long bus cycle similar to an F9445 memory cycle, but with the o 15 information bus and the write rN) line not driven. I MSB Memory Address lSB The F9445 sets the bus control lines as follows: Mhigh, 01 low, and 00 high (I.e., M, 01, 00 to 101). It then Format for memory address register load (MAR EN = 1). generates the ClK, SYN, STRBA and STRBD bus timing Address range is from 0 to 216_1. signals. The high-to-low transition of STRBA latches the priority resolution logic, and starts the internal DCH sequence of the F9449. The F9449 asserts the A memory address (MA) register"associated with each appropriate data channel acknowledge (DCHACK n) line channel contains the address at which the next transfer to signal the requesting peripheral and the F9447 or is to occur; each MA register provides a 16-bit address F9448 that a DCH cycle for it has begun. This may cause space (0 to 65535). The MA registers are incremented the peripheral to remove the REO n signal. (Figure 6 after each transfer in word mode and after every second illustrates the DCH cycle timing; refer to the "Timing transfer in byte mode. 6-64 F9449 Fig. 3 F9449/F9447 Configuration UIER OPTION rc==: NC_ lOP", IOENA w, w, w, iii! ,...... 144' ~ 'CONTROLLER WNWI-- DOE. iKP - cr-"·- ii, ii, ... r' .~ .... iECi mIi ) I~ .,• 0- , Ne..!. RDYM IIOIUB ~ 4 '11v11,1 DeMREQ W i1- = L - -w _i1 DeHREO IDEX • ",0.'1 On' On LE • 'o. OE I DEY. CODE a 0,- -0, _0, DlEN I I ~ :::OPFIOCESSOR 0, IVN - - - OVN DS" IOCS ~Vcc ri ii'RiA - --- [fJ - :;: ifiiii IOSSV DiA - 'I • ROVA ROYA I ! ''t STRia 'OVD CLK T- ::;: CLK ....!... STABD .OVD CLK iii iiii- DiC- INYA DDA - - - -[ .rf- - CDN'tEO EO .R DDB MRCAP DOC - ~ 10RIT - J:;::oo--, l INJEQ - voo--- f - GLOIAl MSKQ ~::LE 10- i - CONREQ iTiiif - OWITCHEO { . 0-- ; - CONIW CLEAR - CCiNii? - i= STEP 0- PULSE APL 0-- APLSW ROENI - - ! I - eONCD DCHE)( - ~ ':" ~--!.... CONEN 5CHi - CONSOLE CODE ..J>. r ~- CONLD DCHI -- ~ 8 - APtliii DCHO DeRMO r;: CONSOLE DATA ..J>. 0"i!,1 DECODER . ..,Ci, • ..... DATA .... .A IDEX ..... CHANNEL 10EN ~A -y - .:- CONTROLLER, DIA PRO. - - _wiii! DCHREQ MAREN --< OD. ~ :) DATA ADISPLAV LE _iii iiRln J o ~xx 9 ROYA I - Si'RiBz. I-- ~ ifRiD r-- '"' A 110 DEVICE ~ I-- Sffii6 ~b ~ STRBON. ~ I- CLK I-- I ROYD RDYD DCHACK4 CLK ~ tz CLK ~-~~ ib ·':.' MR PS3 CONREQ INTREQ MR t:= <.> S'f'RiiZ3 ..J 110 SfFii'D'N3 r i5"C'HACi<3 I-- ~ it' r--- 0 ,.....-- b-~~ PS, --- L: - I:J\CS STRBB~ I-- 110 I-- '~' S'i'RiiiN2 vcc- INTPIN DCHACK2 I-- 1 __ INTPOUT SfRiiiZ, PS, S'i'R'i"DN, DCHACK, ~ I-- - L....-- => _0 A I/O DEVICE 0.0, I ~ 1 CSoCS, F9449 DCHACK n (9448) PS n (9449) DECODER DATA [DEN CHANNEL ~~A r- CONTROLLER -- 93453 PROM '--- ~ DCiiiiEQ MAREN ME _Vi REOn ).-~ '---+ M -----0<1 STRBA - ~ _0. DCI:IACK n I--- 0, PSn CS~ - t-- '--- SVN iCn PER 4 PORTS p: ~ STRBA DCHMO n MEMORY ADDAESS f-- ~A 93471 FlOVA aMn -'OJ RAM REGISTER ADDRESS DCHPIN ~ STRSD OCHPOUT - N C 0" DOUT WE '-- CLK OlEN ---:-+" Ne USER OPTION t sa r--=- NC ~y I----- MR ~ CIRINT L lBo-ii,s Srii ~ LJ -- ":::5l Lo( ... """I ME w t ·OPEN COLLECTOR OUTPUTS tl STABD REQUIRE PULL-UP RESISTOR 6·66 F9449 Table 1 F9449 I/O Control Signal State Operation Performed 10EN W MAR EN PS1 PS2 PS3 PS4 STR 0 X X X X X X X No operation X X X 1 1 1 1 1 No operation 1 1 0 0 0 1 ·· ·· ·· ·· U U Loads IB data into selected word count register Loads IB data into selected memory address register 1 1 1 1 0 1 ·· ·· ·· ·· X X Loads selected word count register data onto IB Loads selected memory address register data onto IB ·One active-low Input, selected by programmed 110 instruction device code. Note Multiple port selects result in unpredictable results. o Low 1 High -----------------. X Donlt care U Low-te-hlgh transition Fig. 5 Programmed I/O Timing so Sl S2 S3 S3 S3 S3 S3 54 CLK (66) ClK SYN(59) SYN -+---1 STRIA (41) M(55) 0, (53)~_________________ +-__-+________________________ '-________________ M,W0" 02 f ~ ( ~ ~ ) M IOENW(S) (11) ..... I.-f.----------------...., I Y IOEN MAREN (10) PS,~(12-1S) JI(~~t------------------------....J ' --iTEN(lBO '--------------- Ps MAAEN (1", 28-3~~ : : : __ _ '::-=-=-=-=-=-=-=-='T:M:~::I~:)::======.~-::======~~~~~~~====:t)- II DATA OUT OF F_ __~__________ ii READ -+l TSTR(IB) ii FOR WRITE ----------------------~1-j(:~+~::;,II~DA~T~A~IN~T~O~F~-~==~=~)>-:::-:_---------- ji WRITE I-- TEN(ST~ r- TIl (STR) 1------+1--TSTR(EN) I ~~--------------~--~~JL ~ -f STR ~I.~::::::~T~(S~T~R)~::::~.I 6-67 - -.. -~~--- F9449 Characteristics" section for a description of the cycle four F9449 controllers by interconnecting the data characteristics and specifications.) channel priority out (DCHPOUT) of a higher priority controller to data channel priority in (DCHPIN) of the During the address phase of a DCH cycle, the F9449 next, thereby permitting the system to serve a total of 16 determines which peripheral is to be served, places the data channel peripherals. . contents of the appropriate MA register onto the information bus and drives the W line to the memory Priority resolution occurs during every cycle, at the high- controller so that the memory performs either a read or a to-low trarisition of the SYN signal. In a ri-tultiple·F9449 write cycle. If internal direction {DIRINn is high, system, all pending REo n inputs are latched at that time, read/write selection can be programmed from the F9445 and the DCHPIN/DCHPOUT signals ripple from device to as the most significant bit of the WC register contents device. load. When this bit is at a logic 0 it causes a read of memory. If the DIRINT pin is low, the read/write Priorities are reestablished during every cycle, including selection is controlled by the peripheral through a data "short" F9445 cycles. Additional states are generated by channel mode (DCHMO n) signal. A high DCHMOn signal the F9449 address ready (ROY A) signal to allow priority indicates a memory read (DCH out operation). If required, ripple when the F9445 responds to a DCH. request from a the data in enable (OlEN) and second byte (SB) lines are "wait" cycle. also asserted at this time. Signal Descriptions The F9449 RDYA signal causes the microprocessor to generate three additional F9445 address strobe (S1G) The F9449 input and output signals are described in states, allowing the address sufficient time to propagate table 2. from the F9449 to the memory controller. Timing Characteristics The F9449 does not actually perform the data transfer between memory and peripheral. Instead, the end of the The timing characteristics of the F9449 are illustrated in STRBA Signal causes the F9449 to stop driving the figure 5 (Programmed I/O Timing) and figure 6 (Data address onto the information bus and allows the F9447 Channel Cycle Timing). or F9448 to provide data control during the data phase of the DCH cycle. It ,enables a peripheral three-state input The abbreviated symbol convention used for timing buffer, or strobes data out from the IB into the parameters in this data sheet is TAb(C)d, where: peripheral. The data phase of the DCH cycle can be extended as required by additional data (53) states • Timing symbols all begin with the letter "T". generated from the F9445 in response to the F9447 or • The mnemonic in the position represented by "A" F9448 data ready (RDYD) output being low. indicates the Signal node beginning the interval. • The mnemonic in the position represented by "b" Because it must communicate with the peripheral during defines the direction of Signal transition at the F9445 programmed I/O cycles, the F9447 or F9448 beginning node, if such definition is necessary; normally accommodates the data timing peculiarities of the new state of the signal may be low (I), high (h), the peripheral. 3-state (z), don't care (x), or valid (v); • The mnemonic in the position represented by "C", The end of the data strobe (STRBD) causes the WC and which always appears in parentheses, indicates the MA registers to increment, a TC signal to be asserted !!.!. signal node ending the interval. . the WC register has reached zero), and terminates the W, • The mnemonic in the position represented by "d" DCHACKn, RDYA, and SB Signals. . is the same as "b", but refers to the state of the signal al the node indicated by the mnemonic in position "C". Priority Arbitration The F9449 arbitrates DCH requests from multiple peripherals on a fixed-priority basis, with channel 1 having the highest priority and channel 4 the lowest. The priority arbitration scheme allows cascading of up to 6-68 F9449 Figure 6 Data Channel Cycle Timing ClK(I8) . ClK SYN (58) _ _ _ _-'! SYN SiiiiA (41) RDYA(7) RDYA ii(5S)~ 0, (54) 0,,(53) --A -1 I-TMOO(ME) DATA CHANNEL CYCLE =101 TMOO(ME)~~+--- X b ii, 0" 0" ME(s?) \",,_~~.,...,.. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _.,...,.._ _ Jfr----ME -I tT~ TSTRBD(W) -+i I- W~:::>~~--~~::::::::::::::::::::::::::::::::::T5TA::B:JLt:.-+i:J\:r----w STRBD(8) \ WRlTt !..EAD STRID I;: TSTRIIA(IBA) -oOj -+i I-TC(lBA) ii(I-4,:ze.31,33-38,IIM3)-----~-..JC:::!~~~~:~>_~~---------------------1I ( . ADDRESS OUT ) I-TC(DIEN) -+i I-TC(DIEN) -+i \. f DIEN -+i TSTRIlA(SB) FIRST BYTE TSTRID(SB) -+i it (25) WRITE I'-_ _ _ _ _ ~ __ ~ BECOND BYTE OR EACH WORD ~ ~ ~ ~ ~ ~ ~ ~ ~ ________________ ~ ~ - - - ' R E A D TSTRID(TC) -+i TC'04C31, 38. 27, 2I) _ _ _ _ _ _ _-:-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ...a.._.....J! _____ -+i..;...tTSTRIAIDCHACK) DCHACK,-4 (8, 411, 45, 44) __ DCHACKo-. -+i I - TDCHPlN(DCHPOUT) DCHPOUT(43)-------------------i* oCHPOUT . -~-------------fl:·::::~·~I~T~DC~H~P~IN;~;;H;PO~U~T)~---------------- DCHPlN(42)-------------~""""I*~-------------------------DCHPIN -11+- TDCHPlN(STRBA) REG, ... (52, 51, &0. 48) \ .. --jTREQ(SYN)i+- --------------------~I .j+-TDCHMO(W)--\ j ~TREQ(DCHREQ) TREQ(DCHREQ) -- I+- DC.HMO,-4(11,11;47,4Ol :::::l" I-- _____:-~-------------------------------- TDIRINT(W)-'--t ~IRINT(3?) ,\-;...._ _ _ _ _ _ _ _ _ _......,;..._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ 6-69 F9449 Table 2 F9449 Signal Descriptions Mnemonic Pin No. Name Description Clock ClK 56 Clock An input signal from the F9445 .. The rising edge of the single· phase system clock causes action in the F9449. This line can also be single·stepped for debugging. CPU Handshake SYN 59 Synchronize An active·highinput signal from the CPU that maintains system timing. The start of SYN indicates the start of a CPU cycle with valid M, 01' 00 code. STRBA 41 Address Strobe An active·low input signal from the F9445. In a DCH cycle, the low-to-high transition is used by the memory controller to strobe the memory address from the IB into the selected MA register. (This can be delayed indefinitely by RDYA.) RDYA 7 Address Ready An active-high open-collector output signal to the F9445. A low level prolongs the STRBA signal to allow time for the F9449 to. perform priority resolution and propagate the memory address to the memory controller over the lB. 8 Data Strobe An active-low input signal from the F9445. The low-to-high transition during a DCH cycle causes the selected WC and MA registers to increment and the VIi, DCHACK n, RDYA and SB signals to terminate. Memory ME 57 Memory Enable An active-low output signal to the memory controller. When low, it informs the memory controller that either the F9445 M is low or a DCH cycle is in progress. CPU Cycle Type M 55 Memory An active-low input signal from the F9445 that serves as a status indicator. When it is low, the F9445 is performing a memory cycle. °10 0 54 53 Memory or I/O Function Active-high "0" line input signals from the F9445, used with the ¥Vi input to indicate the type of cycle the F9445 is performing. During a DCH cycle, fYi, 01' 00 are set at 101. VIi 5 Write An active-low input/output signal to and from the components in the system, normally driven by the F9445 to control the read and write operations. Placed in a high-impedance state by the F9445, during a DCH cycle, when it is driven by the F9449, it is low if the system is writing to memory and high if the system is reading from memory. 6-70 F9449 Table 2 F9449 Signal Descriptions (Cont.) Mnemonic Pin No. Name Description Information Bus Signals iBo-iB15 1-4 Information Bus A set of 16 input/output signals to and from the system. This 28-31 active-low, bidirectional bus is used to load and examine the 33-36 contents of the selected WC and MA registers. These signals 60-63 are driven by the selected MA register during the STRBA state of an F9449 DCH cycle..:...The most significant bit is iBo; the least significant bit is IB 15 . Data Channel DCHPIN 42 Data Channel An active-high input signal from a higher-priority F9449 that is Priority Input used to extend priority resolution logic throughout a multiple- F9449 system. When this signal is iow, it prevents the F9449 from being in a DCH cycle. The highest priority F9449 should have DCHPIN connected high. DCHPOUT 43 Data Channel An active-high output signal to a lower-priority F9449 that is Priority Output used to extend priority resolution logic throughout a multiple· F9449 system. When the signal is high, none of the four channels are requesting a DCH cycle and DCHPIN is high. DCHREQ 58 Data Channel An active-low open-collector output used by the F9449 to Request request a DCH from the F9445. Multiple simultaneous requests will be sorted by priority resolution logic during a DCH cycle and will result in additional consecutive DCH cycles. A low level requests a data channel cycle. Data Buffer Control 20 Data in Enable An active-low output signal that can be used to enable an optional bus transceiver placed between the F9449 and the lB. When low, the F9449 is putting out an address during a DCH cycle or data during an I/O read operation. Reset 17 Master Reset An input signal that is active-low from a power-up, front-panel, or programmed initialization signal. It is used to load the WC and MA registers with zeros, set the internal direction control bit to zero, set the four TC signal lines high and clear the four DCHACK lines. Peripheral Port Control 52 Port Request A set of four active-low input signals from the 51 corresponding requesting peripherals. A low signal on a ~ 50 line indicates that its associated peripheral wishes a DCH n 49 cycle. Priority resolution logic arbitrates multiple requests and generates a single acknowledge, REQ 1 having the highest priority and REQ 4 the lowest. 6-71 F9449 Table 2 F9449 Signal Descriptions (Cont.) Mnemonic Pin No. Name Description ....,. DCHACK1" 6 Data Channel A set of four active·low output signals to the requesting DCHACK4 46 Acknowledge peripherals and to the F9447 or F9448. When low, it informs 45 the appropriate peripheral that its requested DCH cycle is in 44 . progress. The DCHACK signal is used.by the peripheral to clear the REO n line. It is also used by the F9447 or F9448 and by the peripheral to enable data buffers to and from the lB. TC1·TC4 39 Terminal Count A set of four active·high output signals to the associated 38 peripherals, indicating completion of a DCH block. When a 27 WC register is incremented to zero during the last phase of a 26 DCH cycle, the corresponding TC line goes high. When the WC register is I.oaded with any value from the IB during an I/O write operation to the F9449, the corresponding TC line is cleared to low. All four TC signals are set high by a low level on MR. PS4 12 Port Select A set of four active·low input signals from a programmed I I 13 14 110 device. The IB bits are decoded by an F9448, which oiJtputs a port select signal to the F9449. When low, the 15 associated port is selected during an I/O read or write operation. No more than one PS line should be low at a time. BM 1·BM4 · 21 Byte Mode A set of four active·low input lines that are used to 22 establish operating modes. When strapped low, the .23 corresponding channel is set for 8·bit byte·mode operation; 24 when strapped high, the associated channel is set for 16·bit word· mode operation. DCHM01• 18 Data Channel A set of input signals from the requesting peripherals. When. DCHM04 19 Mode Out DIRINT Is low, a DCHMOn low indicates that the 47 corresponding peripheral is writing to memory during a DCH 40 cycle (IN). When the DCHMOn signal is high, It indicates that the peripheral is reading from memory (OUT). BYTE Status SB 25 Second Byte An active·low ope~tor output signal to the memory controller. During STRBD timing, this Signal is high during the first byte of a byte·mode DCH cycle and low during the second byte of a byte·mode cycle and during every word in a word·mode DCH cycle. It can be used to strobe either the left or right half of the memory array during a STRBD operation. Register Control Signals 10EN 11 InputlOutput An active·high input signal from the F9447 or F9448.1t is used Enable to enable the F9449 when the F9445 wishes to read from or write to a WC or MA register during an I/O cycle. When the signal is high, a programmed 110 operation is in progress. 6·72. F9449 Table 2 F9449 Signal Descriptions (Cont.) Mnemonic Pin No. Name Description MAREN 10 Memory Address An active·hlgh Input signal from the F9447 or F9448. It Is used Register Enable to select the source/destination register for an F9445 programmed 110 operation. A high signal selects an MA register; a low signal selects a WC register. Si'R 9 Strobe An input signal from the F9447 or F9448. The low-to-high transition causes the F9449 to load the IB data into the selected WC or MA register during an 110 write operation. DCH Direction Control DIRINT 37 Internal Direction Input line that is used to establish the control sour~ of the W line. When OIRINT is high during a DCH cycle, the W line is controlled internally by lBo, the most significant bit of tt!..e • data word in the WC register. When DIRINT is low, the W line . is controlled externally by the OCHMOn input from the corresponding requesting peripheral. It may be driven low by selected DCHACKn outputs if some channels need internal control and others external control: Power Vee 64 Power Supply Supply voltage ( + 5 Vdc). IINJ 32 Injection Current A constant 250 mA current supply; may be derived by use of an external resistor to Vee' (Nominal V1NJ = 1.2 V.) GND 16, 48 Ground Common power and signal return. 6-73 F9449 Table 3 DC Characteristics Symbol Characteristic Min Typ Max Unit Test Conditions VINJ Injector Voltage. 1.3 V IINJ = Max VIH Input High Voltage. 2.0 V Guaranteed Input High Voltage Vil Input Low Voltage. 0.8 V Guaranteed Input Low Voltage Veo Input Clamp Diode Voltage. -0.9 -1.5 V Vee = Min, liN = -18 rnA, hNJ = Min VOH Output High Voltage. 2.4 3.2 V Vee = Min, 10H = -400 p.A, IINJ = Min VOL Output Low Voltage. 0.2 0.5 V Vee = Min, 10l = 8.0 mA, hNJ ;: Min IIH Input High Current 1.0 mA Vee = Max, VIN = 5.5 V, All Inputs. IINJ = 300 mA III Input Low Current. -0.21 -0.4 mA Vee = Max, VIN = 0.4 V, IINJ = Min 10ZH Output Off (High-Impedance) 100 p.A Vee = Max, Your = 2.4 V, State High Current 180-1815, W. hNJ = Min 10Zl Output Off (High-Impedance) -210 -500 p.A Vee = Max, Your = 0.4 V State Low Current 180-1815, W. hNJ = Min 10SH Output Short Circuit Current. -15 -100 mA Vee = Max, Your = 0.0 V, IINJ = Min' IlOH Output Leakage Current (Open 1.0 mA Vee = Min, VOH = 5.25 V, OHH Collector) RDYA, S8, DCHREQ. IINJ = Min lee Supply Current. 125 mA Vee = Max, IINJ = Min *N.ot more than one output to be shorted at a time. Absolute Maximum Ratings Recommended Operating Ranges Supply Voltage (Vcc) These are stress ratings only, and functional operation Part Number at these ratings, or under any conditions above those Min Typ Max indicated in this data sheet, is not implied. Exposure to F9449DC 4.75 V 5.0 V 5.25 V the absolute maximum rating conditions for extended F9449DM 4.5 V 5.0 V 5.5 V periods of time may affect device reliability, and exposure to stresses greater than those listed may Injector Current (hNJ) Part Number cause permanent damage to the device. Min Typ Max Storage Temperature - 65°C, + 150.o C F9449DC 200 mA 250 rnA 300 mA Ambient Temperature Under 8ias - 55°C, + 125°C F9449DM 200 mA 250 rnA 300 mA Vee Pin Potential to Ground Pin - 0.5 V, + 6.0 V Input Voltage (dc) - 0.5 V, + 5.5 V Input Current (dc) - 20 mA, + 5 mA Output Voltage (Output HIGH) - 0.5 V, + 5.5 V Ordering Information Output Current (dc) (Output LOW) + 20 mA Order Code Temperature Range Injector Current (IINJ) + 500 mA Injector Voltage (VINJ) - 0.5 V, + 2.0 V F9449DC O°C to + 75°C F9449DM - 55°C to + 125°C 6-74 F9450 Single-Chip Microprocessor Advance Product Information Microprocessor Product Description • Real-Time Processing with 16 Levels of Interrupt Vectors, DMA, 128 1/0 Channels, and Two The Fairchild F9450 is a 16-bit single-chip bipolar VLSI. Programmable Timers microprocessor with on-chip hardware floating-point • Directly Addresses 64K Words; Extendable to 1 M capability. The 64-pin F9450 CPU provides 16 registers to Words with MMU fully implement all standard instructions, including • Extensive Fault Detection and Debugging Capability interrupts, single and double precision arithmetic, and with Microcoded Console Support and Self Test 32- and 48-bit floating pOint. The F9450 implements the • Provides for Multiprocessor Implementation entire MIL-STD-1750A instruction set. • 13 L@ Technology • Operating Temperature Range of from - SSOC to The microprocessor will directly address 64K words of + 12SoC memory, and with the addition of the F9451 memory • 64-Pin DIP or Optional Leaded Chip Carrier management will handle one million words. • Low Power Schottky 1/0 • Single + S V Supply • Single 64-Pin Microprocessor Implements MIL-STD • Power Dissipation Approximately 2_S W 1750A Instruction Set Architecture • Radiation-Tolerant Technology • Single and. Double Precision Arithmetic (16 and 32 bits), with 16 general-purpose registers Figure 1 illustrates the CPU logic, and figure 2 shows • 32- and 46-8It Floating Point Arithmetic Implemented the configuration of the CPU with the memory On-Chip management unit (MMU) and the block protect RAM .. ~P~ ~ Signal Functions RESET EXT REQUEST CPU elK TIMER elK ADDRESS/DATA 16 ADDRESS STROBE READY ADDRESS . MEMORY PROTECT ERR DATA STROSE ~ MEMORY PARITY ERR READY DATA MEMORY/1Q PIO CHNL PARITY ERR DIRECTION BUS DMA CHNL PARITY ERR MEMORY 10 EXT ADDR ERR tNST/DATA F94S0 PIO CHNL XMSN ERR (1750A CPU) SYNC FAULT BIT 7 BUS BUSY SYSTEM FAULT ASfPS 4 DMA REQUEST NML PWR UP I BUS STATUS DMA ACKNOWLEDGE MAJOR ERR DMA ENABLE UNRECOVERABLE ERA PWR DOWN BUS REQUEST INTERRUPTS { USER 6 IOL 2 ~ BUS LOCK BUS GRANT }MULTI PROCESSOR INTERFACE • I'L is a registered trademark of Fairchild Camera and Instrument Corp. 6-75 F9450 Figure 1 CPU Logic Diagram :~~CESSOR ________________________-7~II____~________________-,~______~______________- - - - - - - - - - - -________--:ngCESSOR ~J:RNAL-----r--------1_----------~~II~------------_1~--c_--L-------_r----------------__r_------__.-~---INTERNALBUS 18 AADDR REG. FILE SHIVrIlREO TEM~REO B ADDR,.£!-. (4) 18 18 18 18 18 18 8 8 18 18 18 18 BBUS __~2--i--~--~~~----+-----~----~~L---~--~------t--------------t__---------i-----------------------BBUS A8US~~182-~------~~------L-----------~~--~~----------~------~~---L----------~---------------------ABUS Figure 2 CPU Systems RESET EXT REQUEST CPU CLK TIMER CLK ADDRESS/DATA /18 EXT ADDR (EXT 0 7) I EXT ADDRESS (8PO BP7) I ADDRESS STROBE READY ADDRESS READY EXT ADDRESS II ADDRESS/DATA MEMORY PROTECT ERR DMASTROBE AO.DRESS STROBE' MEMORY PARITY ERR READY DATA RES(RO R2) r-'-~- OIRECTION DATA STROBE DMA CHNL PARITY ERR • MEM9RY/1O MM.U DIREcnON BPR EXTERNAL EXT ADOR ERR .. INST/DATA MEf!I.ORY/l0 CPU FAULTS PIO CHNL XMSN ERR SYNC·· INST DATA FAULT BIT7 BUS BUSY , MEMORY PROTECT ERR BUS BUSY SYSTEM FAULT AS/PS 4 DMA ACKNOWLEDQE DMAREQUEST NML PWR UP DMA { DMA ACKNOWLEDGE MAJOR ERR CONTROL DMA ENABLE UNRECOVERABLE ERR MEJORY BUS REQUEST PROTECT {PWRDOWN 8 BUS LOCK } MULTI ERR INTERRUPTS USER PROCESSOR IDL 2 BUS GRANT INTERFACE GLOBAL MEMORY PROTECT ENABLE 6-76 F9451 Memory Management Unit Advance Product Information Microprocessor Product Description The Fairchild F9451 Memory Management Unit (MMU) provides the logical-te-physical address translation for instructions and operands in the MIL-STD 1750A configuration. The MMU serves to expand to one million words the direct addressing of the F9450 CPU, and provides protection in logical space units of 4K-word pages for access key, write, and execute instructions. Figure 1 illustrates the addressing structure, and figure 2 shows a block diagram of the MMU. • Logical-to-Physical Address Translation for Instructions and Operands • One Million Word Addressing Space • Protection in 4K-Word Pages for Access Key, Write, and Execute • Instruction and Operand Maps • 13 L@ Technology II • Operating Temperature Range of from - SsoC to + 12SoC • Radiation-Tolerant Technology • 64-Pin DIP or Optional Leaded Chip Carrier Figure 1 Addressing Structure ACCESS FAULT MEMORY PROTECT PROTECT ERR LOGIC PROCESSOR STATE (PS) 4 +-....~ " ::..IN;;:;ST'-'/.:;;DA::..T'-'A_ _ "" STATUS BUS (AS/PS) ~} .~.. 6-77 F9451 Figure 2 F9451 MMU Block Diagram I/D MAP AD/DATA LATCH 512 x 16 16 STRBA-J ,I RDYA AD4·AD15 STRBD_' RDYD.......J , I I I I EXT O· EXT 7 AS/PS RDYA 6·78 F9452 Block Protect RAM Advance Product Information Microprocessor Product Description The Fairchild F9452 Block Protect RAM (BPR) unit provides write protection in physical memory for the CPU and DMA in blocks of 1K words. The BPR also provides global write protection from initialization until enabled. Figure 1 is a block diagram of the BPR. • 13 L® Technology • Operating Temperature Range From - 55°C to + 125°C • Radiation·Tolerant Technology • 64·Pin DIP, or Optional Leaded Chip Carrier Figure 1 F9452 Block Diagram DMACK II r----------------~ I I EXT O·EXT 7~L-...... 8 I ADIDAT A-,,'"+-~r--~ 16 I STRBA--I I STRBD_1 I DIRECTION_I I M/IO-! I IID-! I BUS BUSY-! I RESET-I I I I I ~----------------~ ® PL is a registered trademark of Fairchild Camera and Instrument Corp. 6·79 F9452 6-80 F9470 Communication and Console Controller Advance Product Information Microprocessor Product Description information from the F9445, and then outputs it to the operator's terminal. The Fairchild F9470 Communication and Console In the 1/0 service mode, the F9470 acts as a serial 1/0 Controller is an LSI MOS device that provides the controller, interfacing the serial 1/0 devices to the F9445 Fairchild F9445 16·bit 13 L® microprocessor with virtual through device codes 10·13 and 77. The console console control functions via a pair of asynchronous commands are not available while in the 1/0 service communication ports. mode: all 1/0 in this mode must be programmed through The F9470 provides a variety of useful console functions, the F9445. including examine and deposit to memory and accumulators, jump to a specified location, and trace the • Accesses Microprocessor Internal Registers F9445 instruction execution. • Two Asynchronous Serial Ports • Allows VDU to Operate as a Console for an F9445 The F9470 operates in two modes: console control and System 1/0 service. In the console mode, all communication with • 40·Pin DIP Requiring Single + 5 V Power Supply the F9445 is controlled by the F9470, which interprets • NMOS Technology. ------. the seven console commands, requests the appropriate Figure 1 illustrates the pin configuration of the console controller. Connection Diagram Signal Functions x, (LSB) CRYSTAL,I x, CLOCK l 00 0, CPU{ CYCLE TYPES M INFORMATION BUS INTPIN RESET ASYNCHRONOUS{ SERIAL PORTS 1 AND 2 RX0 2 (MSB) INTREQ CONREQ BUSGNT ROVO RDYACK EXREQ NC NC NC ROYO NC @ I'L is a registered trademark of Fairchild Camera and Instrument Corp. 6·81 F9470 Figure 1 Pin Configuration of the Console Controller +5 M-------------------------, 0,---------------------------, ~--------------------, + 12--------....., ~~--~--~---------------------, -12 RS232 6 3 4 5 INTA ENABLE ~18~------_+~I.>O-~-TXD, ~19~------_+~l.>o-~-TXD2 R5232 ~16~------~1~~<9~l_~RXD, ~17:..-------_+_><]-+ RXD2 14 13 10 +5 12 11 11 12 10 13 INTREQ 9 14 15 F9470 CONREQ is 33 M 0, BUSGNT 00 RDYD +5 IB12 Do IB10 1811 iB1 STRBA-l>>---+ D Q D QI------I-' CLK CD Q~ LS74 I~----------~======================l:~~------if.~~~~ Ii +5 0, CP,-------4------~--~ IK 6-82 F9470 The three jumpers in figure 1 perform the following functions. Jumper Name Description J1 INTA ENABLE Jumpered low, the F9470 is the highest proirity 1/0 device, or the only 1/0 device in the system. Removing the jumper and driving INTPIN provides a daisy-chain priority-interrupt scheme. A high level on this pin allows interrupts from the 1/0 terminal to be disabled when a device with a higher priority interrupts the CPU. J2 OS77 ENABLE With this jumper in place, the F9470 responds to device code 77 (octal) programmed 1/0 instructions. Removing the jumper allows faster interrupt response to a system device that interrupts the CPU at a higher frequency. Notice that MSKO, INTA, and 10RST are no longer available with the jumper removed. J3 F94701/0 Connect the jumper to ground to use the 1/0 service mode. The F9470 decodes and executes SERVICE 1/0 instructions for a processor in order to control the serial output. The F9470 responds to ENABLE device codes 10, 11, 12, 13, and 77 (teletype in and out, paper tape reader and punch, CPU), ------------~---. II and stalls the CPU to get time to decode and respond to the instructions using these device codes. Console Mode Operation 1. Force an overflow. The F9470 buffer accepts six octal numbers, so only the last six entries will be The procedure used to communicate with the F9470 in used. For example, 77777777 is interpreted to be the console mode is as follows: 177777. Only the least significant bit of the most significant number is read. Entering Data and Commands 2. CTRL-H. This backs up over each mis-typed number The console prompt is an asterisk('), which indicates the and echoes each entry, so the number of character F9470 will accept commands. The commands are deletions is apparent. executed by typing the desired capital letter or, where appropriate, the octal number(s) and letter. No carriage 3. Pressing the backspace key is identical to pressing return (CR) is necessary. Once within the examine (E) CTRL-H. mode, some keystroke is used to complete each individual entry. The strokes are (CR) and 1\. Each closes 4. Pressing any key other than 0 through 7, or any the present entry, and then respectively goes to the next accepted command letter, returns to the console or previous address location. To write a program with the mode. E command, enter the octal values equivalent to the F9445 binary instruction codes. (See the F9445 data 5. After executing the examine command, xxxE, sheet for a description of the instruction set.) pressing any key other than 0 through 7 &~CR), or 1\ returns to the console mode. Recovering from Keystroke Error Return to Console Mode from 110 Service If an error is made by typing the wrong letter command, there is no recovery, since execution begins immediately. BREAK (or CTRL-BREAK) enters the console mode from There are many ways to correct data errors. the 1/0 service mode. The F9445 will continue execution (Characteristics vary among terminals; the following text of any currently running code. (BREAK and CTRL-BREAK refers to what occurs when using the Zenith terminal.) are keystrokes. Some terminals require that the key labeled CONTROL be held while the BREAK key is struck.) 6·83 F9470 The seven console commands processed by the F9470 are given in table 1. Table 1 F9470 Console Mode Commands Command Description A Displays seven fields, the present octal contents of the PC, ACO, AC1, AC2, AC3, SP, and FP registers. PC contains the next Instruction to be executed. n,vC Changes any of six registers to the new octal value, v. To select which register, choose the octa.1 code associated with that register. Octal code (n): o 1 2 3 4 5 Register: ACO AC1 AC2 AC3 SP FP If v is omitted, the chosen register is set to O. Comma is the only proper delimiter to use. xE Examines the contents of the memory cell at address x. The address and its present octal contents are displayed on the terminal. New octal contents may then be typed. A carriage return enters the new value and closes the cell. The next address (x + 1) and its contents are then displayed, and its new value can be typed. Entry continues in sequential locations until the ESC key is pressed and terminates the examining session. Pressing multiple carriage returns effectively displays the contents of consecutive cells. If A (circumflex) is pressed instead of (CR), an open cell is closed, new data (if any) is entered, and the previous address cell is opened. xJ Jumps to location x and begins executing the program located there inF9445 absolute assembly language. Transfers from console mode to service I/O mode. xR Jumps to location x and begins program execution. This is. identical to the jump (J) command, except the F9470 remains in the console mode. The console responds to keystrokes, such as A, T, or more R commands. When the R command is used, the F9470 does not respond to I/O instructions from the F9445, and program execution halts when .another console command (e.g., A) is entered. Back-to-back R commands are not recommended. S Allows the user to reset the baud rate. Issue this command, attach the CRT cable to another device or re-set the baud rate of the terminal In use, then press (CR). The software of the F9470 sets the board baud rate to agree with the rate of the attached device. A second rate can then be software-programmed, in accord with the restrictions noted in figure 2. . . nT Traces through the user program n (octal) steps, beginning at the address pointed to by. the PC counter or where the previous trace left off, whichever was last. If n = 0 or 177777, it will trace forever; if n is omitted, it traces one step. To start tracing at location x, set the PC counter to x with the command xE, then press the ESC key to terminate the examine mode; finally, use the appropriate T command to begin traCing. For every program step that is traced, the command T displays eight fields: the memory address, the instruction in octal form, the four accumulators, the stack pointer, and the frame. pOinter. 6-84 F9470 I/O Service Mode Operation The F9470 responds to the interrupt control instructions listed in table 3 when in the 1/0 service mode. When performing 1/0 functions with the F9470, the following restrictions should be noted. Table 3 F9470 Interrupt Control Commands 1. The busy flag is not set with input device codes 10 Instruction Description and 12, therefore, SKPBZ and SKPBN should not be used with these codes. 10RST Clears all busy and done flags, 2. The F9470 requires some time after clearing the disables interrupts. done flag to remove the associated interrupt request. When performing interrupt-driven 1/0 to the MSKO,ACC,CPU Enables or disables device F9470, the operator needs to add a delay between interrupts by clearing or setting the the clear request and the next INTEN. Alternatively, interrupt disable flag in the device. the interrupt handler must be able to tolerate a The interrupt disable flag of each bogus interrupt from the F9470. In this latter case device is associated with a an INTA command will return a zero (0), which the' specific data line, and is set if its interrupt handler should ignore, and then re-enable mask bit is 1, cleared if 0'. • interrupts. INTA,ACC,CPU Reads device code of highest When in the 1/0 service mode, the F9470 responds to the priority device that is requesting F9445 data control instructions presented in table 2. an interrupt. The 6-bit code is These commands are a subset of the F9445 mnemonic loaded into ACC bits 10-15. All 16 instructions described in the F9445 data sheet. bits are set to 0 of no device is interrupting. Table 2 F9470 I/O Service Instructions 'NOTE: Instruction Description fnterrupt Disable Bits IB Bits S 9 10 11 12 13 14 15 DIAx ACC,DEY Data In from A DOAx ACC,DEY Data Out from A Mnemonics PTR PTP TTl TTO NIOx DEY No 1/0; Used to Start or CH2 CH2 CHI CHI Function Clear a Device In Out In Out SKPBN DEY' Skip if Busy = 1 SKPBZ DEY' Skip if Busy = 0 SKPDN DEY Skip if Done = 1 SKPDZ DEY Skip if Done = 0 NOTES: If x = S (start), set busy flag, clear done. If x = C (clear), clear busy flag, set done ACC = Accumulator 0,1,2, or 3. DEV = Device Codes = 10,11,12,13 • Note that Busy is not defined for input devices (lT1 and PTR); hence, SKPBN and SKPBZ should not be used with these devices. 6-85 F9470 The F9470 responds to device codes 10, 11, 12, 13, and 77, which are octal codes of the six least significant instruction bits: Device Code Mnemonic Description Action 10 TTl Teletype In Input on Channel 1 11 TTO Teletype Out Output on Channel 1 12 PTR Paper Tape Reader Input on Channel 2 13 PTP Paper Tape Punch Output on Channel 2 77 CPU CPU Serial I/O Figure 2 Serial I/O Port Baud Rate Selections The F9470 has two asynchronous serial input/output ports. Each port can select 110, 300, 1200, 1800, 2400, or MNEMONIC 02 2 3 4 5 4800 baud. The initial carriage return after power·up or Q) c 0 0 0 after typing the S command allows the software to BAUD RATE 0 0 0 0 0 0 0 N 1, <1>2 Pins Only VeL Logical 0 Output Voltage -O.S 0.3 V <1>1,<1>2 Pins Only VOH Logical 1 Output Voltage 2.4 V lOUT = - 400 pA VOL Logical 0 Output Voltage O.4S V 10L =2 mA IlLS AT/SPC Input Current (low) 1.0 mA VIN =0.4V, AT/SPC in Input Mode IlL Input Leakage Current -1.0 1.0 p.A VIN ;5;V OO ' All Inputs Except <1>1,<1>2, AT/SPC 10L 100 Output Leakage Current Active Supply Current Absolute Maximum Ratings The absolute maximum ratings for the CPU are -1.0 1.0 300 pA mA OsVINsV OO 10UT=0, TA =O·C • presented in table 3. These are stress ratings only, and functional operation at these ratings or under any conditions above those indicated in this data sheet is not implied. Exposure to the absolute maximum rating conditions for extended periods of time may affect device reliability, and exposure to stresses greater than those listed may cause permanent damage to the device. Table 3 Absolute Maximum Ratings Temperature Under Bias O·C, + 70·C Storage Temperature -6S·C, +1S0·C All Input or Output Voltages with Respect to GND -O.SV, +7.0V Power Dissipation 1.SW 7·11 F16032 7-12 F16081 Floating Point Unit Advance Product Information Microprocessor Product Description Connection Diagram The F16081 Floating Point Unit (FPU) is a slave processor intended to augment the instruction set of the 0'0 VDD F16000 microprocessor family. The FPU implements a D. version the IEEE standard P754 floating point D. specification. 0, • High-Speed Operation D. 0" • Single (32-Bit) and Double (64-Blt) Precision 0, 0" • Selectable Rounding Modes • Error Detection and Interrupt Generation D. 013 • NMOS Technology 0, 0,. • 24-Pln Dual-In-Line Package (DIP) 0,. • + 5 V Power Supply 0, Do GNDL Signal Functions CTIL SINGLE· PHASE CLOCK INPUT RESET ~~:TUS I - ST, AD 15 AD14 AD,. AD12 AD11 AD 10 • AD. SIGNALS - - STo AD. AD, MULTIPLEXED ADDRESS/DATA BUS AD. AD, AD. AD. AD, AD, ADo SPC/AT SLAVE PROCESSOR CONTROL VDD GNDL GNDB t +5V OV OV 7-13 F16081 Instruction Summary the instructions for the F16081 are summarized in table 1. Table 1 F16081 Instruction Summary Mnemonic Description ABSf Absolute Value Floating Point ADDf Add Floating Point CMPf Compare Floating Point DIVf Divide Floating Point FLOORfi Floor Function LFSR Load Floating Point Status Register MOVf Move Floating Point MOVFL Move and Convert MOVif Move and Convert MOVLF Move and Convert NEGf Negate Floating Point ROUNDfi Round Function SFSR Store Floating Point Status Register SUBf Subtract Floating Point TRUNCfi Truncate Function 7·14 F16082 Memory Management Unit Advance Product Information Microprocessor Product Description Connection Diagram The F16082 Memory Management Unit (MMU) provides support for virtual memory management and program A" Voo debugging when used with the F16000 microprocessor A" A" family. It is designed to relieve the microprocessor unit of burdensome tasks associated with memory manage· A" A" ment and provide address translation during program A19 TNt execution. The MMU converts virtual addresses issued A18 PAV by the MPU to physical addresses. Support is included A17 STo to assist the operating system in implementing memory management policies. Memory protection is A16 ST, implemented by slave instructions that check the validity AD 15 ST, of a memory reference. The F16082 also permits easy AD14 ST, implementation of a virtual machine in a qebugging and in·system emulation environment. The MMU slave A013 PFS processor extends the memory management capabilities AD12 DDIN of the F16000 microprocessor family. Slave processor AD11 ADS concepts allow potential software compatibility with future systems because the slave hardware is AD10 U/S transparent to the software. 'ADg SPC/AT AD, ABT/RST • Dynamic Address Translation Using Memory Page Tables m II AP7 • On·Chip Cache for the 32 Most Recently Used AD, HLDAO Memory Page Table Entries ADs HLDAI • Virtual Memory • Memory Protection AD, HQ[lj • Program Breakpointing AD, rn • Program Flow Tracing AD, RDY • Virtual Machine Support • High·Speed NMOS Fabrication AD, "2 • 48·Pin Dual·ln·Line Package (DIP) ADo "1 • Single + 5 V Power Supply GNDL GNDB 7-15 F16082 Signal Functions Instruction Summary ..., The instruction commands for the F16082 are sum· CLOCKS I A,. marized in table 1. } A'23 READY RDY A" A" Table 1 F16082 Instruction Summary HOLD HLDAI A20 A'9 AlB '''''"''" ADDRES BITS HLDAO A'1 Mnemonic Description A,. RESET BUS CYCLE STATUS USERISUPERVISOR I iID ST. ST, ST, ST. AD,s AD,4 AD'3 AD12 AD11 - LMR RDVAL SMR WRVAL Load MMU Register Read Validate Store MMU Register Write Validate STATUS LINE AD,. U/!! ADDRESS AD. AIlS AD. MULTIPLEXED STROBE ADDRESS AND SLAVE PROCESSOR SPC/A'f AD1 DATA BUS Absolute Maximum Ratings CONTROL AD. PROGRAM m ADs FLOW STATUS AD. These are stress ratings only, and functional operation AD. AD, at these ratings or under any conditions above thdse AD, indicated in this data sheet is not implied. Exposure to AD. DATA DIRECTION the absolute maximum rating conditions for extended DDIN (BUS CONTROL) periods of time may affect device reliability, and Ali'f/iID ABORT/RESET exposure to stresses greater than those listed may INT INTERRUPT cause permanent damage to the device. FlT FLOAT (BUS CONTROL) PAY PHYSICAL ADDRESS Voo GNDl GNDB VALID (Memory Temperature Under Bias O·C, + 70·C Control) Storage Temperature - 65·C, +150· +SV t OV OV All Input or Output with Respect to GND - 0.5 V, + 7.0 V Power Dissipation 1.5 W 7·16 F16105 Very Intelligent Peripheral Controller Advance Product Information Microprocessor Product Description The F16105 Very Intelligent Peripheral Controller (VIPC) is a general-purpose device to be used either with the F16000 microprocessor family or as a stand-alone system element The controller is easy to program in both assembly language and high-level language_ • Upward Software Compatibility with the F16032 Microprocessor • Internal10-MHz Clock Speed with Instruction Prefetch • 4096-Byte ROM • 192-Byte Two-Port RAM • 64-Byte Scratchpad RAM • 32 Pins Individually Programmable as 110 • Asynchronous Communication Interface Port • Cascadable 16-Bit Timer and Event Counters • Eight Vectored Interrupts • Input/Output Processor (lOP) or Single-Chip Configurations • Remote or Local Bus Configurations • External Memory Access of 56K Bytes FI 7-17 F16105 7-18 F16201 Timing Control Unit Advance Product Information Microprocessor Product Description Connection Diagram The Fairchild F16201 Timing Control Unit (TCU) is a 24-pin Schottky component used with the Fairchild VDD F16000 microprocessor family. It has four basic RWEN m functions: AD CWAIT 1. Provides twononoverlapping clock phases for WR WAITI unbuffered use within the F16000 microprocessor ODIN WAIT2 family and provides a synchronous TTL output. 2. Provides the basic system read, write, and data- buffer-enable control signals. ROY CTTL 3. Generates slow cycles compatible with the requirements of the older peripherals (those for FCLK which adding wait states is not sufficient). XCTL2 GND XCTLI/ECLK 4. Synchronizes the ready and reset inputs for the MPU. • Two Full-Voo Swing Clock Outputs • On-Chip • TTL Drive Capability on All Outputs Except Clock • Bus Control Generator for F16000 Systems Signal Functions •• Support for Slow Signals for F16000 Systems 8080 Peripherals • States Four Wait Inputs (WAm to Force up to 15 Wait CRYSTAL INPUT OR 1- XCTLI/BCLK +1 I TWO·PHAse CLOCK OUTPUT EXT SOURCE XCTL2 +2 • Continuous Wait Input (CWAln to Generate an Unlimited Number of Wait States tWAIT WAITI FCLK CTTL I PERIPHERAL CLOCKS • Additional CWAIT Timing to Allow a Memory Cycle WAIT2 ROY READY l Hold and Subsequent Regeneration for System WAff4 Arbitration or Memory Refresh WAITS AD • Schmitt Trigger Reset Input, Internally Synchronized WR BUS to Generate a Reset Output for the F16000 System RESET 1 IISfi RSfO DBE CONTROL • Fast-Clock TTL Output with Twice the System Clock PERIPHERAL j- fSO 3·STATE Frequency ODIN CONTROL • Frequency Range of From 0_2 MHz to 10_0 MHz CONTROL SIGNALS PER RWEN VDD GND I POWER • Single + 5 V Power Supply AD!i 7-19 F16201 Functional Description wait count, CWAIT may also be taken to low, overriding the count and forcing a continuous walt to be entered. The'F16201 has five major elements (see figure 1): the oscillator and dl'vide·by·2 circuit, the two·phase The walt·state generator counts the number of wait , generator, the reset synchronization circuit, the wait· states to begenerated~ A start pulse (generated by the state generator, anti the timing state counter and control TSCCSG circuit) is used to Initiate the counting. While signal generator (TSCCSG). the counter Is operating or the CWAIT Input is low, the wait·state generator holds its wait output to the TSCCSG The oscillator and dlvlde·by·2 circuit Is connected to circuit active. The wait·state generator turns Its ready either an external crystal operating at twice the desired output (ROY) to low when a start pulse is received from clock frequency or an external source by way of the the TSCCSG. The ROY output returns to high when the XCTL1/ECLKpin. ThIs circuit also generates the fast TTL wait signal is released. clock (FCLK) with the crystal or ECLK frequency. A one· half·frequency output Is created for ,the two·phase The timing state counter and control signal generator generator. ' , circuit keeps track of the timing state (T·state) within the MPU, 'generating the control.~ls accordingly. The The two·phase generator provides two full·V oo swing, arrival of the address strobe (ADS) Identifies the first nonoverlapplng clock signals. Additionally, it generates a T·state (T1) of a timing cycle. Input signals Di5iiii and TTL clock (CTTL) and an Intemal,clock to synchronize PER are latched, and fast or slow, read or write cycles the other circuits of the chip. are generated. The TSCCSG circuit also extends a cycle, as directed by the wait line. The T·state output (TSO) The reset synchronization circuit synchronizes the reset· signal identifies the beginning of,the second and last In Input (RSTI) to generate reset·out (RSTO) with proper T·states of a timing . cycle; 'it can be used to gate or clock timing. The FmTI has a Schmitt trigger Input. external logic for synchronization .. Wait timing allows two different modes of operation, Recommended Operating Conditions providing ftexibillty in the generation of the walt Inputs. When theCWAIT or WAIT Inputs are active, 'wait states The recommended operating ranges of the TCU are are inserted. However, If CWAIT Is used to create the shown below, ' walt, the WAIT Inputs can be applied and are implemented following CWAIT's release. During a fixed Supply Voltage Vee 4.75 Min., 5.25-Max V Temperature TA 0·C,70·C Figure 1 F16201 Block Diagram TIMING CWAlT STATE WAlT,' WAIT COUNTER AND , WAif. WAIT· CONTROL STATE SIGNAL WAlT. GENERATOR START GENERATOR WAlT. (TSCCSG) RDY XCTL1' ECLK XCTL2 "7·20 F16202 Interrupt Control Unit Advance Product Information Microprocessor Product Description Connection Diagram The F16202 Interrupt Control Unit (ICU) provides the F16000 microprocessor family with hardware support for IR VDD prioritized, vectored interrupts and for a real-time clock. IR, ST IR2 • 16 Interrupt Sources, Cascadable to 256 • 8 Hardware Interrupt Sources In 16-Bit Data Bus D15P7 IR, Mode D14P6 IR_ • Up to 16 Hardware Interrupt Sources In 8-Blt Data D13P5 IR, Bus Mode • Optional 8-Blt Input/Output (I/O) Port when the 8-Blt D12P4 IR. Bus Mode Is Used Dl1P3 IR7 • Five Optional Clock Outputs In the 8-Bit Bus Mode Dl0P2 CLK • Two 16-Bit, dc-to-10 MHz Counters that Can Be Combined Into a Single 32-Bit Counter D9Pl WR • Thirty-two 8-Blt Internal Registers Accessible as Pairs D8PO iii) in the 16-Bit Bus Mode D7 COUT • Software Interrupts • Automatic Handling of Return from Interrupts D8 i'IR • Programmable Polarities and Level/Edge Selection D5 RST for Each of the Hardware Interrupts A_ • D4 • Automatic Rotating Priority Mode • NMOS Technology D3 A, • 40-Pln Dual In-Line Package (DIP) D2 A2 • Single + 5 V Power Supply A, Dl DO Ao GND CS Signal Functions INTERRUPT CLOCK INPUT (10 MPU) D15P7 RESET DI4P. BUS CYCLE D13PS CONFIGURATION- STATUS LINE I DI2P_ DEPENDENT SIGNALS (from MPU) } DATA BUS/I/O PORT/ DllP, Dl0P2 . . . . f~p~j~NAL INTERRUPT BUS CONTROL SIGNALS D09P, =} D08P. 07 D. D, D_ BIDIRECTIONAL D, DATA BUS D2 D, D. COUT EXTERNAL CLOCK IN/OUT GND +5 V t 0V -. 7-21 F16202 7·22 F16203 Channel Controller Advance Product Information Microprocessor Product Description Connection Diagram The F16203 Channel Controller is intended for use with the F16000 microprocessor family. It is a four·channel VDD controller that can operate on a processor local AD. multiplexed bus (via local mode selection) to support AD, low-cost configurations. It can aLso operate with separate user-defined input/output (I/O) buses (via AD. remote mode selection) when high performance is AD. required. AD. • Up to Four Independent Channels ADs • Interfaces with the F16032 Central Processing Unit AD. • Integrated Operation with the F16202 Interrupt AD7 Control Unit • Local/Remote (Slngle-/Multlbus) Configurations DSTB AD. • Versatile Channel Commands 1m' AD. • Command Chaining jjij'f AD,. • Support for Memory-to-Memory and Device-to-Device Transfers RDY • 8- and 16-Bit Devices HlDAO • NMOS Technology HO:iJil • 48-Pln Dual In-Line Package (DIP) • Single + 5 V Power Supply HOLD • Maximum Data Rate of 5M Bytes Per Second IJOIN • Selectable Cycle SteallBurst/Semiburst Transfers AIlI .cs iOS 11ft A20 GND elK 7-23 F16203 Signal Functions Channel Command Summary The basic channel commands for the F16203 are CLOCK INPUT CLK A" DISABLE A" m A21 VERIFY READY INPUT A,o MOST SIGNIFICANT SEARCH ROY ADDRESS BITS A,. TRANSFER AND SEARCH HOLD CONTROL I HLDAI HLDAO A,. Au A,. Various command modifiers are append able to the basic command and are summarized in table 1. AD 15 DMA REQUEST ! R3 AD14 AD13 Table 1 F16203 Command Modifiers - FROM DEVICES 112 AD12 3·0 111 AD11 Ao AD10 AD. MULTIPLEXED Mnemonic Description AD. ADDRESS AND AD7 AD. DATA BUS AS Word Assembly AD, AT Auto Transfer AD, AD, BT Burst Type AD, AD, D Direct/Indirect Mode ADo DL Destination Location HBE MPU BUS DT Destination Type ADS CONTROL DW Destination Width ODIN SIGNALS DSTB DATA STROBE TO DEVICES LP Lock Priority ACK, (Remote Mode Only) MN Match/No Match ACK, DMA ACKNOWLEDGE TO MNI Match/No Match Interrupt Mask ACK 1 DEVICES 3·0 PT Priority Type ACK o RQI Request-While-Disabled Interrupt Mask WAfT WAIT REQUEST TO F16201 SE Stop Enable (Remote Mode Only) iNT SL Source Location CHIP SELECT cs INTERRUPT REQUEST ST Source Type AOIli HOLD REQUEST TO MPU I/O SELECT lOS V DD GND STI Stop Function Interrupt Mask SW Source Width t +5V t OV TC TCI Transfer Complete Transfer Complete Interrupt Mask UW Search Type 7-24 F16204 Bus Arbiter Advance Product Information Microprocessor Product Description The F16204 Bus Arbiter manages heterogeneous multiprocessor systems that share a common bus. • Multiprocessor Environments • Up to 32 Masters • Selection of Arbitration Algorithm • Encoded Arbitration Scheme • 7-25 16204 7·26 F16413 CRT Controller Advance Product Information Microprocessor Product Description Signal Functions The Fairchild F16413 CRT Controller (CRTC) operates within the F16000 microprocessor family for computer cs CCLK terminal, word processor, and monitor applications. The CUR, LLI LINE LOCK INPUT 64·pin, 5 V controller uses N·channel silicon gate LPICUR, 1m WIi technology. A number of features are programmable for RC, I!ST easy adaptation to different display, synchronization, SCAN LINE { RC, iIIll COUNTER RC, and screen formats. RCo 0, D. } A15 0, • Programmable Display and Synchronization Formats A14 0, DATA BUS (110) 0, • Memory Addressing: Row/Column, DMA with Row An 0, A" Buller, or Contiguous Linear Addressing A" 0, A,o Do • Three Video Modes Ag PA, • Three CRT Monitor Interfaces MEMORY As PA, ADDRESS • Programmable Window Location LINES A, } REGISTER ADDRESS PA, A. • Programmable Status Field Location That Can Be PAc A, Used to Provide a Vertical Split Screen A, PS PROP. SPACING A, • Character Clock Rate to 10 MHz A, PBR PROCESSOR BUS REO. • Maskable Interrupts: Line Zero, Vertical Blank, A, BLANK Ac Smooth Scroll Complete, Programmable Row VSYNC Interrupt, End of Scan Line POWER { GND HYSNC • • Two Cursor Flags Voo • Double Width, Double Height Attributes • Smooth Scrolling Forward or Reverse with Scroll Within Window or Its Inverse (Everything but the Window) • Proportional Spacing • Single + 5 V Power Supply The F16413 CRTC features programmable display format for up to 256 characters per row, 128 rows per frame, and 16 rasters per row. It has a programmable format for horizontal and vertical sync pulse delay (front porch), sync pulse width, and scan delay (back porch). Signal Descriptions Table 1 describes the CRTC signals. 7·27 F16413 Table 1 CRTC Signal Descriptions Mnemonic Name Description Voo Power + 5 V power supply. GND Ground Commond ground. Ao/RAo-A5/ RA5 Address Bus and Lower six bidirectional address bus and register address pins. Register Address Aa-A15 Address Bus Higher 10 address bus output.. 0 0-0 7 Data Bus Bidirectional data bus. CS Chip Select Active low input to enable read/write of the internal registers during peripheral access. RO Read Strobe Input used to read data fr{)m the internal peripheral registers. WR Write Strobe Input used to write data to the int'ernal peripheral registers_ RST Reset An active low input to Initialize the internal control and status registers IRQ Interrupt Request An active low output that indicates one of the programmable interrupt conditions has occurred. CCLK Character Clock Clock input to provide timing for synchronization and screen formatting 10 MHz maximum. RB1 Read Row Buffer Output, read row buffer number 1. WB 1 Write Row Buffer Output, write row buffer number 1. RB2 Read Row Buffer Output, read row buffer number 2. WB2 Write Row Buffer Output, write row buffer number 2. HOLD Hold Request Hold request output to the MPU. HOLOAI Hold Acknowledge Hold acknowledge input from the MPU when the CRTC works on the system memory; processor bus request when the CRTC works on dedicated video memory. HOLOAO Hold Acknowledge Hold Acknowledge output to a lower priority peripheral. CUR 1 Cursor 1 Cursor 1 output. CUR2 Cursor 2 Cursor 2 output. 7-28 F16413 Mnemonic Name Description HWS Horizontal Window Start Output indicating the first horizontal position of a window. HWE Horizontal Window End Output indicating the last horizontal position of a window. VWS Vertical Window Start Output indicating the first row of a window. VWE Vertical Window End Output indicating the last row of a window. PS Proportional Space Input causing an update of the RAM address counter; can also be used as a double wide attribute input. DH Double Height Input for double height character attribute. BLANK Blank Active low output signal to turn off the monitor video during horizontal and vertical retrace. HSYNC Horizontal Sync Active low output signal to provide horizontal sync timing. VSYNC Vertical Sync Active low output signal to provide sync timing. -----------------. RCo·RC3 Raster Count Address Outputs giving the current raster count value. -------------------- System Description Mode Control The F16413 CRTC can basically work in two system The mode register determines the pin assignment for configurations, i.e., on a local bus with dedicated video either system or remote bus operation. It is also used to memory or on the system bus with access to the main select contiguous or row/column address, non·interlaced memory. In the latter case, external row buffers must be or interlaced video, attribute delay and external provided, which are being loaded during DMA operation synchronization. It contains a reset control bit so the with the characters of the next followi ng row to be screen format may be reprogrammed anytime after a displayed. software reset. There are 33 registers implemented on the F16413 for Windowing and Scrolling mode control, screen formatting, and display control. Each of these registers is individually addressable using The status field may be used to provide a vertically split the lower six address pins when chip select is active. screen with the video field. The window feature of the Information can be read out from or written into the F16413 allows a defined window anywhere in the video register via the B·bit data bus. field, or splits the screen horizontally into two independent data fields. USing the split screen feature Screen Format requires programming the number of horizontally displayed characters in each data field into the assigned The horizontally displayable dimension of the screen, registers. horizontal front porch, sync pulse width, and back porch are programmable in character clocks. The vertically The soft scroll control register is used to enable soft displayable dimension of the screen is programmable in scroll, to select the area to be scrolled (either video field, number of rows. The vertical front porch, sync pulse window, or status field), and to select scroll rate and width, and back porch are programmable in scan lines. direction. The number of scan lines per row is 1 to 16. F16413 CPU/CRTC Memory Contention The CRTC 3·states the address bus during the horizontal and vertical blanking intervals. An interrupt is provided at the beginning of each blanking interval. Remote Bus Configuration During the blanking interval the CPU is free to access the dedicated video memory without disturbing the display during the active video. System Bus Configuration The F16413 is accessing the system memory during DMA cycles to load external row buffers. If the user provides one external row buffer, the DMA operation starts with the first character of the first scan line of each row and the data is displayed immediately. In this case the RB and WB signals are both active during the first scan line of a row. If two external row buffers are used, then one of them is being loaded with the data of the following row while the other one is sending its data of the present row to the CRT. Loading of the row buffers starts at the beginning of the first scan line of the previous row. 7·30 F16425 Packet Switching Frame Level Controller (FLC) Advance Product Information Microprocessor Product Description Status can be monitored by a series of maskable interrupt conditions or by reading eight directly The F16425 Packet Switching Frame Level Controller addressable status registers. (FLC) is a member of the F16000 microprocessor family that controls the transmission and reception of data Figure 1 is a block diagram of the F16425 controller. (message frames) in a network conforming to the Figure 2 shows how the F16425 interfaces with DTE and international CCITT HDLC protocol for applications in DCE. terminals, network access controllers, and related equipment at level 2 (frame level). It implements X.25 Signal Descriptions LAPB and portions of X.75, SDLC, and HDLC. It can be used with most MOS microprocessor families. Table 1 describes the signals for the F16425 controller. The F16425 controller can be used specifically in data terminal equipment (DTE), data circuit terminating equipment (DCE), and network nodes (point·to·point, Signal Functions switched, or nonswitched systems). It uses all basic commands and responses-normal response mode ODIN (NRM) and asynchronous balanced mode (ABM) with five 0, options. The CPU gives simple one·byte commands to 0, initiate link setup, disconnect and information transfer. 0, 0, 0, • 8·Bit and 16·Bit CPU Compatibility 0, • High·Density NMOS SI·Gate Chip 0, • 64·Pin DIP with 24 Registers at 8 Bits Do • DC to 2.5 Mb/s IRQ • One·Mbyte Direct Address Capability TSO • On·Board DMA to Transfer Messages to and from TCLK Memory RCLK RSI • Modem Interface Control Signals • Programmable Address Field and Global Address • Automatic Sequencing, Acknowledging, and Retransmission of Messages • Automatic Frame Check Sequence Generation and Test • TTL·Compatible RWEN • Single + 5 V Power Supply ADDRESS BUS • Separate Address and Data Bus • 8· or 16·Bit Bidirectional Data Bus CHIP CONTROL • Automatic Zero Insertion and Deletion for Transparency • NRZ or NRZI Serial Data • Programmable System Parameters -Primary Timer (TI) -Retransmission Counter (N2) -Window Size from 1 to 127 Frames GND POWER -Buffer length from 16 to 2K Bytes voo • Programmable Basic or Extended Control Field • I·Field Residual Last Character • X.25 LAPB, X.75 (Excluding Multilink), SDLC, HDLC, ADCCP 7·31 F16425 Figure 1 16425 Block Diagram READ/WRITE ENABLE RESET RWEN RST DAT:I::;:C~~:~: -~';;;------_1 ~:~ ~~~:~~ -5'=-----_1 GND ~~~-~~~-----1 ~ MODEM SIGNALS TRANSMlnER CLOCK TRANSMlneR OUT INTERRUPT REQUEST 110 CENTRAL REGISTERS CONTROLLER DATA BUS ADDRESS BUS ~=========~ A8·A15 RECEIVE ~~~~======~ A16·A19 FIFO RECEIVER CLOCK DMA HOLDS ANO HOLD ACKNOWLEDGE ~~~~=====::~ CONTROLLER -...:..::==--------1.____.J Figure 2 X.25 Interface ----------- PACKET VIRTUAL CALL PROCEDURE SYSTEM & PACKET LEVEL ----------- LEVEL (SETUP, MAINTAIN, SOFTWARE PROCEDURES FLOW CONTROL, CLEAR) PROCEDURES ----------- I I I I FRAME I FRAME LINK ACCESS F16425 LEVEL PROCEDURES ----------- I LEVEL PROCEDURES PROCEDURES I I I I SYNCHRONOUS PHYSICAL CIRCUIT PHYSICAL RS 232C LEVEL LEVEL I I DTE (USER) DCE (NODE) 7·32 F16425 Table 2 F16425 Signal Descriptions Mnemonic Name Description Chip Select CS Chip Select An active-low input to enable READ/WRITE of the internal registers during a peripheral access. Data Bus Do-D 15 Data A 16-bit bidirectional data bus. Register Ao-A4 Address Address bits 0-4 are output during DMA access or input during peripheral access; high-impedance output at all other times. A5 -A 19 Address Address bits 5-19 are output during DMA access; high-impedance output at all other times. Power • GND Ground Voo Power Supply +5 Volts Data Direction DDIN Data Direction In The bidirectional DDIN signal low equals WRITE to FLC: high equals READ from FLC for peripheral access. A DDIN signal low equals WRITE to memory; high equals READ from memory for DMA access. Interrupt IRQ Interrupt Request An active-low output indicating that one of the programmed interrupt conditions has occurred. Transmitter/Receiver RCLK Receive Clock Direct clock input; the RSI signal changes on the falling edge of the RCLK signal. RSI Receive Serial In A receive serial data input signal. TCLK Transmit Clock Direct clock input, the signal TSO signal changes on the rising edge of the TCLK signal. TSO Transmit Serial A transmitted serial output data signal. Out 7-33 F16425 Table 1 F16425 Signal Descriptions (Cont'd.) Mnemonic Pin No. Name Description Modem Control CD Carrier Detect An input signal CTS Clear to Send An input signal DSR Data Set Ready An input signal DTR Data Terminal An output signal Ready RTS Request to Send An output signal. Chip Control DMAE DMA Enable A high output when FLC has control of the system buses, and a low output at all other times; can be used to control external 3-state devices. HBE High Byte Enable An active-low input/output signal that enables READ/WRITE to the high- order byte of the data bus; input during peripheral access and output during DMA access. This signal is not used in the 8-bit mode. HLDAI Hold Acknowledge An active-low input from the CPU or higher priority DMA granting control In of the system buses. HLDAO Hold Acknowledge An active-low output to a lower priority DMA. Out HOLD Hold An active-low output requesting control of the system buses. <0 Au 256 jQ 151) Table 1 Signal Functions Mnemonic Pin No. Name Description Ao·A 12 2·10,21, Address Lines TIL·compatible input lines that identify the memory location 23·25 to be read CE 20 Chip Enable Programmable Input signal that latches the address and controls operating mode; active level is user·defined. CS 1, CS2 26, 27 Chip Select Programmable input signals that allow memory expansion; active level is user·defined. GND 14 Ground Supply and signal ground OE 22 Output Enable Input signal that controls outputs and provides fast data valid time °0·°7 11·13, Data Lines TIL·compatible output lines that contain the data read from 15·19 the addressed location Vee 28 Supply + 5 V power supply 8·18 F3569 64K ROM Advance Product Information Microprocessor Product Description Logic Symbol The Fairchild F35698192 x 8-bit (64K) mask-program- mable, read-only memory (ROM) is designed for use in 10 Ao 00 11 bus-organized systems requiring non-volatile memory A, 0, 12 storage. Because of its high speed, it readily interfaces Ao with all generations of NMOS microprocessors. A. 00 13 Fabricated with n-channel silicon-gate technology, the A4 O. 15 F3569 has industry-standard pinouts and is compatible A. with other available 28-pin 64K ROMs and EPROMs. As 0, 18 Ar Os 17 • Automatic Power-Down 25 A8 • Access Time (tAA) of 25.0 ns for F3569-25 and 350 ns 18 24 As 08 for F3569-35 21 A,. • Low Power Dissipation (440 mW, Maximum, Active; Or 19 55 mW, Maximum, Standby) 23 A11 • Fully TIL-Compatible CE • Three-State Outputs • Mask Programmable Enable Function 27 28 22 20 • Single 5 V Power Supply • Completely Static Operation GND: Pin 14 Vee: Pin 28 • Pin-Compatible with Other Standard 28-Pln 64K ROMs and PROMs The chip enable (CE) input of the F3569 controls the active and standby modes of operation; the output • Connection Diagram enable (OE) input controls the chip output and provides 28-Pln Dip fast data available time for high-speed microcomputer applications (see figure 1). Two chip select (CS) inputs are provided for memory expansion. The active levels of the CE and CS inputs, and the memory contents, are user-defined. The F3569 requires only a single + 5 V power supply, has TIL-compatible inputs and outputs, and, due to its static operation, requires no clocking o(refreshing. Signal Descriptions The input/output signal functions of the F3569 are described in table 1. 8·19 F3569 Figure 1 F3569 Block Diagram Qo Ql Q2 Qs Q4 Qs Q6 Q7 A12 All A10 Ag CHIP CS1/CS1 Y DECODER SELECT As 1·0F·32 BYTES INPUT BUFFERS CS2/CS2 A7 ADDRESS A6 INPUT BUFFERS 256 AL As 1 A4 2 en a:;l: As wO oa: 65536·BIT ENABLE A2 Oeo INPUT CE/CE (.)1/) CELL MATRIX WN BUFFER Al OLL ><0 Ao 256 PI) 150 Table 1 Signal Functions Mnemonic Pin No. Name Description Ao·A 12 2·10,21, Address Lines TIL·compatible input lines that identify the memory location 23·25 to be read CE 20 Chip Enable Programmable input signal that controls operating mode; active level is user·defined. CS 1, CS 2 26, 27 Chip Select Programmable input signals that allow memory expansion; active level is user·defined. GND 14 Ground Supply and signal ground OE 22 Output Enable Input signal that controls outputs and provides fast data valid time °0·°7 11·13, Data Lines TIL·compatible output lines that contain the data read from 15·19 the addressed location Vee 28 - Supply - - ,... _--- + 5 V power supply 8·20 F3570 64K ROM Advance Product Information Microprocessor Product Description Logic Symbol The Fairchild F3570 8192 x 8-bit (64K) mask-program- mable, read-only memory (ROM) is designed for use in 10 Ao Q. 11 bus-organized systems requiring non-volatile memory A, Q, 12 storage. Because of its high speed, it readily interfaces A. with all generations of NMOS microprocessors. A, 13 Fabricated with n-channel Silicon-gate technology, the ,.. Q. Q, 15 F3570 has industry-standard pinouts and is compatible As with other available 28-pin 64K ROMs and EPROMs. A" Q. 16 A7 QS 17 • Access Time (tAA) of 250 ns for F3570-25 and 350 ns 25 A" for F3570·35 24 As Q6 18 • High-Speed Data Valid Time of 120 ns 21 A,. • Low Power Dissipation (440'mW, Maximum, Active) Q7 19 23 A11 • Fully TTL·Compatible • Three-State Outputs ~ • Mask-Programmable Chip Select Active Levels • Single 5 V Power Supply 27 26 22 • Completely Static Operation GND: Pin 14 • Pin-Compatible with Other Standard 28-Pln 64K ROMs Vee: Pin 28 and EPROMs The output enable (DE) input controls the chip output and provides fast data valid time for high-speed microprocessor applications (see figure 1). Two chip select (CS) Inputs are provided for memory expansion. The active levels of the CS inputs, and the memory contents, are user-defined. The F3570 requires only a single + 5 V power supply, has Connection Diagram 28-Pln Dip II TIL-compatible inputs and outputs, and, due to its static NC Vee operation, requires no clocking or refreshing. A,. CS, Signal Descriptions A7 CS. A" A. The input/output signal functions of the F3570 are described in table 1. As As ,.. A11 A. OE A, A,. A, CE Q7 Ao Q. Os Q, Qs Q. Q. GND Q, (Top View) 8·21 F3570 Figure 1 F3570 Block Diagram A12 All Al0 A9 CHIP C§1/CS1 Y DECODER SELECT As 1·0F·32 BYTES INPI,IT BUFFERS CS2/CS2 A7 ADDRESS As INPUT As BUFFERS 256 1 ~ 2 I/) ~~ As WO CI~ A2 Oce •• 65536·BIT CELL MATRIX (.Jon WC'oI • Al ClIL. Ao ... ><0 256 Table 1 Signal Functions Mnemonic Pin No. Name Description Ao·A,2 2·10,21, Address Lines TIL·compatible input lines that Identify memory location to 23·25 be read CS" CS2 26,27 Chip Select Programmable Input signals that allow memory expansion; active level is user·defined. GND 14 Ground Supply and signal ground OE 22 Output Enable Input signal that controls outputs and provides fast data valid time 0 0-07 11·13, Data Lines TIL·compatible output lines that contain the data read from 15·19 the addressed location Vee 28 Supply + 5 V power supply 8·22 F35316/F68316 2048 x 8 ROM Microprocessor Products Description Logic Symbol The F35316/F68316 is a mask-programmable byte- organized MOS Read Only Memory (ROM) designed for use AD in bus-organized systems requiring non-volatile data storage. A, It is fabricated with n-channel silicon-gate technology. For 00 A2 ease of use, the F35316/F68316 operates from a single 0, 10 A3 +5 V power supply, inputs and outputs are TTL and DTL 02 11 A. compatible, and the device needs no clocks or refreshing F35316/F68316 03 13 As because of its static operation. O. 14 A6 05 15 A7 0, The F35316/F68316 is compatible with the F6800, F8 and 16 23 A6 other microcomputer families providing read only storage in 07 17 22 A9 byte increments. To facilitate memory expansion, the device 19 AlO contains three programmable Chip Select inputs providing CSt CS2 CS3 any combination of active HIGH or LOW or an optional DON'T CARE state coupled with output wired-OR capability. Chip 20 18 21 select code and memory content are user defined and are fixed during the masking process. VCC = Pm 24 GNO = Pin 12 The F35316/F68316 provides maximum circuit density, reliability and performance yet maintains low power disSipation and yields significant cost advantages over an EPROM approach. Connection Diagram 24-Pin DIP • 2048 x 8-BIT BUS-COMPATIBLE ORGANIZATION A7 Vee • FULLY STATIC OPERATION • 3-STATE DATA OUTPUTS FOR WIRED-OR CAPABILITY A, As • • • MASK-PROGRAMMABLE CHIP SELECTS FOR SIMPLIFIED MEMORY EXPANSION SINGLE +5 V ± 10% POWER SUPPLY TTL AND DTL-COMPATIBLE INPUTS As A. A3 A9 CS3* CSt· II • MULTIPLE SPEED GRADES A2 AlO tACC = 250 ns, 300 ns (F35316) A, CS2* tACC = 350 ns, 450 ns, 500 ns (F68316) • DIRECTLY COMPATIBLE WITH 2316E AD 07 • PIN COMPATIBLE WITH F2708 AND F2716 EPROMs 00 0, 0, 05 Pin Names Ao-A1O Address Inputs 02 O. CS1-CS3 Chip Select Inputs GND 03 00-07 Data Outputs (Top View) Absolute Maximum Ratings Voltage on Any Pin Relative • Programmable Chip Selects to GND -0.3 V to +7 V Operating Temperature O°C to +70°C Storage Temperature -65°C to +150°C Power Dissipation lW Stresses greater than those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device at Ihese or any other conditions above those indicated in the operating section of this specification IS not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. 8·23 F35316/F68316 Block Diagram AlO A9 As on A7 As . a: w :> III As .. I- :> ;!; A. on on w a: A3 A2 .. C C 16,384-BIT CELL MATRIX 128 l( 128 Al Ao DC Requirements Over operating temperature range Symbol Characteristic Min Typ Max Unit Vee Power Supply Voltage 4.75 5.0 5.25 V VIL Input LOW Voltage -0.5 0.8 V VIH Input HIGH Voltage 2.0 5.5 V DC Characteristics Over operating temperature and voltage range Symbol Characteristic Min Typ Max Unit Notes lee Vee Power Supply Current 110 rnA 1 liN Input Leakage Current 2.5 /lA 2 lOUT Output Leakage Current 10 /lA 3 VOL Output LOW Voltage 0.4 V lOUT = 1.6 rnA VOH Output HIGH Voltage 2.4 V lOUT = -200 /lA Notes on following page. 8·24 F35316/F68316 AC Characteristics (F35316) Over operating temperature and voltage range F35316-25 F35316-30 IEEE SymbolS Symbol Characteristic Min Max Min Max Unit Note TAVAV tCYC Cycle Time 250 300 ns TAVQV tACC Address to Output Delay Time 250 300 ns 4 TSLQV tco Chip Select to Output Delay Time 150 150 ns 4 TSHQZ tOF Data Hold After Deselection 10 150 10 150 ns 4 TAXQZ tOHA Data Hold After Address Time 10 10 ns 4 CIN Input Capacitance 7.5 7.5 pF 5 COUT Output Capacitance 12.5 12.5 pF 5 AC Characteristics (F68316) Over operating temperature and voltage range F68316-35 F68316-45 IEEE Symbol 6 Symbol Characteristic Min Max Min Max Unit Note TAVAV tCYC Cycle Time 350 450 ns TAVQV tACC Address to Output Delay Time 350 450 ns 4 TSLQV tco Chip Select to Output Delay Time 150 150 ns 4 TSHQZ tOF Data Hold After Deselection 10 150 10 150 ns 4 • TAXQZ tOHA Data Hold After Address Time 10 10 ns .4 CIN Input Capacitance 7.5 7.5 pF 5 COUT Output Capacitance 12.5 12.5 pF 5 Notes 1. AlImputs 5 5 V, TA = O°C 2. VIN ~ 0 V 10 5.5 V 3 Device unselected Your = 0 V to 5.5 V 4 Measured with 1 TTL load and 130 pF. tranSition tunes = 20 ns 5 Capacitance measured with Boonlon Meter 6, Timing Parameter Abbreviations All timing abbreviations use upper case characters with no subscripts. The mitial character is always T and is followed by four descriptors. These characters specify two signal pomts arranged In a "from-to" sequence that define a liming Interval. The two descriptors for each signal point specify the signal name and the signal transitions. I Thus the format IS' x x Signal name from which Interval is define_d_ _ _ _ _ +____--'t TranSition directIOn for first signal - - - - - - - - - - - ' I Signal name to which Interval IS defined TranSition direction for second signal - - - - - - - - - - - - - - ' The Signal definitIOns used In thiS data sheet are. The transitIOn deflnilions used In thiS data sheet are A = Address H = tranSition to HIGH 0== Data In L = tranSition to LOW Q:::; Data Out V = transItion to valid W = Write Enable X = tranSition to Invalid or don't care E = Chip Enable Z = transItion to OFF (high Impedance) 8-25 F35316/F68316 Timing Diagram ADDRESS ADDRESS X ADDRESS Y PROGRAMMABLE CHIP SELECTS YUH __________ OPEN __________- ( OUTPUT DATA VOl • DON'T CARE INPUT CONDITION OR INDETERMINATE OUTPUT STATE Custom ROM Programming Information The customer's unique program code pattern may be Fairchild Use Only submitted to Fairchild in several methods. The most SLNo. __________________________________ convenient and readily verifiable is in the form of 2708, 2716 Bid Control No. ____________________________ or 2732 EPROMs. Program code patterns may also be Field Sales Engineer _ _ _ _ _ _ _ _ _ _ _ _ __ submitted on Fairchild Formulator MKIII floppy disks or on HP Date Sent cassette tape in Formulator or MIKBUG* format. Customer Company Name _ _ _ _ _ _ _ _ _ _ _ _ __ Address _____________________________________ Customer Contact Name _ _ _ _ _ _ _ _ _ _ _ _ _ __ Phone No.~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ Customer Part No. _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___ Fairchild Part No. ______________________________ Customer Input Media Request for Return Media 02708 EPROM o Listing o 2716 EPROM o EPROM (include blank EPROMs) 02732 EPROM Chip Select Information o Floppy Disk HIGH LOW Don" Care o HP Cassette CS 1 0 0 o o Formulator Format CS2 0 0 o o MIKBUG Format CS3 0 0 o 'MIKBUG IS a Motorola trademark 8.-26 F35316/F68316 Formulator Format -:::0~1~1--1.1-:-2...J1-:-3_1L-:-4-J- 1~5--1.-:6--1.1-:-7...J1-:-B _11-::-9-J-1-::-10--1.1,,:,1_1....L...jf/ 1 M·6 1 M·5 1 M·4 1 M·3 1 M·2 1 M·l I M SOR L, Lo A3 A2 A, Ao T, To 001 000 011 D(n-l)loln-1)O Ont DnD CK, eKo SOR Start of record defined to be a colon (:) Type field. Length field defined to be the number 001000 ... D(n)l D(n)O Data field. of packed data bytes per record. Each record is (2' L) + 11 characters in Checksum field defined to be negative length inclusive of start of record. modulo 256 summation of all bytes Length a implies end of relocatable since start of record. A summation of module. all characters in a record, including the checksum, will result in zero. Address field. All characters other than SOR are ASCII hexadecimal (0-9, A-F). MIKBUG* Format I Leader (Nulls) (CR) CC = 30 • CC = 31 CC 39 (LF) Header Oat. End-ai-File (NULL) Record Record Record Frame Frame 1. Slart-ol-Record 53 S 53 S 53 S 2. Type 01 Record 30 31 1 39 9 31 31 30 3. Byte Count 12 16 G3 4. 32 36 33 5. 30 31 30 6. 30 31 30 Address/Size 0000 1100 0000 7. 30 30 30 B. 30 30 30 9. 34 39 46 48-11 98 FC (Checksum) 10 10. 38 38 43 34 44-0 32 34 Data CD• -- "" IT] 32 -- 41 -- 38 ~h.CkSUm) 39 9E n (Checksum) 45 S Start of record 7 -bit ASCII) which are converted to BCD. CC Type of record Two BCD digits are combined to make one Byte Count Two frames equal one byte. Frames 3 a-bit byte. The checksum is the ones through n are hexadecimal digits (in complement of the summation of a-bit bytes. 8-27 F35316/F68316 Ordering Information* Part No. Order Code F35316·25 F3531625P, F3531625S F35316-30 F3531630P, F3531630S F68316·35 F3531635P, F3531635S F68316·45 F3531645P, F3531645S P = Plastic DIP = S Ceramic DIP * For extended temperature or military range, call factory. 8·28 [!] 1 !INTRODUCTION r;;i2 ! ORDERING AND PACKAGE ~ INFORMATION 1C!J!F8 MICROCOMPUTER FAMILY 1 0 1 CONTROLLER FAMILY /~IF6800 MICROPROCESSOR FAMILY 1[1J! F16000 MICROPROCESSOR FAMILY / W ! ROM PRODUCTS DEVELOPMENT SYSTEMS AND SOFTWARE /[!QJ 1APPLICATIONS /[!!] ! RESOURCE AND TRAINING CENTERS! 1~lsALES OFFICES Section 9 Development Systems and Software General The following is data that describes the design aids available for hardware and software development and emulation in the creation of Fairchild microprocessor- based systems. • 9-3 Development Systems and Software 9·4 EMUTRACTM Emulation and Tracing System Advance Product Information Microprocessor Product DesCription • The Breakpoint Comparator examines the 48·Blt Machine-State Word During Each Bus Cycle, and Can The Fairchild EMUTRAC is a powerful, cost-effective, in- Detect Eight Simultaneous Breakpoint Conditions. circuit emulation and tracing system that supports micro- • A Programmable Micro-Sequencer Responds During computer system development. The EMUTRAC system Each Cycle to the Detected Condition by: allows simultaneous and interactive hardware and software - Conditional Change In Sequence, with "Jump" or development, which permits control, interrogation, revision, "Step" Functions; and debugging of a microcomputer system in its own real- - Conditional Update of Two Independent Delay· time environment. Software may be developed and debug- Counters; ged with or without complete prototype hardware. - Optional Issue of Four Independent Pulses, to Sync External Tests; • Single Controller Fits Within the F8-1 Chassis. - Conditional Recording of One Trace·Frame; • Interchangeable External Modules Individually Support - Optional "Pause:' "Interrupt:' etc., Functions. F3870, F6800, F6809, and F9445 Microprocessors. • Each Trace·Frame Word Captures 64 Bits, Composed of • EMUTRAC Provides Optional Substitution for CPU and the Address Issued During Bus·Cycle and Machlne·State 1/0 Peripherals, as Well as Memory, in Prototype Word. Systems. • Interactive HardwarelSoftware Debugging Is Simplified, • Address·Steering Allows Selective Substitution for Proto- with Symbolic LocatlonNariable-Names, Instruction type System Memory, In Blocks of 64 Words. Mnemonics, and Signal· Names. • 8K Words (or 16K Bytes) of Mappable Substitution· RAM • Simple, English-like Commands Control the Emulation Is Provided, Using 2114 or 2148 Devices. Process. • 4-Bit Tags, Which Aid In Breakpoint·Marking, Can Be • Command Language Provides REPEAT, Flle·INCLUDE, Associated with Individual Substitution-Memory Loca· and MACRO Capabilities, as Well as Sesslon·Logfile and tlons, 256-Locatlon Blocks of Prototype Memory, or 1/0 Selective-Printout Generation. Device Accesses. • A Tag, User·Asslgnable Probes, Bus Data, and Functions of Key Microprocassor and EMUTRAC·lnternal Signals Comprise the 48-Blt Machine·State Word, Which Is Re· evaluated for Each Bus Cycle. • TMEMUTRAC is a trademark of Fairchild Camera and Instrument Corporation. 9-5 EMUTRAC System Function Operator Interface The EMUTRAC control software, which runs on the FS-I, has The EMUTRAC system combines the functions of console simple setup commands that provide explicit control of the operations, a symbolic debugger, a logic analyzer, and a memory mapping, tag attachment, breakpoint definition, substitution CPU and memory. The system consists of an and sequencer action functions. Additional commands pro- EMUTRAC controller card that plugs into the FS-I develop- vide the block load/dump functions for RAM definition, as ment system and an external module that interfaces the well as the interactive examine/deposit-search operations controller to the target system (see figure 1). usually provided in a debugger. Simple commands provide start, stop, and single-cycle control for the emulation; other The EMUTRAC system supports all Fairchild commands control the operator interface providing log file microprocessor families, with processor-independent and print generation, checkpoint creation and retrieval, and logic on the controller card and logic unique to a REPEAT, INCLUDE, and MACRO commands. The control specific processor residing in the external module. software provides an easy-ta-use, concise command struc- Different microprocessors can be supported using ture, with HELP commands to aid on-line learning, yet aids different EMUTRAC modules with the same EMUTRAC the accomplished user through command flies to perform controller card. repetitious tasks. Figure 1 EMUTRAC System FSI CHASSIS CPU/DISK 1-------- ------------1 I EMUTRAC I I EMUTRAC SYSTEM I CONTROL I SOFTWARE I I I CRT TERMINAL I EMUTRAC I EMUTRAC I CONTROLLER PC BOARD MODULE I I I I I __ ...J LAB OSCILLOSCOPE OR LOGIC ANALYZER 9-6 EMUTRAC Memory Substitution and Initialization Trace-frame generation Is controlled by the programmable The EMUTRAC system's RAM can selectively substitute for sequencer. Detection of a breakpoint can trigger capture of sections of the prototype system's memory. Thus, table- consecutive machine cycles, and counter controls can modifications or code-patches can be made to RAM,-and "center" this capture window as desired. Additionally, the the results verified, without time-consuming PROM·program- trace log can be considerably filtered to include only those ming or ROM-masking. Similarly, the RAM can be used as events surrounding the trigger that satisfy additional condi- memory-expansion for the. prototype system, permitting tions, thereby making better use of available trace memory. extra-large programs (with diagnostic or debugging aids) to Alternatively, short packets of trace information can be be used during development and test. recorded In response to multiple trigger conditions encountered during testing. Block-initialization of EMUTRAC RAM or prototype RAM (or of any control-RAM within the EMUTRAC) can be easily Software Timing accomplished with the "load from " The software timing feature, which works under the control command. The complementary "dump into of the breakpoint sequencer, allows the user to acquire " provides a simple way to capture the current statistics on the performance of the microprocessor system contents of any memory. Together, these commands allow software modules. The timer allows the user to measure the "snapshots" to be taken, for later comparison and analysis execution time of a block of code, as well as the number of or for quick state-restoration between test runs. times that block of code was used during the execution of a given program. This permits the user to estimate the per- Operator Control formance of the total system and provides direction for The console functions of the EMUTRAC system consist of optimization efforts. It can also be used to identify failing four groups: run control, memory examine and depOSit, I/O sequences that take significantly smaller or larger amounts register examine and depOSit, and CPU register examine of time than antiCipated. and deposit. The run control comprises STOP, RESET, START, CONTINUE, and single-Instruction STEP commands. Command·Language Features The memory, I/O register, and CPU register examine and Commands to the EMUTRAC system are issued as a sequence deposit controls allow the user to inspect and modify the of simple, English-like sentences; diagnostic messages in state of the microprocessor, I/O device, and system memory response to command errors, and the HELP command registers. Locations examined can be displayed in symbolic assist new users In operating the system. The accom- form, and modifications can be made in terms of user- plished user is assisted by language features such as: • defined symbols and mnemonic instruction codes. IF ( ... ) ELSE ( ... ) Program Breakpoints The breakpoint feature provides controlled Interruptions or which allows conditional command-issue, normal program flow when the user-selected pattern of status conditions eXists, so that memory, registers, and REPEAT ( ... ) CPU status can be Interrogated and traced. To aid detection of ranges or scattered instances of address- or I/O-access, which reissues a set of commands several times, 4-blt-per-location tags are provided in EMUTRAC memory; thus, improper memory WRITE operations, access to non- INCLUDE existent memory or I/O devices, and references to key variables are all simple to identify. The EMUTRAC break- which issues a pre-recorded sequence of commands, and pointing facility is extremely powerful; up to eight indepen- dent breakpoints can be simultaneously monitored. MACRO ( ... ) which constructs sequences with replaceable elements. Real·Time Trace Control The tracing feature of the EMUTRAC system functions like During the emulation, all commands are recorded In a a dedicated logic analyzer, giving the user a record of up to session-log file as they are issued; this file could, for 255 previous events. The "audit trail" thus created can be instance, be printed as documentation of test results. used to find the cause of system failure. The EMUTRAC The run can later be duplicated, or extended, by simply system, however, offers much more than a normal logic Issuing the saved log-ciata as commands with an INCLUDE analyzer. statement. 9-7 EMUTRAC 9-8 F8 and F387X Formulator Microprocessor Product Description The top of the line is the Formulator Mark IIiFO. This system is identical to the Mark III, except it interfaces to The microprocessor system designer can create the iCOM dual-drive floppy disk. hardware and software development systems for the F8 and F387X by selecting modular subassemblies from Three growth packages are available for Mark I, Mark II, Fairchild's line of F8 and F387X design aids. and Mark III expansion. Growth Package I upgrades the Development may start with a Formulator Mark I single- Mark I system to the Mark II level. Growth Package II board system, then expand to more sophisticated Mark II converts the Mark II to the full Mark III level. Growth or Mark liFO development systems than can handle both Package III upgrades either the Mark II or Mark III to the software and hardware development (see figure 10-1). Mark liFO or the Mark IIiFO floppy disk configurations. Future growth may lead to a complete Formulator Mark III with intelligent control panel, power supply and Other boards are available as options for all five accessories, or to the top of the line Formulator Mark Formulator configurations to increase the flexibility of IIiFO with floppy disk drives. the units by adding to their capabilities_ These include 4K-byte RAM, 4K-byte PROM, and 16K-byte RAM boards, Three growth packages plus a selection of optional as well as an 1/0 light board, a communications board modules provide a practical method for upgrading the with UART, a byte-parallel board for peripheral interface, single-board Mark I to either the Mark II or Mark liFO, or and a PROM programmer. to the maximum system configuration Mark III or Mark IIiFO. Using the growth packages, the designer can begin sophisticated system application programs at very low cost and then upgrade the development tools in relatively inexpensive steps at a later time. The most elementary configuration, called the Formulator Mark I, includes a processor module that contains an F8 CPU, program storage unit that includes a debug program, dynamic and static memory interface circuits, 1024 bytes of random access memory, and the necessary buffers and other components for hardware development. It also includes a 13-slot card cage, an 1/0 cable kit, and a power cable. The second level, the Formulator Mark II, includes all of the Mark I components plus a memory board with 16 kilobytes of RAM and the complete Formulator operating system, designated FOS. The FOS provides complete software development capability, including an assembler, editor, and debug package, and drivers for a teletype or the TI Silent 733 terminal. The third level, the Formulator Mark liFO, is identical to the Mark II with the addition of interface cards and cables for an iCOM F03712 dual-drive floppy disk system and Fairchild 00S4 Floppy Disk Operating System. The fourth level, the Formulator Mark III, includes an intelligent control panel, a serial communications module, a quad 1/0 module, an attractive cabinet, and a power supply. Also included are 16K bytes of RAM, the Formulator processor module, and the Formulator operating system. g.g F8 and F387X Formulator 9-10 FS-I Fairchild System-I Advance Product Inlormation Microprocessor Product Description Multi·User System The Fairchild System· I (FS·I) is a versatile, multi·user System features include: development system designed to support software development and hardware prototyping for applications • Fully Equipped lor Four Timesharing Users using Fairchild microprocessors, including the F8, (Expandable to Eight Simultaneous Users with F3870, F6800, F6809, F9445, F16000, and such upcoming Additional Terminals and Cables). microprocessors as the F9450. • A 16·Bit CPU with 128K·Byte RAM and F9445 Instruction Set. Three principal versions of the FS·I are available: The • A Winchester and a Double·Density Floppy Drive FS·I Standard System, the FS·I Multi·User System, and Provide Approximately 10M·Byte of Mass Storage. the FS·I Entry·Level System. Numerous software and • Memory Management and Protection Unit (MMPU) hardware options are available that operate under Board with 384K Bytes 01 RAM (Gives the System Fairchild's Interactive Multi·User Disk Operating System 512K Words 01 RAM). (1M DOS). The FS·I also supports the in·circuit emulation • I/O Controller Board Provides Winchester/Floppy Disk and tracing (EMUTRAC™) system for the F3870, the Controller Interlace. F6800, F6809, and the F9445 microprocessors. (For a • Nine Asynchronous Serial RS·232C Ports (Up to 19.2K description of the EMUTRAC system, see EMUTRAC Baud) Provide Support lor CRT Terminals, Optional Advance Product /nformation.) Letter·Quality Printer, Modem, and Other Serial Devices. Standard System • One Synchronous Serial RS·232C Port (Up to 19.2K Baud) and Selectable Protocols, such as BISYNC, System features include: ODCMP, SDLC, and HDLC. • PROM Programmer Port to Interlace to tlte Optional • CPU with 128K·Byte RAM and F9445 Instruction Set. Fairchild PROM Programmer Unit. • A Winchester and a Double·Density Floppy Drive • Parallel Printer Port (Centronics·Compatible Provide Approximately 10M·Byte 01 Mass Storage. Interface). • 1/0 Controller Board Provides Winchester/Floppy Disk • Programmable Real·Time Clock. Controller Interlace. • Four CRT Terminals. • Nine Asynchronous Serial RS·232C Ports (Up to 19.2K • Multi·User Version of 1M ~OS, System Processors, Baud) Provide Support lor CRT Terminal, Optional and System Utility Programs (see "System Letter·Quality Printer, Modem, and Other Serial Software"). 9 Devices. • BASIC Language Interpreter with Interface to Custom • One Synchronous Serial RS·232C Port (Up to 19.2K F9445 Assembly Language Programs. Baud) and Selectable Protocols, such as BISYNC, • FS·I Diagnostic Programs. OOCMP, SOLC, and HOLC. • Provides Full Support lor the F9445 and lor the PEP • PROM Programmer Port to Interlace to the Optional 45 Microcomputer System. Fairchild PROM Programmer Unit. • EMUTRAC Can Easily Be Added to the Multi·User • Parallel Printer Port (Centronics·Compatible System. Interlace). • Programmable Real·Time Clock. Entry·Level System • One CRT Terminal. • Single·User Version 01 1M DOS, System Processors, System features include: and System Utility Programs (see "System Software"). • A 16·Bit CPU with 128K·Byte RAM and F9445 • BASIC Language Interpreter with Interlace to Custom Instruction Set. F9445 Assembly Language Programs. • Two Double·Density Floppy Disk Drives Provide • FS·I Diagnostic Programs. Approximately 1M·Byte of Mass Storage. • Provides Full Support lor the F9445 and lor the • 1/0 Controller Board Provides Floppy Disk Controller PEP 45 Microcomputer System. Interface. • Hardware and Software Upgradable to Multi·User • Nine Asynchronous Serial RS·232C Ports (Up to 19.2K System. Baud) Provide Support for CRT Terminal, Optional • EMUTRAC Can Be Added to the Standard System. Letter·Quality Printer, Modem, and Other Serial Devices. ™ EMUTAAC is a trademark of Fairchild Camera and Instrument Corp. 9·11 FS·I • One Synchronous Serial RS·232C Port (Up to 19.2K • Expansion Slots for Fairchild's Optional 1/0 Baud) and Selectable Protocols, such as BISYNC, Controller Boards, Optional EMUTRAC Controller DDCMP, SDLC, and HDLC. Board, Memory Expansion Boards, MMPU Board, and • PROM Programmer Port to Interface to the Optional Industry·Standard, Nova~ 1/0·Compatlble Interface Fairchild PROM Programmer Unit. Boards. • Parallel Printer Port (Centronics·Compatible • Depending Upon System Configuration, the Interface). Mainframe Contains a Single 10M·Byte Winchester • Programmable Real·Time Clock. and a Single 0.5M·Byte Double·Density Floppy Disk • One CRT Terminal. Drive or Two 0.5M·Byte Double·Denslty Floppy Disk- • Single·User Version of IMDOS, System Processors, Drives. and System Utility Programs (see "System Software"). The MMPU board expands the phYSical address space of • BASIC Language Interpreter with Interface to Custom the FS·I to 4M words by performing logical·to·physical F9445 Assembly Language Programs. address translation. This board is required for multi·user • FS·I Diagnostic Programs. system software. With its 384K bytes of RAM, the MMPU • Full Support for the F9445 and for the PEP 45 board extends the FS·I memory to 256K words. Microcomputer System. • Hardware and Software Factory·Upgradeable to Hardware Options Standard or Multi·User System. • EMUTRAC and MMPU Can Be Added to System. The FS·I systems support the following Fairchild· supplied hardware options: System Hardware • Additional I/O Controller Boards that Provide The hardware comprising the FS·I development system is Asynchronous RS·232C Ports (Up to 19.2K Baud) in housed in a single enclosure that contains the Sets of Eight, a Synchronous RS·232C Port for each mainframe CPU, 1/0 board, optional boards, and disk I/O Controller Board, Data Channel Interface to Disk drives. Units, and a PROM Programmer Port for each I/O Controller Board. The mainframe consists of: • Fairchild's PROM Programmer Unit. • MMPU Board that Provides Memory Mapping and • Single·Board 16·Blt CPU with 128K Bytes of RAM, Protection Expansion In Increments of 384K Bytes, 4K·Byte PEPBUG45 PROMs for Bootstrapping the Optional Multi·User Software Allows the MMPU Board System, Real·Tlme Clock, an RS·232C·Compatible to Support Eight Simultaneous Users. Port, and a Centronics·Paraliel Compatible Port. • Memory Expansion Board that Provides 384K Bytes • Power Supplies. of Additional RAM (Requires an MMPU Board In the • 1/0 Controller Board with the Following: Chassis). • Eight Asynchronous Serial RS·232C Ports, with • EMUTRAC System Controller Board that Provides the Four Ports Having Full Modem Control and All Hardware Interface Between the CPU Board in the Ports Having Data Rate Selectable Up to 19.2K FS'I and Processor·Speclflc EMUTRAC Modules. Baud, that Allow Timesharing by Up to Eight • EMUTRAC Modules and EMUTRAC Control Software Concurrent Users on Systems Equipped with that Support the F3870, the F6800, the F6809, and the MMPU Board and Multi·User Operating System F9445 Microprocessors. Software. • Additional CRT Terminals. • One Synchronous Serial RS·232C Port (Up to • Dot Matrix Printer-Texas Instruments Model 810 19.2K Baud) and Selectable Protocols, such as Basic RO Terminal (150 CPS), Centronics Parallel BISYNC, DDCMP, SDLC, and HDLC. Interface, and Cable. • A Parallel Data Channel Interface Compatible with • Daisywheel Letter·Quality Prlnter-Qume Model Shugart Associates System Interface for Sprint 9145 with Bidirectional Forms Tractor (45 CPS), Communicating with Disk Units. Serial Interface, and Cable. • 8·Blt Parallel Port to Interface with Optional Fairchild PROM Programmer. • A Total of Nine Asynchronous Serial Ports (RS·232C· Compatible, DB25·Pin Female Connectors). • One Parallel Printer Port (Centronlcs·Compatible Interface, DB25·Pin Connector). • Nova is a .registered trademark of Data General Corp. 9·12 FS·I This powerful software package, which is included with PEPBUG45 The PEPBUG45 program is a virtual the standard, multi-user, and entry-level systems, offers console and debugging tool for F9445 advanced capabilities that the user would normally absolute assembly language expect from a much larger system, such as: programs. The PEPBUG45 program is also available in PROM. • Multi-User Timesharing • System Executive, Including File Management PEPLlNK45 Provides capability to download System with Version Numbers for Automatic Backup programs from the FS-I to PROM or • Memory Management and Protection by Memory RAM on the PEP 45 microcomputer Mapping system. • Password Protection • Interactive Command Language and Command Files Utility Library Implements the utility functions listed • Multiple Directory Devices in the IMDOS and utility library users • Device-Independent I/O guides. • Hard Disk, Magnetic Tape, Modem, and Real-Time Clock Support PHONE The PHONE program establishes • Documentation Aids communication between the FS-I and • Concurrent Processing and Spooling a modem or telephone line. Software switches govern communication protocols. System Software SCRIPT TheSCRIPT program processes a text The interactive multi-user disk operating system (IMDOS) file that contains SCRIPT commands is the principal operating system for the FS-I. In addition to produce an aesthetically pleasing to being an operating system, the IMDOS includes the document. following features that are useful for developing F9445-based systems: TYPESET The TYPESET program processes a text file that contains TYPESET IMDOS Single-User Supervisor-The commands to produce an supervisor manages the FS-I aesthetically pleasing document. resources and controls the 110. • DEBUG The DEBUG program is a debugger IMDOS Multi-User Supervisor- The supervisor for F9445 macro assembly language manages the FS-I resources for up to programs. eight simultaneous users, controls the 110, and interfaces transparently DIAGNOSTICS A series of programs that test the to the MMPU board (included only FS-I hardware. The diagnostic with the multi-user system). programs are available on diskette in a version suitable for downloading to IMDOS Executive-The executive provides an F9445-based system. the command language interface between the user and the supervisor. BASIC Language interpreter with interface to custom F9445 assembly language EDIT The EDIT program provides the ability programs. to create and modify text files. MACRO The MACRO program is the macroassembler for F9445 macro assembly language. RELOAD The RELOAD program is used to link relocatable macro assembly language programs to create executable F9445 absolute assembly language programs. 9-13 FS·I Software Options F9445 REX A real-time executive for F9445-based systems. The REX F9445 An extended subset of FORTRAN66 system allows creation of custom MICRO FORTRAN that interfaces with custom F9445 REX programs, linkable using .assembly language subroutines. RELOAD. MICROFORTRAN produces "ROMable" F9445 code and can be F9445 PEPBASIC A diskette version of PEPBASIC operated under the real-time (supplied on PROM with the PEP 45 executive (REX): system). A 2K-word subset of BASIC. which accepts abbreviations, that is F9445 PASCAL A Jensen and Wirth-compatible extendable with custom F9445 PASCAL. The F9445 PASCAL assembly language subroutines. compiler generates F9445 code and interfaces with custom F9445 EMUTRAC Control Optional EMUTRAC control software assembly language subroutines. Software packages provide support for each processor-specific- EMUTRAC FS-I/PEP 38 Includes F8/F3870 cross assembler module. (Refer to EMUTRAC System Software and program for downloading to the Advance Product Information.) PEP 38 system. In addition, all Fairchild software for the FS,I is FS-I/PEP 68 Includes F6800 cross assembler, independently available without system purchase under System Software F6809 cross assembler, F6800-to- an ilppropriate software license agreement.' F6809 translator program, and program for downloading to the PEP Dimensions and Power Requirements 68 system. The FS-I standard mainframe enclosure measures only F16000 Cross Assembler, debugger, and 26 inches long by 19 inches wide by 13 inches high. It Software down loader allow the FS-I to requires a 115 V, 60 Hz ac power source. A 50 Hz system generate 16000 code that can be is also available. downloaded to an F16000-based system. 9-14 PEp·45 Prototyping, Evaluation and Programming Board Advance Product Information Microprocessor Product Description Software Support The Fairchild PEP-45 is a single-board microcomputer for In addition to serving as an efficient stand-alone evaluation Prototyping, Evaluation, and Programming of microproces- module, the PEP-45 is designed to operate as a key module sor-based system applications using the F9445 micro- of the FS-I development system. A PEPLINK utility transpar- processor. When used with the Fairchild System-I (FS-I) ently couples the FS-I video terminal to the PEP-45 board. development system, the PEP-45 board provides capability for executing and debugging software directly on the F9445 A powerful PROM-based PEP BUG debugging monitor pro- microprocessor. vides commands for trouble-shooting assembly language programs and for developing and testing peripheral circuits • Stand-alone Prototyplng, Evaluation, and Programming and custom interfaces. A PROM-based PEP BASIC language Board. allows programming in a high-level language. • Provides a Powerful Development Tool to Support F9445 Microprocessor-based System Development. Hardware Specifications • Utilizes All the Advantages of the F9445 Microprocessor, with Its Powerful Instruction Set and High Throughput. Microprocessor • Memory Options for Bipolar and NMOS Memorles_ CPU F9445 • Interfaces with IEEE 796 Standard Bus_ Data word size 16 bits • Buffered F9445 bus_ Instruction word size 16 bits • On-board EPROM programmer_ • Adapts to 16K or 32K Byte EPROMs or 64K Byte Masked Address capability 128K bytes ROMs_ Console controller F9470 • Standard- and High-Speed RAM Options. • Console Commands. Memory • Two Serial I/O Ports_ RAM 8K bytes (4K words) static RAM • 16-Blt Parallel Input/Output. (or optional high-speed RAM) • Four Interrupt Sources_ ROM Eight sockets for 16K bytes of • Five Status Llnes_ F2716 EPROMs (8K words), or up • On-board +12 V and +25 V Voltage Converter_ to 32K bytes using F2732 EPROMs • Requires Single +5 V Power Supply. (16K words), or masked 64K byte The PEP-45 board is primarily intended for use in hardware prototyping and software development applications. It may also be tied to a host computer, such as the FS-I, for large program editing, assemblinglcompiling, and general file storage and handling. Cross-assembler software packages Expansion ROMs using F3564 External memory in any combina- tion of RAM or ROM up to 64K bytes maximum (in 16-bit-wide only) a are available for creating machine-executable programs in formatted form. These programs may be down-loaded from Input/Output the host computer system into the PEP-45 board via one of Parallel 110 Two TTL-compatible, 16-bit 110 the two serial 110 channels. Since the PEP-45 board can ports (one input, one output) operate in a transparent fashion, it may be placed in-line Serial 110 Two programmable, asynchronous between the user's in-house terminal and the host compu- channels, with RS-232 interfaces. ter, giving the PEP-45 the power of the host. Each channel is software-select- able to a baud rate of 110, 300, Also useful for incoming inspector of F9445 parts and as a 1200,1800,2400, or 4800 baud microcomputer training tool, the PEP-45 interacts with the user at the control terminal, with prompts that assist pro- Real-Time Clock Continuously selectable real-time gramming. The control terminal may be a video terminal, clock interrupts from approxi- printer terminal, or from a microcomputer control console. mately 200 !AS to 200 ms 9-15 PEP·45 System Buses Power Supply Dual backplane buses PI-An 86-pin asynchronous sys- Requlrements 1 +5 V ±5% at 3.5 A (typ) tem bus compatible with standard Multibus 16-bit slave boards and Environmental multi-master option Requirements P2-A 50-pin buffered F9445 bus Temperature O·C to +50·C that allows complete expansion of Humidity 0% to 90% (noncondensing) processor capabilities and faster operating speeds Physical Envelope 1/0 buses J1-A 9-pin RS-232C serial 1/0 Dlmenslons2 interface for control terminal Height 10.0 (254) J2-A 9-pin RS-232C second Length 12.0 (305) serial 1/0 interface for a serial Thickness 0.75 (19.05) printer or a host computer Weight 17 oz. (approximately) P3-A 40-pin applications con- Note. nector with two parallel 1/0 ports 1. Power may be applied to the board either through the card..,dge back- (one input and one output), and plane connector or by connection of discrete wires to the board. with status and control bits. May 2. All dimensions are in inches and millimeters (in parentheses). be used for connection to the Fairchild cannot assume responsibility for use of any cir- microcomputer control console or cuitry described other than circuitry embodied In a Fairchild to a high-speed parallel printer product. (Centronics-type) Connectors P1 - An 86-contact, double-sided Fairchild reserves the right to make changes in the circuitry edge connector on 0.156" centers or specifications at any time without notice. P2 - A 5O-contact, double-sided edge connector on 0.100" centers J1, J2-9-pln, D-type subminia- ture right-angle connectors P3-A 40-pln, Ootype subminIa- ture right-angle connector Ordering Data Part Number Product Code Description PEP 9445SFX A F944516PEP PEP-45 Board with 8K byte PROM sockets populated with PEPBASIC and PEPBUG firmware. Firmware carries copywriter notice. Minimum of four PROM sockets will not be populated. PEP-45 Users Guide, PEPBASIC, and PEPBUG Users Guide supplied. PEP9445SXX A F944516PEP PEP-45 Board with 8K byte static MOS and eight PROM sockets not populated. PEP-45 Users Guide supplied. No firmware Included. PEP 9445HXX A F944520PEP PEP 9445 Board with 8K byte high speed RAM and PROM sockets not populated. PEP-45 Users Manual supplied. No firmware or users guides included. 9-16 PEP 68 System Single-Board Microcomputer Development System Advance Product Information Microprocessor Product Description • Single· Board, Stand·Alone System • Processor Options-6S02, 6S0S, or 6S09 The PEP 68 System is a single·board microcomputer • Asynchronous Multibus· Compatible specifically designed to aid microprocessor • Auxiliary Synchronous 6S0X Bus hardware/software designers in designing, prototyping, • Programming Socket for 2716 or 2732 EPROMs and debugging their 6802·,6808·, or 6809·based system. • SK-Byte System Monitor in ROM A powerful, ROM·based debugging monitor provides • 9K Bytes of Static RAM-SK User, 1K System (Write· commands for trouble·shooting machine·language Protectable Segments) programs. Other monitor commands provide for easy • Six Sockets for User·Supplied ROMIEPROM (2K, 4K, development and testing of peripheral circuits and or SK Types) custom interfaces. The monitor includes a full • Sixteen Possible Memory Map Configurations complement of utility routines to make the (Switch-Selectable) hardware/software/firmware design cycles as easy as • Two High-Speed Audio Cassette Tape Interfaces possible. • Two Independent Serial 1/0 Channels-RS-232-C • Independent Baud Rate Selection-50 Through The PEP 68 System is useful as a microcomputer 19.2K bps training tool. Its friendly interaction with the user at the • Connector for Parallel Printer (Centronics Type) control terminal, through its liberal use of prompting, • Six S-Bit Parallel I/O Ports Plus Controls makes procedures easy to learn for the beginner. The • Three Programmable 16·Bit Binary Timers system can be operated using only a serial display • + 5 Volt-Only Operation terminal and a power supply. Since the system possesses two separate bus connectors, expansion with external memory or peripheral boards is simply a matter of providing a backplane connection. Thus, the PEP 68 System can act as a bus master in a multicard system. II *Multibus is a trademark of Intel Corporation. 9·17 PEP 68 Block Diagram CRT Terminal Secondary Channel Connector Connector Multibus Edge Connector Auxiliary Synchronous Bus Edge Connector General Purpose 110 Parallel Printer Connector 110 Edge (Also for General· Connector Purpuse 110) Hardware Description on the other hand, allows for system expansion with peripheral boards that use the industry-standard The PEP 68 System is a single-board, stand-alone Multibus interface. The asynchronous aspect is microcomputer utilizing either a 6802, 6808, or 6809 accomplished by stretching the CPU's system clock. microprocessor as its central processing element. The Both bus interfaces on the PEP 68 System can system may be connected to a larger, host computer simultaneously connect to external peripheral boards. system to utilize that system's file storage, editing, and However, the PEP 68 System can be the only master assembling capabilities. Thus, source language central processor board in the system. programs can be created, edited, and assembled on the host computer system using PEP-UP cross-assembler Memory software packages. The resulting machine-language programs can then be downloaded into the PEP 68 The PEP 68 System contains 8K bytes of on-card static System on-board RAM, executed, and debugged. RAM storage for user application programs. Each 4K-byte segment can be separately write-protected by Dual Bus Interfaces means of either an on-card switch or by signals at the bus edge connector. There are an additional 1K bytes of The PEP 68 System can also serve as the central RAM for use by the board's ROM monitor. A total of six processor in a multi board system with connections to ROM or EPROM sockets is provided on-board. Each can peripheral boards accomplished via a bus interface and be jumpered for either 2K, 4K, or 8K-byte devices, i.e., the cardcage backplane. It has two separate bus many of the various 24-pin ROMs or EPROMs. Normally, interfaces: one synchronous and one asynchronous. The one or two of these sockets contain the FAIRBUG/68 synchronous bus interface includes the system CPU monitor ROM, but if desired, they can be used for user signals and allows for expansion using synchronous code instead. 680X peripheral boards. The asynchronous bus interface, 9-18 PEP 68 All on-board memory and I/O address decoding is done interfaces are driven by code contained within the through the use of a bipolar PROM. This PROM and the monitor, thus minimizing the required hardware circuitry. four DIP switches tied to it allow the user to select one The recording format is a self-clocking method that of 16 different memory map configurations depending on allows synchronous data transfers rates of up to 2000 system requirements. This feature is especially useful bits per second. Connections between the recorder and during the program development phase of a project since the board are made with subminiature phone jacks. the user's code can be resident in either RAM or EPROM and can be relocated with a switch change. EPROM Programming Socket Serial I/O Channels The PEP 68 System provides a zero-insertion-force socket for electrically programming 2716 and 2732 type The board contains two serial 1/0 channels. Both EPROMs; therefore, the user's application programs channels are general-purpose and may be used with any residing in RAM can be preserved by "burning" the code serial RS-232-C device. One channel is normally used for into an EPROM. Subsequent execution can be from communication with the user's control terminal; while either RAM or EPROM. The programming socket is the second channel would normally be used for the driven by signals from three of the six on-board 1/0 interface to the host computer system. However, this ports. The monitor provides commands to perform the second channel could be used for any serial 1/0 use, following: blank check tests, copy EPROM contents to such as a printer or modem. The RS-232-C interfaces memory, verify EPROM contents against memory, generate their own + 12 and -12 volt levels. Thus no program any portion of EPROM, and masking non-blank additional supplies, other than the + 5 Vdc supply, are EPROMs against code in memory. required. Software Description Each channel has a separate baud-rate clock circuit in which the baud-rate is hardware switch-selectable. This • Display or Alter any CPU Register allows very fast communication with a local command • Display or Alter any Memory Location terminal on channel 1 and communication with a slower • Display a Range of Memory speed device such as printer, modem, or phone link on • Display the Previous (or next) Location in Memory channel 2. Allowed baud rates on each channel are 50, • Rapidly Input Consecutive Data Strings to Memory II 110,150,300,1200,1800,2400,4800,9600, or 19,200 bps. • Find (search for) the Address of the Next Occurrence of a Specified Data String Parallel I/O Ports and Programmable Timers • Fill a Range of Memory with a Given Data String • Move (Copy) a Block of Memory from One Address • The PEP 68 System has six 1/0 ports and associated Range to Another Address Range control signals that can be used for general-purpose • Go to an Address and Begin Executing a User input/output. Four ports are available at the top card Program edge connector, while the remaining 2 are accessible via • Load a Formatted File from Either Serial Channel a special plug-in connector. The latter two ports can be with an Optional Address Bias (Multiple Formats used optionally for driving a high speed parallel printer Allowed) with a special cable that attaches to the board through • Punch/Dump a Formatted File to Either Serial the plug-in connector. Channel with an Optional Address Bias (Multiple Formats) The signals and controls associated with the three • Compare Two Memory Ranges for Differences binary timers are accessed via the card edge connector. • Calculate Checksums Over a Range of Memory Each of these three software programmable timers is 16 • Insert a Program "Patch" bits long and can be operated in several different modes, • Disassemble Machine Code into Assembly including continuous, single-shot, frequency comparison mnemonics or pulse-width comparison modes. • Set, Clear, and Display up to 8 Address Breakpoints • Remove all Breakpoints Temporarily and Then Be Able to Restore Them Intact Audio Cassette Tape Interfaces • Continue or Resume Execution" After a Break Occurs There are provisions on the PEP 68 System for or After Stopping or Tracing connecting two audio cassette tape recorders for storing • Calculate Relative Branch Offsets and Perform and retrieving user's applications programs. The Double Precision Hexadecimal Arithmetic • Program 2716 or 2732 Type EPROMs 9-19 PEP 68 • 32 User· Definable Functions • Transparent Mode Operation for Conversing with a • Examine/Alter 110 Port Bits Host Computer from the Same Command Terminal • Single·Step Program Execution Through NN • Echo Incoming Data from Either of the Serial Instructions of a Program 110 Channels to the Parallel Printer Port • Step Through Instructions Conditionally Until • Echo Monitor Output to Parallel Printer Port for Specified Condition is Met Hardcopy of Monitor Output • Trace Through NN Instructions Displaying the CPU • Enter ASCII Strings to Memory Registers After Each Instruction • Print ASCII Strings from Memory • Trace Through Instructions Displaying CPU Registers • Keyboard Test Mode After Each Occurence Until Specified Condition Is Met Applications Low·Cost Development System MODEMI ACOUSTIC COUPLER OR ANY RS-232-C SERIAL DEVICE F68 PEP SYSTEM TERMINAL More Powerful Development System HIGH SPEEO PARALLEL PRINTER HOST COMPUTER SYSTEM FBB PEP SYSTEM AUXILIARY TO ASYNCHRONOUS TO BUS SYNCHRONOUS USER'S COMMANO BUS BACKPLANE BACKPLANE TERMINAL I I. I 9·20 PEP 68 Dedicated Use 2 SERIAL I/O CHANNELS ~~r I___ rL-:_-::~~-- 6 PARALLEL I/O PORTS PLUS 3TIMERS F68 PEP SYSTEM TO ASYNCHRONOUS TO SYNCHRONOUS BUS BACKPLANE BUS BACKPLANE (OPTIONAL) (OPTIONAL) I I Multi·Bus Card Cage Use 9·21 PEP 68 Hardware Specifications Timers Hardware Specifications 3 Binary Timers Three separate 16-bit binary counters Microprocessor Each independently software CPU 6802, 6808, 6809 control able and readable Data word size 8 bits (1 byte) Each with external clock and gate controls for frequency and pulse· Instruction word 6809: 1-4 bytes 6802/6808: 1-3 bytes width measurements size Each with a counter output pin Cycle time 1.0 P.s Interrupts System clock 4,000 MHz Hardware One non-maskable interrupt line available at both system bus edge Address 65,536 bytes connectors (wired-OR to the Restart capability pushbutton switch for initiating Memory manual interrupts) RAM 9K bytes, static One maskable interrupt line for fast 2114 RAM on-board interrupt response (6809 only) ROM Six sockets for 24·pin ROMs or One maskable 1/0 interrupt line EPROMs. Accepts device types: 2516, 2716, 2532, 2732, 68316, 68332, Software Software interrupts available: 68364, or 68764 (I.e., anywhere from 1 for 6802/6808 2K to 48K bytes of ROM) 3 for 6809 Expansion External memory in any combination of RAM or ROM up to 64K bytes maximum Input/Output Parallel 1/0 Six TTL-compatible, bidirectional 8-bit 1/0 ports with two port controls each Serial 1/0 Two programmable, asynchronous channels with full RS-232-C interfaces Each channel is double·buffered and has independent switch·selectable baud rates of 50, 110, 150, 300, 1200, 1800,2400,4800,9600, or 19,200 bps 9·22 PEP 68 System Busses Power Supplies Dual Backplane P1-an 86-pin asynchronous system Requirements +5V dc ±5% @ 2.5 A (typ) Busses bus compatible with standard Multibus slave boards (multi-master + 25 Vde @ 30 mA (typ) (used for options not supported) EPROM programming only) Environmental P2-a 60-pin synchronous MPU bus that allows complete expansion Temperature o to +50'C capabilities and faster operating speeds Humidity o to 90% (noncondensing) 1/0 Busses P3-a 60-pin applications bus with Physical four parallel 1/0 ports with controls, Dimensions 2 plus three sets of counter controls for the three on-board binary timers Height 8.0 (203.2) P4-a 25-pin applications connector Length 12.0 (305) with two parallel 1/0 ports with controls; can be used for connection Thickness 0.672 (17.1) with a high-speed parallel printer (Centronics type) Weight 17 oz. (approximate) P5-a 9-pin RS-232-C serial 1/0 Noles interface 1. Power can be applied to the board either through the card·edge backplane connector, or by connection of discrete wires to the on- board screw-down terminal strip. P6-a 9-pin RS-232-C serial 1/0 interface 2. All dimensions in inches bold and millimeters (parentheses) Connectors P1-86-contact, double-sided edge connector on 0.156" centers P2-60-contact, double-sided edge connector on 0.100" centers II P3-60-contact, double-sided edge connector on 0.100" centers P4-25-pin, subminiature D-type right angle connector P5, P6-9-pin, subminiature D-type right angle connector 9-23 PEP 68 Ordering Information Relocatable Macro Cross·Assembler Software Packages for F6800, F6801, F6802, F6803 Using Order Number Description Intel MDS·800 Series Development Systems IT PEP680XCSD PEP 68 Single Board Development S"tom NN = without cross·assembler The PEP 68 System is available with cross·assembler software packages that allow users of Intel development systems to do software development for F6800, F6801, F6802, and F6803 CPUs on their own systems. The cross· assembler software package is compatible with both the Motorola and Fairchild language syntax. Useful features similar to those of the 8080/8085 Assembler are included to provide systems compatibility. The assembler accepts the user's source program as L...._ _ _ specifies CPU type input and translates it into machine·executable code. 8 = 6802/6808 CPU or Relocatable object modules are linked together into load 9=6809 CPU modules and then into execution modules under the ISIS-II operating system. Application programs can then be downloaded in a formatted form through a serial port for Intel MDS systems to the PEP 68 System's on-card memory. Now the (single density floppy disk) program can be exercised and debugged using the FAIRBUG/68 debug monitor. for Intel MDS systems (double density floppy disk) • 680X Cross·Assembler Software Package • Intellec 800 and 888 Series II Compatible • Full Macro Capability • Expanded Relocation Capability • Expanded Assembler Directives • Comprehensive Conditional Assembly • Includes Logical, Comparative, and Expression Truncation Operators 9-24 PEP F387X Formulator Microprocessor Product Description A single-board microcomputer for program development timing, debugging, and emulating the F387X family of single-chip microcomputers, the PEP F387X system includes an F38E70 EPROM microcomputer programmer, an on-board keypad, address and data displays. A 40·pin emulation cable is also provided. Features • Full In-Circuit Emulation of the F3870 and F3872 Microcomputers • On-Card Keypad for Command and Data Entry • On-Card 7-Segment Address and Data Displays • Programming Sockets for F38E70s and 2716s • 2K Bytes of 2114 Static RAM Plus Space for an Additional 2K Bytes • Space for 6K Bytes of 2716 EPROM • 2K-Byte Firmware Monitor • Flexible Memory-Map Strapping Options • Crystal-Controlled System Clocks • Four General-Purpose Programmable Timers • Four General-Purpose Interrupt Controls • Current-Loop and EIA RS232C Serial 110 • Spare 8-Bit 110 Port • Requires Only + 5 and + 12V Supplies II 9-25 PEP F387X 9-26 Software Packages Microprocessor Product Several software packages are offered by the convenient and powerful programming debug facility to aid Microprocessor Division for the system developer. A brief in the development of F8 or F387X programs. The debugg- description of each one follows. ing program provides the user with an interactive system via a teletype terminal or via a 4 x 6 keypad. This is the F8 Formulator Disk Operating System Version 4.0 (DOS4) standard debugging aid provided with the PEP 387X development board. The Formulator Disk Operating System version 4.0 (DOS4) provides the F8 or F387X system developer with a complete Minicomputer F8/F387X Cross Assembler set of tools for software development including source pro- gram editor, relocatable assembler, linking loader and in· The Fairchild F8/F387X Cross Assembler is deSigned for teractive debugger. Also included are many utilities for effi· use on any 16-bit word length minicomputer with an ANSI cient use of the floppy disk subsystem and support for a FORTRAN IV Compiler. The Cross Assembler is indepen· number of other standard peripherals. The DOS4 is an im· dent of machine character representation and numerical proved and streamlined version of the F8-D03 with added representation. Minor alterations may be required to satisfy capability and greater ease of use. various Computer/Operating System/Peripheral Device combinations. FAST Software Debugger Installation and modification of this program should be per· The FAST software debugger (FSD) is a fast software formed by a programmer who is quite familiar with debugging monitor for F8/F387X microcomputer systems FORTRAN IV and with the hardware and software con· programs. Its speed and ease of use meet or exceed any figuration of the target computer. Under such cir- other method of debugging F8/F387X programs. cumstances, installation can probably be completed in one or two days. . The FSD is designed for use with the Fairchild F387X pro- gramming, evaluation, and prototyping (PEP) board. It F9445 BASIC Language Package replaces the PEPBUB monitor chip provided with the board and allows all operations to be performed through a CRT The Fairchild BASIC language interpreter for F9445·based terminal rather than through the PEG BUG keypad. It does systems is specifically tailored to high-performance not support parallel paper tape I/O. microcomputing, providing a powerful, interactive program- ming language that can be used to solve a wide range of FAIRBUG application problems. It incorporates extensions of and A special Debug ROM 3851A PSU provides the F8 user with a convenient and powerful programming debug facility that is used in the development of F8 programs. This debugging modifications to the BASIC language originally developed at Dartmouth College. The Fairchild enhanced BASIC in- creases the capability and flexibility of the language with a complete set of data types, additional statements and func- II program (FAIR-BUG) provides the user with an interactive tions, comprehensive data management facilities, file system via a teletype terminal. The following capabilities management an I/O control and multi-dimensional array are provided: capabilities. Interface to custom F9445 assembly language Display or Alter Memory locations programs is also provided. The BASIC language is fully sup· Display or Alter Scratch pad Registers ported by the F9445 Interactive Multi-User Disk Operating Display of Alter Accumulator, ISAR, System (1M DOS), which allows full use of the extensive Status I.Y'I Register) operating features of IMDOS, such as independent I/O and Display or Alter PCO, DCO, DC1 the ability to dynamically create, access, and delete files. Load Formatted Paper Tape Punch Formatted Paper Tape F9445 PEP BASIC Language Package Punch Paper Tape in PROM Format Entry from Keyboard or by Program Instruction The Fairchild PEPBASIC, deSigned to reside in a 2K PROM, I/O Subroutines available to user retains the essential simplicity and computational power of BASIC. PEPBASIC provides a unique capability to extend F8/F3870 PEPBUG and customize programs, either through enhancements written by the user in F9445 absolute assembly language. A special F38T56 PSU with a debug monitor (PEPBUG 38) Versatile applications like real·time process control, data has been developed by Fairchild to provide the user with a acquisition, or math packages can be created, based on the general-purpose facilities available within PEPBASIC. 9·27 Software Packages F9445 PEPBUG Package To time an instruction, a short loop containing the instruc- tion is executed and its time lapse cOl11pared to a null (no The Fairchild F9445 PEPBUG package is the interactive en- instruction) loop, during the transmission of one character. try and debugging software for use with the F9445 family of The 110 terminal displays the resulting times. The user microprocessor products. The PEPBUG 45 software specifies the Baud rate of the I/O device at program package creates a versatile and efficient control environ- execution time in reponse to a program prompt. ment, enabling the user to enter and test F9445 absolute assembly language programs interactively. It is unique F9445 MICRO FORTRAN Language Package among the programs offered with the F9445 family in that it gives the user control of the microprcessor through a video The Fairchild MICROFORTRAN package is a ligh-Ievel terminal, provides many different capabilities in a single language compatible with the F9445 microprocessor based stand-alone mini-executive program, and occupies a family of products, providing a powerful tool for structured relatively small amount (2 thousand bytes) of memory program development. Subroutines and fUnctions are in- space. dependently compiled, and translated into relocatable ob- ject modules that can be linked in any combination, F9445 PASCAL Language Package according to commands given at load time. Interface to custom F9445 assembly language subroutines is provided. The Fairchild F9445 PASCAL package is a high-level language suited to the development of microcomputer soft- ware because of its strong and logical control structures and its versatility in handling data. Fairchild PASCAL is F9445 Diagnostics Package designed to solve complex problems using such modern language concepts as variable data types, including The basic diagnostic package for the Fairchild F9445 family records, sets, scalars, and others. Interface to custom of microprocessor products contains seven programs: a F9445 assembly language subroutines is provided. memory address test, a memory test, a system exerciser, a memory diagostic, and three F9445 instruction set tests. PASCAL offers highly structured techniques for organizing These disk-based programs enable the user to identify and and coding programs so that they are easily understood isolate faults in the CPU, memory, and certain I/O sub- and modified, which allows cost-effective software systems of F9445-based systems. Versions of several of the development. tests also test the Fairchild System-I (FS-I). F9445 Instruction Timer F9445 Interactive Multi-User Disk Operating System (IMDOS) . The Fairchild F9445 Instruction Timer (fIMER45) software operates in the F9445-based systems, reporting the time The Fairchild F9445 Interactive Multi-User Disk Operating needed to execute each class of CPU instruction. It uses System (IMDOS), customized for high-performance the I/O terminal device as the standard to measure the microcomputer systems, offers extended file management, times and report the results. The timer is most useful for timesharing, device-independent input/output, system pro- detecting the execution speeds in mircroseconds for over cessors such as MACRO assembler and a utility library. 60 representative instructions, to optimize the design of F944T PASCAL, F9445 BASIC, and MICRO FORTRAN com- F9445-based systems. It also serves as a diagnostic tool in pilers, are also fully supported. IMDOS is also the principal detecting clock drift. operating system for the Fairchild System-I (FS-I) 9-28 I[!] !INTRODUCTION ~2 !ORDERING AND PACKAGE ~ INFORMATION I[ ! ] ! Fa MICROCOMPUTER FAMILY 1 0 I CONTROLLER FAMILY 1~IF6aoo MICROPROCESSOR FAMILY 10!F16000 MICROPROCESSOR FAMILY I~! ROM PRODUCTS InIg I DEVELOPMENT SYSTEMS AND L!.J SOFTWARE I[!IJ!RESOURCE AND TRAINING CENTERS! I@] I SALES OFFICES Section 10 Applications 10-3 Applications 10·4 A Matrix Printer Controller Using The F8 and F3870 Circuits The multi-chip F8'" microprocessor and single-chip F3870 memory size increases. MicroMachine'"2 microcomputer have become popular cir- cuits for control applications. Inexpensive and easy to use, The F8 microprocessor can address up to 64K bytes of their instruction sets and architecture combine to give the program and data storage. Each peripheral controller can modern system designer NMOS LSI power and flexibility. easily be implemented as a subroutine within the PSU and, depending upon the desired configuration, the required PSU The architecture of the F8 microprocessor is designed to can be plugged in to provide a modular, flexible system. implement I/O-intensive applications. The memory address- ing registers, the 16-bit program counter, and the data coun- The F3870 MicoMachine2 is a complete8-bit microcomputer ters are located in the Program Storage UnitWSU). The PSU, on a Single MOS integrated circuit. It features 2048 bytes of as well as the other F8-system peripheral circuits, is driven by ROM, 64 bytes of scratchpad RAM, a programmable binary the Central Processing Unit (CPU) with micro-instructions timer, 32 bits of I/O, and has a Single +5 V power supply communicated over the five control lines (ROMCo-ROMC4) requirement. The F3870 can execute the F8 instruction set and is synchronized by a Write signal. The unusual partition- and can easily be interfaced with any microprocessor system ing of the CPU and PSU chips frees many pins normally through the I/O ports by properly defining command, status, needed for address bussing foruse as I/O lines and provides and data lines, making it a universal controller. room for a 64-byte scratch pad memory on the CPU chip. No matter how much memory is contained in the system, the MATRIX PRINTER CONTROLLER number of I/O lines remains fixed at 16; therefore, the num- A matrix printer controller can be constructed using either ber of pins available for useful functions does not diminish as the F8 microprocessor (Figure 1) or the F3870 microcom- 4.7 k 3851 lK )( 8 PSU' HOME "V~ DATA BUS ¢ r ~ REV 2N4401 = ROMCo- ROMC4 ¢ :i' 20 TRIAC -. l· CIRCUITS FWD WRITE _ 7 MATRIX TO/FROM PRINTER r " V CPU DBDA _ 1 1 LINE FEED 4.7 k --.J TIP 30 -. I,: ~ l" } r- _10 ~ ~OO,.} t- -. 24 INB- OUT B - 2 25 7 INC- 9667 t--0UTC 7 - ~ INO- DARLINGTON - DRIVER OUT 0 ---;7""-- - -, 31 36 INE- IN F - !-OUT E I-0UT F - - 37 ING- -OUTG .- 'Other PSUs available are the 3856 (2K x 8 with 1/0) and the 3857 (2K x 8 with address bus). Fig. 1 Matrix Printer Controller Using the Fa Microprocessor 10-5 F3870 - [' 4.7 k MICROCOMPUTER HOME +.~ P1, 2N4401 . 3' READ STATUS Ph "1 = . 3. ~ ~ REV ~ 20 P1, CLEAR BUFFER 2. ~ "]. l· TRIAC , '" CIRCUITS P16 .. FWD P1s .. LINE FEED 23 +5V MATRIX PRINTER P1, 4.7k LOAD BYTE 2 LINE FEED 22 L BIT DATA BUS (1/0 PORT 0) COMMAND BUSY READ STATU s <=> j l: } {""- 1 :r r . ,. ~ ~ 24 31 3. 37 7 7 '" INB- INC- IND- INE- INF- ING- 9667 DARLINGTON DRIVER r I-OUT B rOO"} ro"" rOUT E r OUTD rOUT F OUTG ~ , r - - - - - ,- LOAD BYTE LINE FEEO PRINT ClEA~ BUFFER Fig. 2 Matrix Printer Controller Using the F3870 Microcomputer puter (Figure 2). In the F3870-based controller, the following used to hold the gate current off and provide a low-impe- com mands are used to perform the control functions: dance path to ground. This provides good noise immunity to prevent turn-on of either triac by noise. CLEAR BUFFER - stores zeroes in the 40-character print buffer contained within the scratch pad RAM. SOFTWARE DESIGN The matrix printer controller software can easily fit within a PRINT - causes the contents of the print buffer to be 3851 PSU with 1K x 8 bits of ROM and 16 I/O lines. printed. Error status if the head motion is not correct. The timing can be done by software loops without using the LINE FEED - advances the paper to the next line. timer. This is the easiest technique, but suffers from the drawback that the whole system is tied up during the printing LOAD BYTE - takes a byte from the data bus and places it of an entire line. A more sophisticated technique, employed next in the print buffer. Error status if the buffer is full. in many real-time control systems, is to make each timing control event a discrete event entered into a table controlled READ STATUS - places the status on the data bus and by the real-ti me monitor. clears the status byte. The status is held on the bus until the command is taken away, at which time the port is cleared The software has three entry points: for reading again. The initialization entry point (address H'OOB1'l, which fires In all command sequences, the F3870 microcomputer pre- the reverse triac, turns off the paper-feed solenoid, and sents BiJSY until the command has been performed or until returns the print head to the home position. status is stable on the data bus. The line-feed entry pOint (address H'OOCFl, which ener- The current requirements of the matrix printer solenoids are gizes the paper-feed solenoid for 30 ms and then turns off met by a suitable driver, such as the 9667 Darlington driver the solenoid. circuit with seven drivers and built-in back-emf suppression diodes. The 9667 interfaces directly with the F8 microproces- The print entry point (address H'0065'l, which fires the sor and F3870 microcomputer ports. forward triac, prints the line of characters, fires the reverse triac, and then does a paper feed. The line-feed drive solenoid is implemented as a pnp power transistor (TIP 30), the base drive of which is supplied directly Access to this software is accomplished by loading the from the I/O port. The HOME phototransistor in the matrix registers with the required parameters and executing a "call printer supplies base current to a simple 2N4401 npn transis- to subroutine immediate" (PI) instruction to the appropriate tor, which saturates, providing the Home signal to the con- entry pOint. troller. The forward and reverse triac drives are provided across 100 n resistors from +5 V (Figure 3). A TTL gate is The subroutines to control the matrix printer head motion 10·6 '5 V 100 n MOTOR 75451 WINDING FWD (FROM CONTROLLER) ----t>o-+------- ~}--28V.C MAC 92·2 Fig. 3 Forward Triac Interface Circuit and printing functions are listed in the appendix. These the status register. A test for minus then detects when Home would be used alone in a 3851 PSU with other F8 system becomes false: circuits or as part of an F3870 universal controller. The control program for the F3870 microcomputer and its sub- INS 5 INPUT & SET STATUS routines are listed in the appendix. BP *-1 LOOP UNTIL "HOME" IS FALSE However, it must be determined if the forward motion fails for FORWARD MOTION CONTROL some reason. Therefore, the system does not loop indefinit- The forward triac is fired by setting bit 1 in output port 5: ely but, rather, sets up two counters and waits only 1.5 second, see program segment A. LIS 2 OUTS 5 PRINT SOLENOID CONTROL All other bits in port 5 should be cleared so that it is not Once the Home indications goes false, the system fires the necessary to OR bit 1 to the port. The Home signal is con- print solenoids, waits 650 P.s, turns off the solenoids, and nected to port 5 bit 7 and active High <+5 = Hamel. This makes waits 700 p'S for each of the five columns forming thecharac- use of the fact that the F8 system input instructions also set ter, see program segment B. Segmeni A CLR LR O,A LR 1,A PRDR20 INS BM !RDR30} 24 P.s x 256 } = 5.S ms OS o 1.5 s BNZ PRDR20 OS 1 BNZ PRDR20 CLR OUTS 5 TURN OFF FWD TRIAC LIS 2 SET ERROR FLAG LR ERR,A BR EXIT Segment B PRDR30 LM LOAD FIRING PATTERN OUTS 4 II 186 INC BNZ CLR OUTS *-1 4 Sp.sx70 = 630 P.s } 645 P.s "ON TIME" II 180 INC 9 p'S x 76 BNZ *-1 = 684 P.s } 698 " "OFF TIME" OS EOC BNZ PRDR30 10·7 REVERSE MOTION CONTROL is loaded from the table, the address is incremented by one, The forward triac is turned off and a 10-ms delay initiated to pointing to the next value in the table. allow sufficient time for the triac to stop conduction (one-half cycle is 8.3 msl. The reverse triac is then fired and the The table is organized so that the first bit pattern is addressed program loops until Home becomes true. Again, there is by pointing to the beginning of the table and adding the some error control in the event that something prevents the ASCII character to the data counter five times: print head from returning to the home position, see program segment C. DCI BIT PAT TABLE ADDRESS ADC POINTS TO LINE FEED CONTROL ADC THE Nth The line-feed solenoid can be turned on for only 30 ms; beyond that time, damage may be done to it. Setting bit 7 turns on the solenoid: ADC ADC ADC } ENTRY IN A FIVE-BYTE- WIDE TABLE LI H'80' OUTS 4 TURN ON SOLENOID Since the first 32 ASCII characters are not used in this matrix LIS 10 printer, the actual program subtracts 32 from the ASCII LR 1,A character before adding it to the data counter five times. OS BNZ DS BNZ 0 '-1 1 '-4 } 30 ms DELAY CONCLUSION The F8 instruction set has been shown to be ideal for control applications, such as the matrix printer controller described. CLR Of particular note are the input/output instructions that set OUTS 4 TURN OFF SOLENOID status, and the table look-up instructions that allow fast access to tables of any length and do not place any con- CHARACTER SET TABLE straints on the location of tables in memory. Accessing tables of data with the F8 microprocessor and F3870 MicroMachine 2 microcomputer is easy and efficient. The F3870 microcomputer has been shown to be ideal for use The data counter is loaded using the "load dc immediate" with any microprocessor system as a universal peripheral (DCD instruction. The "add accumulator to data counter" controller. This is accomplished by interfacing through the (ADC) instruction allows a signed 8-bit value contained in the input/output ports, which gives the system designer great accumulator to be added to the data counter. When the data flexibility in his system configuration. Segment C CLR TURN OFF FWD TRIAC OUTS 5 LIS 3 LR 1,A DS BNZ DS BNZ o '-1 1 '-4 } 10 ms DELAY LIS 1 TURN ON REVERSE TRIAC OUTS 5 CLR CLEAR COUNTERS FOR TIMEOUT DELAY LR O,A LR 1,A PRH010 INS 5 BP DS BNZ DS BNZ LIS PRH020 ~RD010 PRH010 1 I 1,5 sTIMEOUT SET ERROR STATUS LR ERR,A I PRH020 LIS 3 LR 1,A 10 ms DELAY DS o BNZ '-1 DS BNZ '-4 CLR TURN OFF REVERSE TRIAC OUTS 5 10·8 APPENDIX FORMULATOR FDOS ASSEMBLER (REV 2.0) RS LOC OB-JECT AIIDR LINE SOURCE STATEMENT 0001 • MATRIX PRIhTER CONTROLLER 0002 • 0003 • D. R. HOLLINBECK 0004 • FAIRCHILD MOS MICROCOMPUTER 0005 • THE UNIVERSAL CONTROLLER CONTROL 0006 • PROGRAM IS GIVEN FIRST WITH THE 0007 • SUBROUTINES 000::: • FOLLOI.oJING AND BIT PATTERN TABLES 000';" • 0010 0005 0011 •STATUS- EOU '5 HATU-S: BYTE 0004 0012 B'/TES EOU 4 NUMBER OF BYTES TO PRINT 0003 0013 EOC EOU :: COUNTER FOR END-OF-CHARACTE 001:3 0014 BUFFER EOU 0- 100'-40 START OF BUFFER 0004 0015 BUS..,.' EOU B-- 00000100 - -- BU-S:'/-- BIT OOFB 0016 t-iBUSY EOU B--- 11111011-- r-mT --BUS""'-" BIT 0000 70 0017 001:3 • CLR CLEAR ACCUMULATOR 0001 EO 0019 OUTS 0 ALLOW READING OF PORTS 0002 Bl 0020 OUTS 1 (I AND 1. 0003 2:300Bl OOBI 0021 PI PRHOME INSURE HEAD IS HOME 000':", 55 0022 LR STATUS.A CLEAR STATUS 0007 54 002.3 LR BYTES.A AND BYTE COUNTER 0024 00,::5 •• READ COMMAND STROBES 000:3 Al 0026 0027 •RD'::MD HE 0009 :34FE 000:3 002:=: BZ i':DC~1D I.o.IAIT FOR '::OMMA~m OOOE: '313C 0048 002':;- B~1 CLF.:BUF TEST BIT 7 DODD 1-'"--' 0030 SL 1 OOOE 914D 005C 00:31 B~1 PRINT TEST BIT 6 0010 1:3 00.32 SL 1 0011 911:3 002A 00:33 BM LINEFD TEST BIT '5 001:3 1:3 0034 SL 1 0014 911E 003:3 0ln5 Bt'1 LDB'/TE TEST BIT 4 00:36 • 0037 • Fi:EAD STATUS Cm1~1AND 0016 45 00:3'3 00.39 • LF.: A,STATUS GET STATUS FROM SCRATCH PAD II 0017 BO 0040 OUTS (I 001:3 Al 0041 HE 1 SET 'BUSY' 0019 '2204 0042 01 BUSY 001B Bl 0043 ours 1 001C Al 0044 HIS 1 001D 210:3 0045 NI B'00001000' WAIT FOR COMMAND 001F 94FC 001C 0046 BNZ .-:3 TO GO AWAY 0021 70 0047 '::LR CLEAR STATUS AND PORT 0022 BO 004:3 OUTS 0 002:3 55 0049 LR S:TATUS, A 0050 0051 •• CLEAR BUSY STATUS 0024 Al 0052 005:3 •CLRBSY HiS 1 0025 21FB 0054 NI NBUS'/ RESET 'BUSY' 0027 Bl 0055 OUTS 1 002:3 90DF 000:3 0056 BR RDCMD I,JAIT FOR ANOTHER COMMAND 0057 • LINE FEED COMMAND 005:3 • 002A Al 0059 0060 •LINEFD INS SET 'BUSY'- 002B 2204 0061 or BUS'/ 10·9 --~---- APPENDIX FORMULATOR FDOS ASSEMBLER (REV 2. (I) R"~ .::, LOC OBJECT AD DR LItlE SOURCE STATEMEtlT 002D Bl 0062 OUTS 1 002E 2:300CF OOCF 0063 PI LFOO '3D DO LINE FEED 0031 '30F2 0024 0064 BR CLRBSY CLEAR "BUSY" AND I.,JAIT 0065 • TRANSFER BnE INTO PRINT BUFFER 0066 • 003:3 201:3 0067 006>3 • LDBnE LI BUFFER POINT TO NE:':T EMPTY 0035 C4 0069 AS BYTES: BYTE HI BUFFER 0036 2540 0070 CI 0"100" CHECK: IF BUFFER FULL 00.3:3 9407 0040 0071 B~IZ LDBYI0 0072 • ERROR - SET BUFFER FULL STATUS (BIT 3) 007:3 • 00'74• AND ERROR FLAI3 (BIT 7) . 0075 • LF.: A. STATU'~: I:;ET STATUS BYTE 003A 45 0076 00:3.B 228S 0077 OI B'"1 0001 000" ~:ET ERROR FLAI:;S 00:3D 55 0078 LR S:TATUS. A 003E '30E5 0024 0079 BR '::LRBSY 0040 OB 00:30 00'31 •LDBYI0 LR IS.A LOAD IS:AR 0041 AO 00'32 I ~'I'::: (I GET DATA 0042 5C 00:33 LR .S:,A STORE ItHO 'SCRATCHPAD 0043 44 . 00:34 LF.' A.BYTES INCREt1ENT COUNTER 0044 IF 00:35 INC 0045 54 00:36 LR B'/TES. A 0046 90IlD 0024 00:37 BF.' '::LF.'BSY OO:3S • ':LEAR PRItH BUFFER cm1MAt'!II 00:3'3 • 00'30 0091 • CLRBUF INS 004:3 Al 0049 2204- 0092 or BUS..,.' SET "BUSY'" 004B Bl 00'33 OUTS 1 004C 2028 00'34 LI 40 40 B'/TES TO CLEAR 004E 54 0095 LR BYTES.A 004F 201:3 0096 LI BUFFER GET nAFHING ADDRESS 0051 OB 00'37 LF.: IS-A At~D PUT INTO EAR 0052 70 (1)'3:3 CLRBI0 CLR CLEAR ACCUMULATOR 0053 5C 00'3'3 LR S,FI STORE 'I"IA EAR 0054 OA 0100 LR A. IS: INCREMENT ISAR 0055 IF 0101 me 0056 OB 0102 LR IS.A 0057 34 0103 rc BnES f '. 005:3 '34F9 0052 0104 BNZ CLRBI0 005A 90C9 0024 0105 BR CLRBS'l' 0106 • PRINT BUFFER COt1MAND 0107 • 005C Al 010'3 0109 •PRINT INS 005D 2204 0110 or BUSY 005F Bl 0111 OUrS: 1 0060 2:30065 0065 0112 PI PRDROO 00';3 90CO 0024 0113 BR CLRB.SY 10·10 APPENDIX FORMULATOR FDoS ASSEMBLER (REV 2.0) RS LoC OBJECT ADDR LINE SOURCE STATEMENT 0114 EJECT 0115 • 0116 • 0117 • MATRIX PRINTER DRIVER 011a • D. R. HoLLINBECK 011';1 • FAIRCHILD MoS MICROCOMPUTER 0120 • 0121 0122 •• MAIN PRINT ENTRY POINT 0065 oa 012.3 0124 •PRDROO LR SAVE RETURN ADDRESS 006611 0125 LR H,DC SAVE DCO 0067 72 0126 i...IS 2 FIRE FORWARD TRIAC 0068 B5 0127 OUTS 5 0069 10 012a PRDR10 LR DC,H RESTORE LIST POINTER 006Ft 16 0129 LM GET NEXT CHARACTER TO PRINT 006B 24EO 0130 AI ·-32 006D 11 0131 L.R H,DC SA',lE D'::O 006E 2AOOEO OOEO 01.32 DCI BITPAT POINTER TO PRINT TABLE 0071 aE 01.33 ADC DCO = DCO + '5 • (ACC) 0072 aE 0134 -=tD':: 0073 BE 0135 ADC THIS GET; ·THE PROPER ENTRY 0074 ;3E 01.36 AD,:: IN A FI~E BYTE WIDE TABLE. 0075 ;3E 01T(, ADC 0076 70 013':: CLR 0077 50 01::;" LR I),A INITIALIZE DELAY COUNTER 007a 51 0140 LR 1, A INITIALIZE ERROR CODE 007'3 75 0141 LIS 5 LOAD NEEDLE FIRING COUNTER (107A 5.3 0142 LR (lOlB AS 014.3 F'RDR20 INS s LOOK AT 'HOME' LED INDICATD 007C 910F ooa,:· 0144 B~1 PRDR30 007E 30 0145 D; 0 007F 94FB 007B 0146 BliZ ;:'RDR20 ooa 1 31 0147 D~; 1 00;::2 94Fa 007B 014;:: BI'iZ PRDR20 00:34 70 0149 I::LR 00:35 B5 0150 OUTS S 00:36 45 0151 LR Ft. S:TATIJS 00.37 22;32 0152 01 B'10000010' II 00:39 55 0153 LR S:TATUS, Ft OO.3A ';"027 00B2 0154 BR PRH005 TURNOFF TRIAC'S AND EXIT 00;3C 16 0155 PRDR30 LM GET NEEDLE DRIVER BITS OO'::D B4 0156 OUTS FIRE DRI\IERS OO'::E 20BA 0157 LI bJAIT 650 MICROSEcmms 0090 1F 015:3 HK 0091 94FE 0090 015·:l BNZ .-1 00'33 70 0160 CLR RESET NEEDLE DRIVERS 0094 B4 0161 LJun: 00:l5 20B4 0162 u DELAY 700 MICROSECS 00';17 IF 016.3 INC 009;:: 94FE 0(1":l7 0164 BNZ .-1 009A 3.3 0165 DS EOC TEST END-OF-CHARACTER 009B:l4FO ooac 0166 BNZ PRDR30 GET NEXT BIT PATTERN 009D 2074 0167 LI 116 DELAY 1350 MICROSECS 009F IF 016:3 HK OOAO 94FE OO·:lF 0169 BNZ ·-1 OOA2 .34 0170 DS B'lTES TEST FOR END-OF-LINE OOA'3 94C5 0069 0171 BNZ PRDRI0 GET NEXT BYTE TO PRINT OOA5 70 0172 CLR TURN OFF FORWARD TRIAC OOA6 B5 0173 OUTS 5 OOA7 7.3 0174 LIS .3 DELAY 10 MILLISECS 10·11 APPENDIX FORMULATOR FDOS ASSEMBLER (REV 2.0) RS LoC OBJECT ADDR LINE SOURCE STATEMENT 00A8 51 0175 LR I,A 00A'3 .30 0176 DS: 0 OOAA 94FE OOA9 0177 BNZ .-1 OOAC .31 017a DS 1 OOAD 94FB OOA'3 017'3 BNZ .-4 OOAF 9002 OOB2 0180 BR PRHo05 01'31 • 0182 • INITIALIZATION ENTRY POINT. 01a.3 • ENTER HERE AT THE START OF THE MAIN PROGRAM 01:34 • JUST TO ENSURE THAT THE PRINT HEAD IS HOME. 01as .• OOBI oa 01:36 PRHOME LR SAVE RETURN ADDRESS 01:37 • 018a • ENTER HERE TO RETURN PRINT HEAL HOME OOB2 71 01:3'3 01',0 •PRHOOS LIS FIRE REVERSE TRIAC OOB3 B5 01'31 OUTS: :5 OOB4 70 01'32 CLR OOBS 50 01'33 LR O,A OOB6 51 01',4 LR 1, A 00B7 A5 01',5 PRH010 HE :5 '.,IA I T FOR "HOME" oOB'3 :::1 OB 00C4 01'3'6 BF' ?RH020 OOBA 30 01'3'7 IIS 0 OOBB 94FB OOB7 01'38 Bi'iZ ?RH010 OOBD .31 01'3'3 DS: 1 OOBE '34Fa ODE7 0200 BNZ PRH010 oDeD 45 0201 LR A, S:TATUS. 00(:1 22:31 0202 01 B'10000001' HEAD DID NOT RETURN HOME 00(;3 55 0203 LR ;:TATU;,A 00C4 ?3 0204 PRH020 LE 3 DELAY 10 MILLISECS 00C5 51 020 5 1 LR 1, A 00C6 30 020';:, DS 0 00C7 '34FE 00C6 0207 BNZ .-1 00C9 .31 020:3 DS 1 DOCA '34FB 00C6 0209 BNZ .-4 OOCC 70 0210 CLR TURN OFF OOCD B5 0211 OUTS :5 REV TRIAC OOCE OC 0212 P~: RETIJRN 0213 0214 •• LINE FEED ENTRY POINT OOCF oa 0215 0216 •LFOO LR OODO 10 0217 CLR TURN OFF TRIAC'S OODI B5 021:3 Dun 5 00D2 20ao 021'3 LI 1"1"':30' FIRE LINE FEED 00D4 B4 0220 Dun 4 OOD5 7A 0221 LIS 10 DELAY .30 MILLISECS 00D6 51 0222 LF.: 1. A OOD7 30 0223 DS o 00D8 '34FE 00Il7 0224 BNZ .-1 OODA 31 0225 D:S 1 OODB '34FB OOD7 0226 BNZ .-4 OODD 70 0227 CLR TURN OFF LINE FEED OODE B4 0228 ours 4 OODF oe 022'3 PK RETURN FROM SUBROUTINE 10·12 APPENDIX FORMULATOR FDOS ASSEMBLER (REV 2.0) RS LOC OBJECT AD DR LINE SOURCE STATEMENT 0230 E,JECT 02:31 • 0232 • TABLE OF BIT PATTERNS FOR CHARACTER SET. 02:3.3 + OOEO 00 0234 BITPAT DC H'OO' OOEl 00 02:35 DC H" 00" 00E2 00 02:36 DC H'" oq··· .: ) OOE:3 00 0237 DC H'" 00'" 00E4 00 02.3:::: DC W' 00'" 02~3'3 • OOE5 00 0240 H'" 00'" 00E6 00 0241 H'" 00'" 00E7 7D 0242 H 7D" ••••• • (! ) OOE:3 00 0243 H'" 00'" OOE':;' 00 0244 H'" 00" 0245 • OOEA 00 0246 H'" 00'" OOEB 60 0247 024:::: H' 60'" H'" 00 , ' •• (") OOEC 00 OOED 60 OOEE 00 024'3 0250 H' 60" H'" 00'" •• 0251 • OOEF 14 0252 DC H'14' •• oOF 0 7F 025.3 DC H' 7F'" ••••••• oOF 1 14 0254 DC H'l4' •• 00F2 7F 0255 DC H7F' ••••••• OOF.3 14 0256 DC H'14 " • • 0257 • OOF4 12 DC W12" • • OOF5 2A 025'3 DC H" 2A'" ••• 00F6 7F 0260 DC W7F' ••••••• OOF7 2A 0261 DC H' 2A" ••• oOF:::: 24 0262 0263 • DC H' 24" • • OOF9 62 0264 DC H'- t:,2'" •• • OOFA 64 0265 DC H 64'" •• • OOFB oa 0266 DC H'" 0:::: ,,' • OOFC 1:3 0267 liC Wl3' • •• OOFD 2:3 02t=.:.::: 026'3 • DC H" 2.3'" • •• OOFE :36 0270 DC H" .36'" •• •• OOFF 4"'.1 0271 DC H 4',"'- • • • 0100 35 0272 DC H" 35'" •• • • 0101 02 027.3 DC W02" • 0102 05 0274 0275 • DC H'" os'" •• 0103 00 0276 DC H'" 00'" 0104 6:3 0277 DC W6:3'" •• • <"') 0105 70 027:3 0279 DC DC W70'" H'" 00'" ••• 0106 00 01 07 00 02:::0 DC H'" 00'" 02':: 1 • 010e 00 02;32 DC H'" 00'" 010"'.1 1C 02::::3 DC H"'lC'" ••• 010A 24 0284 DC W24" • • ( () 010B 42 0285 02:36 DC DC W42" H'" 00'" • • 010C 00 02:::7 * 010D 00 02:3:3 DC H'" 00'" OlOE 42 02:39 DC H" 42" • • 010F 24 02'30 DC W24" • • () ) 10-13 APPENDIX FIlRMULATDR FDIlS ASSEMBLER (REV 2.0) RS LIlC OBJECT ADDR LINE S:OURCE STATEMENT 0110 lC 0291 DC H'lC' ••• 0111 00 0292 DC WOO" 02 ';:! 3 • 0112 08 0294 DC H/08' • 0113 2A 02';:!5 DC H'2A' ••• 0114 lC 0296 DC W'lC' ••• (.} 0115 2A 02 ';:! 7 DC H'2A' ••• 0116 08 0298 DC W' 08' • 02';:!';:! • 0117 08 0300 DC W' 08' • 0118 0'3 0301 DC W08" • 011';:! 7F 0302 DC W'7F' ••••••• (+) al1A 08 0.3 0.3 DC W08" • 011B 08 0304 DC W' 08' • 011C 00 0.305 0.306 • DC H'OO' 011D OD 0.307 DC H' OD' •• • 011E OE 0.308 DC H' OE' ••• (, ) 011F 00 0.309 DC H'OO' 0120 00 0.310 PC H'" 00" 0.311 • 0121 08 0.312 DC W08' • 0122 08 0.31:3 DC W08' • 0123 08 0.314 DC r!"08" • (-) 0124 08 0:315 DC W08" • 0125 08 0.31E, DC H' 08" • 0126 00 031"? 031 :3 • DC W' 00' 0127 03 031';:! DC m; W03'" •• 0128 03 0320 H'" 0.3' H'" 00'" •• (.) 012';:! 00 0.321 DC 012A 00 0322 DC WOO" 0.32.3 • 012B 02 0:324 DC H'" 02"- • 012C 04 0.325 DC W04" • 012D 08 0326 DC H'08' • ( ..... ) 012E 10 0327 DC Wl0" • 012F 20 0:328 DC H~' 20'" • 01.3 0 3E 0.329 03.30 • DC W.3E' ••••• 01.31 45 0331 DC H"'45" • •• 01:32 49 03.32 DC H' 4'3' • • • (0) 0133 51 0.3.3.3 DC W51" •• • 0134 .3E 0334 DC W3E" ••••• 0135 00 0.335 0336 • III::: H" 00' 0136 21 01.37 7F 0337 0.338 DC DC W21" W7F" • ••••••• • (1) 0138 01 013'3 00 0.33';:! 0340 DC DC W01 ' H' 00" • 0341 • 013A 23 0:342 DC H"'2:3'-' • •• 013B 45 0:343 DC H'45' • •• 01:3C 4';:! 0.344 DC W'4'3' • • • (2) 013D 49 0345 DC H'4'3" • • • 013E 31 0346 DC H'31' •• • 0347 • 01:3F 22 0348 DC H"'22'" • • 0140 41 0:349 DC W41' • • 0141 49 0350 DC H'49' • • • (.3) 0142 49 0.351 DC W"49 ' • • • 10·14 APPENDIX FORMULATOR FDDS ASSEMBLER (REV 2.0) RS LOC OBJECT AD DR LINE SOURCE STATEMENT 0143 ,36 0'352 0.;:53 + DC H"3;:,'" •• •• 0144 OC 0.354 DC H'" OC", •• 0145 0146 14 24 (I ~:55 0:::56 DC DC W14'" H"'24" • •• • (4.:- 0147 7F 0357 DC Y 7F'" ••••••• 014::: 04 DC H' 04'" • 014'3 72 014A 014B 51 51 I) 3'5'3 0-;:60 0361 I) ;:62 • DC DC DC H" 72"- H 51" H' 51' .. ••• • . •• ' • (5) o14C 51 I) 3~,;: DC H"' 51' •• • 014D 4E 0364 03e.5 • DC H" 4E' • ••• o14E 1 E O:::~,6 H IE' •••• 014F 0150 29 49 (1 ;:-:,( 0:::6,:: '1 2;" H 4;" •• • .. • • (e.) 0151 4';' 03-:,'3 H 4';' • • • 0152 46 0:::7 (I 0371 • H46 • •• 0153 40 0.;:72 H' 40'" • 0154 47 0.;:7::: '1'47' H" 4::: ,,' • ••• .... (7) 0155 4::: 0374 015':, 50 O~:75 W50" •• .. .. 0157 6 I) OJ76 0:::77 • H ':.1)'" •• :::r:. ·· .. ... 015::: 037::: DC '1' ::6' " 015'3 4'4 03::;:0 DC DC H 4:;' H'4;' • • • 015A 49 (':::' 015E: 4';' 03:: 1 DC ,j , ~,. 01Se :::6 0:::::2 DC '1 ::,:, , •• •• o15D 30 015E 4'''' 0::,:::: 03'::4 0.::::::5 • H" 30 ", H'4;" • •.. •• ... ..... 015F 49 0.;: ::t. H ''49 ... <'3) 0160 4A 03·::7 :14A' rl/ ;:C . ' • •• 0161 3C 0162 I) (I 016:: ::6 0164 ::~, 0.;:'3 I) 03;'1 0.;:'32 II,:: H" 00" H' 3~, '1 ::""" ..... ..... (: ) I) 165 00 (1 :::'3::: H'" 00'" (1166 0 (I (I :::34 H" 00'" 0167 00 03'36 DC H'" 00'" 016::: 6D 03'37 DC H 6D" •• •• • 0169 6E 03'3::: DC H" ""E" •• • •• I., ~ .I o16A (I (I 03'3'3 DC H'-" 00'" o16B 00 0400 DC H'-' 00'" 0401 • 016C oe 0402 DC '1", 0,:: ", • o16D 14 040,:: DC W14' • • 016E 22 O,~04 DC H"1~2'" • • ( <> 016F 0170 41 00 0405 0406 DC DC W41' H'" 00'" • • 0407 • 0171 14 040::: DC W14'" •• 0172 14 0409 DC W14" •• 0173 14 0410 DC W14' •• (=) 0174 14 0411 DC W14' •• 0175 14 0412 DC '1 14" •• 10·15 APPENDIX FDRMULATOR FDOS ASSEMBLER (REV 2.0) RS LOC OBJECT ADDR LItiE SOURCE STATEMEtiT 0176 00 0413 0414 • DC H' 00' 0177 41 0415 DC H'41' • • 0178 22 0416 DC H'22' • • 0) 0179 14 0417 DC H'14' •• 0171"1 08 0418 DC H'08' • 0419 • 017B 30 0420 DC H'30' •• 017C 40 0421 DC H' 40" • 017D 45 0422 DC H"45' • •• ' Since different manufacturers have different receiv- tuning with sliding inductor coils. These all have evolved into er requirements, the central processing unit will differ from the systems used today and have undergone considerable manufacturer to manufacturer, or even model to model. "human engineering." With the event of fully electronic con- trolled systems with calculator-type key boards, touch panels, remote control, etc., a similar evolution is taking place in tuning The F3870 low-cost one-chip microprocessor with 2K bytes of and display systems. on-board ROM, a 54-bit scratch pad RAM, and 32 bits (four 8-bit bytes) of TTL-compatible input/output is an ideal candidate for The various controls and displays for TV or AM/FM receiver a central processor. The F3870 requires no peripheral devices tuning, volume, brightness, etc., require either director indirect except a crystal and power supplies. Using this processor, the human interface (Figures 1 and 2). They can take many forms, type of control operation is programmed into the ROM at the from the old familiar knob system with dial readout that is factory. With efficient software programming, two or three controlled by a switch, potentiometer or variable capacitor, to a programs could be stored in the ROM so that the receiver remote control keyboard system or touch-control panel. The manufacturer may offer the same chassis with differentfeatures latter requires electronic control of the major functions such as and operations. O INPUTS ON/OFF DISPLAY FUNCTION INPUTS TUNING ~ DISPLAY FUNCTION BAND/AM/FM FREQUENCY/TIME [[]]] • ON/OFF READOUTS FOR ...->----+- AM/FM VOLUME CHANNEL I=-o--- CHANNELS/TIME, ETC. VOLUME BALANCE o0 0 0 TAPE FUNCTIONS COLOR BASS TINT TREBLE CONTRAST PHONO BRIGHTNESS TAPE FUNCTIONS SET TIME PROGRAMMING/TIME FREQ PROGRAM TIME AND CHANNEL TIME GAMESITELETEXT, ETC. SET TIME SET ALARM/ALARM Flg.1 Television Fig. 2 Auto RadIo/HI-FI INPUTS ON/OFF - DODD VOLUME - DODD TUNING - ETC - DODD I----------------J ETC DODD Fig. 3 Receiver with Central Processor 10·19 The microprocessor may also perform additional functions the line, may be built with almost every imaginable feature by such as D/A conversion for actually controlling the circuits, simply adding the appropriate modular circuit onto the bus tuning; volume, brightness; color, etc. It could be used as a time (Figures 5 and 6). Other circuits will be available shortly-an 8- clock capable of being programmed to switch on the receiver at channel 6-bit D/A converter, a time clock, and an on-screen a given, time and channel. The microprocessor may also act as a character generator. Each modular chip will have built-in iden- receiver section of a remote control system, ultrasonic or IR, to tity code, which is something like a chip select but operates on decode the signals for a particular function. However, special- data on the data bus. The identity code word is four bits; ized chips are now available that perform the dedicated func- therefore, there are 16 possible combinations, but only 15 are tions- PLL timing, D/A conversion, etc. - more efficiently than available for use since one is reserved for when no chip is microprocessors, and work well under microprocessor com- addressed. mand. To address a particular chip on the data bus, the correct IDENT STANDARDIZED BUS SYSTEMS code is placed on the data bus and an IDENT clock on the Fairchild adopted a standardized bus system (Figure 4) for control bus. The chip selected is initialized and reset, ready to mic'roprocessor-controlled AM/FM and TV receivers. Using accept data from the data bus. The DATA clock on the control this system, AM/FM and TV models, from low end to the top of bus clocks the information into the selected chip. The number MICROPROCESSOR ACKNOWLEDGE Flg. 4 Standardized Bus System KEYBOARD 0000 DODD ON SCREEN DODD READOUT OF DODO VIDEO TIME AND CHANNEL TTT FEX 2600 ON SCREEN CHARACTER GENERAT.OR DATA BUS CONTROL BUS 3870 DEDICATED MICROCONTROLLER Fig. 5 Microprocessor-Controlled TV with PLL Tuning 10-20 0000 FCM 6020 7-SEGMENT 0000 TIME CLOCK CHIP DECODER DRIVER 0000 0000 KEYBOARD Fig_ 6 Microprocessor-Controlled AM/FM Radio with PLL Tuning of words required to read a chip depends upon the particular The output frequency of the veo (a varactor local oscillator) is chip function, and a DATA clock must be generated for each divided down by the divide-by-n counter and fed into the word. To disable the chip from the bus, the procedure is frequency/phase detector where the frequency and phase are reversed. The wrong IDENT code is put in the data bus with an compared to a reference frequency. The frequency/phase de- I DENT clock on the control bus. tector output circuit has three modes~open circuit, or sup- plying a series of pump-up or pump-down pulse charge~ to PLL TUNING the integrator/amplifier. The output of the integrator/amplifier It has long been realized that the ultimate tuning system is the supplies dc feedback control voltage to the veo. When the phase-locked loop. However, it has not successfully penetrat- loop is locked and operating at the desired frequency, the two ed the consumer market, until recently, due to its stringent frequencies fed into the frequency/phase detector are the same requirements -large complex logic, ability to perform at high and of essentially the same phase. frequencies, system partitioning, and specific system configur- ation. Simple PLL TV tuning systems accurately tuned to the Under these conditions, the frequency/phase comparator sup- FCC channel assignments; however, local problems such as plies only sufficient charge to maintain loop lock. When the antenna mismatch, IF misalignment, cable TV problems, etc:, loop is not locked, the two frequencies at the input to the were often present and required fine tuning or, more accurate- ly, detuning of the PLL system. Therefore, it was imperative to frequency/phase comparator differ. The frequency/phase de- 0 tector supplies a charge of sufficient amplitude and direction to add the fine-tuning capability, inherent in the old turret tuners, the integrator/amplifier to generate a voltage for driving the to the PLL TV tuning system. This complicated the system and VCO to a frequency that will cause the loop to lock. Therefore, also required some kind of non-volatile memory for storing the the output frequency of the PLL can be written as follows: fine-tuning information for each channel. Another problem in PLL TV tuning was how to control the TV fvcO = n x fREF receiver, especially in the method of entry from the calculator- board -whether one or two keys should be used, or an entry where n is always a whole integer. button, and whether the channel display should indicate which key has been depressed or indicate the channel on the screen. Changing the value of the divide-by-n counter changes the frequency. For example, a tuning system for tuning in 25 kHz Now, with the addition of the microprocessor as a central increments requires a reference frequency of 25 kHz. control unit, the problems of the PLL TV tuning can be simpli- fied and the exact application can be determined by the TV or Unfortunately, to build a programmable divide-bY-n counterfor AM/FM manufacturer rather than by the semiconductor manu- a PLL system that operates at the local oscillator frequencies of facturer. FM and TV receivers is impractical. Therefore, an ECL high- BASIC PLL SYSTEMS speed prescaler is inserted between the veo and the pro- A better, more descriptive name for the PLL would be "fre- grammable divide-by-n counter to reduce the counterfrequen- quency, phase-locked loop" (Figure 7) because, for the loop to cy. A simple fixed prescaler (Figure 8) places too many com- lock, the frequency must be adjusted first, then the phase. promises on the PLL designer-long loop lock-up times or 10-21 CHANNEL CHANNEL I, SELECTION I, SELECTION Fig. 7 Basic PLL Clrcuil Fig. 8 High-Frequency Loop Using Fixed Prescaler ~I ,..........----LENGTH' 101 INCHES-----I.. [2Q ~ j ___,_~~O T NINE 10·INCH BRICKS ONE 11-INCH BRICK III LENGTH: 105 INCHES 11:1 CJ ciP CJ c::=J cj!~ CJ FIVE 10-INCH BRICKS FIVE 11-INCH BRICKS Fig. 9 Brick Analogy restrictions on the timing increments-that generally result in The operation of the system for a total divide-by-n cycle is as too many loop or receiver problems. A superior approach is to follows. When the program counter reaches terminal count, it use a dual-modulus prescaler, i.e., an ECl divider with two parallel loads both itself and the swallow counter with the different divide ratios usually closely related, in a technique desired divide ratios. The Terminal-Count output of the swal- called "pulse swallowing." low counter, which is also the prescaler Mode-Control input, then goes HIGH and both counters begin to count. Since the Pulse Swallowing swallow counter is smaller, it reaches terminal count first and Pulse swallowing is a technique that combines the talent of a stops, causing the Mode-Control input to the prescaler to go very fast, but dumb, ECl prescaler with that of a low speed, but lOW, changing the prescaler modulus. The program counter very smart, counter. The best way to explain it is to divert, for the continues until reaching terminal count and the divide-by-n moment, from the field of electronics and enter the world of sequence is repeated. Therefore the program counter performs masonry. Suppose a universal brick were required for building the coarse, or rough, tuning while the swallow counter handles walls of any length, within one inch, without breaking the brick. the fine tuning. One way to do this would be to make one brick 10 inches long and another 11 inches. Using combinations of these two sizes THE FAIRCHILD MICROPROCESSOR CONTROLLED 01 bricks, walls ohny length (over 100") may be built(Figure9). PLL TUNING SYSTEM The Fairchild FEX2500 Pll circuit is made using CMOS metal- gate technology and is packaged in a 28-pin DIP, either plastic Back to electronics-the dual-modulus prescaler (Figure 10) is or ceramic.The primary features are: similar to the two different brick lengths. By controlling the du.al-modulus prescaler appropriately, the incoming clock fre- • Microprocessor addressable quency pulses can be counted in two different "block lengths" • Data-holding registers independent of input data, (Figure 11l. For high-frequency applications, pulse swallowing once addressed combines the advantages ot.-both the straightforward method • Operates to 4 MHz (Figure 7l and the fixed modulus prescaler (Figure 8l. It allows • Operates to 1 GHz with appropriate prescaler the highest possible reference frequency fREF and vastly re- • Fine tuning capability-1 kHz AM band, 25 kHz FM band, duces the speed requirement of a programmable divide-by-n 62.5 kHz TV counter. The dual-modulus prescaler, when operating, appears • Complete digital portion of Pll tuning system to swallow pulses when changing between the two divide ratios • On-board oscillator circuit for reference frequency of the prescaler.....,.thus the name, "pulse swallowing." • 4 MHz, 2 MHz and 1 MHz outputs that may be used for clock input to microprocessor or other circuits To keep track of how many times the prescaler operates in one • Unique data-bus chip select system of its two modes (usually the higher), an extra counter, called a • Choice of 1 kHz, 5 kHz, 7.8125 kHz or 25 kHz reference swallow counter, is added to the system. The swallow counter frequency has only a small total divide ratio compared to that of the • Phase comparator incorporates patented anti-backlash program counter. It differs from the program counter in that its circuit to reduce random FM modulation of the Veo Terminal-Count output is connected back to a Stop input and • Out-of-Iock output indicates out-of-Iock condition of loop operates like a one-shot. This is called a dead-ended counter • Dual ratio program and swallow counters for extended loop because it stops after reaching terminal count. frequency range 10·22 r--------------- TOTAL OIVIDE-BV-N COUNTER -----------------1 I I I r------ 1--------------- I I ---- --, I I i IV t~7 I I I I I PE PE I DUAL MODULUS PRESCALER I t-t-';-:-iI-t CP ~~~~~~~ TC f- , . CP t 6~~~~:~ TC 1--~7__.l--:~kF. FREQ.) + U/L I I STOP I f MODULUS I I I t CONTROL (1) fosc = N x fref PC ~ PROGRAM COUNTER RATIO SW ~ SWALLOW COUNTER RATIO (2) N = Sw (U-L) + LPc U ~ UPPER PRESCALER DIVIDE RATIO (3) or N = USw + L(Pc-Sw) L = LOWER PRESCALER DIVIDE RATIO N ~ TOTAL DIVIDE RATIO LIMITS PC >SW Fig. 10 Frequency Dlvlde-by-N Counter Using a Dual Modulus Preacaler j - - - REFERENCE FREQ PERIOD -J DIVIDE-BV-N r-- ONE COMPLETE DIVIDE-8V-N CVCLE -J r----~I ~ COUNTER OUTPUT WAVEFORM -of ~ I I II L --u I I I I PARALLEL LOAD Ur---- PRESCALER OPERATES IN LOWER DIVIDE RATIO PRESCALER MODE .--I~-----_A. . ------..:_--., CONTROL WAVEFORM -of f--I ' l.; f - - - (SWALLOW COUNTER OUTPUT) L. PRESCALER OPERATES IN HIGHER DIVIDE RATIO--' ----------- Fig. 11 Different "Block Lengths" The FEX2500 contains all the essential digital components of Programs and Swallow Counters an advanced Pll tuning system, requiring only an external tuner, integrator and a crystal to complete the entire loop. Clock Inputs The Clock input for the program and swallow counters can be selected for either a differential input or a single-ended input by II , The Pll loop operates from 100 kHz to 4 MHz directly, andto 1 using an Input Select pin (IS), For TV or FM radio applications, GHz with the addition of an ECl prescaler. The system has fine the differential input mode is generally used. The Pll differen- tuning increments of 1 kHz for the AM band, 25 kHz for the FM tial inputs are connected directly to the differential outputs of band, and 62.5 kHz for TV and can be set lower with loop an ECl prescaler. This considerably reduces the amount of compromises. The user hasa choice of 1 kHz,5 kHz, 7.8125 kHz radiated digital-interference noise. Single-ended mode is in- or 25 kHz reference frequencies when used with a 4 MHz tended for AM radio applications without the use of a prescaler. reference crystal. Once addressed to the desired tuning fre- In AM/FM radio, the local oscillator is connected to the single- quency, the Pll circuit can be operated independently of the ended input while the differential inputs are connected to the microprocessor, since the Pll contains the necessary holding ECl prescaler that derives input from the FM local oscillator. registers for data. To accommodate the 4 MHz input operating loop change from AM to FM is accomplished with the IS frequency and low propagation delays, it uses two power sup- control. The maximum frequency on both inputs is 4 MHz. plies, +12 V and 5 V. The +5 V supply is required to make the input and output circuits compatible with other +5 V logic Counter Configurations circuits. Figure 12 shows the complete block diagram contain- The counter has a total bit length of 16 bits, is sub-divided into ing both the program counter and swallow counter as well as a two sections-a program counter and a swallow counter, and phase comparator, crystal oscillator, reference frequency di- has two selectable configurations: 13 bits program/3 bits swal- vider, four 4-bit registers to store tuning information, plus low or 11 bits program/5 bits swallow. Counter-configuration additional circuits. control determines which bit lengths are selected according to 10-23 ID/ENABLE IDENT CLOCK DATA CLOCK DATA BUS IN 4 BITS DIFF IN + DIFF IN - SINGLE ENDED ~ INPUT o N .... MC J MODE INPUT SELECT ! CONTROL OUTPUT ~.o""~L COUNTER CONFIGURATION COMPARATOR OUTPUT DISABLE CO COMPARATOR COMPo OUTPUT REF SELECT 0 OSCIN 1 • OUT-OF-LOCK OL -- esc OUT F1 1 MHz F2 2 MHz F4 4 MHz Fig. 12 FEX2500 PLL Block Diagram different divide ratios required in various applications. The an output disable circuit. The actual frequency/phase compar- maximum possible divide ratios are: ator is the standard digital type that locks onto the negative edges of the two waveforms, one from the program counter and MODE PROGRAM SWALLOW the other from the reference-frequency divider (Figure 141. It can only lock onto the correct frequency with no output of the 13/3 213 = 8192 23 = 8 comparator at multiples of either of the two frequencies. 11/5 211 =2048 25 = 32 Anti-Backlash Circuit The anti-backlash circuit eliminates the dead-zone problems Both counters are down types; therefore, the divide ratio is the due to propagation delays in other digital frequency/phase same as that of the binary load value. The load values for comparators. A narrow pulse (~ 200 nsl is injected into the frequency or channel allocation are obtained from the micro- pump-down circuit to cause a loop error. The loop responds by processor. Binary counters, rather than decimal counters, sim- making another pulse of equal and oppOSite magnitude to plify chip design and minimize software programming prob- cancel out the error (Figure 151. Both pulses are arranged to be lems on the microprocessor. For low-frequency operation be- closely related in time so they can be easily filtered out by small low 4 MHz, the swallow counter is not used and it is immaterial filter capacitors. Therefore the net charge fed to the integrator what data values are loaded into it. Figure 13 shows the data by these pulses is zero. However, the injection of these pulses loading format. causes a slight phase error that operates the frequency-phase comparator outside the dead zone. The addition of this circuit Frequency/Phase Comparator considerably enhances the spectral output of the veo, elimi- The frequency/phase comparator has a number of unique nating random low-frequency modulation caused by phase- features, an anti-backlash circuit, an out-of-Iock detector and comparator "hunting" in standard comparators. HEXADECIMAL INPUT DATA REGISTERS WXYZ ~ _ _ _ _ _ _ _ _ _ _- - J A ,_ _ _ _ _ _ _ _ _ _ _ _ ~ ...------... ...------... ...------... ...------... SWALLDW + PRDGRAM SWALLDW PRDGRAM PRDGRAM PRDGRAM CDUNTER ~ r~-- ____________ ______________ PROGRAM COUNTER ~A,- ~, CDUNTER CONFIGURATION 3 BITS SWALLOW 13 BITS PROGRAM I cc = PIN 20 "HIGH" I MSB ++ER:W LSB Msa I I ++ER> LSB I ++++ ++++ ++++ + + ++ SWALLOW HEXADECIMAL INPUT DATA REGISTERS WXYZ r~'--------------~'----------~~ ...------... ...------... ...------... SWALLOW + PROGRAM PROGRAM PROGRAM ~ II SWALLOW COUNTER PROGRAM COUNTER COUNTER CONFIGURATION ,.-"'---., ,___----------J"---------. 5 BITS SWALLOW 11 BITS PROGRAM I CC" PIN 20 "LOW" 1++R:wl MSB I ++R:X LSB MSB I I ++R> LSB I ++++ ++++ ++ ++ ++ ++ Fig. 13 Bit Coordination Between Input Registers and Loop Counters 10·25 ON FREQUENCY AND LOW IN FREQUENCY HIGH IN FREQUENCY IN PHASE OIVIDE-BY-N COUNTER OUTPUT REFERENCE FREQUENCY PUMP UP + o +--...:..--.....---+- PUMP DOWN + HIGH IMPEDANCE (OPEN CIRCUIT) Fig. 14 Output Waveforms from Frequency/Phase Comparator I" REF FREQ PERIOD. ----- LOOP RESULTANT CORRECTION PULSE ~INJECTED~ ~ ERROR -, 800 ns PULSE VARIABLE DIGITAL TIMING SAMPLER OL PULSE REFERENCE Fig. 15 Output of Frequency/Phase Detector with Anti-Backlash Circuit Fig. 16 Out-ol-Lock Circuit Out-ol-Lock Detector (Figure 16) Relerence Frequency Divider and Oscillator Circuits This circuit is used to detect an out-of-Iock condition, due to The oscillator circuit consists of two high-gain CMOS inverter either a malfunction or a channel change. The indicator is also circuits in series plus the external components-crystal, trim- useful during initial loop set-up and test. It can also be used to mer capacitor. resistor-connected between the input and mute the audio during channel changes, or itcan be connected output of the inverters. to an LED display for indication of loop malfunction. In operation, a window signal is decoded off the reference- The reference frequency divider circuit is a straightforward frequency divider chain (Figure 171. When the loop is locked, counter with various outputs-4 MHz, 2 MHz and 1 MHz the negative edge of the output waveform hom the divide-by-n -which may be used for the microprocessor clock. The refer- counter rests in the middle of the window. If it strays outside the ence frequencies of 1 kHz, 5 kHz, 7.8125 kHz and 25 kHz are tapped off the divider chain through a 4-input multiplexer, that window for two period reference cycles, a latch is set and an selects the reference frequency. out-of-Iock condition is indicated. Output Circuit Chip-Identity Circuit The output circuit is designed to provide three output modes When the IDENT code (PLL Chip 0110) is present on the Data (Figure 18) -current sourcing (pump-up), current sinking Bus input and an IDENT clock is generated, the scan counter is (pump-down) or high impedance (open circuit). initialized. Data can now be entered into the first register W via the DATA clock. which then clocks the scan counter so the When the loop is locked, the output circuit is in the, high- second register X is ready to accept data. This is repeated until impedance state, except during the positive and negative anti- the remainder of the registers are loaded. Data can be repeat- backlash pulse injection mentioned previously. edly loaded into the registers using the DATA clock, but care must be exercised to keep track of which register is receiving Output Disable data. To disable the Data Bus input to the PLL chip, a wrong This control can be used to hold the loop on frequency while IDENT code is put into the data bus and an IDENTclock gener- new frequency information is being loaded into the PLL regis- ated. The IDENT code circuit may be disabled by leaving the ID ters. When the output is disabled, the output from the frequency Enable input HIGH. phase comparator is in the high impedance state. When a frequency change is initiated, new data is fed, relatively slowly, Data Input Terminal into the four registers, WXYZ. During the loading of each Figure 13 shows the input data format for registers W X Y Z in register, the loop responds to the new data causing erroneous both configurations of the counters. loop responses, unless the comparator output is disabled. When this output is disabled, the integrator tends to remember The generation of the input data for operating a PLL at given the last charge level, thus keeping the loop on or about frequencies is worked. out from the equation in Figure 10. The frequency. following example shows the procedure for establishing the 10-26 -OUT~OF-LOCK-r-IN-LOCK~OUT-OF-LOCK- DECODED fROM REfERENCE DIVIDER OUT·Of·lOCK WINDOW ~~~_-:-......_ _ _ _ _""" DIVIDE·BY·N COUNTER Fig. 17 Out-ol-Lock Timing Diagram +5V fROM + N COUNTER fREQI OUTPUT PHASE OISABlE COM REf fREQUENCY DIVIDER Fig. 18 Frequency/Phase Comparator Output INPUT .:_ _ _~ + 31132 : OUTPUT ' - - - - - - _ c MODE CONTROL 11C79 200 MHo ECl PRESCAlER INPUT .:------IL.__ H +_8_.... + 31132 t - - -.... : OUTPUT ' - - - - - - -.... MODE CONTROL Fig. 19 Prescalers values and will help clarify the operation of the pulse swallow- The integer part of the number is the PC load divide ratio ing system. :. PC = 127 Receiver -FM 88.1 to 107.9 MHz IF 10.7 MHz b. Find SW divide ratio (Fine Tuning) PLL Setup for 4 MHz Crystal Reference Take the integer number from above and multiply bY",. 25 kHz Reference Frequency prescaler lower ratio: .. 1. LOW Frequency = Receiver + IF 127 x 31 = 3939 = 88.1 + 10.7 = 98.8 MHz Subtract this number from Divide-by-n: 2. Total Divide-by-n = LOW Frequencyof- Reference 3952 - 3937 = 15 = 98.8 of- 25 kHz = 3952 :. SW = 15 3. To find PLL loading data: This is the number of times the prescaler operates in the divide-by-32 mode. It is not necessary to work out subse- Program Counter = PC quent frequencies in the range, but merely increment the Swallow Counter = SW values by the required amount. These numbers then have to be translated first into binary, then into hexadecimal data a. Find PC divide ratio (Coarse Tuning) to fit the data loading format shown in Figure 13. "Divide-by-n" divided by prescaler lower ratio PRE SCALERS (Figure 19) Two prescalers have been specially designed to operate with 3952 of- 31 = 127.48387 the FEX2500 PLL chip: 11C79 divide-by 31/32 (200 MHz) and 10·27 "NOTE: FOR TV USE A HEADER AND PLACE 11eu r----r---- +5 V PRESCALER AT THE TUNER. J = OPTIONAL JUMPERS 04·' 0fI- BANDSWITCH 01. 01 - OPTIONAL BANDSWITCH \17 ,-- ." J-~ ~ PROCESSOR POWEAOH '-" ,.3... "I ~ ~ RESET 03 YARACTOR r.1 "RESCALER Hen . ".1k TUNER -31/32 10 . , t AM/F. "".NOSWITCH ,----,1 ,.------, ~ . 11 ~" ~ .--. F£)(2730 " " NON-VOLATILE MEMORV "Ii " 11 ~ ~ ~ t- "3i p: IIII 'q~~~.,; I~ III , ~ H~~ ~ o " "" "- 30 ,,- " MICROPROCESSORI EMULATOR FORMULATOR FEX2500 '" ,,, 1,.-- 8 I '" (Xl 27 "..- ,-----..- ,----- 0, 1<> ~;EYBoARD 1 IT3 r,,- An A, A, "'3 El BCD TO 7 SEGMENT Ao A, A2 "'3 El BCD TO 7 SEGMENT U~~'$~at 1 1 DECODER/DRIVER OECODERIDRIVEA : , 1 1 L~ _____ -..l L__ '~~~R!~O~ __ J , , LINES LINES r----- - --------------- - - --- - - - - - - - - ------------, -, 1 1 1 1 SPARE 1 1 4O.PIN 1 1 I-I I-I 1-' SOCKET (ALL PINS IN PARALLEL 1 1 1 I 1 , 1 1 WITH I_I I I I I MICROPROCESSOR) I 1 1 1 1 " o. 1 1 ~-p} °'1 ~ 1 I 1 1 -5 V I PLUMATRIllKEY80ARD/OISPLAY L________________ ~~N~~~~~~~~ ______________ J Fig. 20 Advanced AM/FM Radio Application 11 C82 divide-by 248/2511 GHz). Other prescalers are available One exciting area for a PLL tuning system is a home AM/FM with a decrease in digital noise performance: 11 C90 divide-by radio with short-wave bands. Low-cost short-wave receivers to 10/11 1600 MHz) and 11C91 divide-by 5/61600 MHz)' date are generally difficult to tune but with the precise tuning of a PLL tuning circuit, this would change. The maximum operating frequency of PLL system is limited by the 4 MHz maximum frequency of PLL FEX2500. If the radio had memory storage for a number of short-wave stations, people living in different lands could program in a Example using 11 COO divide-by 10/11: station from their own country. Most foreign countries radiate the same program material on a number of frequencies. Due to = 4 MHz x 10 = 40 MHz periodic sunspot activity, some frequencies are better than others; thus it is necessary to store a number of short-wave AM/FM APPLICATIONS frequencies. Also, because of the ease of tuning, the short-wave Figure 20 shows an advanced AM/FM radio with a single chip broadcast bands could become acceptable for normal broad- F3870 microprocessor and keyboard with an LED display read- cast frequencies. out. It has manual or automatic search tuning and storage for a number of stations. It can tune on AM to 1 kHz increments and HISTORICAL NOTE ON PULSE SWALLOWING FM to 25 kHz. The pulse swallowing technique makes the whole PLL tuning system commercially feasible and acceptable in performance. With the integrator circuit, the undesirable reference frequency It was the idea, or.invention, of John Nichols in about 1968-69 modulation of the VCO frequency is: time period when he worked for Fairchild. The work was done initially for 360-channel aircraft radio/transmitters. It was not FM = better than 50 dB at 25 kHz until many years later that his brilliant idea became widely AM = better than 45 dB at 1 kHz known. 10-29 Microprocessor-Based Solar Controller Microprocessor-Based Solar Controller Controller Operation Energy is being consumed today in greater quantities than The microprocessor is programmed to solve a set of logicl ever; at the same time, yesterday's seemingly unlimited arithmetic equations. These equations are contained in the resources are now seen to be quite finlte. As a result, EPROM program storage, with the associated constants be- energy conservation has assumed a new importance, and ing held in the 1K RAM. The keyboard can be used to the search for alternative energy sources has begun in change a number of the equation constants, permitting earnest. One of the more promising possibilities is harnes- system changes to be made without hardware modification. sing the sun as a direct source of heat. In normal operation, the AID converter receives analog tem- The solar heating systems now being installed in homes, perature information from as many as 16 thermistors and apartment complexes, and businesses contain heat collec- presents the converted data to the microprocessor. Digital ting and storing devices from which resources are drawn data, such as that produced by switch closures and teletype during non- and low-sunlight periods. Although there are signals, can be presented directly to the microprocessor many types of such systems, the most common circulate through the 16 digital inputs of the input cards. These data water or some other liquid through solar heating panels, or are used to solve the system functional equations and pro- collectors, during the day and store the heated fluid in duce two types of microprocessor outputs. tanks. When required, this fluid is pumped through radiators or radiant coils to provide area heating. To maintain comfort In the channel-monitor modes, temperature information is and make the best use of the available energy, the user output to the display in degrees Fahrenheit or CelSius, must continuously monitor the temperature of every area to depending upon resident program. In the time-display be heated, as well as the temperatures of the collectors and mode, a timekeeping routine program assumes control of the storage tanks. Valves must then be opened or closed the display circuitry and the temperature information is not and pumps turned on or off to maintain the desired relation- provided. ship among the system components. A computerized ener- gy management system, or solar controller, can perform all The other microprocessor output consists of control signals of the monitor and control functions with optimum efficiency. that are suitable for opening and closing relays and activat- ing solid state switches. These signals perform such func- A microprocessor-based solar controller designed by Fair- tions as turning on pumps and opening valves to let water child for Rho Sigma, Inc., a major manufacturer of solar run into the storage tank or circulate through radiators. controls, is specifically intended to accept the low voltages produced by thermistor temperature sensors, process and Since program storage is in ROM, power failure does not display the data, and provide outputs for relay and switch II cause catastrophic loss of memory. When power is restor- opening and closing. The solar controller contains a single- ed, a resetting sequence begins, with the controller ensur- board F8™ microprocessor, two input and two output cards, ing that all valves and controls are turned off so that stored an AID converter control card, a display control card, two energy is not lost. The controller then cycles through all of • 4K EPROM program storage cards, and a 1K RAM and the inputs, decides what the system operating conditions memory address card (figure 1). should be, and generates the necessary output signals. This analysis takes approximately five seconds. To indicate to Also included in the unit are an AID converter, a 5-digit LED the user that power has been off, the display flashes until display, and a 16-key keyboard. The display automatically manually reset. sequences through all input channels, displaying the num- ber and temperature of each channel for one second before Originally designed for use in solar heating applications, the cycling to the next. The keyboard can be used to halt this intelligent microprocessor-based controller is applicable to sequencing and either make the display continuously moni- any system in which the ability to deal with multiple sensor tor only one channel or convert it to a clock-only display inputs and generate control outputs is required. that shows time of day. 10-31 Fig. 1 Solar Controller Functional Block Diagram 10-32 [!] I 1 INTRODUCTION '2l 1ORDERING AND PACKAGE ~ INFORMATION 1 0 1 F8 MICROCOMPUTER FAMILY 101CONTROLLER FAMILY wI 1 F6800 MICROPROCESSOR FAMILY 1C!JIF16000 MICROPROCESSOR FAMILY [!] 1 1ROM PRODUCTS I ~9 DEVELOPMENT SYSTEMS AND L!.J SOFTWARE ~ 1APPLICATIONS 1 11 RESOURCE AND TRAINING ~ ISALES OFFICES 1 Section 11 Microprocessor Resource and Training Centers Microprocessor Resource Center The Microprocessor Resource Center (MRC) organization The following Education Center course offerings are was created to serve as yet another, technically oriented, included. Fairchild customer link to a world·wide support structure that is concerned with all phases of the customer's require· • F8 and F3870 Microprocessor Systems ments. Intended to introduce the student to the Fairchild F8 and F3870 microprocessor systems, this course provides Every MRC is available to assist the customer in microproc· basic knowledge of F8 and F3870 hardware, software, essor hardware and software development and application applications, and development aids. Included are labora· engineering, product definition, and long·term product tory sessions in which the student applies that knowl· strategies. Backed by Fairchild's expertise and extensive edge in practical situations. Among the areas covered resources, the MRC is a tool for solving current problems are device features and architecture, use of the various and planning for future needs. registers, machine and assembly language syntax, pro- gram writing and debugging, and hands-on use of the At each Center is a microprocessor expert who is equally PEP387X and Formulator systems. familiar with standard devices and those Fairchild state·of· the·art products that are on the leading edge of technology. • F6800 Microprocessor Family Because they understand the microprocessor market and This course provides the student basic knowledge of development trends, these experts provide technical support Fairchild F6800 8·bit microprocessor family hardware, and planning assistance that can benefit the customer software, applications, and development aids. Included through timely and cost·effective system design and are laboratory sessions in which the student applies that implementation. knowledge in practical situations. Among the areas cov· ered are device features and architecture, register organ· As an added convenience, all Microprocessor Division devel· ization and use, system configurations, program writing opment systems can be demonstrated at the MRCs. This and debugging, and hands·on use of the various training affords the customer an opportunity to assess the perform· and development aids. ance and applicability of products in an operational· type environment. • F9445 Family Introduction This course is an overview of the Fairchild F9445 16·bit Training on Fairchild's microprocessor products is available microprocessor and its supporting circuits. Consisting of at either the customer or MRC location. This training, which both lecture and laboratory sessions, with emphasis on is coordinated by the MRC manager, is performed in con· hands·on experience, the course covers such areas as junction with the Microprocessor Division Education Center. F9445 CPU and system timing, software, device features and architecture, and use of the FS·I and EMUTRAC Microprocessor Education Center development aids. III Education plays a key role in the technical support of a • F16000 Family Introduction microprocessor user. It is essential to a full understanding IntroduCing the student to the Fairchild F16000 16·bit of the complexities, capabilities, and applications of microprocessor family, this course is an overview that modern processor products, and is therefore treated as an consists of both lecture and laboratory sessions. Empha· important component of the Fairchild Microprocessor sizing hands·on experience in the laboratory, the course Division customer support structure. covers such areas as device features and architecture, CPU and system timing, principles of memory manage· The most recent advances in microprocessor technology ment and virtual memory, floating point arithmetiC, and are included in the Fairchild Microprocessor Eduction familiarization with design aids. Center courses, which feature a maximum amount of hands·on experience. Indeed, the major thrust of the • FS·I Development System training courses is to focus on the general techniques of This course introduces the student to the Fairchild microprocessor usage. This emphasis, it is felt, best pre· System·1 (FS·I) development system, emphasizing hands· pares the student to apply the available design and develop· on experience. Included is coverage of operating system ment tools to specific applications in an efficient manner. usage, utility software usage, high·level languages and their associated compilers and interpreters, and the EMUTRAC emulation and tracking system. 11·3 Microprocessor Resource. and Training Centers • Microprocessor Control and Interface This course is intended to introduce the student to the principles and techniques of microprocessor control and interfacing. Opportunity is provided for hands-on experi- mentation with a mini-development system. Included in the course are a review of microprocessor fundamentals, transducer types and applicability, conversion tech- niques, and parallel and serial formats . • Pascal for Microprocessors An introduction to the high-level Pascal language, this course teaches the student the skills required to produce software in Pascal for many practical applications, in- cluding real-time computing, scientific and engineering- type problem solving, and data processing. 11-4 I[!] I INTRODUCTION ~2 IORDERING AND PACKAGE ~ INFORMATION I[!] I Fa MICROCOMPUTER FAMILY I[!] I CONTROLLER FAMILY 1~IF6aoo MICROPROCESSOR FAMILY 101F16000 MICROPROCESSOR FAMILY I~ I ROM PRODUCTS InIg I DEVELOPMENT SYSTEMS AND L!J SOFTWARE I[!QJ I APPLICATIONS I[!IJ I RESOURCE AND TRAINING CENTERSI Section 12 Sales Offices II 12·3 Sales Offices 12·4 FAIRCHILD Sales United States and A Schlumberger Company Offices Canada Alabama Indiana North Carolina Huntsville Olfice Ft. Wayne Office Raleigh Oflice 500 Wynn Drive, Suite 511 2118 Inwood Drive, SUite 111 1100 Navaho Drive. SUite 112 Huntsville. Alabama 35805 Ft. Wayne. Indiana 46815 Raleigh. North Carolina 27609 Tel: 205-837-8960 Tel: 219-483-6453 TWX 810-332-1507 Tel 919-876-9643 Arizona Indianapolis Office Ohio Phoenix Office 7202 N. Shadeland. Room 205 Dayton Office 2255 West Northern Road. Suite B112 Castle POint 5045 North Main Street SUite 105 Phoenix, Arizona 85021 Indianapolis, Indiana 46250 Dayton. Ohio 45414 Tel: 602-864-1000 TWX: 910-951-1544 Tel: 317-849-5412 TWX: 810-260-1793 Tel: 513-278-8278 TWX 810-459-1803 California Kansas Oklahoma Los Angeles Office' Kansas City Office Tulsa Office Crocker Bank Bldg 8600 West 110th Street. Suite 209 9810 East 42nd Street. SUite 127 15760 Ventura Blvd" Suite 1027 Overland Park. Kansas 66210 Tulsa. Oklahoma 74145 Encino, California 91436 Tel: 913-649-3974 Tel: 918-627-1591 Tel: 213-990-9800 TWX: 910-495-1776 Maryland Oregon San Diego Office' Columbia Office Portland Office 7867 Convoy Court. Suite 312 1000 Century Plaza. SUite 225 8285 SW. Nimbus Avenue. SUite 138 San Diego. California 92111 Columbia. Maryland 21044 Beaverton. Oregon 97005 Tel: 714-279-7961 TWX: 910-335-1512 Tel: 301-730-1510 TWX' 710-826-9654 Tel: 503-641-7871 TWX 910-467-7842 Santa Ana Office" Massachusetts Pennsylvania 1570 Brookhollow Dnve. Suite 206 Framingham Office Philadelphia Office' Santa Ana. California 92705 5 Speen Street 2500 Office Center Tel: 714-557-7350 TWX: 910-595-1109 Framingham, Massachusetts 01701 2500 Maryland Road Tel: 617-872-4900 TWX 710-380-0599 Willow Grove, Pennsylvania 19090 Santa Clara Office' Tel: 215-657-2711 3333 Bowers Avenue. SUite 299 Michigan Santa Clara. California 95051 Detroit Office' Tennessee Tel: 408-987-9530 TWX: 910-338-0241 21999 Farmington Road Knoxville Office Farmington Hills, Michigan 48024 Executive Square II Colorado Tel: 313-478-7400 TWX: 810-242-2973 9051 Executive Park Drive, Suite 502 Denver Office Knoxville. Tennessee 37923 7200 East Hampden Avenue. Suite 206 Minnesota Tel 615-691-4011 Denver. Colorado 80224 Minneapolis Office· Tel: 303-758-7924 4570 West 77th Street. Room 356 Texas Minneapolis, Minnesota 55435 Austin Office Connecticut Tel: 612-835-3322 TWX: 910-576-2944 9027 North Gate Blvd SUite 124 Danbury Office Austin. Texas 78758 57 North Street. #206 New Jersey Tel: 512-837-8931 Danbury. Ccnnectlcut 06810 New Jersey Office Tel: 203-744-4010 Vreeland Plaza Dallas Office 41 Vreeland Avenue 1702 North CollinS Street. SUite 101 Florida Totowa. New Jersey 07511 Richardson, Texas 75081 Ft. Lauderdale Office Tel: 201-256-9006 Tel: 214-234-3391 TWX 910-867-4757 Executive Plaza, Suite 112 1001 Northwest 62nd Street New Mexico Houston Office Ft. Lauderdale. Florida 33309 Albuquerque Office 9896 Blssonnet-2. SUite 470 Tel: 305-771-0320 TWX: 510-955-4098 North Building Houston, Texas 77036 2900 Louisiana N.E. South G2 Tel: 713-771-3547 TWX 910-881-8278 Orlando Office' Albuquerque, New Mexico 87110 Crane's Roost Office Park Tel: 505-884-5601 TWX: 910-379-6435 Canada 399 Whooping Loop Toronto Regional Office Altamonte Springs. Florida 32701 New York 2375 Steeles Avenue West. Suite 203 Tel: 305-834-7000 TWX: 810-850-0152 Fairport Office Downsview, Ontario M3J 3AB, Canada 815 Ayrault Road Tel: 416-665-5903 TWX 610-491-1283 Georgia Fairport. New York 14450 Atlanta Sales Office Tel: 716-223-7700 Interchange Park. Bldg. 4183 N.E. Expressway Melville Office Atlanta. Georgia 30340 275 Broadhollow Road. Suite 219 Tel: 404-939-7683 Melville. New York 11747 Tel: 516-293-2900 TWX: 510-224-6480 Illinois Itasca Office Poughkeepsie Office 500 Park Blvd" SUite 575 19 Davis Avenue Itasca. Illinois 60143 Poughkeepsie. New York 12603 Tel: 312-773-3300 Tel: 914-473-5730 TWX 510-248-0030 • Field Application Engineer 12-5 I=AIRCHILD Sales International· A Schlumberger Company Offices Australia Hong Kong Scandinavia Fairchild Australia Pty Ltd. Fairchild Semiconductor I HK Ltd, Fairchild Semiconductor AB Branch Office Third Floor 135 Hoi Bun Road Svartengsgatan 6 F.A.1. Insurance Building Kwun Tong S-11620 Stockholm 619 Pacific Highway Kowloon, Hong Kong Sweden SI. Leonards 2065 Tel 3-440233 and 3-890271 Tel: 8-449255 Telex: 17759 New South Wales, Australia Telex· HKG-531 Tel, 02 ,-439-5911 Singapore Telex: AA20053 Italy Fairchild Semiconductor Pty. Ltd. Fairchild Semiconducttori, S.P.A. No. 11, Lorong 3 Austria and Eastern Europe Via Flamenia Vecchia 653 Toa Payoh Fairchild Electronics 00191 Roma, Italy Singapore 12 A-1010 Wien Tel: 06 327 4006 Telex: 63046 ,FAIR ROM Tel: 531-066 Telex: FAIRSIN-RS 21376 Schweden platz 2 Tel: 0222635821 Telex· 75096 Fairchild Semiconducttori S.P.A. Taiwan Viale Corsica 7 Fairchild Semiconductor Ltd. Benelux 20133 Milano, Italy Hsietsu Bldg., Room 502 Fairchild Semiconductor Tel: 296001-5 Telex: 843-330522 47 Chung Shan North Road Ruysdaelbaan 35 Sec. 3 Taipei, Taiwan 5613 Ox Eindhoven Japan Tel: 573205 thru 573207 The Netherlands Fairchild Japan Corporation Tel 00-31-40-446909 Telex: 00-1451024 Pola Bldg. United Kingdom 1-15-21, Shibuva Fairchild Camera and Instrument Ltd Brazil Shibuya-Ku, Tokyo 150, Japan Semiconductor Division Fairchild Semiconductores Ltda. Tel: 03 400 8351 Telex: 242173 230 High Street Caixa Postal 30407 Potters Bar Rua Alagoas, 663 Fairchild Japan Corporation Hertfordshire EN6 5BU 01242 Sao Paulo. Brazil Yotsubashl Chuo Bldg England Tel 66-9092 Telex· 011-23831 1-4-26, Shinmachi Tel: 0707 51111 Telex: 262835 Cable FAIRLEC Nishi-Ku, Osaka 550, Japan Tel 06-541-6138/9 Fairchild Semiconductor Ltd. France 17 Victoria Street Fairchild Camera & Instrument S_A Korea Craigshill '21, Avenue d'italie Fairchild Semikor Ltd. Livingston 75013 Paris, France K2 219-6 Gari Bong Oong West Lothian, Scotland-EH54 5BG Tel: 331-584-5566 Young Dung Po-Ku Tel: Livingston 050632891 Telex: 72629 Telex: 0042 200614 or 260937 Seoul 150-06, Korea Tel: 85-0067 Telex: FAIRKOR 22705 GEC-Fairchild Ltd. Germany Chester High Road Fairchild Camera and Instrument GmBH mailing addressI Neston Daimlerstrasse 15 Central P.O. Box 2806 South Wirral L64 3U E 8046 Garchlng Hochbruck Cheshire, England Munich, Germany Mexico Tel: 051-336-3975 Telex: 629701 Tel: ,089 320031 Telex: 524831 fair d Fairchild Mexicana S.A. Blvd. Adolofo Lopez Mateos No. 163 Fairchild Camera and Instrument GmBH Mexico 19, DF Oeltzenstrasse 15 Tel: 905-563-5411 Telex: 017-71-038 3000 Hannover W, Germany Tel: 0511 17844 Telex: 09 22922 Fairchild Camera and Instrument GmBH Poststrasse 37 7251 Leonberg W. Germany Tel 0715241026 Telex: 07 245711 12·6 FAIRCHILD Schlumberger Company Fairchild reserves the right to make changes In the circuitry or specifications at any time without notice. Manufactured under one of the following U.S. ~3tents 2981877, 3015048, 3064167,3108359, 3117260; other pat nts pending. Fairchild cannot assume responsibility for use of any circuitrY described other than circuitry embodied in a Fairchild pro uct. N ther circuit patent licenses are implied.