Part 12: Microprocessor Peripheral Devices with PIN Configuration

Part 12: Microprocessor Peripheral Devices with PIN Configuration

Peripheral Devices

In order to communicate with the outside world microcomputers, use peripherals (I/O devices). Commonly used peripherals are: A/D converter, D/A converter, CRT, printers, Hard disks, floppy disks, magnetic tapes etc. Peripherals are connected to the microcomputer through electronic circuits known as interfacing circuits.

Programmable Peripheral interface (PPI)

A programmable peripheral interface is a multiport device. The ports may be programmed in a variety of ways as required by the programmer. The device is very useful for interfacing peripheral devices. The term PIA, Peripheral Interface Adapter is also used by some manufacturer.

Intel 8255

The Intel 8255 is a programmable peripheral interface (PPI). It has two versions, i.e. the Intel 8255A and Intel 8255A-5. General descriptions for both are same. There are some differences in their electrical characteristics. Hereafter, they will be referred to as 8255. Its main functions are to interface peripheral devices to the microcomputer.

It has three 8-bit ports, namely Port A, Port B and Port C. The port C has been further divided into two 4-bit ports, port C upper and Port C lower. Thus a total of 4-ports are available, two 8-bit ports and two 4-bit ports. Each port can be programmed either as an input port or an output port.

Operating Modes of 8255

The Intel 8255 has the following three modes of operation which are selected by software:

Mode 0 – Simple Input/output: The 8255 has two 8-bit ports (Port A and Port B) and two 4-bit ports (Port Cupper and Port Clower). In Mode 0 operation, a port can be operated as a simple input or output port. Each of the 4 ports of 8255 can be programmed to be either an input or output port.

Mode 1-Strobed Input/output: Mode 1 is strobed input/output mode of operation. The Port A and Port B both are designed to operate in this mode of operation. When Port A and Port B are programmed in Mode 1, six pins of Port C are used for their control.

Mode 2 -Bidirectional Port: Mode 2 is strobed bidirectional mode of operation. In this mode Port A can be programmed to operate as a bidirectional port. The mode 2 operation is only for Port A. When Port A is programmed in Mode 2, the port B can be used either Mode 1 or Mode 0.

Architecture of Intel 8255

Intel 8255A pin description

It is a 40 pin I.C. package. It operates on a single 5 Vd.c. supply. Its important characteristics are as follows:

Ambient temperature 0 to 700C, Voltage on any pin: 0.5 V to 7 V. Power dissipation 1 Watt VIL = Input low voltage = Minimum 0.5 V, Maximum 0.8 V. VIH = Input high voltage = Minimum 2 V, Maximum Vcc. VOL = Output low voltage = 0.45 V VOH = Output High Voltage = 2.4 V IDR = Darlington drive connect = Minimum 1 mA, Maximum 4 mA of any 8 pins of the port.

The pins of various ports are as follows:

PA0 – PA7 8 Pins of port A PB0 – PB7 8 pins of port B PC0 – PC3 4 pins of port Clower PC4 – PC7 4 pins of Port Cupper

The important control signals are:

CS (Chip Select): It is a chip select signal. The LOW status of this signal enables communication between the CPU and 8255.

RD (READ): When RD goes LOW the 8255 sends out data or status information to the CPU on the data bus. In other words it allows the CPU to read data from the input port of 8255.

WR (Write): When WR goes LOW the CPU writes data or control word into 8255. The CPU writes data into the output port of 8255 and the control word into the control word register.

RESET: RESET is an active high signal. It clears the control register and sets all ports in the input mode.

A0 and A1: The selection of input port and control word register is done using A0 and A1 in conjunction with RD and WR. A0 and A1 are normally connected to the least significant bits of the address bus. If two 8255 units are used the addresses of ports are as follows:

For the First unit of 8255, i.e. 8255.1:

Port/Control word register Port/Control word register Address
Port A 00
Port B 01
Port C 02
Control word register 03

For the 2nd unit of 8255, i.e. 8255.2:

Port/Control word register Port/Control word register Address
Port A 08
Port B 09
Port C 0A
Control word register 0B

8253 Programmable Interval Timer

programmable counter or interval timer is used in real time application for timing and counting function such as BCD or binary counting, generation of accurate time delay, generation of square wave of desired frequency, rate generation, hardware/software triggered strobe signal, one shot signal of wanted width etc.

Popular programmable interval timer chips are Intel 8253 and 8254. Both are pin to pin compatible and operate in the following six modes:

Mode 0: Interrupt on terminal count

Mode 1: Programmable one-shot

Mode 2: Rate generator

Mode 3: Square wave generator

Mode 4: Software triggered mode

Mode 5: Hardware triggered mode

The 8254 is compatible to 8086, 8088, 8085 and most other microprocessors. The 8253 is compatible to 8085 microprocessor. The 8254 is superset of the 8253.

Architecture of Intel 8253/54

Intel 8253

The 8253 is 24-pin IC and operates at 5 Vd.c.. It contains three independent 16-bit counters. The programmer can program 8253 to operate in any one of the 6 operating modes. It operates under software control.

The description of its important pins is as follows:

RD (Read): When this pin is LOW the CPU reads data.

WR: (Write): When this is low, the CPU outputs data in the form of mode information or loading of counters.

A0, A1: These pins are connected to the address bus. These are used to select one of three counters. These are also used to address the control word registers for mode selection.

CS: Chip Select.

D0 – D7: Bidirectional data bus.

CLK0, CLK1 and CLK2 are clock for Counter 0, Counter 1 and Counter 2 respectively.

GATE0, GATE1 and GATE2 are gate terminals of Counter 0, Counter 1 and Counter 2 respectively.

OUT0, OUT1 and OUT2 are output terminals of Counter 0, Counter 1 and Counter 2 respectively.

The 8253 contains a data buffer, read/write logic and control word register as described below:

Data Bus Buffer: This buffer is within 8253. It is a 3-state, bidirectional, 8-bit buffer. It is used to interface 8253 to the system data bus through D0 – D7 lines.

Read/Write logic: The 8253 contains a read/write logic which accepts input from the system bus and then makes control signals for the operation of 8253. The following table displays the status of pins associated with read/write logic for several controls:

CS A1 A0 RD WR Result
0 0 0 0 1 Read Counter No. 0
0 0 1 0 1 Read Counter No. 1
0 1 0 0 1 Read Counter No. 2
0 0 0 1 0 Read Counter No. 0
0 0 1 1 0 Read Counter No. 1
0 1 0 1 0 Read Counter No. 2
0 1 1 1 0 Write Mode word
0 1 1 0 1 No-operation 3 state
0 X X 1 1 No-operation 3 state
0 X X X X Disable 3 -state

Keep it mind, X indicates undefined state. It means that it does not matter whether the state is 0 or 1.

Counter Word Register: When the pins A0, A1 are 11, the control word register is selected. The control word format is shown below:

D7   D6   D5   D4   D3   D2   D1   D0

SC1 SC0 RL1 RL0 M2 M1 M0 BCD

The bits D7 and D6 of the control word are to select one of the 3 counters. D5 and D4 are for loading/reading the count. D3, D2 and D1 are for the selection of operating mode of the selected counter. These are six modes of operation for each counter of 8253. The six modes of operation are: MODE 0, MODE 1, MODE 2, MODE 3, MODE 4 and MODE 5. The bit D0 is for the selection of binary or BCD counting.

8253/54 Operational Modes

8253/54 can be operated in 6 different modes. These modes are:

MODE 0 : Interrupt on Terminal Count

  • Mode 0 is used for the generation of accurate time delay under software control.
  • One of the counters of 8253 is initialized and loaded with suitable count for the desired time delay.
  • When counting is finished the counter interrupts the CPU. On interruption the microprocessor completes the required task which is to be performed after the desired time delay.
  • For MODE 0 operation GATE is kept high. While counting is going on the counter output OUT remains LOW. When the terminal count is reached i.e. count reaches 0, the output becomes HIGH until the count is reloaded or new count is loaded.
  • When the count is reloaded or OUT becomes LOW and the counter starts its counting operation again.

