Anda di halaman 1dari 13

201-Microprocessor and Microcontroller Introduction

1. Microprocessor introduction and functions.

Microprocessor
Microprocessor: Microprocessor is a digital integrated circuit device that can be
programmed with a series of instruction to perform specified function on data. When
microprocessor is connected to a memory device and provided with means of transferring
data to and from the “out side world” you have microcomputer.

Introduction
A microcomputer is a complete personal computer (PC), which is on a smaller scale
computer designed for an individual. A microcomputer contains a microprocessor (a
central processing unit on a microchip), memory in the form of read-only memory and
random access memory, I/O ports and a bus or system of interconnecting wires, housed
in a unit that is usually called a motherboard.

In an ascending hierarchy of general computer sizes, we find:

• An embedded systems programming computer, which is embedded in


something and doesn't support direct human interaction but nevertheless meets all the
other criteria of a microcomputer

Microcomputer

• workstation , as used to mean a more powerful personal computer for special


applications
• minicomputer , now restyled a "mid-range server"
• mainframe or mainframe computer, which is now usually referred to by its
manufacturers as a "large server"
• Supercomputer, formerly almost a synonym for "Cray supercomputer" but now
meaning a very large server and sometimes including a system of
computers using parallel processing
o A parallel processing system is a system of interconnected computers
that work on the same application together, sharing tasks that can be
performed concurrently

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 1


201-Microprocessor and Microcontroller Introduction

1.1.1 Introduction to Microcomputers

Even though electronic digital computers have existed since the 1940's, microcomputers
have been around only since the late 1970's. The appearance of microcomputers
coincided with the development of large-scale integrated circuits (LSI chips). An
integrated circuit is a tiny chip of silicon on which is layered multiple electronic
circuits. Figure 1.1 illustrates the size of a common silicon chip.

Fig. 1.1 Silicon Chip Fig. 1.2 Chip in a DIP Fig. 1.3 Chip and Socket

A chip like the ones shown in Figure 1.1 can hold thousands of electronic circuits
containing millions of individual components. In order to connect wires to the chip so that
signals can be sent to and from it, the chip must be mounted in a plastic package
containing wire leads. This plastic case is called a dual in-line package, or DIP for short.
The name is quite descriptive since a DIP consists of two rows of leads on each side of
the plastic case. A DIP is shown in Figure 1.2.

A typical microcomputer will contain dozens of chips that perform such


functions as storing data, routing data, displaying data, and performing arithmetic and
logic operations on data. These chips are usually plugged into special sockets like the one
shown in Figure 1.3. These sockets are then attached to a large printed circuit board
called the motherboard. The motherboard of a microcomputer is shown in Figure 1.4.

Figure 1.4 Microcomputer Motherboard

In addition to a variety of chips, the motherboard of a microcomputer also


contains a series of expansion slots. These are the long sockets shown in the upper-left

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 2


201-Microprocessor and Microcontroller Introduction

corner of Figure 1.4. These sockets are designed to hold additional printed circuit boards
for such things as video display adapters, serial interfaces, and instrument interfaces.

Although microcomputers from a variety of manufacturers appeared in the


1970’s, it was the introduction of the Personal Computer (PC) from IBM in 1981 that
initiated the widespread use of microcomputers in the sciences. The IBM-PC was the first
microcomputer from a major vendor to combine the important features of large memory
capacity (up to 640,000 characters), rapid processing speed (a 4.77 MHz clock), high
resolution graphics, and convenient expansion capabilities. Within months of the
introduction of the IBM-PC, other computer manufacturers such as Hewlett-Packard,
AT&T, and Zenith introduced copies of the IBM-PC that performed exactly like the
model from IBM. These copies were sometimes referred to as clones or compatibles.
The acceptance of the IBM-PC architecture by so many different computer companies
helped to establish it as an industry standard. This standard, at least in part, is still with us
today. We still use the term PC to refer to any microcomputer whose heritage traces back
to the original IBM-PC.

1.1.2 Computers are Digital Devices

All data transfer, storage, and processing done by a microcomputer is


performed digitally using binary (base two) codes. This binary system translates every
character entered in the computer into a set of 1's and 0's. For example, the PC represents
the capital letter "C" as 1000011. The advantage of binary coding over other methods is
that a sequence of only two possible states is required to represent a character in the
electronic circuits of the computer. The binary digit 1 could be represented by a signal
level of +5 volts and a binary 0 could be represented by a signal level of 0 volts.
Therefore, the smallest piece of information that needs to be stored in memory is a single
binary digit. A single binary digit is called a bit (abbreviated with a lowercase b).
Different groupings of bits are used to represent different characters or instructions.

