Anda di halaman 1dari 15

MODULE-1 Prepared by NITHIN JOHN

INTEL 8085 MICROPROCESSOR

Microprocessor is a semiconductor IC manufactured using LSI or VLSI This IC consists of ALU , registers and control circuits in a single chip Program instructions can be fed into the microprocessor in binary form and decoded and executed General purpose Microprocessors can be categorized by the number of bits ALU can handle eg: 4-bit,8-bit Bit: a Binary Digit 0 or 1 Nibble : a group of 4 bits

A Microprocessor is identified by a number an the name of the company that released it : 4-bit processors : INTEL 4004, INTEL 4040 8-bit processors : INTEL 8080, INTEL 8085 8/16 bit processors : INTEL 8088 16 bit processor : INTEL 8086, INTEL 80186 32 bit processors : INTEL 80386, INTEL 80486 64 bit processors : INTEL Pentium Applications Applications of microprocessors : Cpu of personal computer system In Microwave ovens, Washing machines, Sewing machin Auto ignition systems In automatic control systems In Intelligent Instruments like logic analyzers, Storage oscilloscopes, Frequency Synthesizers In Medical instrumentation : patient monitoring In industries in process control In Data Acquisition Systems In Telecommunications and computer networks: Digital Telephone sets, Routers and Modems

SIGNALS ARCHITECTURE OF 8085 The 8085 is an 8-bit general purpose microprocessor that can address 64K Byte of memory. It has 40 pins and uses +5V for power. It can run at a

maximum frequency of 3 Mhz. Intel 8085 Pin Configuration

Clock Pins 8085 MPU has 3 pins that control or present the clock signal. X1 and X2 pins determine the clock frequency. CLK OUT is a TTL squarewave output clock. The CLOCK OUT is onehalf the crystal frequency Address and data bus 8085 p consists of 16 signal pins use as address bus. Divide into 2 part: A15 A8 (upper) and AD7 AD0 (lower). A15 A8 : Unidirectional, known as high order address. AD7 AD0 : bidirectional and dual purpose (address and data placed once at a time). AD7 AD0 also known as low order address.

To execute an instruction, at early stage AD7 AD0 uses as address bus and alternately as data bus for the next cycle. The method to change from address bus to data bus known as bus multiplexing. Group of signals consists of : Two control signals (RD read; and WR - write). Three status signals (IO/M, S1, and S0) to recognize nature of operation. ALE (Address Latch Enable) signal : active high signal - generated to show the start of 8085 operation. When transition 1-to-0: indicate that lines AD7-AD0 (AD7AD0 = A7-A0) act as address lines. Control and Status Signals Signals: RD Read (active low). To indicate that the I/O or memory selected is to be read and data are available on the bus. WR Write: Active low. This is to indicate that the data available on the bus are to be written to memory or I/O ports. IO/M To differentiate I/O operation of memory operations. 0 - indicates a memory operation. 1-indicates an I/O operation. IO/M combined with RD and WR to generate I/O and memory control signals. S1 and S0: Status signals, similar to IO/M, can identify various operations as shown on the following table

INTR&INTA : INTR is a interrupt request signal after which P generates INTA or interrupt acknowledge signal. When INTR is asserted, 8085 response with INTA pulse. During INTA pulse, 8085 expect to see an instruction applied to its data bus RESET signal Following are the two kind of RESET signals: RESET IN: an active low input signal, Program Counter (PC) will be set to 0 and thus MPU will reset. RESET OUT: an output reset signal to indicate that the p was reset (i.e. RESET IN=0). It also used to reset external devices. Pin configuration The pins on the chip can be grouped into 6 groups: Address Bus. Data Bus. Control and Status Signals. Power supply and frequency. Externally Initiated Signals. Serial I/O ports. 1.The Address and Data Buses The address bus has 8 signal lines A8 A15 which are unidirectional.

