Content text Unit_2.pdf
Unit 2 Basic Computer Architecture The 8085 microprocessor is an 8 bit general purpose microprocessor having 16 bit address lines (capable of addressing 2 16 = 65536 bytes = 64 KB of memory). The device has 40 pins, requires a +5V single power supply and can operate with 3 MHZ single phase clock. Internal Architecture and features of 8085 Microprocessor The main components of 8085 microprocessor, as shown in functional block diagram, are the Arithmetic/Logic Unit (ALU), Register Array, Timing and Control Unit, Instruction Register and Decoder, Interrupt Control and Serial I/O Control. These are linked by an internal data bus. Fig: Functional Block Diagram of 8085 Microprocessor The major components of the block diagram are described as follows: 1. Arithmetic Logic Unit (ALU) The ALU performs the computing functions. It includes the Accumulator, temporary register,arithmetic and logic circuits, and five flags. 1 Puran Adhikari www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com
● Accumulator (register A): It is an 8 bit register that is the part of ALU. This register is used to store the 8-bit data and to perform arithmetic and logic operations and 8085 microprocessor is called accumulator based microprocessor. When data is read from input port, it first moved to accumulator and when data is sent to output port, it must be first placed in accumulator. ● Temporary Registers (W & Z): They are 8 bit registers not accessible to the programmer. During program execution, 8085A places the data into it for a brief period. ● Flags: The bit positions reserved for flags in flag register is as follows: Register consists of five flip flops, each holding the status of different states separately is known as flag register and each flip flop are called flags. 8085A can set or reset one or more of the flags and are sign(S), Zero (Z), Auxiliary Carry (AC), Parity (P) and Carry (CY). The state of flags indicates the result of arithmetic and logical operations, which in turn can be used for decision making processes. The different flags are described as: a. Sign flag (S): After the execution of arithmetic or logic operation, if D7 bit (MSB: most significant bit) of the result (usually in accumulator) is 1, the sign flag (S) is set. Otherwise it is reset. (For signed number operation D7 bit indicates the sign (positive or negative) of number). b. Zero flag (Z): Set i.e. 1, if the result of last operation is zero, and the flag is reset i.e. 0 if the result is not 0. This flag is often used in loop control and in searching for particular data value. c. Auxiliary Carry (AC): If the last operation generates a carry from the lower half word (lower nibble), its status will be 1 otherwise 0 (i.e. when a carry is generated by digit D3 and passed on to digit D4). The flag is used only internally for BCD (Binary-Coded Decimal) operations and is not available for programmer. d. Parity flag (P): If the result of the last operation has even number of 1’s (even parity), its status will be 1 otherwise 0. e. Carry flag (CY): If the last operation generates a carry its status will 1 otherwise 0. It can handle the carry or borrow from one word to another. 2. Instruction Register and Decoder It is a 8 bit register not accessible to the programmer. It receives the operation codes of instruction from internal data bus and passes to the instruction decoder which decodes so that microprocessor knows which type of operation is to be performed. 2 Puran Adhikari www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com
3. Register Array ● Scratch Pad Registers (B, C, D, E): It is a 8 bit register accessible to the programmers. Data can be stored upon it during program execution. These can be used individually as 8-bit registers or in pair BC, DE as 16 bit registers. The data can be directly added or transferred from one to another. Their contents may be incremented or decremented and combined logically with the content of the accumulator. ● Register H & L: They are 8 bit registers that can be used in same manner as scratch pad registers. In addition, the register H and L are utilized in indirect addressing mode. In this mode, the memory location whose address is specified by contents of the register pair. ● Stack Pointer (SP): It is a 16 bit register used as a memory pointer. It points to a memory location in R/W memory, called the stack. The beginning of the stack is defined by loading a 16- bit address in the stack pointer. ● Program Counter (PC): Microprocessor uses the PC register to sequence the execution of the instructions. The function of PC is to point to the memory address from which the next byte is to be fetched. Depending upon the instruction type the program counter is incremented by one, two, or three to point to the next memory location. 4. Timing and Control Unit This unit synchronizes all the microprocessor operations with the clock and generates the control signals necessary for communication between the microprocessor and peripherals. 5. Interrupt Controls The various interrupt controls signals (INTR, RST 5.5, RST 6.5, RST 7.5 and TRAP) are used to interrupt a microprocessor. 6. Serial I/O Controls Two serial I/O control signals (SID and SOD) are used to implement the serial data transmission. The salient features of 8085 microprocessor are: ● It is a 8 bit microprocessor. ● It has 16-bit address bus and hence can address up to 2 16 = 65536 bytes (64KB) memory locations through A0-A15. ● The first 8 lines of address bus and 8 lines of data bus are multiplexed AD0 – AD7. ● Data bus is a group of 8 lines D0 – D7. ● It supports external interrupt request. ● A 16 bit program counter (PC). ● A 16 bit stack pointer (SP). ● Six 8-bit general purpose register arranged in pairs: BC, DE, HL. ● It requires a signal +5V power supply and operates at 3 MHZ single phase clock. ● It is enclosed with 40 pins DIP (Dual in line package). ● It has 74 operation codes with total 246 instructions. 3 Puran Adhikari www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com
Pin configuration of 8085 microprocessor A microprocessor based system consists of a set of components or modules of three basic types: CPU, memory and I/O units, which communicate with each other. A bus is a group of wires used for communication pathway between two or more such components. The fundamental characteristic of a bus is that, it is a shared transmission medium. Number of devices is connected to the bus and a signal transmitted by a signal device is available for reception by all other devices attached. Data signal to the bus will be send by one device at a time successfully because if two devices transmit at the same period, their signals get overlapped and become garbage. The bus that connects major microcomputer components such as CPU, memory, I/O is called the system bus. Fig: Pin diagram and signals of 8085 microprocessor The 8085 pin signals can be classified into following groups: 1. Address signals (A15 - A8) 2. Multiplexed Address/Data signals (AD7 - AD0) 3. Control and Status signals 4. Power Supply and frequency signal 5. Externally initiated signals 6. Serial I/O signals 1. Address signals (A15 - A8) The 8085 microprocessor has 16 address signal lines hence can address up to 2^16=65536 bytes (64 KB) memory locations through A15 - A0. However, these lines are split into two segments: A15 - A8 and AD7 - AD0. The 8 signal lines, A15 - A8 are unidirectional and used for most significant bits called higher order address of a 16-bit address. 4 Puran Adhikari www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com www.bcanotesnepal.com