Training Course For MEE Unit1-Microprocessors and Its Applications 2025
Training Course For MEE Unit1-Microprocessors and Its Applications 2025
Many consider the transistor to be one of the most important inventions of all time.
Though the precursors of the transistor were invented in 1907 (at the time they were
not transistors yet, they were vacuum tubes called valves),
These were soon replaced by smaller components called transistors. These are still
the key components of modern computers nowadays.
So what is a transistor?
Use the checkboxes below this transistor to understand how applying a voltage to
the base of a transistor is equivalent to turning on a switch.
Transistor
A transistor acts like a switch, operated by applying a small current to the base.
Transistors come in many shapes and sizes
More about BJT Transistors and Power MOSFET Transistors Logic Gates are made
by combining transistors. They enable to apply logic to small currents which are
either turned on or off and represent binary information inside a computer.
Computers are made by combining logic gates together.
Logic Gates are made by combining transistors. They are enabled by applying small
currents at their inputs so that they are either turned on or off and represent binary
information inside a computer. Computers are made by combining logic gates
together.
Some of the key logic gates are built using transistors as below:
Integrated Circuits
(However there are several hundred or thousands of other integrated circuits with
specific purposes)
More complex integrated circuits include binary adders (half-adder, full
adder used to perform binary additions) and flip-flop circuits used to implement
volatile memory.
The active part of the transistor is silicon, which changes its electrical state when
pulsed. A transistor may normally allow or impede current flow, but when voltage
is applied, it flips its state. See chip and active area.
Transistors make up logic gates. Gates make up circuits. Circuits make up electronic
systems (see Boolean logic and Boolean gates).
Silicon is Switchable
Microprocessor
The microprocessor is a multipurpose, clock driven, register based, digital-
integrated circuit which accepts binary data as input, processes it according to
instructions stored in its memory, and provides results as output. A microprocessor
incorporates the functions of a computer’s central processing unit (CPU) on a single
integrated circuit (or at most a few integrated circuits).
A chip can contain from thousands to billions of transistors, and the elements making
up the transistors are measured in billionths of a meter (see process
technology and transistor density).
Finally, you can understand the Microprocessor as a programmable digital device,
which can be used for both data processing and control applications
Not all the items shown in this diagram are present on every PLC, but this will provide an
idea of a typical configuration.
Back in the 1950s, computers consisted of vacuum tubes called valves (the
precursors of transistors). These valves were quite bulky, like electric bulbs, and
produced a lot of heat. The installations used to fuse frequently.
Punch cards, paper tape, and magnetic tape were used as input and output
devices. 1st Generation Computers were programmed using machine code.
1st Generation Computers were very expensive and only large organizations were
able to afford them.
In the early 1960s, 2nd Generation computers used transistors to replace the
vacuum tubes of 1st generation computers. Therefore 2nd Generation computers
were cheaper, consumed less power and were more compact in size. They were also
more reliable and faster. More transistors could be used to create more complex
computers.
Magnetic tape and magnetic disks were used as secondary storage devices as well as
punched tapes which were still used.
2nd Generation Computers were programmed using assembly language and high-
level programming languages such as FORTRAN or COBOL.
In the second half of the 1960s, integrated circuits were used by 3rd Generation
Computers. An integrated circuit has many transistors, resistors, and capacitors
along with the associated circuitry. This development made computers smaller in
size, more reliable and efficient.
In the 1970s, Computers of 4th generation used Very Large Scale Integrated (VLSI)
circuits. VLSI circuits having about 5,000 transistors on a single chip called a
micro-processor.
The period of fifth generation is 1980-to date. In the fifth generation, VLSI
technology became ULSI (Ultra Large Scale Integration) technology, resulting in
the production of microprocessor chips having ten million electronic components.
5th Generation processors
Microprocessor: – silicon chip which includes ALU, register circuits & control
circuits
Microprocessor Memory
To execute a program the user enters its instructions in binary format into the
memory
The microprocessor then reads these instructions and whatever data is needed from
memory, executes the instructions and places the results either in memory or
produces it on an output device
The first Microprocessor (4004) was designed by Intel Corporation which was
founded by Moore and Noyce in 1968 Intel introduced the 4004 microprocessor to
the worldwide market on November 15, 1971. It was a 4-bit PMOS chip with 2300
transistors. Around the same time Texas Instruments developed a 4-bit
microprocessor TMS 1000 and became the owner of microprocessor patent. Later
Intel introduced world’s first 8 bit general purpose microprocessor 8008 in 1972.
This processor was used in the popular computer ‘Mark-8’ in those days.
In 1974, Intel introduced the improved version of 8008, the 8080 microprocessor.
This 8080 is the much more highly integrated chip than its predecessors which is
built around N-channel MOS technology. It could execute up to 290,000 operations
per second and could address up to 64K.bytes of memory. The other notable 8 bit
microprocessors include Motorola 6800, Rockwell PPS-8 and Signetics 2650 with
powerful architecture and instruction set.
In 1978, Intel introduced the 16 bit microprocessor 8086 and 8088 in 1979. IBM
selected the Intel 8088 for their personal computer (IBM-PC).8086 microprocessor
made up of 29,000 MOS transistors and could work at a clock speed of 5-10 MHz.
It has a 16-bit ALU with 16-bit data bus and 20-bit address bus.
In 1982 Intel released another 16-bit processor called 80186
In 1985, Intel released the first 32 bit processor 80386, with 275,000 transistors. It
has 32-bit data bus and 32-bit address bus so that it can address up to a total of 4GB
memory Intel introduced 80486 microprocessor with a built-in maths co-processor
and with 1.2 million transistors. It could run at the clock speed of 50 MHz This is
also a 32 bit processor but it is twice as fast as 80386
On 19th October, 1992, Intel released the Pentium-I Processor with 3.1 million
transistors. So, the Pentium began as fifth generation of the Intel x86architecture.
The 7.5 million transistors based chip, Intel Pentium II processor was released in
1997. It works at a clock speed of 300M.Hz. Intel Celeron Processors were
introduced in the year 1999. Pentium-III processor with 9.5 million transistors was
introduced in 1999. It has improved MMX which enables advanced imaging, 3D
streaming audio and video, and speech recognition for enhanced Internet facility.
Pentium-IV with 42 million transistors and 1.5 GHz clock speed was released by
Intel in November 2000. The Pentium 4 processor enables real-time MPEG2 video
encoding and near real-time MPEG4 encoding, allowing efficient video editing and
video conferencing.Intel with partner Hewlett-Packard developed the next
generation 64-bit processor architecture called IA-64 .This first implementation was
named Itanium. Itanium processor which is the first in a family of 64 bit products
was introduced in the year 2001
Pentium 4EE was released by Intel in the year 2003 and Pentium 4E was released in
the year 2004.
The Pentium Dual Core, which consists of 167 million transistors was released on
January 21, 2007. In September.2009, new Core i7 has been announced.
Different types of Embedded CISC and RISC processors provided by leading manufacturers
8085 Microprocessor IC
Fig.3 8085 Microprocessor Internal architecture
Timing and control block is the control section of µP. It accepts clock input. It
generates signals within uP to carry out the instruction, which has been decoded. In
reality causes certain connections between blocks of the uP to be opened or closed,
so that data goes where it is required, and so that ALU operations occur.
Instruction register: When an instruction is fetched, it is executed in instruction
register. This register takes the Opcode value only.
Instruction decoder: It decodes the instruction from instruction register and then to
control block.
The ALU performs the actual numerical and logic operation such as‘add’, ‘subtract’,
‘AND’,‘OR’,etc. Uses data from memory and from Accumulator to perform
arithmetic. Always stores result of operation in Accumulator.
2.1.3 Registers
i) General-purpose registers
The 8085/8080A has six general-purpose registers to store 8-bit data; these are
identified as B,C,D,E,H, and L as shown in the figure. They can be combined as
register pairs - BC, DE, and HL - to perform some 16-bit operations. The
programmer can use these registers to store or copy data into the registers by using
data copy instructions.More complex processors may have a variety of differently
named registers.
Fig.4 Programming Model for 8085 Microprocessor
The Special purpose registers, as their name indicates, are used for some specific
purpose. The Special purpose registers are: Accumulator (A), Flag Register,
Instruction Register(IR), Program Counter (PC) and Stack Pointer (SP).
It is an 8-bit tri-state register. It is mainly used for arithmetic, logic, load and store
operations. It is also used in I/O operations. In most of operations, the result is stored
in Accumulator after execution.
2-Flag Register:
The flag register includes five flip-flops, which are set or reset after an operation
according to data conditions of the result in the accumulator and other registers. They
are called: Sign (S), Zero (Z), Auxiliary Carry (AC), Parity (P), and Carry (CY) flags,
so it is an 8-bit register, which consists of only five flags. Each flag bit is a flip flop
that indicates either a set or reset state they are shown below
Sign Flag: The sign flag is set to1 if the most significant bit of the result of an
arithmetic or logic operations is 1. Else it is reset (0).
Zero Flag: The Zero status flag is set to 1 if the result of an arithmetic or logic
operation is Zero For non-Zero result it is reset to 0.
Auxiliary carry Flag: This flag is set if there is a carry from 3rd bit to 4th bit during
BCD operations (carry from lower nibble to higher nibble). This flag is not
accessible to the user.
Parity Flag: Parity is defined by the number of 1s present in a binary number stored
in A register. After any arithmetic or logical operation, if the result has an even
number of 1s it is called even parity and the Parity Flag is set to 1. Otherwise.i.e. If
there is odd number of 1s in the result, it is called Odd Parity and the Parity flag is
set 0.
Carry flag:After an arithmetic operation, like addition, subtraction if there exists a carry or
barrow, this flag CY is set to 1 else it is reset (made0)
5-Instruction Register/Decoder
Temporary store for the current instruction of a program. Latest instruction sent here
from memory prior to execution. Decoder then takes instruction and ‘decodes’ or
interprets the instruction. Decoded instruction then passed to next stage.
Generates signals within uP to carry out the instruction which has been decoded. In
reality causes certain connections between blocks of the uP to be opened or closed,
so that data goes where it is required, and so that ALU operations occur.
This block controls the use of the register stack. Just a logic circuit which switches
between different registers that will receive instructions from Control Unit.
Note also Temporary registers (W,Z): which are not available for user.. W and Z are
two 8-bit temporary registers of 8085 microprocessor, are exclusively used for the
internal operation by the microprocessor. These registers are used either to store 8-
bit of information in each W and Z registers or a 16-bit data in W, Z register pair
with lower order 8-bits in Z and higher-order 8-bits in W register.
Microprogramming
How does the µP knows what an instruction means, especially when it is only a
binary number? The microprogram in a uP/uC is written by the chip designer and
tells the uP/uC the meaning of each instruction uP/uC can then carry out operation.
Typical system uses a number of busses, collection of wires, which transmit binary
numbers, one bit per wire. A typical microprocessor communicates with memory
and other devices (input and output) using three busses: Address Bus, Data Bus and
Control Bus.
i) Address Bus
One wire for each bit, therefore 16 bits = 16 wires. Binary number carried alerts
memory to ‘open’ the designated box. Data (binary) can then be put in or taken out.
The Address Bus consists of 16 wires, therefore 16 bits. Its "width" is 16 bits. A 16
bit binary number allows 216 different numbers, or 65536=64 KB of memory locations, ie
0000000000000000 up to 1111111111111111. Because memory consists ofboxes,
each with a unique address, the size of the address bus determines the size of
memory, which can be used (if n is the number of address bus thus there are 2n
different numbers of locations). To communicate with memory the microprocessor
sends an address on the address bus, eg 0000000000000011 (3 in decimal), to the
memory. The memory then selects box number for reading or writing data. Address
bus is unidirectional, ie numbers only sent from microprocessor to memory, not
other way.
ii) Data Bus
Data Bus: carries ‘data’, in binary form, between µP and other external units, such
as memory. Typical size is 8 or 16 bits. The Data Bus typically consists of 8 wires.
Therefore, 2 power 8 combinations of binary digits. Data bus are used to transmit
"data", ie information, results of arithmetic, etc, between memory and the
microprocessor.
Data bus is bi-directional. Size of the data bus determines what arithmetic can be
done. If only 8 bits wide then largest number is 11111111 (255 in decimal).
Therefore, larger number have to be broken down into chunks of 255. This slows
microprocessor. DataBus also carries instructions from memory to the
microprocessor. Size of the bus therefore limits the number of possible instructions
to 256, each specified by a separate number.
Control Bus are various lines which have specific functions for coordinating and
controlling uP operations. Eg: Read/NotWrite line, single binary digit. Control
whether memory is being ‘written to’ (data stored in mem) or ‘read from’ (data taken
out of mem) 1 = Read, 0 = Write. May also include clock line(s) for
timing/synchronising, ‘interrupts’, ‘reset’ etc. Typically µP has 10 control lines. It
cannot function correctly without these vital control signals.
The Control Bus carries control signals partly unidirectional, partly bi-directional.
Control signals are things like "read or write". This tells memory that we are either
reading from a location, specified on the address bus, or writing to a location
specified. Various other signals to control and coordinate the operation of the system.
Modern day microprocessors, like 80386, 80486 have much larger busses. Typically
16 or 32 bit busses which allow larger number of instructions, more memory location,
and faster arithmetic. Microcontrollers are organized along same lines, except that
microcontrollers have memory etc.. inside the chip, the busses may all be internal.
In the microprocessor the three busses are external to the chip (except for the internal
data bus). In case of external busses, the chip connects to the busses via buffers,
which are simply an electronic connection between external bus and the internal data
bus.
2.2 8085 Pin description.
The pin diagram of 8085 microprocessor is shown in Fig 5. From the figure it is
clear that it is 40 pin DIP chip. The various pins of 8085 microprocessor can be
grouped in the following categories
Power Supply and Clock pins
Data bus and Address bus
Control and Status signals
Interrupt signals
DMA signals
Serial I/O signals
A8-A15: These are the upper half of the 16 bit address lines. These lines are
exclusively used for the most significant 8 bits of the 16 bits of the16 bit
address bus as below:
𝑹𝑫
̅̅̅̅̅ (Read): This is an active low read control pin. This signal indicates that
the selected I/O or memory device is to be read and data are available on data
bus.
𝑾𝑹
̅̅̅̅̅ (Write): This is an active low write control pin. It indicates that the data
on the data bus are to be written into a selected memory or I/O location
S1 and S0: These are status signals and they indicate the type of machine cycle
in progress during execution of an instruction.
READY (Input): Through this pin, the microprocessor will know whether
peripheral device is ready or not for data transfer. If the device is not ready
the processor waits. So, this pin helps to synchronize slow devices to the
microprocessor.
Interrupt signals:
What is interrupt service routine (Interrupt Handler)?
Interrupt means to break the sequence of operation. While the CPU is executing a program an interrupt
breaks the normal sequence of execution of instructions & diverts its execution to some other program.
This program to which the control is transferred to is called the interrupt service routine.
A subroutine is any block of code that we may want to use more than once. In the main program we insert
an instruction CALL followed by a label to identify the block of code so for our delay loop which we called
‘count’ we would insert the instruction ‘CALL count’ at any time we want to use our program to cause a
delay. When the delay loop ‘count’ has been completed, we insert the instruction RETURN at the end of
this block of code and the microcontroller will return to the main program.The benefit of using a subroutine
is that we can run the ‘count’ delay twice just by inserting the instruction CALL count twice in the
mainprogram and we don’t have to enter the delay loop again with the fear that we will mistype something
and it will all collapse. We can make a subroutine as long as we want and use it as often as we want just by
adding the CALL and RETURN instructions.
Let's consider a program that the A Microcontroller is executing. A program is a list of instructions that
the micro-controller executes in a sequential manner. A hardware event is something special that happens
in the micro-controller's hardware. An example of such an event is the RESET that occurs when pin 9 on
the A Microcontroller is set to ground.
When an event occurs the micro-controller generates a hardware interrupt. The interrupt forces the micro-
controller's program counter to jump to a specific address in program memory. This special memory address
is called the interrupt vector. At this memory location we install a special function known as an interrupt
service routine (ISR) which is also known as an interrupt handler. So upon generating a hardware interrupt,
program execution jumps to the interrupt handler and executes the code in that handler. When the handler
is done, then program control returns the micro-controller to the original program it was executing. So a
hardware interrupt allows a micro-controller to interrupt an existing program and react to some external
hardware event. This type of flow control is illustrated in figure 2.
In our case, of course, our hardware events are not as dramatic as "deploy airbag".
What type of hardware events are of interest to the microcontroller? You have already used some of these
events. We've already mentioned the RESET interrupt that is tied to pin 9. When this pin goes low, it
generates a hardware interrupt that forces program execution to jump to the interrupt vector 0xFFFE. This
memory location is the default starting address defined in vector.c. So when pin 9 goes low, the micro-
controller stops everything and begins re-executing the program.
A table of some of the other hardware interrupts along with their interrupt vectors are found in the following
table.
This table is only a partial list of the hardware events that can be used to interrupt program execution. In
using the microcontroller to generate a PWM signal, we'll only need to focus on one of the hardware events;
the output compare event (OC4). This is the same hardware event that is used by the kernel function pause.
TRAP, RST 7.5, RST 6.5, RST5.5 and INTR: These are the interrupt signals which
are externally initiated.
RST 7.5: It is a restart interrupt pin. It has higher priority than RST 6.5,
RST5.5 and INTR. It is a maskable vectored interrupt.
RST 6.5 and RST5.5: These two are maskable vectored interrupt with higher
priority than INTR.
𝐼𝑁𝑇𝐴
̅̅̅̅̅̅̅ (Output): It is an active low interrupt acknowledge pin. This will
acknowledge the reception of interrupt request to the peripheral device.
DMA Signals:
Hold:indicates that another Master is requesting the use of the Address and
Data Buses. The CPU, upon receiving the Hold request.will relinquish the use
of buses as soon as the completion of the current machine cycle. Internal
processing can continue. The processor can regain the buses only after the
Hold is removed this is to mean direct transfer of a data between memory and
I/O devices without the use of microprocessor
HLDA (Output): A high on this pin acknowledges the hold request from
peripheral.
𝐑𝐄𝐒𝐄𝐓𝐈𝐍
̅̅̅̅̅̅̅̅̅̅̅̅̅: It is an active low signal. When the signal on this pin goes low,
the system is in reset i.e. the program counter is set to zero, the address & data
buses are tristated.
SOD: Serial output Data pin is used by the microprocessor to output data
serially to the external devices. Serial data is sent out of the microprocessor
by executing SIM instruction. The most significant bit of accumulator should
have the serial bit and D6 bit of the accumulator must be made high to enable
the serial data transfer.
===========================================================