MODE 1 : Programmable One-Shot

  • In MODE 1 the counter acts as a retriggerable and programmable one-shot.
  • The LOW to HIGH transition of the signal applied to GATE acts as a trigger signal.
  • In this mode of operation OUT becomes firstly HIGH after the mode is set. After mode set operation the counter is loaded by a count value of N. The counter decrements count, and the output (OUT) goes LOW for N clock cycles for every LOW to HIGH transition of the GATE input.

MODE 2 : RATE Generator

  • In MODE 2 the counter acts as a simple divide by N counter.
  • When this mode is set the output of the counter turn out to be firstly HIGH.
  • After mode set operation the counter is loaded by a count of value N.
  • For MODE 2 operation GATE is kept HIGH.
  • In this mode the output remains HIGH for (N-1) clock pulses and then goes LOW for one clock pulse.

MODE 3 : Square Wave Generation

  • In MODE 3 the counter acts as a square wave generator. After mode set operation the counter is loaded by a count of value N.
  • For MODE 3 operation GATE is kept back HIGH.
  • For even values of N the output remains HIGH for N/2 clock pulses abd then goes LOW for next N/2 clock pulses.

MODE 4 : Software Triggered Strobe

  • In MODE 4 operation the output of the counter becomes firstly HIGH after the mode is set.
  • GATE is kept HIGH for this mode of operation. The counter begins counting instantly after the count is loaded into the count register.
  • When the counter reaches terminal count (i.e. counter content = 0) the output goes LOW for one clock period, then it returns to HIGH.
  • The output signal may be used as strobe.
  • This mode of operation is referred to as a software triggered strobe because the generation of the strobe signal is triggered by loading the count into the count register.

MODE 5 : Hardware Triggered Strobe

  • operation GATE input acts as a trigger.
  • After the mode is set, the output becomes initially HIGH.
  • A count value of N is loaded into the counter.
  • a LOW to HIGH transition of the GATE input the counter starts decrementing the count.
  • The counting begins at the first negative edge of the clock after the rising edge of the GATE input.
  • On terminal count the output goes LOW for one clock period, and then it goes HIGH again.
  • the LOW to HIGH transition of the GATE input causes triggering, this mode is referred to as hardware triggered strobe.

 

Part 12: Microprocessor Peripheral Devices with PIN Configuration

Part 6: Microprocessor Based Application Usage in Everyday Life.

Microprocessor Application

Microprocessor based systems are found everywhere today. It just not in computers and smartphones also in automatic testing of products, speed control of motors, traffic light control, communication equipment, television, satellite communication, home appliances, such as microwave oven, washing machine, gaming controller, industrial controllers and even specialized applications such as military applications.

Microprocessor Applications

A microprocessor makes everyday life smoother because of its low cost, low power, small weight, and vast application in each and every field. There are many applications of microprocessors. Some of the important applications are:

  • Handheld devices

Most processors nowadays are 64bit. With Graphics Processing Unit (GPU) being included inside mobile processors, these devices can now offer high quality graphics, Virtual Reality capability, 3D capability and 4k recording, plus the improved processor technology means greater power efficiency. This includes smartphones, tablets, portable media players – have rather powerful microprocessors, so much so that they can compete with a desktop computer. The latest processor from MediaTek is the Helio P90. The system support features such as intelligent imaging, better and quick photography, faster and more simple gaming, and advanced connectivity with dual 4G SIM.

  • Household Devices

The programmable thermostat allows the control of temperature at homes. In this system, a microprocessor works with the temperature sensor to determine and adjust the temperature accordingly.

  • High-end coffee makers, Washing machines, and radio clocks contain microprocessor technology.

Some other home items that contain microprocessors are: microwaves, toasters, televisions, VCRs, DVD players, ovens, stoves, clothes washers, stereo systems, home computers, alarm clocks, hand-held game devices, thermostats, video game systems, bread machines, dishwashers, home lighting systems and even some refrigerators with digital temperature control.

  • Industrial Applications of Microprocessors