A collection of eight bits is called a byte (abbreviated with an uppercase B).


One byte can represent any one of 256 characters (28 = 256). The word "hello" would
require a total of five bytes of memory – one byte for each character in the word. Since
we are primarily concerned with how many characters the memory banks of a computer
can hold, memory size is referred to in units of bytes. The memory size of modern
computers is typically measured in megabytes (MB). In binary arithmetic, the power of
two which is closest to 1,000,000 is 220 (220 = 1,048,576). Therefore, in computer jargon,
the prefix "mega" stands for 1,048,576. A similar situation exists for the prefix "kilo".
Normally, the prefix "kilo" means 1,000 such as in kilometer (km). When speaking of
computer memory, however, the prefix "kilo" means the power of two that is closest to
1,000. This is 210 which is 1,024. Therefore, a computer having 256 kilobytes of memory
has the ability to store as many as 262,144 (256 X 1,024 = 262,144). Frequently, the word
kilobyte is abbreviated with a capital K. Fortunately, the distinction between the normal
use of the terms "kilo" and "mega" and there use in reference to computers is of little
importance.

1.1.3 Microcomputer Parts

All microcomputers, regardless of the brand, share a common overall design.


This design is illustrated in Figure 1.5. The CPU, shown in the middle of the diagram, is

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 3


201-Microprocessor and Microcontroller Introduction

the brain of the computer. CPU stands for central processing unit and it is the chip that
contains all the circuitry for performing arithmetic and logic operations and for directing
data to and from memory. In a microcomputer, the CPU is contained on a single chip.
Minicomputers and mainframe computers have CPU's that occupy several chips.

Figure 1.5 Relationship of CPU to Memory and I/O Devices

The CPU chip (sometimes called the microprocessor) in a PC is made by


Intel or one of the companies that produces microprocessors that emulate the Intel
architecture such as Cyrix and AMD. Intel supplied the CPU for the very first IBM-PC in
the form of the Intel 8088 microprocessor. Successive generations of PCs have used Intel
processors including the 80286, 80386, 80486, Pentium, and Pentium II. A picture of the
Pentium II processor is shown in Figure 1.6.

Figure 1.6 Pentium II CPU

All of the Intel CPUs are downwardly compatible with earlier models which
means that software written for the original 8088 will still run on the newer Pentium class
CPUs. Indeed, Intel has set downward compatibility with the 80x86 instruction set (the
instructions used by the CPU to perform arithmetic and logic operations) as a design goal
for all of its PC microprocessors. This emphasis on compatibility is one of the reasons
why the Intel-based PC has been so popular among business and scientific users.

How rapidly the CPU can process data is partially a function of the internal
timing crystal, known as the system clock, that controls the timing of CPU operations.
Every operation the CPU performs, whether it is an arithmetic/logic operation or a
transfer of data to memory, occurs under the precisely controlled timing of the system
clock. The faster the clock "ticks", the faster data can be processed. The clock crystal in
the original IBM-PC ran at 4.77 MHz. This seems remarkably slow when compared to
today’s CPUs which are approaching clock speeds of 1 GHz (giga = 109).

Early CPUs (8088, 80286, and 80386) could only perform integer arithmetic
in hardware and therefore had to rely on software to perform floating point operations and

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 4


201-Microprocessor and Microcontroller Introduction

transcendental functions (logarithms and trigonometric functions). Intel introduced FPUs


(Floating Point Unit – sometimes called a math coprocessor) for each of these chips
which greatly accelerated their performance with math-intensive operations. Later Intel
designs incorporate the FPU within the CPU itself. In 1997, Intel introduced the MMX
(Matrix Math eXtensions) instruction set into its Pentium line of CPUs. This additional
set of instructions accelerates matrix math operations and speeds up audio and video
applications.

Another technique for increasing computer performance is the use of a


memory cache (usually just called cache – pronounced "cash"). A memory cache is a
small amount of very high-speed memory used to temporarily hold blocks of data as they
move from the slower main memory area to the CPU. Caching speeds up computer
operations by relying on the fact that the next piece of data needed by the CPU is most
likely in the block of data already stored in the high-speed memory cache. Intel
introduced cache memory as part of the CPU with the 80486 line of microprocessors.