The other 8 address bits are multiplexed (time shared) with the 8 data bits. So, the bits AD0 AD7 are bi-directional and serve as A0 A7 and D0 D7 at the same time. During the execution of the instruction, these lines carry the address bits during the early part, then during the late parts of the execution, they carry the 8 data bits. In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes. 2.The Control and Status Signals There are 4 main control and status signals. These are: ALE: Address Latch Enable. This signal is a pulse that become 1 when the AD0 AD7 lines have an address on them. It becomes 0 after that. This signal can be used to enable a latch to save the address bits from the AD lines. RD: Read. Active low. WR: Write. Active low. IO/M: This signal specifies whether the operation is a memory operation (IO/M=0) or an I/O operation (IO/M=1). S1 and S0 : Status signals to specify the kind of operation being performed .Usually un-used in small systems. Frequency Control Signals There are 3 important pins in the frequency control group. X0 and X1 are the inputs from the crystal or clock generating circuit. The frequency is internally divided by 2. So, to run the microprocessor at 3 MHz, a clock running at 6 MHz should be connected to the X0 and X1 pins. CLK (OUT): An output clock pin to drive the clock of the rest of the system. Externally initiated signals They are the signals initiated by an external device to request the microprocessor to do a particular task or work. Serial i/o signals SID : used by the microprocessor for reading data serially bit by bit from external devices SOD : used to transmit data serially from the microprocessor to external device

Three Units of 8085 Processing Unit Instruction Unit Storage and Interface Unit Processing Unit Arithmetic and Logic Unit Accumulator Status Flags Temporary Register Instruction Unit Instruction Register Instruction Decoder Timing and Control Unit Storage and Interface Unit General Purpose Registers Stack Pointer Program Counter Increment/Decrement Register Address Latch Address/Data Latch

Three Other Units Interrupt Controller Serial I/O Controller Power Supply Accumulator It the main register of microprocessor. It is also called register A. It is an 8-bit register. It is used in the arithmetic and logic operations. It always contains one of the operands on which arithmetic/logic has to be performed. After the arithmetic/logic operation, the contents of accumulator are replaced by the result. Arithmetic & Logic Unit (ALU) It performs various arithmetic and logic operations. The data is available in accumulator and temporary/general purpose registers. Arithmetic Operations: Addition, Subtraction, Increment, Decrement etc. Logic Operations: AND, OR, X-OR, Complement etc. Temporary Register It is an 8-bit register. It is used to store temporary 8-bit operand from general purpose register. It is also used to store intermediate results. Status Flags are set of flip-flops which are used to check the status of Accumulator after the operation is performed. Status Flags

S = Sign Flag Z = Zero Flag

AC= Auxiliary Carry Flag P = Parity Flag CY= Carry Flag Sign Flag (S): It tells the sign of result stored in Accumulator after the operation is performed. If result is ve, sign flag is set (1). If result is +ve, sign flag is reset (0). Zero Flag (Z): It tells whether the result stored in Accumulator is zero or not after the operation is performed. If result is zero, zero flag is set (1). If result is not zero, zero flag is reset (0). Auxiliary Carry Flag (AC): It is used in BCD operations. When there is carry in BCD addition, we add 0110 (6) to the result. If there is carry in BCD addition, auxiliary carry is set (1). If there is no carry, auxiliary carry is reset (0). Parity Flag (P): It tells the parity of data stored in Accumulator. If parity is even, parity flag is set (1). If parity is odd, parity flag is reset (0). Program Status Word (PSW) The contents of Accumulator and Status Flags clubbed together is known as Program Status Word (PSW). It is a 16-bit word.

Instruction Register It is used to hold the current instruction which the microprocessor is about to execute. It is an 8-bit register. Instruction Decoder It interprets the instruction stored in instruction register. It generates various machine cycles depending upon the instruction. The machine cycles are then given to the Timing and Control Unit. Timing and Control Unit It controls all the operations of microprocessor

