You are on page 1of 28

ELECTRONICS -II

Subject Code : T31


(TH-60,MT-30,CA-10)
Unit -II, Module –3
MICROCONTROLLERS
Introduction

 A computer is a programmable machine


that receives input, stores and manipulates
data/information, and provides output in a
useful format.
1.1 BLOCK DIAGRAM OF A
BASIC COMPUTER SYSTEM
Basic components of
microcomputer

CPU - Central Processing Unit


(Microprocessor)
 the portion of a computer system that executes the
instructions of program
 the primary element carrying out the computer's
functions. It is the unit that reads and executes
program instructions.
 The data in the instruction tells the processor what to
do.
5
Evolution of Microprocessor

6
MICROPROCESSOR
MICROPROCESSOR

Arithmetic & Logic Unit


(ALU)

Accumulator

Working Registers

Program Counter Stack Pointer

Clock Circuit Interrupt Circuits


MICROPROCESSOR

 It is an integrated circuit(IC) that performs all the functions


of a central processing unit of a computer.
 It is a central processing unit(CPU) on a single chip
containing millions of very small components including
transistors, resistors, and diodes that work together.
 Microprocessors help to do everything from writing to
searching the Web.
 Everything a computer does is described by lots of precise
instructions, and microprocessors carry out these
instructions at incredible speed—many millions of times a
second.
Arithmetic and logic unit (ALU)
 Most important component in a
microprocessor.
 It performs the arithmetic and logical
operations.
 Able to perform the basic logical
operations like AND, OR, NOT etc. &
arithmetic operations like addition,
subtraction etc. 11
Internal structure of ALU

2 bits of ALU 4 bits of ALU

12
Control unit
 The circuitry that controls the flow of information
through the processor, and coordinates the
activities of the other units within it.
 In a way, it is the "brain within the brain", as it
controls what happens inside the processor, which
in turn controls the rest of the PC.
 On a regular processor, the control unit performs
the tasks of fetching, decoding, managing
execution and then storing results.
13
Register sets
 The register section/array temporarily
stores data or program codes until they
are sent to the ALU or to the control section or
to memory.
 The number of registers are different for
different CPU’s.
 Registers are normally measured by the
number of bits they can hold, for example, an
"8-bit register" or a "32-bit
14 register".
15
Accumulator
 a register in which intermediate arithmetic and
logic results are stored.
 example for accumulator use is summing a list
of numbers.
 The accumulator is initially set to zero, then each
number in turn is added to the value in the
accumulator.
 Only when all numbers have been added is the
result held in the accumulator written to main
memory(RAM). 16
Bus system

 A system of transport, that transfers


data between computer components
inside a computer or between
computers.
# types
1) Data bus

2) Address Bus

3) Control Bus 17
Data bus

 The data bus is 'bi-directional'


 data or instruction codes from memory or

input/output are transferred into the


microprocessor
 the result of an operation or computation

is sent out from the microprocessor to


the memory or input/output.
 Depending on the particular microprocessor,
the data bus can handle 188 bit or 16 bit data.
Address bus

 The address bus is 'unidirectional', over which


the microprocessor sends an address code to the
memory or input/output.
 The size (width) of the address bus is specified by
the number of bits it can handle.
 The more bits there are in the address bus, the
more memory locations a microprocessor can
access.
 A 16 bit address bus is capable of addressing
65,536 (64K) addresses.
19
Control bus

 The control bus is used by the microprocessor


to send out or receive timing and control
signals in order to coordinate and regulate its
operation and to communicate with other
devices, i.e. memory or input/output.

20
Program counter (PC)

 A 16 bit register, used to store the next address


of the operation code to be fetched by the CPU.
 Purpose of PC in a Microprocessor
 to store address of tos (top of stack)

 to store address of next instruction to be

executed.
 count the number of instructions.

 to store base address of the stack.

21
Stack Pointer (SP)

22
MICROCONTROLLER

 Industrial & domestic products like automobiles,


engines, measuring instruments, automatic
washing machines, ovens etc. uses automation
technique.
 Data storage & processing is integral part of any
automatic control system.
 Microcontrollers are single chip controllers ,
more suited for control & automation of machines
& processes.
MICROCONTROLLER
It consists of
1) Central Processing Unit (CPU)
2) Memory
3) Input/ Output ports (I/O)
4) Timers
5) Counters
6)Serial Ports
7) Interrupt Logic
8) Oscillator Circuitry
9) Analog to Digital converters
10) Digital to Analog Converters
& many more functional blocks on chip
MICROCONTROLLER
MICROCONTROLLER
 Designed in such a way that it can be
used for many applications
 Very flexible & extensive instruction set.
 Pins are programmable : Capable of
having several different functions
depending on the wishes of the
programmer.
Microprocessor Vs. Microcontroller
Microprocessor Microcontroller

1) CPU is stand-alone, RAM, 1) CPU, RAM, ROM, I/O and


ROM, I/O, timer are separate timer are all on a single chip
2) Designer can decide on the 2) fixed amount of on-chip
amount of ROM, RAM and I/O ROM, RAM, I/O ports.
ports.
3) Expensive, versatile 3) for applications in which cost,
power and space are critical
4) General-purpose 4) single-purpose (control-
oriented)
5) High processing power 5) Low processing power
Microprocessor Vs. Microcontroller
Microprocessor Microcontroller

6) High power consumption 6) Low power consumption


7) Instruction sets focus on 7) Bit-level operations. Instruction
processing-intensive operations sets focus on control and bit-level
operations
8) Typically 32/64 – bit 8) Typically 8/16 bit
9) Typically deep pipeline (5-20 9) Typically single-cycle/two-stage
stages) as CPU, RAM, ROM, I/O and timer
are all on a single chip
10) Cannot be used in compact 10) Can be used in compact systems
systems. and hence it is an efficient technique
e.g. 8085, 8086 e.g. 8051

You might also like