When the CPU performs a calculation, the data for the calculation are held in
registers inside the CPU. Each piece of data must be in a register. The size of these
registers determines the number of bits that the CPU can manipulate in one operation.
This is referred to as the word length of the CPU and is directly related to the processing
power of the CPU. The larger the word length of a CPU, the more data it can manipulate
during each clock cycle. The original Intel 8088 CPU had a 16-bit word length. The Intel
Pentium CPU has a 32-bit word length.
Connecting the CPU to the rest of the computer is the function of the bus. The
bus is a set of wires that carries signals from one component of the computer to another.
Figure 1.7 shows a portion of the bus on the motherboard of a microcomputer.

Figure 1.7 Microcomputer Bus

Strictly speaking, a PC has several buses, all of which operate at different


speeds and use different numbers of wires to carry data. These buses are connected to one
another through bridges to form a seamless flow of data throughout the computer. The
speed with which data can flow through a computer is a function of its bus width
measured in bits. For example, a computer with a 32-bit bus (32-bits of information
transferred simultaneously) can send data to and from components twice as fast as one
with only a 16-bit bus.

The standard bus found in all PCs today is the PCI (Peripheral Component
Interconnect) bus. This bus consists of 32-bit and 64-bit sections depending on which
CPU it is used with and which components are being connected (e.g. the bus that goes to

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 5


201-Microprocessor and Microcontroller Introduction

memory is wider than the bus that goes to disk drives). To remain compatible with older
machines, most modern PCs also contain a bus called the ISA (Industry Standard
Architecture) bus. This is a 16-bit bus that is compatible with both 8-bit and 16-bit
devices. (The original ISA bus that appeared in the 1981 IBM-PC was an 8-bit bus.)

Table 1.1 contains information on all of the major Intel CPU chips used in PCs
since 1981. Some of the items described in the preceding sections will make more sense
as you compare CPU specification in the table.

Table 1.1 Intel CPUs

Register
Bench- Bus lock Rate ransistors
Intel CPU Date Width Notes
mark Width (MHz) (106)
(Word)

8088 1979 1.0 16 8 4.77 0.029 1 MB RAM limit

80286 1982 3.1 16 16 8 0.134 16 MB RAM limit

80386DX 1985 15 32 32 16 0.275 4 GB RAM limit

80486DX 1989 54 32 32 25 1.2 8 KB cache & FPU

Pentium 1993 190 32 64 60 3.1 16 KB cache & FPU

4 GB RAM limit, 32
Pentium II 1997 570 32 64 233 7.5 B cache, FPU, MMX
instruction set

As you can see from Table 1.1, the speed, power, and complexity of CPUs has been
increasing at a tremendous rate. Gordon Moore, Co-founder along with Robert Noyes of
Intel, stated in 1965 that the data density of integrated circuits would double every 18
months. This has certainly held true for microprocessors and has turned out to be true for
other computer components as well. The statement made by Dr. Moore has become
known as Moore’s Law.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 6


201-Microprocessor and Microcontroller Introduction

1.1.4 Microprocessor Architecture

Microprocessor is a clock-driven semiconductor device consisting of electronic logic


circuits manufactured by using either a large-scale integration(LSI) or very-Large Scale
Integration (VLSI) technique. it is capable of performing various computing functions
and making decision to change the sequence of program execution. Microprocessor can
be dividing in to three segments for understanding the structure arithmetic /logical unit,
register array, control unit.

Arithmetic unit made up of:


Arithmetic Logic Unit (ALU) – Arithmetic calculations + logic operations
Accumulators (ACC) – Where arithmetic calculations are made
Condition Code Register (CCR) – Set based on results of ALU;
4 common bits: Zero, Negative, Overflow, Carry
Control unit made up of:
Memory Address Register (MAR) – holds current address where µp is accessing
Memory Data Register (MDR) – holds instruction temporarily
Instruction Register (IR) – holds fetched instruction Æ decoder circuitry
Program Counter (PC) – holds next instruction address
Control Logic (CL) – synchronisation

ALU:

This is the are of the microprocessor where the various computing functions
are performed on data. The ALU unit perform such arithmetic operation as addition and
subtraction, and such logic operation as AND, OR, and exclusive OR.

Register Unit:
This area of microprocessor consist of various registers identified by letters such as
A,B,C,D,E,H, and L. These register are primarily used to store data temporarily during
the execution of the program and are accessible to the user through instructions.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 7


201-Microprocessor and Microcontroller Introduction

Control Unit:
The control unit provide the necessary and control signals to all the operation in the
microcomputer. It control the flow af data between the microprocessor and memory and
peripherals.

