MICROPROCERSSORS AND MICROCONTROLLERS REGULATION
/BRANCH :R16/R18 ECE/EEE |
INTRODUCTION
What is a Microprocessor?
The word comes from the combination micro and processor.
Processor means a device that processes whatever. In this context processor means a device that processes numbers, specifically binary numbers, 0’s and 1’s.
To process means to manipulate. It is a general term that describes all manipulation. It means to perform certain operations on the numbers that depend on the microprocessor’s design.
What about micro?
Micro is a new addition.
In the late 1960’s, processors
were built using discrete elements. These devices performed the required operation,
but were too large and too slow.
In the early 1970’s the microchip was invented. All of the components that made up the processor were now placed on a single piece of silicon. The size became several thousand times smaller and the speed became several hundred times faster.
The “Micro”Processor Was born.
Microprocessor
The microprocessor is a programmable device that takes in numbers, performs on them arithmetic or logical operations according to the program stored in memory and then produces other numbers as a result.
A microprocessor, as the
term has come to be known, is a general-purpose digital computer CPU. Popularly
known as a “CPU on a Single chip.”
A microprocessor CPU, contains an
ALU, a PC, a SP, some working registers, a clock timing circuit, and interrupt
circuits.
The microprocessor is made up of 3 main units.
–The Arithmetic/Logic Unit (ALU)
–The Control Unit.
–An array of registers for holding data while it is being manipulated.
To make a complete microcomputer, one must add memory, usually ROM and RAM, memory decoders, an oscillator, and a number of I/O devices. Additionally, special-purpose devices, such as interrupt handlers, or counters, may be added.
Microcontroller
v Microcontroller
is a true computer on a chip. The design
incorporates all of the features found in a microprocessor CPU:ALU, PC, SP, and registers.
v It also
has added the other features needed to make a complete computer: ROM, RAM,
parallel I/O, serial I/O, counters, and a clock circuit.
v Like the
microprocessor, a microcontroller is a general- purpose device, but one which
is meant to fetch data, perform limited calculations on that data, and control
its environment based on those calculations. The prime use of microcontroller
is to control the operation of a machine using a fixed program that is stored
in ROM and that does not change over the lifetime of the system.
The application areas and the products in the embedded domain are countless.
1. Consumer Electronics: Camcorders, Cameras etc..
2. Household appliances: Washing machine, Refrigerator, Air conditioner, Oven etc…
3. Automotive industry: Anti-lock breaking system (ABS), engine control.
4.Home automation & security systems: Air conditioners, sprinklers, fire alarms, CCTV, biometric systems etc.
5. Telecom: Cellular phones, telephone switches, Web cameras, Muxs etc..
6. Computer peripherals: Printers, scanners etc.
7. Computer networking systems: Network routers and switches, bridges, frame relay switches etc.
8. Medical electronics: EEG, ECG machines, BP measuring devices, X-ray scanners etc.
9. Banking & Retail: Automatic teller machines, point of sales, smart cards etc.
10. Instrumentation: Measuring equipment such as weight ,temperature, pressure, humidity, voltage, current etc and spectrum analyzer, logic analyzer & protocol analyzer etc..
Microprocessor VS Microcontroller
8086 ARCHITECTURE
8086 Architecture –Functional Diagram
In 1978, Intel designed the 8086 processor. The Intel 8086 is a 16-bit microprocessor, implemented in N-channel, depletion load, silicon gate technology (HMOS), and packaged it in a 40 pin dual in line package.
FEATURES OF 8086 MICROPROCESOR
v The 8086 is a 16-bit microprocessor. The term "l6-bit" means that its Arithmetic logic unit, internal registers and most of its instructions are designed to work with16-bit binary words.
v It is a 40
pin device which operates at a clock frequency of 5 MHz.
v It require
+5V DC power supply.
v The 8086 has
a 16-bit data bus, so it can read data from or write data to memory and ports
either 16 bits or 8 bits at a time.
v The 8086 has
a 20-bit address bus, so it can directly access 220 or 1,048,576
(1MB) memory locations. Each of the 1048576 memory locations is byte wide.
Therefore, sixteen-bit words are stored in two consecutive memory locations.
v The 8086 can
generate 16-bit I/O address; hence it can access 216 i.e 65536 I/O
ports.
v The 8086 has
fourteen 16-bit registers.
v The 8086 has
multiplexed address and data bus which reduces the number of pins needed, but
does slow down the transfer of data (drawback).
v The 8086
requires one phase clock with a 33% duty cycle to provide optimized internal
timing.
v The Intel
8086 is designed to operate in two modes, namely the minimum mode and the
maximum mode.
v The Intel
8086 supports multiprogramming. In multiprogramming, the code for two or more
processes is in memory at the same time and is executed in a time-multiplexed
fashion.
v An
interesting feature of the 8086 is that it fetches up to six instruction bytes
from memory and queue stores them in order to speed up instruction execution.
v The 8086
provides powerful instruction set with the following addressing modes:
Register, immediate, direct, indirect etc..
REGISTER ORGANIZATION
8086 has a powerful set of registers known as general purpose and special purpose registers. All of them are 16-bit registers and are categorized into two groups.
1)
General purpose registers
2) Special
purpose registers
1)
General Purpose Registers
The general purpose registers, can be used as either 8-bit registers or 16-bit registers. They may be either used for holding data, variables and intermediate results temporarily or for other purposes like a counter or for storing offset address for some particular addressing modes etc.
v The
8086 has four 16-bit general purpose registers labeled AX, BX, CX and DX.
v Each
16-bit general purpose register can be split into two 8-bit registers.
v The
letters L and H specify the lower and higher bytes of a particular register.
Eg: BH is the higher byte (8-bits) of
the BX and BL is the lower byte (8-bits) of the BX
v The
letter X is used to specify the complete 16-bit register.
AX Register (Accumulator):
AX is used as 16-bit accumulator, with the lower
8-bits of AX designated as AL and higher 8-bits as AH. AL can be used as an
8-bit accumulator for 8-hit operations. This is the most important general
purpose register having multiple functions.
The
register BX is used as an offset storage for forming physical addresses in case
of certain addressing modes.
The
register CX is also used as a default counter in case of string and loop
instructions.
DX
register is a general purpose register which may be used as an implicit operand
or destination in case of a few instructions.
2) Special
purpose registers
The special purpose registers are
used as segment registers, pointers, index registers or as offset
storage registers for particular addressing modes.
Segment Registers:
Unlike 8085, the 8086 addresses a segmented memory. The complete 1 MB memory, which the
8086 addresses, is divided into 16 logical segments. Each segment thus contains 64 Kbytes of memory.
There are four segment registers,
viz. Code Segment Register (CS), Data Segment Register (DS), Extra
Segment Register (ES) and Stack
Segment Register (SS).
These are used to hold the upper 16-bits of the starting addresses of the four memory segments, on which 8086 works at a particular time.
For example, the value in CS identifies the starting address of 64 K-byte segment known as code segment.
The code segment (CS) register is used for
addressing a memory location in the code segment of the memory, where the
executable program is stored.
The extra segment (ES) also refers to a
segment which essentially is another data segment of the memory. Thus, the extra
segment also contains data.
The stack segment (SS) register is used for addressing stack segment of memory i.e. memory which is used to store stack data.
Pointers Registers:
The pointers contain offset within the particular segments. The pointers IP, BP and SP usually contain offsets within the code (JP), and stack (BP & SP) segments.
Index Registers:
The index registers DI and SI are used as a general purpose registers as well as for offset storage in case of indexed, based indexed and relative based indexed addressing modes.
The register SI is generally used to store the offset of source data in data segment while the register DI is used to store the offset of destination in data or extra segment. The index registers are particularly useful for string manipulations.
Flag
Register:
A flag is a flip-flop which indicates some condition produced by the execution of an instruction or controls certain operations of the EU. The 8086 flag register contents indicate the results of computations in the ALU, It also contains some flag bits to control the CPU operations.
SF-Sign Flag: This flag is set when the result of any computation is negative. For signed computations, the sign flag equals the MSB of the result.
(b) Machine control flags- The control
flag register is the higher byte of the flag register of 8086. It contains
three flags, viz. direction flag (D), interrupt flag (I) and trap
flag (T).
TF-Trap Flag :One way to debug a program is to run the program one instruction at a time and see the contents of used registers and memory variables after execution of every instruction. This process is called 'single stepping' through a program, Trap flag is used for single stepping through a program. If this flag is set the processor enters the single step execution mode. In other words, a trap interrupt is generated after execution of each instruction. The processor executes the current instruction and the control is transferred to the Trap interrupt service routine.
IF-Interrupt Flag If this flag is set, the maskable interrupts are recognized by the CPU. otherwise they are ignored.
Otherwise, the string is processed from the highest address towards the lowest address, i.e. auto decrementing mode.
No comments:
Post a Comment