0% found this document useful (0 votes)
10 views16 pages

Microprocessor and Microcontroller Overview

The document outlines essential terminology related to data size units, memory types, and the components of microprocessors and microcontrollers. It explains the differences between Harvard and Von Neumann architectures, compares microprocessors and microcontrollers, and discusses criteria for selecting microcontrollers, particularly the 8051 family. Additionally, it covers semiconductor memory characteristics, including capacity, organization, and speed.

Uploaded by

h406389
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Microprocessor and Microcontroller Overview

The document outlines essential terminology related to data size units, memory types, and the components of microprocessors and microcontrollers. It explains the differences between Harvard and Von Neumann architectures, compares microprocessors and microcontrollers, and discusses criteria for selecting microcontrollers, particularly the 8051 family. Additionally, it covers semiconductor memory characteristics, including capacity, organization, and speed.

Uploaded by

h406389
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Important Terminology

A) The unit of data size

 Bit : a binary digit that can have the value 0 or 1


 Byte : 8 bits
 Nibble : half of a bye, or 4 bits
 Word : two bytes, or 16 bits

B) The terms used to describe amounts of memory in IBM PCs and compatibles

 Kilobyte (KB)
 Megabyte (MB)
 Gigabyte (GB)
 Terabyte (TB)

C) CPU (Central Processing Unit)

 Execute information stored in memory


 I/O (Input/output) devices
 Provide a means of communicating with CPU

D) Memory

 RAM (Random Access Memory) – temporary storage of programs that computer is


running The data is lost when computer is off
 ROM (Read Only Memory) – contains programs and information essential to operation
of the computer The information cannot be changed by use, and is not lost when power is
off – It is called nonvolatile memory

Page 3 of 31
a) Address bus
For a device (memory or I/O) to be recognized by the CPU, it must be assigned an
address The address assigned to a given device must be unique The CPU puts the address
on the address bus, and the decoding circuitry finds the device

b) Data bus
The CPU either gets data from the device or sends data to it

c) Control bus
Provides read or write signals to the device to indicate if the CPU is asking for
information or sending it information

Page 4 of 31
Microprocessor & Microcontroller

a) General-purpose microprocessors contains-

 No RAM
 No ROM
 No I/O ports

b) Microcontroller has

 CPU (microprocessor)
 RAM
 ROM
 I/O ports
 Timer
 ADC and other peripherals

Page 5 of 31
Microprocessor
A microprocessor, as the term has come to be known, is a general-purpose digital
computer central processing unit (CPU). Although popularly known as a “computer on a chip”,
the microprocessor is in no sense a complete digital computer.
Fig 1.1 shows the block diagram of a microprocessor CPU , which contain an arithmetic
logic unit (ALU) , a program counter (PC) , a stack pointer (SP) ,some working register , a clock
timing circuit ,& interrupt circuit’s .
To make a complete microcomputer, one must add memory, usually read only program
memory (ROM) and random- access memory (RAM), memory decoder’s and oscillator, and
number of input / output (I/O) devices, such as parallel and serial data port. In addition-special
purpose devices, such as

Arithmetic & Logic


Unit (ALU)
Accumulator

Program Counter Working Register(s) Stack Pointer

Clock Ckt Interrupt Circuit

Fig 1.1
Interrupt handlers and counters, may be added to relieve the CPU from time consuming counting
or timing chores. Equipping the microcomputer with mass storage devices, commonly floppy
and hard disk drives and I/O peripherals, such as keyboard and a CRT display, yields a small
computer that can be applied to a range of general purpose software applications.
The key term is describing the design of the microprocessor is general _purpose. The
hardware design of microprocessor CPU is arranged so that a small or very large system can be
configured around the CPU as the application demands .The internal CPU architecture, as well as
the resultant machine-level code that operates that architecture is comprehensive but as flexible
as possible.