1.1.5 Microprocessor Based System:

Microcomputer is one of among many Microprocessor based system it include three


components 1.) Microprocessor 2) Input/Output (I/O) 3). Memory (read/write and read
only memory). Here, microprocessor is a component of
microcomputer.

Figure 1.8 Microcomputer System –Architecture.

Here various bus is commonly known as system bus which are differentiating
in three parts category according to the different function of bus Address Bus, Control
Bus, and Data Bus.

Understand the basic function among programmer’s instruction, the ALU, and
the control unit with example of full adder circuit.

Full adder circuit can be designed with registers, logic gates, and clock. The
clock initiates the adding operation similarly, the bit pattern of an instruction initiate a
sequence of clock signals, activates the appropriate logic circuit in the ALU, and perform
the task. This is called microprogramming, which is done in the design stage of the
microprocessor. In many ways this is similar to the process of how our brain operates. In
early childhood, in our brain. When we here a word “ sit “. Our brain activates a series of
action for our muscles and bones and we sit down . in this analogy the word sit is an
instruction in a microprocessor, and action initiated by our brain are like micro programs.
The bit pattern required to initiate these micro program operations are given to
the programmer in the form of the instruction set of the microprocessor. The programmer
selects appropriate bit pattern from the set for a given task and enters them sequentially in
memory through an input devices. When the CPU reads these bit patterns one at a time, it
initiates appropriate micro program through the control unit, and perform the task
specified in the instructions.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 8


201-Microprocessor and Microcontroller Introduction

1.1.6 Memory
Memory stores the binary information as instructions and data, and provides
that information to the microprocessor whenever necessary. To execute programs, the
microprocessor reads instruction and data from memory and performs the computing
operation in its ALU section. Result are either transferred to the output section for
display or stored in memory for later use.
Basically memory can be Read- only memory (ROM), Read/Write memory
(R/WM), popularly known as Random- Access memory (RAM).

The ROM is used to store program that not need alteration. Program stored in rom
can only be read; they can’t be altered.
The read/Write Memory (R/WM) is also known as user memory : its used to stored
user program and data. The information stored in this memory can be easily read and
altered.
Random Access Memory (RAM) is also known as a volatile memory or temporary
storage memory. Once the power turn down, this memory is cleared.

1.1.7 Input/Output
The third microprocessor based –based system is I/O is communicate with the
out side world. It include two types of devices which is known as Input and Output
devices we studied in other chapter.

1.1.8 System Bus


The system bus is a communication path between the microprocessor and
peripherals; it is nothing but a group of wire to carry bits. In fact, there are several bus in
system that will be discuss in next chapters, all peripherals shares the same bus ; however
microprocessor can communicates with only one peripherals at a time; The timing is
provided by control unit of the microcomputer.

Assignment: Questions
• What is Micro Computer& micro processor? Give Example of
Microprocessor based system.
• Describe Evolution of Microprocessor.
• Explain, How Microcomputer work?

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 9


201-Microprocessor and Microcontroller Introduction

1.2. Micro processor internal functions and computer


languages.

Microprocessor always works in binary format according to its design of code.


Microprocessor can accept the words form out side the world in byte(group of 8-bit) or
nibble(group of 4-bit) format, the word length range from 4 bits for small microprocessor,
and 64 bit for high-speed large computer. Each machine has its own set of instructions
based on the design of its CPU. To communicate with computer one must give instruction
in binary language (machine language), but it’s not possible to write program in binary
for human beings so program can write in assembly language. So some general purpose
language like FORTRAN and BASIC have been devised English code in to machine
code. These languages are known as a high level language. These language deals with
various three types of languages: machine, assembly and high-level.

1.2.1 Machine Language

The number of bits are fixed for words with different combination of bits.
For example, ACSII (2^8 )combination of eight bits-thus a language of 256 words. The
microprocessor design engineer select combination of bit patterns and gives a specific
meaning to each combination by using electronic logic circuits; this is called an
instruction.

Here we studied 8-bit microprocessor is 8085.manufactured by Intel


Corporation. The primary focus here is on the microprocessor because the
microprocessor determines the machine language and the operation of a microprocessor-
based system.

The 8085 Microprocessor has a 8-bit word length : 8085 is earlier version of 8080A

An instruction is a binary pattern entered through an input device in memory to


command the microprocessor to perform that specific function.

0011 1100 –instruction increment the number in register called the accumulator by 1.

