Before getting to know about 8085 let’s understand what a microprocessor is and how it is different from a micro controller.
What is a Microprocessor?
A microprocessor is a programmable device similar to the CPU of a computer that is responsible for computing and taking logical decisions.
Difference between microprocessor and microcontroller
|A device that performs the instructions and tasks involved in computer processing.
|A compact integrated circuit designed for a specific operation in an embedded system.
|It is the central processing unit on a single silicon-based IC.
|It is a byproduct of the development of a microprocessor with a CPU along with other peripherals.
|It has no RAM, ROM, I/O units, timers, and other peripherals on the chip.
|It has a CPU along with RAM, ROM, and other peripherals embedded in a single chip.
|High clock speed
|Lower clock speed
|32 bit/ 62 bit
|8/ 16/ 32 bit
|Consume more power
|Consumes less power
|Larger in size as all devices need to be externally connected.
|Smaller in size
|Used in PC and Laptop
|Used in microwave ovens and washing machines
Now since we are clear with the difference let’s talk about the 8085 microprocessor in specific
Architecture of 8085
8085 is an 8-bit microprocessor designed by Intel.
It is capable of addressing 64k of memory.
It is manufactured on a single LSI chip using NMOS technology.
The microprocessor is a 40 pin IC package
8085 operates with a 3.14 MHz Single-phase clock.
It uses +5V single DC power supply.
The clock cycle is 320 microseconds
It is further divided into three blocks namely ALU, Registers, and Timing & Control Unit.
Understanding each unit of the 8085 microprocessor
The Buses are a group of lines used for interconnecting various building blocks within a computing system.
They can be unidirectional or bidirectional
There are various types of Buses-
The Address Bus
The 8085 Address Bus has 16 address lines where AD0-AD7 are termed as the lower address lines and A8-A15 are termed as upper address lines.
To calculate the memory locations as we stated above was 64k can be done if we know the number of address lines
So, if there are n address lines then 2^n will give the number of memory locations in the microprocessor.
2^16 = 65536 which is approximately 64k
Now convert this value to hexadecimal to find the address range of the memory
(65536) → (FFFF)
So, the address range of the memory is 0000H to FFFFH
Now, to transfer a 16-bit address, 8 bits are transferred from AD0 – AD7 and the other 8 bits are transferred from A8 – A15.
Next, we have,
A Databus is a group of 8 lines, used to transfer data.
It is bidirectional between the CPU and the peripheral devices.
Now the 8 lines are AD0 – AD7 and as address and data are transferred at a different time so the same pins that are AD0-AD7 can be used for transferring the eight lower bits of the 16-bit address as well as the 8-bit data.
The AD0-AD7 are called time-multiplexed and time-shared address data bus.
8085 has 8 data lines and so 8085 is an 8-bit microprocessor
next we have,
The Internal Data Bus
The 8-bit data bus is provided to transfer data between the outer data lines and the inner registers in a bidirectional way
An accumulator is an 8-bit register which contains 8 Flip-flops.
So, basically it can store 8 bit of data.
Accumulator is responsible for performing ALU operations. The microprocessor takes first 8 bits from the accumulator then the operation is performed and then the 8 lower bits of the result are stored back in the accumulator.
Also Read Interfacing Joystick with Arduino Uno
We have six 8 bit general-purpose registers which are B, C, D, E, H, L.
Each contains 8 flip flops So can store 8 bit of data which means 1 byte.
To store large data up to 16 bits these registers are used in pairs B C, D E, H L and together they can store 16 bits of data.
There are 3 Temporary Registers namely X, W and Z.
Each of these are 8-bit registers and can store 8 bit of data.
Temporary resistors are not accessed by the programmers and used to store temporary data.
While the operation is performed, if we need to store 16-bit data in this temporary data, then we can use this in the WZ pair to maximize the storage
Flag register / Program status word.
The 8085 is an 8 bit register and has a 8-bit flag register but out of these there only 5 flags the other three flip flops are not used in 8085. So, the five flags in 8085 are status flag, Zero Flag, auxiliary carry flag, parity flag and carry flag.
The status of the result is stored in the flag register and according to numbers given to the flags D0, D2, D4, D6 and D7 are status flag which are used and the D1, D3 and D5 are not used
Flags in 8085
The carry flag becomes High i.e. 1 when there is a carry while doing the operation. For example, in subtraction if there is a borrow then the Carry flag will become one else will remain zero.
It is also known as the half carry flag. It is similar to the carry flag except that the auxiliary carry flag will indicate the status of the 4 LSB’s.
If there is odd parity then the party flag will be high or one else if it is even parity then it will be low that is zero
It becomes high if all the 8 bits we get after performing the operation are zero otherwise it remains zero or low
If the result is unsigned then this flag of no use. If the result is signed then if the result is positive, it will be zero and if it is negative then it will be one.
Instruction Register and Instruction Decoder
8 bit data is fed to the instruction decoder. Instruction Decoder has 8 Input and, 2^8 instruction Decoder outputs i.e 0 – 255. Each output is connected to one controlling circuit so, there are 256 controlling circuits and each circuit generates a signal to perform the particular operation which means 8085 has 256 different operations.
Now when the 8-bit instruction register is given as the input to the instruction Decoder only one instruction Decoder output becomes active i.e. logic 1 and rest 255 instruction Decoder output is inactive. So controlling circuit connected to the inactive instruction Decoder output generates a control signal and a particular operation is executed.
The Arithmetic Logic Unit (ALU)
8085 has an 8 bit ALU which can perform arithmetic and logical operations. For example, 8 bit binary addition and subtraction. It can also perform addition for 16 bits. It can increment or decrement data. Some examples of logical operation include inverting, comparison, rotating left or right and performing operations like AND, OR, NOT, XOR etc.
The program counter acts as a pointer to the next instruction to be executed and always contains the 16-bit address of the memory location of the next instruction. After the completion of the instruction program counter is updated by the processor and then it points to the next instruction.
The stack pointer holds the address of the last byte written onto the stack which is called the top of the stack. It gets decremented as the data is read out of the memory.
So, there is a Stack in which the temporary information is stored in the FIFO basis (First In First Out) and stack pointer points to the last bite written in this stack.
Interrupt controls are responsible for enabling and disabling interrupts. There are 5 hardware interrupts namely INTR, RST 5.5, RST 6.5, RST 7.5 and TRAP.
Serial I/O control
in 8085 parallel data transfer is possible but if we want to send data serially then the serial input-output control pins can be used.