8080 Data Sheet.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
tiT^r The 8080 is a complete 8-bit parallel, central processor bit 3-state Address Bus (A0-A15). Six timing and control unit (CPU) for use in genera! purpose digital computer sys- outputs (SYNC, DBIN, WA)T,WR, HLDA and INTE) eman- tems. It is fabricated on a single LSI chip (see Figure 2-1). ate from the 8080, while four control inputs (READY, using Intel's n-channe) silicon gate MOS process. The 8080 HOLD, INT and RESET), four power inputs (+12v, +5v, transfers data and interna) state information via an 8-bit, -5v, and GND) and two clock inputs (01 and ^2) are ac- bidirectional 3-state Data Bus (DQ-D7). Memory and peri- cepted by the 8080. pheral device addresses are transmitted over a separate 16- MIT HEADY HLDA f "ruMm GND O- -O A^ D, O- -O A^ -O A^ -O A, 5 D, O- <-0 Ag ^ -O Ag Dp O !NTEtT -O A? ..^.ysPr "t- O, O 9 -O A. O. 10 A5 '.' S L. < < .. 0 8080 -5V O- 11 -O A„ ' . =- . RESET O 12 HOLD O- 13 -O +HV INT O- 14 -O A2 ... J 15 -O Ai - . A M ', ^ . INTE O- 16 -O A„ DBIN o- 17 <-0 WAIT WR O- 18 -O READY tMaEBPWtW, ... ryWi .duamamyta. SYNC O- 19 -O #1 w- +5V O- 20 . BiUtatC^mNAti ^ - ^ . .. An A,; A,3 A„ A„ Figure 2 1. 8080 Photomicrograph With Pin Designations 2-1 ARCHtTECTURE OF THE 8080 CPU matically during every instruction fetch. The stack pointer The 8080 CPU consists of the following functional maintains the address of the next available stack location in units: memory. The stack pointer can be initialized to use any * Register array and address logic portion of read-write memory as a stack. The stack pointer * Arithmetic and logic unit (ALU) is decremented when data is "pushed" onto the stack and * Instruction register and control section incremented when data is "popped" off the stack (i.e., the * Bi-directional, 3-state data bus buffer stack grows "downward"). Figure 2-2 illustrates the functional blocks within The six general purpose registers can be used either as the 8080 CPU. single registers (8-bit) or as register pairs (16-bit). The temporary register pair, W,Z, is not program addressable and is only used for the internal execution of instructions. Registers: Eight-bit data bytes can be transferred between the The register section consists of a static RAM array internal bus and the register array via the register-select organized into six 16-bit registers: multiplexer. Sixteen-bit transfers can proceed between the register array and the address latch or the incrementer/ * Program counter (PC) decrementer circuit. The address latch receives data from * Stack pointer (SP) any of the three register pairs and drives the 16 address * Six 8-bit general purpose registers arranged in pairs, output buffers (A0-A15), as well as the incrementer/ referred to as B,C; D,E; and H,L decrementer circuit. The incrementer/decrementer circuit * A temporary register pair called W,Z receives data from the address latch and sends it to The program counter maintains the memory address the register array. The 16-bit data can be incremented or of the current program instruction and is incremented auto- decremented or simply transferred between registers. Di D„ BI-DIRECTIONAL DATA BUS DATA BUS INTERRUPT HOLD WAIT WRITE CONTROL CONTROL CONTROL CONTROL SYNC CLOCKS INTE INT HOLDHOLDWAIT SYNC <^2 RESET ACK READY ADDRESS BUS Figure 2 2. 8080 CPU Functional Block Diagram 2 2 Arithmetic and Logic Unit (ALU): THE PROCESSOR CYCLE The ALU contains the following registers: An instruction cycte is defined as the time required to fetch and execute an instruction. During the fetch, a * An 8-bit accumulator selected instruction (one, two or three bytes) is extracted from memory and deposited in the CPU's instruction regis- * An 8-bit temporary accumulator (ACT) ter. During the execution phase, the instruction is decoded and translated into specific processing activities. * A 5-bit flag register: zero, carry, sign, parity and Every instruction cycle consists of one, two, three, auxiliary carry four or five machine cycles. A machine cycte is required each time the CPU accesses memory or an I/O port. The * An 8-bit temporary register (TMP) fetch portion of an instruction cycle requires one machine cycle for each byte to be fetched. The duration of the execu- Arithmetic, logical and rotate operations are per- tion portion of the instruction cycle depends on the kind formed in the ALU. The ALU is fed by the temporary of instruction that has been fetched. Some instructions do register (TMP) and the temporary accumulator (ACT) and not require any machine cycles other than those necessary carry flip-flop. The result of the operation can be trans- to fetch the instruction; other instructions, however, re- ferred to the internal bus or to the accumulator; the ALU quire additional machine cycles to write or read data to/ also feeds the flag register. from memory or I/O devices. The DAD instruction is an exception in that it requires two additional machine cycles The temporary register (TMP) receives information to complete an internal register-pair add (see Chapter 4). from the internal bus and can send all or portions of it to Each machine cycle consists of three, four or five the ALU, the flag register and the internal bus. states. A state is the smallest unit of processing activity and The accumulator (ACC) can be loaded from the ALU is defined as the interval between two successive positive- and the internal bus and can transfer data to the temporary going transitions of the 01 driven clock pulse. The 8080 accumulator (ACT) and the internal bus. The contents of isdriven by a two-phase clock oscillator. All processing activ- the accumulator (ACC) and the auxiliary carry flip-flop can ities are referred to the period of this clock. The two non- be tested for decimal correction during the execution of the overlapping clock pulses, labeled 01 and 02. are furnished DAA instruction (see Chapter 4). by external circuitry. It is the 01 clock pulse which divides each machine cycle into states. Timing logic within the 8080 uses the clock inputs to produce a SYNC pulse, tnstruction Register and Contro!: which identifies the beginning of every machine cycle. The SYNC pulse is triggered by the low-to-high transition of 02, During an instruction fetch, the first byte of an in- as shown in Figure 2-3. struction (containing the OP code) is transferred from the internal bus to the 8-bit instruction register. The contents of the instruction register are, in turn, FIRST STATE OF available to the instruction decoder. The output of the 'EVERY MACHINE CYCLE decoder, combined with various timing signals, provides the control signals for the register array, ALU and data ^ — / \ buffer blocks. In addition, the outputs from the instruction decoder and external control signals feed the timing and state control section which generates the state and cycle / \ / \ timing signals. SYNC / \ Data Bus Buffer: 'SYNC DOES NOT OCCUR IN THE SECOND AND THIRD MACHINE This 8-bit bidirectional 3-state buffer is used to CYCLES OF A DAD INSTRUCTION SINCE THESE MACHINE CYCLES isolate the CPU's internal bus from the external data bus. ARE USED FOR AN INTERNAL REGISTER-PAIR ADD. (Do through Dy). In the output mode, the internal bus content is loaded into an 8-bit latch that, in turn, drives the Figure 2 3.01,02 And SYNC Timing data bus output buffers. The output buffers are switched off during input or non-transfer operations. There are three exceptions to the defined duration of a state. They are the WAIT state, the hold (HLDA) state During the input mode, data from the external data bus and the halt (HLTA) state, described later in this chapter. is transferred to the internal bus. The internal bus is pre- Because the WAIT, the HLDA, and the HLTA states depend charged at the beginning of each internal state, except for upon external events, they are by their nature of indeter- the transfer state (T3—described later in this chapter). minate length. Even these exceptional states, however, must 2-3 be synchronized with the pulses of the driving clock. Thus, the contents of its H and L registers. The eight-bit data the duration of all states are integral multiples of the clock word returned during this MEMORY READ machine cycle period. is placed in a temporary register inside the 8080 CPU. By now three more clock periods (states) have elapsed. In the To summarize then, each ctock period marks a state; seventh and final state, the contents of the temporary regis- three to five states constitute a machine cycle; and one to ter are added to those of the accumulator. Two machine five machine cycles comprise an instruction cycte. A full cycles, consisting of seven states in all, complete the instruction cycle requires anywhere from four to eight- "ADD M" instruction cycle. teen states for its completion, depending on the kind of in- struction involved. At the opposite extreme is the save H and L registers (SHLD) instruction, which requires five machine cycles. Machine Cycte tdentification: During an "SHLD" instruction cycte, the contents of the With the exception of the DAD instruction, there is processor's H and L registers are deposited in two sequen- just one consideration that determines how many machine tially adjacent memory locations; the destination is indi- cycles are required in any given instruction cycle: the num- cated by two address bytes which are stored in the two ber of times that the processor must reference a memory memory locations immediately following the operation code address or an addressable peripheral device, in order to byte.