Architecture of 8085 microprocessor
8085 consists of various units and each unit performs its own functions. The various units of a microprocessor are listed below
· Arithmetic and logic Unit
· General purpose register
· Program counter
· Stack pointer
· Temporary register
· Instruction register and Decoder
· Timing and Control unit
· Interrupt control
· Serial Input/output control
· Address buffer and Address-Data buffer
· Address bus and Data bus
Accumulator is nothing but a register which can hold 8-bit data. Accumulator aids in storing two quantities.
The data to be processed by arithmetic and logic unit is stored in accumulator.
It also stores the result of the operation carried out by the Arithmetic and Logic unit.
The accumulator is also called an 8-bit register. The accumulator is connected to Internal Data bus and ALU (arithmetic and logic unit). The accumulator can be used to send or receive data from the Internal Data bus.
Arithmetic and Logic Unit
There is always a need to perform arithmetic operations like +, -, *, / and to perform logical operations like AND, OR, NOT etc. So there is a necessity for creating a separate unit which can perform such types of operations. These operations are performed by the Arithmetic and Logic Unit (ALU). ALU performs these operations on 8-bit data.
But these operations cannot be performed unless we have an input (or) data on which the desired operation is to be performed. So from where do these inputs reach the ALU? For this purpose accumulator is used. ALU gets its Input from accumulator and temporary register. After processing the necessary operations, the result is stored back in accumulator.
General Purpose Registers
Apart from accumulator 8085 consists of six special types of registers called General Purpose Registers.
What do these general purpose registers do?
These general purpose registers are used to hold data like any other registers. The general purpose registers in 8085 processors are B, C, D, E, H and L. Each register can hold 8-bit data. Apart from the above function these registers can also be used to work in pairs to hold 16-bit data.
They can work in pairs such as B-C, D-E and H-L to store 16-bit data. The H-L pair works as a memory pointer.
A memory pointer holds the address of a particular memory location. They can store 16-bit address as they work in pair.
Program Counter and Stack Pointer
Program counter is a special purpose register.
Consider that an instruction is being executed by processor. As soon as the ALU finished executing the instruction, the processor looks for the next instruction to be executed. So, there is a necessity for holding the address of the next instruction to be executed in order to save time. This is taken care by the program counter.
A program counter stores the address of the next instruction to be executed. In other words the program counter keeps track of the memory address of the instructions that are being executed by the microprocessor and the memory address of the next instruction that is going to be executed.
Microprocessor increments the program whenever an instruction is being executed, so that the program counter points to the memory address of the next instruction that is going to be executed. Program counter is a 16-bit register.
Stack pointer is also a 16-bit register which is used as a memory pointer. A stack is nothing but the portion of RAM (Random access memory).
So does that mean the stack pointer points to portion of RAM?
Yes. Stack pointer maintains the address of the last byte that is entered into stack.
Each time when the data is loaded into stack, Stack pointer gets decremented. Conversely it is incremented when data is retrieved from stack.
As the name suggests this register acts as a temporary memory during the arithmetic and logical operations. Unlike other registers, this temporary register can only be accessed by the microprocessor and it is completely inaccessible to programmers. Temporary register is an 8-bit register.
In the next article let us discuss about the
- TIMING AND CONTROL UNIT
- INTERRUPT CONTROL
and various other units of 8085 processor.