Page 6 of 31
The prime use of microprocessor is to read data, perform extensive calculation s on that
data, and store those calculations in a mass storage device or display the result for human use.
The programs used by the microprocessor are store in the mass storage device and loaded into
RAM as the user directs. A few microprocessor programs are stored in ROM. The ROM based
program’s are primarily small fixed programs that operate peripherals and other fixed devices
that are connected to the system .
Microcontrollers
Fig 1.2 shows the block-diagram of a typical microcontroller, which is a true computer
on chip .The design, incorporates all of the features found in microprocessor CPU: ALU, PC, SP
and register. It also has added the other features needed to make a complete computer: ROM,
RAM, parallel I/O, serial I/O, counter’s and clock circuit.
Like the microprocessor, a microcontroller is general purpose device, but one that it
meant to read data, perform a limited calculation on that data, and control is environment based
on those calculations .The prime use of microcontroller is to control the operation of machine
using a fixed program that is stored in ROM and that does not change over the lifetime of the
system.

Timer / counter IO
ALU
Port
Accumulator
IO
Register(S)
Port
Internal Interrupt
Internal Rom Circuits
Ram
Clock circuit

Stack Program Counter


Pointer

The pins that connect the microprocessor to external memory are unique, each having a single
function. Data is handled in word, double word, or larger sizes.

Page 7 of 31
The microcontroller design use a much more limited set of instructions that are used to
move code and data from internal memory to the ALU. Many instructions are coupled with pins
on the integrated circuit package; the pins are “programmable”—that is capable of having
several different functions depending on the wishes of the programmer.

8-bit microcontrollers

 Motorola’s 6811
 Intel’s 8051
 Zilog’s Z8
 Microchip’s PIC
Wide availability and reliable sources of the microcontroller
The 8051 family has the largest number of diversified (multiple source) suppliers

 Intel (original)
 Atmel
 Philips/Signetics
 AMD
 Infineon (formerly Siemens)
 Matra
 Dallas Semiconductor/Maxim

Intel introduced 8051, referred as MCS- 51, in 1981

The 8051 is an 8-bit processor


The CPU can work on only 8 bits of data at a time

The 8051 had –

 128 bytes of RAM


 4K bytes of on-chip ROM
 Two timers
 One serial port
 Four I/O ports, each 8 bits wide
 6 interrupt sources

Page 8 of 31
Comparison of 8051, 8051 and 8031 microcontroller-

Comparing Microprocessor and Microcontroller

Parameter Microprocessor Microcontroller


No. of instructions Many instructions to read/ write Few instruction to read/ write data
used data to/ from external memory. to/ from external memory

Memory Do not have inbuilt RAM or Inbuilt RAM or ROM


ROM.
Memory Program and data are stored in Separate memory to store
same memory. program and data

Registers Microprocessor contains general Microcontroller contains general


purpose registers, Stack pointer purpose registers, Stack pointer
register, Program counter register register, Program counter register
additional to that it contains
Special Function Registers
(SFRs) for Timer , Interrupt and
serial communication etc.
Timer Do not have inbuilt Timer. Inbuilt Timer

I/O ports I/O ports are not available requires I/O ports are available
extra device like 8155 or 8255.
Serial port Do not have inbuilt serial port, Inbuilt serial port
requires extra devices like 8250 or
8251.

Page 9 of 31
Criteria for selecting a microcontroller

1. The important criterion in choosing microcontroller is that it must meet the task hand
efficiently and cost effectively. We must see whether an 8-bit, 16-bit or 32-bit
microcontroller can best handle the computing needs of the task most efficiently.
a) Speed. What is the highest speed that the microcontroller supports?
b) Packaging. Does it come in a 40-pin DIP(dual inline package) or a QPF(quad flat
package), or some other packaging format?
c) Power consumption. This is especially critical for battery-powered products.
d) The amount of RAM and ROM on chip.
e) The number of I/O pins and the timer on the chip.
f) How easy it is to upgrade to higher-performance or lower power-consumption
versions.
g) Cost per unit. This is important in terms of the final cost of the product in which
microcontroller is used.
2. The second criterion in choosing a microcontroller is how easy it is to develop products
around it. Key considerations include the availability of an assembler, debugger, code
efficient C language compiler, emulator, technical support, and both in-house and outside
expertise. In many cases, third party vendor support for the chip is as good as, if not
better than, support from the chip manufacturer.
3. The third criterion in choosing a microcontroller is its ready availability in needed
quantities both now and in the future. For some designers this is even more important
than the first two criteria. Currently, of the leading 8-bit microcontrollers, the 8051
family has the largest number of diversified suppliers. By supplier is meant a besides the
originator of the microcontroller. 8051 was originated by Intel; several companies also
currently produce the 8051. These companies include: Intel, Atmel, Philips/Signetics,
AMD, Infineon, Matra, and Dallas Semiconductor.