Some industrial items which use microprocessors technology include: cars, boats, planes, trucks, heavy machinery, elevators, gasoline pumps, credit-card processing units, traffic control devices, computer servers, most high tech medical devices, surveillance systems, security systems, and even some doors with automatic entry.

  • Transportation Industry

Automobiles, trains and planes also use microprocessor technology.

Consumer vehicles-buses, cars, trucks -integrate microprocessors to communicate important information throughout the vehicle. E.g., navigation systems provide information using microprocessors and global positioning system (GPS) technology.

  • Computers and Electronics

Microprocessor-drives technology is the brain of the computer. They are used in all type of computers ranging from microcomputers to supercomputers.

A cell phone or mobile device executes game instructions by way of the microprocessor.

VCRs, televisions and gaming platforms also contain microprocessors for executing complex instructions and tasks.

  • In Medicals

Many medical devices, like an insulin pump, are typically controlled by a microprocessor. The microprocessors perform various functions, such as processing data from bio-sensors, storing measurements, and analyzing results.

  • Instrumentation

Microprocessor is also very useful in the field of instrumentation. Function generators, frequency counters, frequency synthesizers, spectrum analyses and many other instruments are available, when microprocessors are used as controller.

  • Entertainment

The use of microprocessor in entertainment equipment, toys and home entertaining applications is making them more useful and full of features.

  • Embedded Systems at Home

A number of modern devices in the home are microprocessor based i.e. camera; washing machines; calculators; hi-fi systems; telephones; microwave ovens; burglar alarms etc. The input are usually simple numeric keyboards, sensors, buttons or while the output include lights, simple LCD screens displays, motors and relays, LEDs, buzzers etc.

  • Office Automation and Publication

Microprocessor based system with software packages has changed the office environment. systems are based on Microprocessors based are being used for spread sheet operations, word processing, storage etc.

The Publication technology has revolutionized by the microprocessor.

  • Communication

In communication the telephone industry is most important. In this industry, microprocessors are used in digital telephone sets, telephone exchanges and modem etc. The use of microprocessor in satellite communication, television, has made teleconferencing possible. Railway reservation and airline reservation system also uses microprocessor technology. WAN (Wide Area Network) and LAN (Local Area Network) for communication of vertical information through computer network.

Part 12: Microprocessor Peripheral Devices with PIN Configuration

Part 1: Introduction to Microprocessor Evolution with its Features

What is a Microprocessor?

A digital Computer or Computer’s Central Processing Unit (CPU) built on a single Integrated Circuit (IC) is called a microprocessor. Since it is a programmable electronics chip of computing and decision making capabilities. The microprocessor contains numerous components like transistors, registers, and diodes that work together or programmable, multipurpose, clock -driven, register-based electronic device.   Any microprocessor based systems having limited number of resources are called microcomputers. It reads binary instructions from a storage device called memory, accepts binary data as input and processes data according to those instructions and provides results as output. Nowadays, microprocessor can be seen in almost all types of electronics devices such as mobile phones, printers, washing machines etc.

Blog Diagram

Block Diagram of a Microcomputer

Microprocessor Introduction

A microprocessor consists of an ALU, control unit and register array. ALU performs arithmetic and logical operations on the data received from an input device or memory. Control unit controls the instructions and flow of data within the computer. And, register array consists of registers identified by letters like B, C, D, E, H, L, and accumulator.

Evolution of Microprocessors

The category of microprocessor according to the generations or according to the size of the microprocessor:

First Generation (4 – bit Microprocessors configuration)

The first generation microprocessors were introduced in the year 1971 by Intel Corporation. It was named Intel 4004 since it was a 4-bit processor. It was a processor on a single chip. It could perform simple arithmetic and logical operations such as addition, subtraction, Boolean OR and Boolean AND. It had a control unit able to perform control functions and 4 bit data like fetching an instruction from storage memory, decoding it, and then generating control pulses to execute it. Intel introduced the enhanced version of 4004, the 4040. 4-bit Microprocessor.

  • The INTEL 4004/4040 was invented in the year 1971 by Stanley Mazor & Ted Hoff.
  • The clock speed of this microprocessor is 740 KHz.
  • The number of transistors used in this microprocessor is 2,300 and instruction per second is 60K.
  • The number of pins of this microprocessor is 16.