and peripheral devices. Depending upon the machine cycles received from Instruction Decoder, it generates 12 control signals: S0 and S1 (Status Signals). ALE (Address Latch Enable). RD (Read, active low). WR (Write, active low). IO/M (Input-Output/Memory). READY RESET IN RESET OUT CLK OUT HOLD and HLDA General Purpose Registers There are 6 general purpose registers, namely B, C, D, E, H, L. Each of the them is 8-bit register. They are used to hold data and results. To hold 16-bit data, combination of two 8-bit registers can be used. This combination is known as Register Pair. The valid register pairs are: B C, D E, H L. Program Counter It is used to hold the address of next instruction to be executed. It is a 16-bit register. The microprocessor increments the value of Program Counter after the execution of the current instruction, so that, it always points to the next instruction Stack Pointer It holds the address of top most item in the stack. It is also 16-bit register. Any portion of memory can be used as stack. Increment/Decrement Register This register is used to increment or decrement the value of Stack Pointer. During PUSH operation, the value of Stack Pointer is incremented. During POP operation, the value of Stack Pointer is decremented. Address Latch It is group of 8 buffers. The upper-byte of 16-bit address is stored in this latch. And then it is made available to the peripheral

devices. Address/Data Latch The lower-byte of address and 8-bit of data are multiplexed. It holds either lower-byte of address or 8-bits of data. This is decided by ALE (Address Latch Enable) signal. If ALE = 1 then Address/Data Latch contains lower-byte of address. If ALE = 0 then It contains 8-bit data. Serial I/O Controller It is used to convert serial data into parallel and parallel data into serial. Microprocessor works with 8-bit parallel data. Serial I/O devices works with serial transfer of data. Therefore, this unit is the interface between microprocessor and serial I/O devices. Interrupt Controller It is used to handle the interrupts. There are 5 interrupt signals in 8085: TRAP RST 7.5 RST 6.5 RST 5.5 INTR Interrupt controller receives these interrupts according to their priority and applies them to the microprocessor. Power Supply This unit provides +5V power supply to the microprocessor. The microprocessor needs +5V power supply for its operation.

Timing and Control unit Timing and control unit The timing and control unit synchronizes all the microprocessor operations with the clock and generates the control signals necessary for communication between the

microprocessor and peripherals It controls all the operations of microprocessor and peripheral devices. Depending upon the machine cycles received from Instruction Decoder, it generates 12 control signals: S0 and S1 (Status Signals). READY RD (Read, active low). WR (Write, active low). IO/M (Input-Output/Memory). RESET IN RESET OUT CLK OUT HOLD and HLDA ALE (Address Latch Enable). Each machine cycle is composed of many clock cycle. Since, the data and instructions, both are stored in the memory, the P performs fetch operation to read the instruction or data and then execute the instruction. The P in doing so may take several cycles to perform fetch and execute operation time taken by any P to execute one instruction is calculated in terms of the clock period. Timing diagram is the display of initiation of read/write and transfer of data operations under the control of 3-status signals IO / M , S1, and S0. The 3-status signals : IO / M, S1, and S0 are generated at the beginning of each machine cycle. The unique combination of these 3-status signals identify read or write operation and remain valid for the duration of the cycle. The execution of instruction always requires read and writes operations to transfer data to or from the P and memory or I/O devices. Each read/ write operation constitutes one machine cycle (MC1) . Each and every operation inside the microprocessor is under the control of the clock cycle. The clock signal determines the time taken by the microprocessor to execute any instruction.

Processor cycle The function of the microprocessor is divided into fetch and execute cycle of any instruction of a program. The program is nothing but number of instructions stored in the memory in sequence. In the normal process of operation, the microprocessor fetches

(receives or reads) and executes one instruction at a time in the sequence until it executes the halt (HLT) instruction. Thus, an instruction cycle is defined as the time required to fetch and execute an instruction. For executing any program, basically 2-steps are followed sequentially with the help of clocks Fetch, and Execute. The time taken by the P in performing the fetch and execute operations are called fetch and execute cycle. Thus, sum of the fetch and execute cycle is called the instruction cycle Instruction cycle : the time required to execute one instruction Machine cycle : time required to complete one operation of accessing memory, I/O or acknowledge an external request. T-states : one subdivision of the operation performed in one clock period MACHINE CYCLES OF 8085: The 8085 microprocessor has 5 (seven) basic machine cycles. They are 1. Opcode fetch cycle (4T) 2. Memory read cycle (3 T) 3. Memory write cycle (3 T) 3. I/O READ CYCLE(3T) 4. I/O WRITE CYCLE(3T)

Anda mungkin juga menyukai