Page 10 of 31
Features of 8051 micro controller are as follows:-

1) 8- bit data bus and 8- bit ALU.


2) 16- bit address bus – 64KB of RAM and ROM.
3) On- chip RAM -128 (256) bytes (“Data Memory”)
4) On- chip ROM – 4 KB (“Program Memory”)
5) Four 8-bit bi- directional input/output ports Four 8-bit bi- directional input/ output ports.
6) Programmable serial ports i.e. One UART (serial port)
7) Two 16- bit timers- Timer 0& Timer 1
8) Six interrupts are available: Reset, Two interrupts Timers i.e. Timer 0 and Timer 1, Two
external hardware interrupts- INT0 and INT1, Serial communication interrupt for both receive
and transmit

Page 11 of 31
HARWARD AND VON NEUMANN ARCHITECTURES

There are two major classes of computer architectures, namely, ‘Harvard Architecture’, and the
‘Von Neumann or Princeton Architecture’. Figure1.3 shows the Harvard architecture. Many
special designs of microcontrollers and DSP(Digital signal processor) use Harvard architecture.
Harvard architecture uses separate memories for program and data with their independent
address and data buses. Because of two different steams of data and address, there is no need to
have any time division multiplexing of address and data buses. Not only the architecture supports
parallel buses for address and data, but also it allows a different internal organization such that
instruction can be pre-fetched and decoded while multiple data are being fetched and operated
on. Further, the data bus may have different size than the address bus. This allows the optimal
bus widths of the data address buses for fast execution of the instruction. For example, the MCS-
51 family of microcontrollers by Intel has Harvard architecture because there are different
memory spaces for program anddata and separate (internal)buses for address and data. Similarly,
PIC microcontrollers by Microchip use Harvard architecture.
In Von Neumann architecture, programs and data share the same memory space. Figure1.4
shows the Von Neumann architecture. Von Neumann architecture allows storing or modifying
the programs easily.

CPU CPU

DATA MEMORY PROGRAM MEMORY


MEMORY

Fig. 1.3 Harvard Architecture Fig. 1.4 Von Neumann Architecture

However, the code storage may not be optimal and requires multiple fetches to form the
instruction. Program and data fetches are done using time division multiplexing which affect the
performance. One example of the microcontroller using the Von Neumann architecture is
Motorola 68HC11 microcontroller.

Page 12 of 31
Von Neumann architecture Harvard architecture

Diagram to be drawn Diagram to be drawn

The Van Neumann architecture The Harvard architecture uses


uses single memory for their physically separate memories for their
instructions and data. instructions and data.
Requires single bus for instructions Requires separate & dedicated buses
and data for memories for instructions and data.
Its design is simpler Its design is complicated
Instructions and data have to be Instructions and data can be fetched
fetched in sequential order limiting simultaneously as there is separate
the operation bandwidth. buses for instruction and data which
increasing operation bandwidth.

Parameters CISC RISC

Complex Instruction Reduced Instruction


Set Computer Set Computer
Instruction Set Large (100 to 300) Small (100 or less)
Addressing Modes Complex (8 to 20) Simple (4 or less)
Instruction Format Specialised Simple
Code Lengths Variable Fixed
Execution Cycles Variable Standard for most
Cost / CPU Complexity Higher Lower
Emphasis on hardware Emphasis on Emphasis on
/software hardware software
Clock cycle requirement Includes multi clock Single clock reduced
complex instruction instruction only

Page 13 of 31
SEMICONDUCTOR MEMORY

In this section we discuss various types of semiconductor memories and their


characteristics such as capacity, orgnization and access [Link] the design of all microprocessor-
based systems,semiconductor memories are connected directly to the CPU and they are the
memory that the CPU first ask for information (code and data).For this reason,semiconductor
memories are sometimes reffered to as primary [Link] most widely used semiconductor
memories are ROM and [Link] we discus different types of RAM and ROM, we discus
some important terminology common to all semiconductor memories such as
capacity,orgnization and speed.