Second Generation (8 – bit Microprocessor configuration)

The second generation microprocessors were introduced in 1973 again by Intel. It was a first 8 – bit microprocessor which could perform arithmetic and logic operations on 8-bit words. It was Intel 8008, and another improved version was Intel 8088.

  • The 8008 processor was invented in the year 1972. The clock speed of this microprocessor is 500 KHz and instruction per second is 50K.
  • The 8080 microprocessor was invented in the year 1974. The clock speed is 2 MHz. The number of transistors used is 60k and instruction per second is 10 times quicker as compared with 8008 processor.
  • The 8085 microprocessor was invented in the year 1976. The clock speed is 3 MHz. The number of transistors used is 6,500 and instruction per second is 769230.
  • The number of pins of this microprocessor is 40

Third Generation (16 – bit Microprocessor configuration)

The third generation microprocessors, introduced in 1978 were represented by Intel’s 8086, Zilog Z800 and 80286, which were 16 – bit processors with a performance like minicomputers.

  • The 8086 microprocessor was invented in the year 1978. The clock speed is 4.77, 8 & 10 MHz. The number of transistors used is 29000 and instruction per second is 2.5 Million. The number of pins of this microprocessor is 40
  • The 8088 microprocessor was invented in the year 1979 and instruction per second is 2.5 Million
  • The microprocessors like 80186 or 80188 were invented in the year 1982. The clock speed is 6 MHz
  • The 80286 microprocessor was invented in the year 1982. The clock speed is 8 MHz. The number of transistors used is 134000 and instruction per second is 4 Million.
  • The number of pins of this microprocessor is 68 and 32-bit Microprocessor

Fourth Generation (32 – bit Microprocessors configuration)

Several different companies introduced the 32-bit microprocessors, but the most popular one is the Intel 80386.

  • The Intel 80386 microprocessor was invented in the year 1986. The clock speed is 16 MHz to 33 MHz. The number of transistors used is 275000. The number of pins  is 132 14X14 PGA
  • The Intel 80486 microprocessor was invented in the year1986. The clock speed is 16MHz to 100 MHz. The number of transistors used is 1.2 Million transistors and instruction per second is 8 KB of cache memory. The number of pins of this microprocessor is 168 17X17 PGA (Pin Grid Array)
  • The PENTIUM microprocessor was invented in the year 1993. The clock speed is 66 MHz and instruction per second is Cache memory 8-bit for instructions 8- bit for data. The number of pins of this microprocessor is 237 PGA

Fifth Generation (64 – bit Microprocessors configuration)

From 1995 to now we are in the fifth generation. After 80856, Intel came out with a new processor namely Pentium processor followed by Pentium Pro CPU, which allows multiple CPUs in a single system to achieve multiprocessing.

  • The INTEL core 2 microprocessor was invented2006. The clock speed is 1.2 GHz to 3 GHz.
  • The number of transistors used is 291 Million and instruction per second is 64 KB of L1 cache for each core 4 MB of L2 cache.
  • The i3, i5, i7 microprocessors were invented in the years 2007, 2009, 2010 2. The clock speed is 2GHz to 3.3GHz, 2.4GHz to 3.6GHz & 2.93GHz to t 3.33GHz.

Other improved 64-bit processors are Celeron, Dual, Quad, Octa Core processors.

Important Intel Microprocessors abbreviation

PGAPin Grid Array

MMX – Multimedia Extensions

EPICExplicitly Parallel Instruction Computing

SIMDSingle Instruction Multiple Data

ALUArithmetic and Logic Unit

MMUMemory Management Unit

FPU Floating Point Unit

Microprocessor-based system