1000 0000-add number in the register called B to number to accumulator and keep
sum in accumulator.

In 8085 mp 246 such bit pattern and 74 different instruction are called its instruction
sets. Instruction sets is called the 8085 machine language, but it is difficult to write in
binary language instruction sets are convert in to hex format so here you gives this
instruction as 3C instead of 0011 1100. The monitor program of the system translates
these keys into their equivalent binary pattern.

-0011 1100 of the 8085 microprocessor is represented by mnemonics INR A:


INR A- Here INR for Incremented and A stands for accumulator.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 10


201-Microprocessor and Microcontroller Introduction

-Add B add stands for addition. And B represent the content in register B. This
symbol suggests the addition of the contents in register B and the contents in the
accumulator.

The complete set of 8085 mnemonics is called the 8085 assembly language,
and a program written in this mnemonics is called the assembly language, and a
program written in this mnemonics is called an assembly language program. An
assembly language program written for one microprocessor is not transferable to
another microprocessor unless two microprocessor are compatible in their machine
codes. Here machine language and assembly language are microprocessor-specific
and are both considered low- level languages. The mnemonics can be written
electronically on a computer using a program called an editor in the ASCII codes and
translate in to binary code by using the program called assembler.

1.2.2 Written and Executing an assembly language program

A program is a set of logically related instructions written in a specific sequence to


accomplish a task. To manually write and execute an assembly language program on a
single-board computer. With a hex keyboard for input LEDs for output, the following
steps are necessary:

Write the instruction in mnemonics obtain from the instruction set written by the
manufacturer.

find hexadecimal machine code for each instruction by searching to through the set of
instruction.

Enter the program in the user memory in a sequential order by using the hex keyboard
as the input device.

Execute the program by pressing the execute key. The answer will be display by the
LEDs.

Here when execute the commands microprocessor fetch each instruction, decode it,
and execute it in a sequence until the end of the program.

1.2.3 High-Level Languages

Programming language that are intended to be machine- independent are called


high-level languages. This includes such languages as BASIC, PASCAL, C++,C and
Java, all of which have certain set of rules and drawn on symbols and convention
from English. Instruction written in this language are known as statements rather than
mnemonics.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 11


201-Microprocessor and Microcontroller Introduction

1.3 Micro processor Controlled Temperature


System
This system is expected to read the temperature of the room and display the
temperature in a room, display the temperature at a LCD(liquid Crystal Display)
panel .turn on a fan if temperature is above a set point and turn on a heater if the
temperature is below a set point we will discuss various component of this system.

1.3.1 System Hardware:

In addition to the microprocessor and memory, we need various input and


output devices. The system need a temperature sensor as an input device to sense
room temperature, and three out put device –a fan , a heater , and a LCD panel for
display.

Microprocessor

Show 8085 processor with a system bus; processor read the binary instruction
from memory and execute those instruction continuously, display it at the LCD
display panel, at turn on/off the fan and the heater based on the temperature.

Memory

The system includes two types of memory. ROM will be used store the
program, called the monitor program that is responsible for providing the
necessary instruction to the processor to monitor the system. This will be
permanent program stored in ROM and will be altered. The R/W memory is
needed for temporary storage of data.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 12


201-Microprocessor and Microcontroller Introduction

Input

In this system we need a device that can translate temperature in to an


equivalent electrical signal; a device that translate one form of energy in to
another form of energy is called a transducer. i.e. Microphone is a transducerthat
converts sound energy in to an electrical signal, and thermocouple is a transducer
that converts heat in to an electrical signal.

The analog to digital converter (A/D converter) is electronic semiconductor


chip that converts input analog signals in to the eight bit binary output signals.
This Microprocessor based system provide binary codes are connected to the
processor using device such as buffers called input ports, this A/D converters is
an input port, and it will be assign a binary number called an address. This
microprocessor reads this digital signal from the input port.

Output

Out put devices are connected to microprocessor using letch called output ports.

Fan: this is output device connected to microprocessor with port no 1.that is turn
on by the processor when the temperature reaches a set higher limit.

Heater This is also an output device, identified as port no 2, that on by the


processor when the temperature reaches a set lower limit.

Liquid Crystal Display(LCD) this display is made of crystal material placed


between two plate in the form of a dot matrix of segment. It can display letters
decimal digits, or graphic characters. This LCD displays temperature.

Developed By : Prakash M Vora, C.U.Shah College of MCA, Wadhvan,Surendranagar 13

Anda mungkin juga menyukai