Memory capacity
The number of bits that a semiconductor memory chip can store is called as
chip [Link] can in units of Kbits (Kilobits), Mbits (Megabits), and so [Link] must be
distinguished from the storge capacity of computer [Link] the memory capacity of a
memory IC chip is always given in bits, the memory capacity of a computer system is given by
bytes. For example, an article in a journal may state that 128M chip has become [Link] that
case, it is understood, although it is not mentioned, that 128M means 128 megabits since the
article is refering to an IC memory [Link], if an advertisement states that a computer
comes with 128M memory, it is understood that 128M means 128 megabytes since it is refering
to computer system.

Memory orgnization
Memory chips are orgnized into number of location within the IC. Each location can hold 1 bit, 4
bit, 8 bit, or even 16 bits, depending on how it is designed [Link] number of bits that each
location within the memory chip can hold is always equal to the number of data pins on the
[Link] many locations exist inside a memory chip? That depends on the number of address
[Link] number of locations within a memory Ic always equal 2 to the power of address
[Link],the total number of bits that a memory chip can store is equal to the number of
locations times the number of data bits per [Link] summerize:
1. A memory chip contains 2x locations, where x is the number of address pins.

Page 14 of 31
2. Each location contains y bits, where y is the number of data pins on the chip.
3. The entire chip will contain 2x*y bits, where x is the number of address pins and y is the
number of data pins on the chip.

Speed
One of the most important characteristics of memory chip is the speed at which its data
can be accessed. To access the data, the address is present to the address pin, the READ pin is
activated,and after a certain amount of time has elapsed, the data show up at the data pins .The
shorter this elapsed time ,the better , and consequently, the more expensive the memory [Link]
speed of the memory chip is commonly referred to as it access [Link] access time of memory
chips varies from a few nanoseconds to hundreds of nanoseconds, depending upon the IC
technlogy used in the design and fabrication process.
The three important memory characteristics of capacity, orgnization, and access time
will be explored extensively in this chapter.

ROM (Read Only Memory)

ROM is a type of memory that does not lose its contents when the power is turned off. For this
reason, ROM is also called non-volatile memory. There are different types of read only memory,
Such as PROM, EPROM, EEPROM, Flash EPROM and mask ROM. Each is explained below

PROM (programmable ROM) and OTP