Microprocessor-based system

 

  • Address Bus:
    It carries the address, which is a unique binary pattern used to identify  a memory location or an I/O port. For example, an eight bit address bus has eight lines and thus it can address 28 = 256 different locations. The locations in hexadecimal format can be written as 00H – FFH.
  • Data Bus:

    The data bus is used to transfer data between memory and processor or between I/O device and processor. For example, an 8-bit processor will generally have an 8-bit data bus and a 16-bit processor will have 16-bit data bus.

  • Control Bus:

    The control bus carry control signals, which consists of signals for selection of memory or I/O device from the given address, direction of data transfer and synchronization of data transfer in case of slow devices.

Basic Terms used in Microprocessor:

A list of some basic terms used in microprocessor:

  • Instruction Set:

    The group of commands that the microprocessor can understand is called Instruction set. It is an interface between hardware and software.

  • Bus :
    Set of conductors intended to transmit data, address or control information to different elements in a microprocessor. A microprocessor will have three types of buses, i.e., data bus, address bus, and control bus.
  • IPC (Instructions Per Cycle) :
    It is a measure of how many instructions a CPU is capable of executing in a single clock.
  • Clock Speed :
    It is the number of operations per second the processor can perform. It can be expressed in megahertz (MHz) or gigahertz (GHz). It is also called the Clock Rate.
  • Bandwidth:
    The number of bits processed in a single instruction is called Bandwidth.
  • Word Length:
    The number of bits the processor can process at a time is called the word length of the processor. 8-bit Microprocessor may process 8 -bit data at a time. The range of word length is from 4 bits to 64 bits depending upon the type of the microcomputer.
  • Data Types:

    The microprocessor supports multiple data type formats like binary, ASCII, signed and unsigned numbers.

 

Working of Microprocessor

The microprocessor follows a sequence to execute the instruction: Fetch, Decode, and then Execute. Initially, the instructions are stored in the storage memory of the computer in sequential order. The microprocessor fetches those instructions from the stored area (memory), then decodes it and executes those instructions till STOP instruction is met. Then, it sends the result in binary form to the output port. Between these processes, the register stores the temporary data and ALU (Arithmetic and Logic Unit) performs the computing functions.

 

Features of Microprocessor

Low Cost:

Microprocessors are available at very low cost. It will reduce the cost of a computer system.

High Speed:

the microprocessor can work at very high speed. It can execute millions of instructions per second.

Small Size:

A microprocessor is fabricated in a very less footprint due to very large scale and ultra large scale integration technology. Because of this, the size of the computer system is reduced.

Versatile:

The same chip can be used for several applications, therefore, microprocessors are versatile.

Low Power Consumption:

Microprocessors are using metal oxide semiconductor technology, which consumes less power.

Less Heat Generation:

Microprocessors uses semiconductor technology and will not emit much heat as compared to vacuum tube devices.

Reliable:

The failure rate is very less. Hence it is very reliable.

Portable :

small in size and low power consumption microprocessors are portable.

Part 12: Microprocessor Peripheral Devices with PIN Configuration

Part 4: Instruction and Data Formats of 8085 microprocessor

8085 microprocessor Instruction and Data Formats.

There are numerous techniques to require data for instructions are:

  1. In the instruction itself 8-bit or 16-bit data may be directly given.
  2. In the instruction itself, the address of the memory location, I/O port or I/O device, where data resides, may be given.
  3. In some instructions, only one register is specified. The content of the specified register is one of the operands.
  4. Some instructions specify two registers and contents of the registers are the required data.
  5. In some instructions, data is implied and in the most instructions of this type operate on the content of the accumulator.

To specify various kind of data for instructions, the machine codes of all instructions are not of the same length. It may vary as 1-byte, 2-byte or 3-byte instruction.

8085 microprocessor Addressing Modes

Each instruction requires some data on that it has to operate. There are different techniques which are called addressing modes. Intel 8085 uses the following addressing modes:

  • Direct Addressing

In this addressing mode, the address of the operand or data is given in the instruction itself.

Example

STA 2400H: This stores the content of the accumulator in the memory location 2400H.

32, 00, 24: The above instruction in the code form.

In the above instruction, 2400H is the memory address for data stored given in the instruction itself. The 2nd and 3rd bytes of the instruction specify the address of the memory location. It is clear, that the source of the data is accumulator.

  • Register Addressing

In register addressing mode, the operand is in one of the general-purpose registers. The opcode specifies the address of the register(s) in addition to the operation to be performed.

Example:

MOV A, B: Move the content of B register to register A.

78: The instruction in the code form.

In the above MOV A, B is 78H. In addition the operation to be performed the opcode also specifies source and destination registers.

The opcode 78H can be printed in binary form as 01111000. The first two bits, i.e. 0 1 are for MOV operation, the next three bits 1 1 1 are the binary code for register A, and the last three bits 000 are the binary code for register B.

  • Register Indirect Addressing

The Register Indirect mode of addressing operand is specified by a register pair.

Example

  • LXI H, 2500 H – Load H-L pair with 2500H.
  • MOV A, M – Move the content of the memory location, whose address is in H-L pair (i.e. 2500 H) to the accumulator.
  • HLT – Halt.

In the above program MOV A, M is register indirect addressing. This instruction, the operand is in the memory. The address of the memory is not directly given in the instruction. The address of the memory resides in H-L pair and this has already been specified by an earlier instruction in the program, i.e. LXI H, 2500 H.

  • Immediate Addressing

In this addressing mode the operand is specified within the instruction itself.

Example

immediate addressing. 2500 is 16-bit data which is given in the instruction itself. It is to be loaded into H-L pair.

  • Implicit Addressing

There are certain instructions which operate on the content of the accumulator. Such instructions do not require the address of the operand.

Example

CMA, RAL, RAR, etc.

Status Flags

There is a set of five flip-flops which indicate status (condition) arising after the execution of arithmetic and logic instructions. These are:

  • Carry Flag (CS)
  • Parity Flag (P)
  • Auxiliary Carry Flags (AC)
  • Zero Flags (Z)
  • Sign Flags (S)

Symbols and Abbreviations:

The symbol and abbreviations which have been used while explaining Intel 8085 instructions are as follows:

Symbol with details
Addr 16-bit address of the memory location.
Data 8-bit data
data 16 16-bit data
r, r1, r2 One of the registers A, B, C, D, E, H or L
A, B, C, D, H, L 8-bit register
A Accumulator
H-L Register pair H-L
B-C Register pair B-C
D-E Register pair D-E
PSW Program Status Word
M Memory whose address is in H-L pair
H Appearing at the end of the group of digits specifies hexadecimal, e.g. 2500H
Rp One of the register pairs.
Rh The high order register of a register pair
Rl The low order register of a register pair
PC 16-bit program counter, PCH is high order 8 bits and PCL low order 8 bits of register PC.
CS Carry Status
[] The contents of the register identified within bracket
[ [] ] The content of the memory location whose address is in the register pair identified within brackets
^ AND operation
OR operation
⊕ or ∀ Exclusive OR
Move data in the direction of arrow
Exchange contents

 

Intel 8085 Instructions:

An instruction of a computer is a command given to the computer to perform a specified operation on given data. In microprocessor, the instruction set is the collection of the instructions that the microprocessor is designed to execute.

The programmer writes a program in assembly language using these instructions. These instructions have been classified into the following groups:

Data Transfer Group:

Instructions which are used to transfer the data from a register to another register from memory to register or register to memory come under this group

Instruction

Example

Description States Flags Addressing Machine Cycles
MOV A, B Move the content of the one register to another 4 none Register 1
MOV B, M Move the content of memory to register 7 none Register Indirect 2
MOV M, C Move the content of register to memory 7 none Register Indirect 2
MVI r, data
[r] ←dataExample:MVI M, 08
Move immediate data to register 7 None Immediate Register 3
LXI H, 2500H Load Register pair immediate 10 None Immediate 3
LDA 2400 H Load Accumulator direct 13 None Direct 4
STA 2000H Store accumulator direct 13 None Direct 4
LHLD 2500H Load H-L pair direct 16 None Direct 5
SHLD 2500 H Store H-L pair direct 16 None Direct 5
LDAX B Load accumulator indirect 7 None Register Indirect 2
STAX D Store accumulator indirect 7 None Register Indirect 2
XCHG
[H-L] ↔[D-E]
Change the contents of H-L with D-E pair 4 None Register 1