PROM refers to the kind of ROM that the user can burn information into. In other words, PROM
is a user-programmable memory .for every bit of the PROM there exists a fuse .PROM is
programmed by blowing the fuses. If the information burned into PROM is wrong, that PROM
must be discarded since its internal fuses are blown permanently .For this reason, PROM is also
referred to as OTP (one-time programming ROM, also called burning ROM, requires special
equipment called a ROM burner or ROM programmer.

Page 15 of 31
EPROM (erasable programmable ROM) and UV-EPROM
EPROM was invented to allow making changes in the content of PROM after it is burned .In
EPROM, one can program the memory chip and erase it thousands of times. This is especially
necessary
During development of the prototype if a microprocessor-based project. A wisely used EPROM
is called UV-EPROM, where UV stands for ultraviolet. The only problem with UV-EPROM is
that erasing its contents can take up to 20 minutes. All UV-EPROM chips have a window
through which the programmer can shine ultraviolet (UV) radiation to erase its content. For this
reason, EPROM is also referred to as UV-erasable EPROM or simply UV-EPROM. Figure 14-1
shows the pins for a UV-EPROM chip.
To program a UV-EPROM chip, the following steps must be taken:
1. Its contents must be erased. To erase a chip, remove it from its socket on the system
board and place it in EPROM erasure equipment to expose it to UV radiation for 15-20
minutes.
2. Program the chip. To program a UV-EPROM chip, place it in the ROM burner
(Programmer). To burn code or data into EPROM, the ROM burner uses 12.5 volts or
higher, depending on the EPROM type. This voltage is referred to as V pp in the UV-
EPROM data sheet.
3. Place the chip back into its socket on the system board.
As can be seen from the above steps. Not only is there an EPROM programmer (burner), but
there is also separate EPROM reassure equipment. The main problem and indeed the major
disadvantage of UV-EPROM, is that it cannot be erased and programmed while it is in the
system board. To find a solution to this problem, EEPROM was invented.

EEPROM (electrically erasable programmable ROM)


EEROM has several advantages over EPROM, such as the fact that it’s method of erasure is
electrical and therefore instant, as opposed to the 20-minute erasure time required for UV-
EPROM. In addition, in EEPROM one can select which byte to be erased, in contrast to UV-
EPROM, in which the entire contests of ROM are erased. However, the main advantage of
EEPROM is that one can program and erase its contents while it is still in the system board. It
does not require physical removal of the memory chip from its socket. In other words, unlike

Page 16 of 31
UV-EPROM, EEPROM does not require an external erasure and programming device. To utilize
EEPROM fully, the designer must incorporate the circuitry to program the EEPROM into the
system board. In general, the cost per bit for EEPROM is much higher than for UV-EPROM.

Flash memory EPROM


Since the early 1990s, flash EPROM has become a popular user-programmable memory chip,
and for good reasons. First, the erasure of the entire contest takes less than a second, or one
might say in a flash, hence its name, flash memory. In addition, the erasure method is electrical,
and for this reason it is sometimesreferred to as flash EEPROM. To avoid confusion, it is
commonly called flash memory. The major difference between EEPROM and flash memory is
that when flash memory’s contents are erased, the entire device is erased, in contrast to
EEPROM, where one can erased a desired section or byte. Although in some flash memories
recently made available the contents are divided into block and the erasure can be done block by
block, unlike EEPROM, flash memory has no byte erasure option. Because flash memory can be
programmed while it is in its socket on the system board, it is widely used to upgrade the BIOS
ROM of the PC. Some designers believe that flash memory will replace the hard disk as a mass
storage medium. This would increase the performance of the computer tremendously, since flash
memory is semiconductor memory with access time in the range of 100ns compared with disk
access time in the range of tens of milliseconds. For this to happen, flash memory’s program/
erase cycles must become infinite, just like hard [Link]/ erase cycle refers to the number
of times that a chip can be erased and programmed before it becomes unusable. At this time, the
program/ erase cycle is 100,000for flash and EEPROM, 1000 for UV-EPROM, and infinite for
RAM and disks
.
Mask ROM
Mask ROM refers to kind of ROM in which the contents are programed by the IC manufacturer.
In other words it is not a user-programmable ROM. The term mask is used in IC fabrication.
Since the process is costly, mask Rom is used when the needed volume is high (hundreds of
thousands) and it is absolutely certain that the contents will not change. It is common practice to
use UV-EPROM or flash for the development phase of a project, and only after the code/ data
have been finalized is the mask version of the product ordered. The main advantage of mask

Page 17 of 31
ROM is it cost. Since it is significantly cheaper than other kind of ROM, but if an error s found
in the data/ code, the entire batch must be thrown away. Many manufacturers of 8051
microcontrollers support the mask ROM version of the 8051. It must be noted that all ROM
memories have 8 bits for data pins; therefor, the organization x8.

RAM (random access memory)


RAM memory is called volatile memory since cutting off the power to the IC results in the loss
of data. Sometimes RAM is also referred to as RAWM (read and write memory), in contrast to
ROM, which cannot be written to. There are three types ofRAM: staticRAM, dynamic RAM and
NV-RAM (nonvolatile RAM).

NV-RAM (nonvolatile RAM)


Whereas SRAM is volatile, there is a new type of volatile RAM called NV-RAM. Like other
RAMs, it allows the CPU to read and write to it, but when the power supply is turned off the
contents are not lost. NV-Ram combines the best of RAM and ROM: the read and write ability
of RAM, plus the nonvolatile of ROM. To retainits contents, every NV-RAM chip internally is
made of the following components:
1) It uses extremely power efficient (very, very low power consumption) SRAM cells built
out of CMOS.
2) It uses an internal lithium battery as a backup energy source.
3) It uses an intelligent control circuitry. The main job of this control circuitry is to monitor
the Vcc pin constantly to detect loss of the external power supply. If the power to the Vcc
pins falls below out of tolerance conditions, the control circuitry switches automatically
to its internal power source, the lithium battery. The internal lithium power source is used
to retain the NV-RAM contents only when the external power source is off.

It must be emphasized that all three of the components above are incorporated into a single IC
chip, and for this reason nonvolatile RAM is a very expensive type of type of RAM as far as cost
per bit is concerned. Offsetting the cost, however, is the fact that it can retain its contents up to
ten years after the power has been turned off and allows one to read and write in exactly the
same way as SRAM.

Page 18 of 31

You might also like