Arithmetic Group:

The instructions of this group perform arithmetic operations such as addition, subtraction, increment or decrement of the content of a register or a memory.

Instruction Example Explanation States Flags Addre-ssing Machine Cycles
ADD r
[A] ←[A]+[r]Example: ADD K
Add register to accumulator 4 All Register 1
ADD M
[A] ← [A] + [[H-L]]Example: ADD K
Add memory to accumulator 7 All Register indirect 2
ACC r
[A] ← [A] + [r] + [CS]Ex:ACC K
Add register with carry to accumulator 4 All Register 1
ADC K Add memory with carry to accumulator 7 All Register indirect 2
ADI 55K Add immediate data to accumulator 7 All Immediate 2
ACI 55K Add with carry immediate data to accumulator 7 All Immediate 2
DAD K Add register paid to H-L pair 10 CS Register 3
SUB K Subtract register from accumulator 4 All Register 1
SUB M
[A] ← [A] – [[H-L]]Example: SUB K
Subtract memory from accumulator 7 ALL Register indirect 2
SBB K Subtract memory from accumulator with borrow 7 All Register indirect 2
SUI 55K Subtract immediate data from accumulator 7 All Immediate 2
XCHG Subtract immediate data from accumulator with borrow 7 All Immediate 2
INR K Increment register content 4 All except carry flag Register 1
INR K Increment memory content 10 All except carry flag Register indirect 3
DCR K Decrement register content 4 All except carry flag Register 1
DCR K Decrement memory content 10 All except carry flag Register indirect 3
INX K Increment memory content 6 None Register 1
DCX K Decrement register pair 6 None Register 1
DAA Decimal adjust accumulator 4 1

Logical Group

The instructions in this group perform logical operation such as AND, OR, compare, rotate, etc.

Instruction Set Explanation States Flags Addressing Machine Cycles
ANA r
[A] ←[A]∧[r]
AND register with accumulator 4 All Register 1
ANA M
[A] ←[A]∧[[H-]]
AND memory with accumulator 4 All Register indirect 2
ANI data
[A] ← [A] ∧ [data]
AND immediate data with accumulator 7 All Immediate 2
ORA r
[A] ←[A]∨[r]
OR-register with accumulator 4 All Register 1
ORA M
[A] ←[A]∨[[H-L]]
OR-memory with accumulator 7 All Register indirect 2
ORI data
[A] ← [A] ∨ [data]
OR -immediate data with accumulator 7 All Immediate 2
CMP r
[A]-[r]
Compare register with accumulator 4 All Register 1
CMP M
[A] – [[H-L]]
Compare memory with accumulator 7 All Register indirect 2
CPI data
[A] – data
Compare immediate data with accumulator 7 All Immediate 2
RLC
[An+1] ←[An], [A0] ←[A7], [CS] ←[A7]
Rotate accumulator left 4 Cs Implicit 1
RRC
[A7] ←[A0], [CS] ←[A0], [An] ←[An+1]
Rotate accumulator right CS Implicit 1
RAL
[An+1] ←[An], [CS] ←[A7], [A0] ←[CS]
Rotate accumulator left through carry CS Implicit 1
RAR
[An] ←[An+1], [CS] ←[A0], [A7] ←[CS]
Rotate accumulator right through carry CS Implicit 1

Branch Control Group: This group contains the instructions for conditional and unconditional jump, subroutine call and return, and restart.
Others are Unconditional Jump, Conditional Jump, Unconditional CALL, Conditional CALL, Unconditional Return, Conditional Return, Restart, Stack, I/O and Machine Control Group.