Unit 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Study Material

< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>:<22426><Microcontroller and Applications><Basics of Microprocessor and 8051


Microcontroller><UO1a : Describe microprocessor, microcontroller and microcomputer .State its role in different fields and give their
comparison for given parameters.>

Mr Deepak Kulkarni Date:1/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:. Microprocessor


Describe microprocessor, microcontroller and
Microprocessor, microcomputer and its role in different fields
Microcontroller
Microcomputer
Memory
I/O ports

Key Questions Concept Map

Q1. Do you know what is


a microprocessor,
microcontroller, and
microcomputer?

Introduction: Key Definitions


The term microprocessor first came into use at Microprocessor is a general-purpose device which
Intel in 1972 and, generally, refers to the is called a CPU
implementation of the central processor unit Microcontroller is a dedicated chip which is also
functions of a computer in a single, large scale called a single chip computer
Give a few examples of integrated (LSI) circuit. A microcomputer, then, Microcomputer is a small computer with a
Microprocessor ICs and is a computer built using a microprocessor and a microprocessor as its central processing unit.
Microcontroller ICs. few other components for the memory and
Ans: 8085, 8080 are the I/O.The Intel 4004 was a 4-bit microprocessor
8-bit microprocessors and led the way to the development of the 8008,
whereas 8086, 8088 the first 8-bit microprocessor, introduced in
etc. are the 16-bit 1972.
microprocessors. Computers are used in applications where the
8051 by intel and PIC system is dedicated to performing a single task
by microchip are a few or a single group of tasks. These are called
examples of embedded applications, and examples are in
microcontroller. products from microwave ovens and toasters to
automobiles. These are often control
applications and make use of microcontrollers.
microcontroller
Application areasisof microprocessor:
a microcomputer with its
Calculators, https://youtu.be/SUusup7FfJo
memory andSystems,
Accounting I/O integrated into a single
Games Machine, chip. In
Complex
1991 the chip
Industrial manufacturers
Controllers, deliveredSystems,
Data Acquisition over 750
million applications,
Military 8-bit microcontrollers;
Communication by systems,
2004 the
industry’s annual total was 6.8 billion
etc
microcontroller units
Application areas of microcontroller: Mobile
phones, CD/DVD players, Washing machines,
Cameras, Security alarms, microwave oven, etc
Microprocessor:
 Microprocessor is a single integrated circuit that has ability to perform all the functions of central processing unit in a
single microchip. A microchip is called a microprocessor, when it has capability to perform all CPU functions like
control unit, arithmetic logic unit, register, bus control circuit and instruction decoders in a single integrated unit.
 It consists of a an ALU, accumulator, working registers, program counter, stack pointer, clock, and interrupt circuit
These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system designer has to add them
externally to make them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc.
 8085,8080 are the 8-bit microprocessors whereas 8086, 8088 etc. are the 16-bit microprocessors.

Applications of microprocessor:
Calculators, Accounting Systems, Games Machine, Complex Industrial Controllers, Data Acquisition Systems, Military
applications, Communication systems, etc

Microcontroller :
 Microcontroller is a modified and developed form of Microcomputer, in which all the necessary components like
programmable input/output peripherals, processor core and memory are present in a single microchip. This
technology is mostly used in embedded applications.
 Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other peripherals all embedded on a
single chip. At times it is also termed as a minicomputer or a computer on a single chip. Different manufacturers
produce microcontrollers with a wide range of features available in different versions. Some manufacturers are
ATMEL, Microchip, TI, Freescale, Philips, Motorola etc.
Microcontrollers are designed to perform specific tasks. Specific means applications where the relationship of input
and output is defined. Depending on the input, some processing needs to be done and output is delivered. For
example, keyboards, mouse, washing machine, digicam, pen drive, remote, microwave, cars, bikes, telephone,
mobiles, watches, etc. Since the applications are specific, they need small resources like RAM, ROM, I/O ports etc and
hence can be embedded on a single chip. This in turn reduces the size and the cost.
 8051 by Intel and PIC by microchip are a few examples of microcontroller.

Block diagram of Microcontroller:


Applications of microcontroller:
Mobile phones, CD/DVD players, Washing machines, Cameras, Security alarms, microwave oven, etc

Microcomputer
 Microcomputer is small computer; whereinone can see the association of microprocessor, I/O peripherals, data and
programmable memory as well as other supporting circuits at one place, but not in single chip.
 The earlier computers like mainframes and minicomputers were comparatively much larger and more expensive.
 Many microcomputers are also personal computers.
Block diagram of Microcomputer

Elements of microcomputer:
The microcomputer has microprocessor, memory, buses, and I/O devices as shown in the above block diagram.
 Microprocessor : The microprocessor is the central processing unit. It does all the arithmetic and logical operations
through internal registers and ALU (Arithmetic Logic Unit). It also works as a master to control the data transfer which
includes address generation, bus synchronization and actual data transfer. Generally, the frequency of operation of
microprocessor is in Megahertz which means the time period is in microsecond. So, it is called as microprocessor.
 Memory : The microprocessor does not has internal memory. So external memories need to be interfaced with the
microprocessor. It includes ROM which is used for storage of program and RAM which is used to store data
temporarily. Upon reset or power cut, the data in RAM is erased while data in ROM remains the same. Apart from
these, some systems may include EEPROM as per the applications requirement.
 Buses : For actual data transfer between CPU and peripheral devices or memory, buses are used. A bus is collection of
connectors/paths (typically in multiples of 8) and is used for data transfer. Depending upon the use, the buses can be
classified in 3 types, viz., address bus, data bus and control bus. The data bus carries data in bidirectional way. The
address bus is used to carry the address whereas control bus is used to synchronize data transfer.
 I/O devices : The input/output devices are necessary to interact with external world. The devices can be interfaced
through a peripheral controller IC. Similar to memory, input devices send data to CPU and output devices receive data
from CPU through buses. The I/O device can be as simple as keys and LEDs.

Applications of Microcomputers:
Modern desktop computers, video game consoles, laptops, tablet PCs, and many types of handheld devices, including
smart phones, pocket calculators, and industrial embedded systems.

Comparison of Microprocessor, Microcontroller and Microcomputer


Parameter Microprocessor Microcomputer Microcontroller

Definition Memory,I/O ports,timers, Microcomputer is a small Microcontroller is a single chip


interrupts are not integrated computer which includes with on board RAM,ROM,I/O
inside the chip amicroprocessor,memory and ports,timers ,interrupt controller
input/ output facilities. and serial port.
Components Requires many additional digital Not all microcomputer uses Can work as a microcomputer
components to perform its microcontroller. without any additional
operation. components.
Cost A system is bulkier and System is simple, economic, and System is simple, economic, and
expensive as it requires compact. compact.
additional components.
Memory Do not have inbuilt RAM and Inbuilt RAM and ROM Inbuilt RAM and ROM
ROM Separate memory to store Separate memory to store
Program and data are stored in program and data. program and data.
same memory.
Architecture Higher accessing time required. Low accessing time. Low accessing time.
Boolean Boolean operation is not Boolean operation is possibleif Boolean operation i.e.,
Operation possible directly. microcontroller is used. operation on individual bit is
possible directly.
Instructions Many instructions to read/write Few instructions to read/write Few instructions to read/write
data from/to external memory. data to/from external memory. data to/from external memory.
Pins Only few pins are Maximum of the pins are Maximum of the pins are
programmable. programmable. programmable.
Bit handling Very few bit handling Boolean instructions for bit Boolean instructions for bit
instructions instructions. manipulation. manipulation.
Application Widely used in modern PC and Widely used in large control Widely used in small control
laptops. systems such as small industry systems such as washing
automation, CNC machine. machine, modern LED TV etc.
Examples INTEL 8086, INTEL Pentium Video game console, mobile INTEL 8051, 89960, PIC16F877
series. phone, Laptop, Tabs etc.

Key Take away from this UO:

 The processor on a single chip is called a Microprocessor which can process micro-instructions
 A Microcontroller is a small and low-cost microcomputer, which is designed to perform the specific tasks of
embedded systems
 Microcomputer is a small, relatively inexpensive computer with a microprocessor as its central processing unit
(CPU).
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>:<22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1b.1:Describe types of Buses: address bus, data bus and control bus .>

Mr Deepak Kulkarni Date:6/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:.


Describe types of Buses: address bus, data bus Buses
Bus,Address Bus,Data Bus, and control bus
Control Bus

Key Questions Concept Map

Data
Q1. Do you know the
Bus
three types of bus?
Address Control
Bus Bus

Bus

Introduction: Key Definitions


A Bus is a set of physical connection used for
A bus is a means of exchanging information communication between CPU and peripherals.
between the components of a computer.
Generally, a computer uses two or more Address Bus-It is unidirectional and carries address
conductors running in parallel to carry
State the number of information in the form of electronic pulses.
memory locations A common communication channel between a Data Bus -It is bidirectional and carries data
that can be number of devices uses parallel wires to carry
accessed by a 16-bit address, data, control signals and power.
address bus. Control Bus- It sends out or receives control and
Ans: A 16-bit timing signals.
address bus can
16
access 2 =
64kbytes of
memory locations.

https://youtu.be/3osm-soT_Lc
Applications
Microcomputers .Laptop, Embedded systems,
Microprocessors, Microcontrollers, Desktop PC
All the cables are different with the different grouping of conductors. But the communication paths inside the CPU
that are used to connect the internal components of the CPU are called buses. Similarly, a communication path
connecting the CPU to memory is a bus.

A bus is merely a group of wires that carry information between different components. Depending on the type of
information carried by them they can be classified as...

1. Address Bus
2. Data Bus
3. Control Bus

A bus may be unidirectional or bidirectional depending on the requirement of the information. Similarly, if it
connects the components of CPU then it can be internal buses and if it connects the CPU with the external
components then it is an external bus. Whether it is an internal bus or external bus depending on the type of
information they have the classification as an address bus, data bus, and control bus.

Address Bus

The address bus is used by the CPU to send the address of the memory location or the input/output port that is to be
accessed at the instant. It is a unidirectional bus i.e., the address can be transferred in one direction only and that is
form CPU to the required port or location.

Whether it is a read operation or write operation the CPU calculates the address of the required data and sends it on
the data bus for the execution of the required operation. The maximum number of memory locations that can be
accessed in a system is determined by the number of bits used by an address bus.
n 16
An address bus of n bits can address at the most 2 locations directly. Thus a 16-bit address bus can allow access 2
or 64 K Byte of memory locations.

In Intel 8085 microprocessor, address bus is of 16 bits .This means that microprocessor 8085 can transfer maximum16
bit address that is 65,536 different memory locations. The bus is multiplexed with 8-bit data bus. So, the most
significant bits of address do through Address bus(A7-A0) and least significant bits goes through multiplexed data bus
(AD0-AD7).

In a multiplexed address scheme, the address is sent in two equal parts on alternate cycles. These halves the number
of address signals required to connect to memory.

Data Bus

A data bus is used to carry the data and instructions from the CPU to memory and peripheral devices and vice versa.

Thus, it is a bidirectional bus. It is one of most important parts of the connections to the CPU because every program
instruction and every byte of data must travel across the bus at some point.

The size of the data bus is measured in bits. The data bus size has much influence on the computer architecture
because the important parameters of it like word size, the quantum of data etc. are determined and manipulated by
the size of the data bus.

The width of the data bus reflects the maximum amount of data that can be processed and delivered at one time. A
64-bit processor has a 64-bit data bus and can communicate 64-bits of data at a time, and whether the data is read or
written is determined by the control bus.

Generally, a microprocessor is called n-bit processors. Thus, as the CPU became more advanced, the data bus grew in
size. A 64-bit data bus can transfer 8 bytes in every bus cycle and thus its speed is much faster as compared to the 8-
bit processor that can transfer one byte in every bus cycle.

A good way to understand this flow of information is to consider a highway and the traffic it carries. If a highway has
only one lane for each direction of travel, only one car at a time can move in a certain direction, If one wants to
increase the traffic flow one can either increase the speed of the cars or add more lanes or do both.

Control Bus

A control bus contains various individual lines carrying synchronizing signals that are used to control various
peripheral devices connected to the CPU.

The common signals that are transferred to the control bus from CPU to devices and vice versa are
Memory read
Memory write
I/O read
I/O write etc

Signals are designed, keeping in mind, the design philosophy of the microprocessor and the requirement of the
various devices connected to the CPU. So different types of the microprocessor have different control signals.

Key Take away from this UO:

A bus is a pathway for digital signals to rapidly move data. There are three internal buses associated with processors: the
data bus, address bus, and control bus. Together, these three make up the “system bus”.
Study Material

< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051


Microcontroller><UO1b.2 :Explain Harvard and Von-Neumann architecture.>

Mr Deepak Kulkarni: Date:9/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:


Explain Harvard and Von-Neumann architecture
Harvard Architecture,
Von-Neumann,
Architecture
Data Memory, Program
Memory

Key Questions Concept Map

Q1.Do you know the two


types of Computer Computer
Architecture? architecture

Harvard Von-Neumann
Architecture Architecture

Introduction: Key Definitions


Basically, Microprocessors or Microcontrollers
are classified based on the two types of
Computer Architecture: Harvard Architecture is the digital computer
Von Neumann Architecture and Harvard architecture whose design is based on the concept
Architecture. where there are separate storage and separate buses
They represent two different ways of exchanging (signal path) for instruction and data
Q1. Give the data between CPU and memory.
disadvantages of Von- MCs with Harvard architecture are called "RISC
Newmann architecture. MCs". It was basically developed to overcome Von Neumann Architecture is a digital computer
the bottleneck of Von Neumann Architecture architecture whose design is based on the concept of
Parallel implementation which means Instructions can only be carried out stored program computers where program data and
of program is not one at a time and sequentially. instruction data are stored in the same memory
allowed due to
MCs with Von Neumann’s architecture are called
sequential instruction
'CISC microcontrollers'. This architecture was
processing.
designed by the famous mathematician and
physicist John Von Neumann in 1945.
Von
Neumann bottleneck –
Instructions can only be Applications https://www.youtube.com/watch?v=QMFlF-9ji8Y
carried out one at a time
and sequentially. Microcomputers
PIC Microcontroller
Risk of an instruction 8051 Microcontroller https://youtu.be/Yzu1s7SEDAY
being rewritten due to an DSP
error in the program. Microprocessors
ARM9
ARM7
Harvard Architecture

 Harvard architecture uses separate memories for program and data with their independent address and data buses.
 This architecture supports parallel buses for address and data and allows a different internal organization such that
instruction can be prefetched and decoded while multiple data are being fetched and operated on.
 The data bus may have different size than the address bus. This allows the optimal bus width of the data and
address buses for fast execution of the instruction.
 The MCS-51 family of microcontrollers by Intel has Harvard architecture because there are different memory
spaces for program and data and separate buses for address and data.
 Also, PIC microcontrollers by Microchip use Harvard architecture. Example: PIC16F84 MC
 Many special designs of microcontroller and DSP use Harvard architectures. Example: SHARC, ARM9

Von-Neumann Architecture :

 In Von-Neumann architecture, programs and data are stored on the same memory space.
 Von-Neumann architecture allows storing or modifying the program easily.
 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 effect the performance.
 For example, Motorola 68HC11 microcontroller, ARM7, Pentium, MSP 430 useVon-Neumann architecture.
Difference between Harvard and Von-Neumann Architecture:
Harvard Architecture Von-Neumann Architecture
(1) The distinction between program and data memory (1) The distinction between program and data memory is
is physical. logical.
(2) It uses physically separate memories for their (2) It uses single memory for their instructions and data.
instructions and data.
(3) Requires separate and dedicated buses for (3) Requires single bus for instructions and data.
instructions and data.
(4) Instructions and data can be fetched simultaneously (4) Instructions and data have to be fetched in sequential
as there are separate buses for instructions and data order and hence affects the performance.
which helps in post execution.
(5) Its design is complicated. (5) Its design is simpler.

Key Take away from this UO:


 Harvard architecture uses separate memories for data and program.
 Von-Neumann architecture uses single memory for data and program
Study Material

< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications ><Basics of Microprocessor and 8051


Microcontroller><UO1b.3:State the importance of 8051 Pins.>

Mr Deepak Kulkarni Date:10/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:.


State the importance of 8051 Pins. IC 8051
DIP (Dual in Line)
Packages
TQFP-Thin Quad-flat no-
leads package
PLCC-Plastic Lead Chip
carrier

Key Questions Concept Map

Q1. Do you how many


pins are available in 8051
microcontroller?

.Introduction Key Definitions


8051 Microcontroller is available in a variety of Dual in-line package (DIP or DIL), or dual in-line
packages like 40 – pin DIP or 44 – lead PLCC and pin package (DIPP) is an electronic
TQFP. The pin orientation of an 8051 component package with a rectangular housing and two
Microcontroller may change with the package, parallel rows of electrical connecting pins.
List functions of The package may be through hole mounted to a printed
but the Pin Configuration is sameSince it is a 40 –
following pins of 8051: circuit board (PCB) or inserted in a socket.
pin DIP IC, each side contains 20 Pins
ALE, 𝐸𝐴’𝑃𝑆𝐸𝑁’ QFP IC has pins on all four sides. A QFP IC can have
ALEis the Address Latch There are other packages of 8051 like the 44 –
pins anywhere from eight per side (32 total) to
Enable Pin. Using this Lead PLCC and the 44 – Lead TQFP. The following
upwards of seventy (300+). Pins on a QFP IC are usually
Pins, external address image shows the 8051 Microcontroller Pin
spaced anywhere from 0.4mm to 1mm apart. Smaller
can be separated from Diagram for these packages.
variants of the standard QFP package include thin QFP
data (as they are (TQFP), very-thin QFP (VQFP) and low-profile QFP
multiplexed by 8051). (LQFP) packages.
EA’is the External Access Plastic Leaded Chip Carrier, PLCC
Enable Pin i.e., allows The PLCC, Plastic Leaded Chip Carrier is a form of SMD
external Program IC package that can either be soldered to the board or
Memory. Code from mounted in a socket.
external program You tube link:
memory can be fetched Application of Microcontroller : https://youtu.be/8VnylmlrQow
only if this pin is LOW. Electronic system needing real time
For normal operations, processing/control,Domestic application such as
this pin is pulled HIGH. washing machine, TV and air conditioners.
PSEN’:-Using this pins, Microcontrollers are also used in automobiles,
external Program process control industries, cell phones, robotics
Memory can be read and in space application
Pin Diagram of 8051 microcontroller

Pins 1 – 8 (PORT 1): Pins 1 to 8 are the PORT 1 Pins of 8051. PORT 1 Pins consists of 8 – bit bidirectional Input / Output Port
with internal pull – up resistors. PORT 1acts as 8 – bit I/O PORT.

Pin 9 (RST): Pin 9 is the Reset Input Pin. It is an active HIGH Pin i.e. if the RST Pin is HIGH for a minimum of two machine
cycles, the microcontroller will be reset. During this time, the oscillator must be running.

The Reset Circuit. A logic HIGH (+5V) on Reset Pin for a minimum of two machine cycles (24 clock cycles) will reset the
8051 Microcontroller. The reset circuit of the 8051 Microcontroller consists of a capacitor, a resistor and a push button
and this type of reset circuit provides a Manual Reset Option. If you remove the push button, then the reset circuit
becomes a Power-On Reset Circuit.
Pins 10 – 17 (PORT 3): Pins 10 to 17 form the PORT 3 pins of the 8051 Microcontroller.
PORT 3 also acts as a bidirectional Input / Output PORT with internal pull-ups.
Additionally, all the PORT 3 Pins have special functions. The following table gives the details of the additional functions of
PORT 3 Pins.

PORT 3 Pin Function Description


P3.0 RXD Serial Input
P3.1 TXD Serial Output
P3.2 INT0 External Interrupt 0
P3.3 INT1 External Interrupt 1
P3.4 T0 Timer 0
P3.5 T1 Timer 1
P3.6 WR External Memory Write
P3.7 RD External Memory Read

Pins 18 & 19: Pins 18 and 19 i.e. XTAL 2 and XTAL 1 are the pins for connecting external oscillator. Generally, a Quartz
Crystal Oscillator is connected here.

Pin 20 (GND): Pin 20 is the Ground Pin of the 8051 Microcontroller. It represents 0V and is connected to the negative
terminal (0V) of the Power Supply.

Pins 21 – 28 (PORT 2): These are the PORT 2 Pins of the 8051 Microcontroller.
PORT 2 is also a Bidirectional Port i.e. all the PORT 2 pins act as Input or Output.
Additionally, when external memory is interfaced, PORT 2 pins act as the higher order address byte. PORT 2 Pins have
internal pull-ups.

Pin 29 (PSEN): Pin 29 is the Program Store Enable Pin (PSEN). Using this pins, external Program Memory can be read.

Pin 30 (ALE/PROG): Pin 30 is the Address Latch Enable Pin. Using this Pins, external address can be separated from data (as
they are multiplexed by 8051).
During Flash Programming, this pin acts as program pulse input (PROG).

Pin 31 (EA/VPP): Pin 31 is the External Access Enable Pin i.e., allows external Program Memory. Code from external
program memory can be fetched only if this pin is LOW. For normal operations, this pins is pulled HIGH.
During Flash Programming, this Pin receives 12V Programming Enable Voltage (VPP).

Pins 32 – 39 (PORT 0): Pins 32 to 39 are PORT 0 Pins.


They are also bidirectional Input / Output Pins but without any internal pull-ups. Hence, we need external pull-ups in
order to use PORT 0 pins as I/O PORT.
In addition to acting as I/O PORT, PORT 0 also acts as lower order address/data bus when external memory is accessed.

Pin 40 (VCC): Pin 40 is the power supply pin to which the supply voltage is given (+5V).

Key Take away from this UO:


8051 microcontroller is a 40 pin Dual Inline Package (DIP). These 40 pins serve different functions like read, write, I/O
operations, interrupts etc. 8051 has four I/O ports wherein each port has 8 pins which can be configured as input or
output depending upon the logic state of the pins. Therefore, 32 out of these 40 pins are dedicated to I/O ports. The rest
of the pins are dedicated to VCC, GND, XTAL1, XTAL2, RST, ALE, EA’ and PSEN’.
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1b.4:Explain the 8051 Architecture>

Mr Deepak Kulkarni Date:6/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Institute Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:


CPU,RAM,ROM,I/O Ports, Explain the 8051 Architecture System On Chip – 8051
Timers/Counters

Key Questions Concept Map

Q1. Do you know that


8051 has inbuilt RAM
and ROM memory?

Introduction: Key Definitions


Features of 8051.
Central processing unit (CPU): 8051 uses the 8-bit
Some of the features that have made the 8051
processor. The unit performs arithmetic and logical
popular are:
operations on 8-bit data as it has ALU, with internal
registers and program counters.
1. It is an 8-bit microcontroller.
Memory: Basically 8051 microcontroller consists of
2. It has 128 bytes of Internal RAM.
on-chip program memory i.e., ROM - to store the
Q1. How many 16-bit 3. It has 4kilo bytes of Internal ROM.
code or program and on-chip data memory i.e., RAM-
registers are there in 4. It has two 16-bit internal timers/counters.
to store the Data.
8051 microcontroller? 5. It has 4 eight-bit parallel ports.
Input/ Output port: 8051 consists of 4 parallel ports
State them. 6. Programmable full duplex serial channel.
of 8 bit each thereby providing 32 input-output pins.
7. It has three internal and two external
There are two 16-bit All the 4 ports function bidirectionally i.e., either
interrupts
registers in 8051 input or output according to the software control.
microcontroller. Data Timers/Counters: Timers are used to count the
pointer and Program internal signal of a particular function of the
counter. controller while counters are used to count the
external signals of the peripherals connected to the
controller.

Applications of microcontroller: https://www.youtube.com/watch?v=aArpCMXOn0A


.
Electronic gadgets (like keyboard, mouse etc),
automobiles, e-commerce, electronic household
items (like ovens, washing machines) etc.
8051 microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller. It is built with 40 pins DIP (dual inline
package), 4kb of ROM storage and 128 bytes of RAM storage, 2 16-bit timers. It consists of are four parallel 8-bit ports,
which are programmable as well as addressable as per the requirement. An on-chip crystal oscillator is integrated in the
microcontroller having crystal frequency of 12 MHz
In the following diagram, the system bus connects all the support devices to the CPU. The system bus consists of an 8-bit
data bus, a 16-bit address bus and bus control signals. All other devices like program memory, ports, data memory, serial
interface, interrupt control, timers, and the CPU are all interfaced together through the system bus.
Block diagram of 8051 microcontroller.

Architecture of 8051 microcontroller


The various functional blocks of 8051 are:
• ALU
• TIMING AND CONTROL UNIT
• PROGRAM AND DATA MEMORIES
• REGISTERS
• PORTS
Arithmetic Logic unit (ALU):
• ALU of 8051 is 8 bits. It performs Arithmetic and logic operations on 8bit data.
Instruction Register (IR) & timing and control unit:
• The controller will fetch the instructions one by one, starting from the address stored in PC and store in IR, which
decodes the instructions and give information to timing and control unit.
• Using the information supplied by the IR unit the control signals necessary for internal and external operations
are generated by the timing and control unit
PROGRAM AND DATA MEMORIES
• There are two separate program and data memories.
• The program code is stored in ROM/EPROM/EEPROM. Program memory of 8051 is 4 KB. Data memory stores
variable data required in the program. 8051has 128 bytes of internal RAM ( DATA MEMORY ).
• External memory access is also available in 8051. 8051 can access external 64 KB of program memory and data
memory. For this it uses 16bit address bus, Port 0 (AD0-AD7) & Port 2 ( A8-A15).
MCS-51 REGISTERS
There are general purpose and special function registers ( SFR’S).

General purpose registers:


• Accumulator (A) register B and four Register Bank registers ( R0 to R7) can be used as general-purpose registers.
SFR’S –Special Function Registers.
• 128 bytes of additional on chip RAM locations from 80H to FFH are reserved for special functions and are
therefore called special function registers ( SFRs )
• SFRs are used for control or to show status of various functions done by 8051.
• Each SFR has an address (80h through FFh) and a name. The following chart provides a graphical presentation of
the 8051's SFRs, their names, and their address.

(SFR MEMORY MAP )


VARIOUS SFRs OF 8051 ARE:
• Accumulator (Register A)-8 BIT
• Register B – 8 bit
• DPTR : [DPH&DPL] – 16 bit combined
• PC : Program Counter – 16 bits
• Stack pointer SP – 8 bit
• PSW : Program Status Word
• Port Latches ( P0,P1,P2,P3)
• Serial Data Buffer(SBUF)
• Timer Registers ( TH0,TL0,TH1,TL1)
• Control Registers(TMOD,TCON,SCON,PCON,IE,IP)
Accumulator (A reg.):

• It is a general-purpose 8-bit register.


• The CPU of 8051 is accumulator based; hence, accumulator is used to hold the source operand and result of
arithmetic operations like addition, subtraction, multiplication, and division. However, accumulator is source as
well as destination for logical operations and data movement instructions.
B registers:

• It is special math register. It is used in conjunction with the A register as the second input operand and to return
8-bit result.
• It is used in multiply and divide instructions. It is also used as a general-purpose register. It is also treated as
memory location. It is bit accessible.
Data Pointer (DPTR):

• The data pointer is a 16-bit register used to hold the 16-bit address of data memory.
• This can also be used as two numbers of 8-bit data pointer namely DPH and DPL.
• The 8-bit data pointers are used for accessing internal RAM and SFR.
• The 16-bit data pointer is used for accessing external data memory.
 The contents of data pointer are programmable using instructions
STACK POINTER (SP):
• SP is 8- bit register that points to the last used location of the stack(stack top )
• Push operation will first increment SP and then copy data.
• Pop operation will first copy data and then decrement SP.
• Upon reset SP contains 07H. So, register banks 2,3,4 (08H to 1FH) form the default stack area.
• Stack can be relocated by setting SP to the upper memory area in 30H to 7FH.For e.g., MOV SP, #32H, so SP =32h
means stack area starts from 33h.
PROGRAM COUNTER (PC):
• Program counter is a 16-bit register. It stores address of next instruction to be fetched & executed and is
automatically incremented after fetching instruction. PC is the only register that has no address
PSW (Program Status Word) : - 15, 16, 17]
It is a flag register. It provides four math flags and five control flags. Many instructions affect several status flags, which are
grouped together to form PSW.
CY AC F0 RS1 RS0 OV X P
Bit7 Bit0
CY: (Carry Flag) : It is a carry flag. Internal hardware or software sets it. It is set when there is a carry from D7 bit. It is used
in arithmetic, logical, jump, rotate and Boolean operations. In Boolean operation, it functions as an accumulator.
AC: (Auxiliary Carry Flag) : It is also called half carry. It is used in BCD arithmetic operations. It will be set when there is a
carry from D3 bit.
F0: (User Flag 0) : It is user-defined flag. The user defines the function of this flag. The user can test, clear and set this flag
through software.
RS1 and RS0: (Register Bank Select) : These flags are used to select only one bank of 8 registers. In default mode, it selects
bank0. The user can use only one bank of registers at a time. The programmer can use different banks for different
programs.
RS1 RS0 REGISTER BANK
0 0 BANK0 (00 –07H)
0 1 BANK1 (08 – 0FH)
1 0 BANK2 (10 – 17H)
1 1 BANK3 (18 – 1FH)
OV : (Overflow Flag) : It is used in signed arithmetic operations only. Overflow occurs when the result of signed arithmetic
operation is too large, so it is cannot be stored in one register. It is used to detect overflow in the signed arithmetic
operations.
P : (Parity Flag) : It is a parity flag. It shows the parity of data stored in the accumulator. If the number of 1s present in the
accumulator is odd, then P flag is set to 1. This flag is reset for even number of 1s present in the accumulator. The parity of
the data including parity bit is always even. Hence, this flag can be used as even parity flag.
Registers (R0-R7) : There are eight general purpose registers R0 to R7 in each bank which is selected using PSW register
bank selection bits. They are used for temporary storing variables and intermediate results.
Timer Registers:
Register pairs (TH0, TL0), and (TH1, TL1), are the 16-bit counting registers for Timer/Counters 0, and 1, respectively
I/O Ports:
• The 8051 has four numbers of 8-bit ports namely port-0, port- 1, port-2 and port-3.
• Each port has a latch and driver (or buffer).
• When external memory is employed the port-0 lines will function as multiplexed low byte address/data lines and
port-2 lines will function as high byte address lines.
• Also, the port pins P3.7 and P3.6 are used to output read and write control signals respectively.
• The port-1 is dedicated I/O port and does not have any alternate function.
SBUF ( SERIAL DATA BUFFER ) :
 SBUF is 8 bit register used for serial communication.
 SBUF are physically two registers with same address and same name. One is read-only used for reading serial
input data and the other is write-only used for storing serial output data. SFR Address is 99h
Control Registers:
Special Function Registers IP, IE, TMOD, TCON, T2CON, SCON, and PCON contain control and status bits for the interrupt
system, the timer/counters, and the serial port.
Timer/Counter & Serial port:
• The 8031/8051 has two 16-bit programmable timer/counter namely timer-1 and timer 0.
• In the counter mode of operation, they can count the number of high to low transitions of the signal applied to
the timer pins.
• In timer mode of operation, they can be independently programmed to work in any one of the four operation
modes. They are called mode-0, mode-1, mode-2 and mode-3.
• In mode-0 the serial port can either receive or transmit at fixed baud rate.
• In mode-2 it can simultaneously transmit and receive at any one of the two selectable baud rates.
• In mode-1 and mode-3 it can work as full duplex serial port with variable baud rate, which is programmed using
timer-1
Interrupts:
Six interrupts are allocated as follows
• Reset – power-up reset
• Two interrupts are set aside for the timers: one for timer 0 and one for timer 1
• Two interrupts are set aside for hardware external interrupts ƒ P3.2 and P3.3 are for the external hardware
interrupts INT0 (or EX1), and INT1 (or EX2)
• Serial communication has a single interrupt that belongs to both receive and transfer

Key Take away from this UO:

A microcontroller is an integrated chip designed under Very Large-Scale Integration technique that consists of a processor
with other peripheral units like memory, I/O port, timer, decoder, ADC etc. A microcontroller is basically designed in such a
way that all the working peripherals are embedded in a single chip with the processor.
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1b.5:Explain Boolean Processor, Power saving options -idle and power down mode>

Mr Deepak Kulkarni Date:12/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:


Boolean Processor,Idle Explain Boolean Processor, Power saving options Power options of 8051 microcontroller
mode,Power down mode –idle and power down mode

Key Questions Concept Map

Q1. Did you know that Idle Mode


8051 microcontroller has Power Saving
two power saving Options
options? Power Down
Mode

Introduction: Key Definitions

The CPU in each microcomputer is the latest and


most efficient for numerical calculations on byte
Boolean Processor. It is an independent bit
operand.
processor with its own instruction set, its own
accumulator and its own bit addressable RAM and
It is often required to deal with bits, not bytes in
I/O.
the real world typically for the control of
Q1. State some of the ON/OFF systems.
Boolean Instructions
IDLE MODE: In this mode, the internal clock signal is
For such control situations, the MCS51 supports
gated off to the CPU, but not to the Interrupt, Timer
Ans: a number of special features like direct bit
and Serial Port functions.
manipulation and testing of individual bits and
CLR C ;Clear Carry allow the use of single bit in performing logical
Power Down Mode: In this mode Power Down
flag operators. These features are referred to as
mode, the on-chip oscillator is stopped. With the
MCS51 Boolean processor.
CLR bit ; Clear direct clock frozen, all functions are stopped, but the on-
bit chip RAM and Special Function Register are
Boolean processor is an integral part of 8051
SETB C ; Set Carry flag maintained held.
architecture. It is an independent bit processor https://www.youtube.com/watch?v=TNmV46AgoU0
SETB bit ; Set direct bit. with its own instruction set , its own &feature=youtu.be
CPL C ;Complement accumulator , that is carry flag and its own bit
Carry flag addressable RAM & I/O .
CPL bit ;Complement
direct bit The bit manipulation instructions, i.e. Boolean
instructions also allow direct addressing
Boolean instructions are 1, 2, 3 byte long depending upon what function they perform.

Following are some Boolean instructions:

Being Boolean processor there are many advantages like:


1. It can control individual I/O devices simultaneously without affecting others
2. It can manipulate single bit / flag for specific applications
3. It can perform single bit logical operations.
4. Using bit manipulation instructions reduces memory occupied as size of these instructions is less.

POWER SAVING OPTIONS / MODES OF 8051:

8051 has two power saving modes:

 IDLE MODE
 POWER DOWN MODE

IDLE and POWER DOWN HARWARE


Power control (PCON ) register : 8 bit register , direct address is 87h , not bit addressable

1. IDLE MODE:It is selected by setting IDL bit in PCON register. In idle mode the internal clock is gated off to CPU but not to
interrupt, timer and serial port functions. PC, SP,PSW, Accumulator and all other registers maintain their data during idle
mode. Port pins hold their state, they had at time idle mode was activated.

Termination from idle mode:There are two ways:

a. Activation of any enabled interrupts will cause PCON.0 to be cleared and idle mode is terminated.
b. Hardware reset clears IDL bit in PCON register directly. At this time CPU resumes program execution from where
it left off, i.e., the instruction following the one which activated idle mode.

2. POWER DOWN MODE:It is selected by setting PD bit in PCON register. In power down mode the on-chip oscillator is
stopped. With the clock frozen, all functions are stopped. Contents of on chip RAM and SFRs are maintained. Port pins
output the values they held by their respective SFRs. ALE & PSEN are held low. In this mode VCC can be reduced as low as
2Volts.

Termination from power down mode:The only exit from this mode is hardware reset. Reset redefines all SFRs, but does not
change on chip RAM

NEED OF POWER SAVING OPTIONS:

1. It is able to put more functionality into smaller space on IC.


2. Allows use of smaller & lighter power supplies & less heat being generated allows denser packaging of circuit
components
3. Cooler chips are most reliable as random & wear out failures relate to die temperature

Key Take away from this UO:


Boolean processor is an integral port of 8051 architecture.
8051 has two power reducing modes; (i) Idle mode, (ii) Power down mode.
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1c:Describe Memory organization of 8051 with neat sketch>

Mr Deepak Kulkarni Date:12/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective: Data and Program Memory


Data Memory,Program Describe Memory organization of 8051 with neat
Memory,RAM,ROM sketch.

Key Questions Concept Map

Data
Q1 Did you know 8051 Memory
microcontroller has
128bytes of internal RAM
Memory
and 4k bytes of internal
ROM?
Program
Memory

Introduction: Key Definitions

8051 Microcontroller Memory Organization


Program Memory -The code or instructions to be
The 8051 Microcontroller Memory is separated
executed are stored in the Program Memory, which
in Program Memory (ROM) and Data Memory
is also called as the ROM of the Microcontroller.
(RAM).
The Program Memory of the 8051
Data Memory: The Data Memory or RAM of the 8051
Microcontroller is used for storing the program
Q1. State the number of Microcontroller stores temporary data and
to be executed i.e. instructions.
register banks in 8051 intermediate results that are generated and used
The Data Memory on the other hand, is used for
microcontrollers along during the normal operation of the microcontroller.
storing temporary variable data and intermediate
with its address range. results.
8051 microcontroller contains 128 bytes of
Ans:There are four internal RAM and 4kbytes of internal ROM to
register banks in 8051 hold data and program code bytes.
microcontrollers. If the internal memory is inadequate, you can
add external memory using suitable circuits.
Register Bank 0-00H to
07H Program Memory (ROM) of 8051 Microcontroller https://www.youtube.com/watch?v=Ww3oXEaQl0s
Register Bank 1-08H to
0FH. In 8051 Microcontroller, the code or instructions
Register Bank 2-10H to to be executed are stored in the Program
17H Memory, The original 8051 Microcontroller by
Register Bank 3-18H to Intel has 4KB of internal ROM and it can be
1FH. expanded up to 64k bytes.
Some variants of 8051 like the 8031 and 8032
series doesn’t have any internal ROM (Program
Memory) and must be interfaced with external
Program Memory with instructions loaded in it.
 When External Accesss pin is high (EA=1): In this case, the microcontroller executes first the program from built-in
ROM and then the program stored in external memory. The internal ROM has address range from 0000H to
0FFFH.After that the external memory are accessed from 1000H to FFFFH.
 When External Access pin is low (EA=0) : In this case the microcontroller completely ignores internal memory and
executes the program stored in external memory. So with 16 bit address bus, all the 64 K locations are accessed
from external memory.
 In both case port P0 and P2 are used for data and address transmission and so cannot be used as I/O ports. Also
pins ALE and PSEN are used.

Data Memory (RAM) of 8051 Microcontroller


The Data Memory or RAM of the 8051 Microcontroller stores temporary data and intermediate results that are generated
and used during the normal operation of the microcontroller.
It has 128 bytes internal RAM. It is organized into 3 major areas.
 First 32 bytes from address 00H to 1FH are organized as four banks of 8 registers each. Four register banks are
numbered as bank 0, bank 1, bank 2 and bank 3. Each register in a specified bank can be addressed by its name or
by its RAM address. Bit RS0 and RS1 in PSW determine which bank of register is currently in use.
 A bit addressable area of 16 bytes occupies RAM addresses 20H to 2FH. Thus, 128 addressable bits are available.
This addressable bits is specified by its addresses 00H – 7FH. We can also read a byte from addresses 20H – 2FH.
 A general purpose RAM area from address 30H – 7FH-80 bytes
 Upper 128 bytes (80H – 0FFH) for the Special Function Register (SFRs) which includes I/O ports (P0, P1, P2, P3),
Accumulator (A), Timers(THx, TLx, TMOD, TCON, PCON), Interrupts(IE, IP), Serial Communication controls(SBUF,
SCON), Program Status Word (PSW). These are addressed using Direct addressing.
Stack
The stack area in 8051always can be implemented in the internal data memory. Here the stack pointer (SP) is an only 8-
bit register, because the internal RAM area is only in range 00H to 7FH, and when all register banks are being used, the
stack location will be in range 30H to 7FH. So in such a case, the SP will be initialized with 2FH.

The stack pointer SP increases before each PUSH operation and decreases after each pop instruction.
When the 8051 is reset, the Stack Pointer will point to 07H. It means the location 08H to 7FHcan be used as a stack.
Here it is assumed that the register bank 0 is in use and 20H to 27H are not like bit-addressable area.

Key Take away from this UO:


 8051 has 128 bytes of internal Ram and 4k bytes of internal ROM.
 External code and data memory up to 64k bytes can be added using suitable circuit
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1d:Compare Derivatives of 8051(8951, 8952, 8031, 8751)>

Mr Deepak Kulkarni Date:12/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:


Derivatives of 8051 Compare Derivatives of 8051(8951, 8952, 8031, IC 8952 IC 8951
8751).
Key Questions Concept Map

Q1Did you know that 8031


does not have on chip 8951 8952
program memory?

8031 8752

Key Definitions
8051 is a popular 8-bit microcontroller and has
been used in many applications since Intel
Derivative of 8051 microcontroller
Q1. Give difference introduced it. Many 8051 architecture are
between 8951 and 8952 produced by Triscend, Intel, Atmel, Philips,
Derivative microcontroller (or derivative chip) is a
based on chip data Infineon (Siemens), ISSI, and Max Corp. with
term used to refer to any of the hundreds of 8051-
memory and on chip advanced features/ or memory capacity. While
compatible microcontrollers produced by dozens of
program memory each CU may have same core the feature set can
semiconductor firms such as Dallas Semiconductor,
vary a lot. Some of the common differences
Philips, Atmel, etc. These lines of microcontrollers all
within a single family are:
Ans: 8951 has 128 bytes of use the "8051 core" licensed from Intel. The "core"
On Board ROM size
on chip data memory and refers to the instruction set and Special Function
On Board RAM size
4k Bytes of Flash memory Register structure/map.
Re-programmability
whereas 8952 has 256
ADCs
bytes of on chip data https://youtu.be/xTR_7zl9JYg
Timers
memory and 8k Bytes of
And many other features.
Flash memory.
This 8-bit architecture has different segments
such as 8052, 8051, 8751 and 8031. 8052 is the
super-set of 8051 and 8031 is the program
memory-less microcontroller hence, it has
interfaced with external ROM.
Whereas, 8751 chip has only 4Kbytes of on chip
UV-EPROM.
Features of Derivatives of 8051 microcontroller.

8951: The 89c51 is compatible with MCS 51 family. It has 128btes of on chip data memory,4k bytes of flash memory, two 16-bit timers,
four I/O ports, fivevectoredinterrupts, on chip oscillator and a serial port.

8952- Low-power, high-performance CMOS 8-bit microcontroller with 8KB of ISP flash memory. It has 256 bytes of on chip RAM. The
device uses Microchip high-density, non-volatile memory technology and is compatible with the industry-standard 80C51 instruction set
and pinout. On-chip flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory
programmer. This powerful microcontroller is suitable for many embedded control applications.

.
8031: The 8031 is the members of MCS-51 family of 8-bit microcontrollers. 8031/80C31 have the same integrated peripherals as on
8051 microcontroller-4 I/O ports, two 16-bit timers/counters, on-chip oscillator, and a serial port.
The MCUs have 128 bytes of internal RAM and in addition to that, can utilize up to 64 KB of external data memory. The microcontrollers
do not have on-chip ROM and must use external program memory.

8751 is the 8051-architecture microcontroller consists of memory and interrupts, timer, same as in 8051 microcontroller. Butit has UV-
EPROM. Using 8751 chip for development requires access to a PROM burner, as well as a UV-EPROM eraser to erase the contents of
UV-EPROM inside the 8751 chips before you can program it again.Because the on-chip ROM for the 8751 is UV-EPROM, it takes around
20 minutes to erase the 8751 before it can be programmed again.

8052 is the super-set of 8051 that consists of 8K bytes of internal ROM (4K in 8051), 256 bytes of RAM (128 bytes in 8051), 3 Timers (2
timers in 8051), and 6 Interrupts (4 Interrupts in 8051) and other functionalities are same. All programs, written for 8051, can be run for
8052 but the reverse is not true

89V51RD2: 80C51 compatible CPU. It has On chipBootloader,32kB of on chip flash user code memory with ISP and IAP, Supports 12-
clock (default) or 6-clock mode selection via software or ISP, SPI and enhanced UART, PCA with PWM and capture/compare functions.

Comparison of 8051 Derivatives

.
ON-CHIP ON-CHIP
NO. OF
DATA PROGRAM 16-BIT FULL DUPLEX
DEVICE VECTORED
MEMORY MEMORY TIMER/COUNTER I/O
INTERUPTS
(bytes) (bytes)

AT89C51 128 4k Flash Memory 2 5 1


AT89C52 256 8k Flash memory 3 6 1
8031 128 None 2 5 1
8751 128 4k EPROM 2 5 1
8051 128 4k ROM 2 5 1
8052 256 8k ROM 3 6 1
8752 256 8k EPROM 3 6 1
Key Take away from this UO:
8951,8952,8031,8751,8052 are the various derivatives of 8051 microcontroller.
Study Material
< DE/EJ/ET/EN/EX/EQ/IE/IS/IC/>: <22426><Microcontroller and Applications><Basics of Microprocessor and 8051
Microcontroller><UO1e:Describe procedure to troubleshoot the simple given microcontroller-based circuit with neat sketches>

Mr Deepak Kulkarni Date:16/02/2021 Mentor: Mr. K. P. Akole


Mrs Rita Vora Co-ordinator: Mrs Nirmala Kamble

Key words Learning Objective:Describe procedure to Troubleshooting tools


Troubleshooting troubleshoot the simple given microcontroller-
Debugging based circuit with neat sketches

Key Questions Concept Map

Do you know the Observe


faults
troubleshooting tools
required for
Locate fault
microcontroller base
system?
Fault correction

Introduction:
Troubleshooting is the process that determines the cause of the problem in the electronic circuit by examining the affected area of it,
and then by taking appropriate action. For minor problems, troubleshooting requires a little knowledge about the circuit and its
components’ working because it involves checking the connections only. However, the major problems of these circuits require a
deeper knowledge of the circuit operation and the way of using various troubleshooting tools.
Select Troubleshooting Tools
Troubleshooting process involves checking the terminal voltage across different components and devices in the circuit; checking the
continuity of the current for open circuit faults, components like resistor, capacitor, transistors, and their status checking whether they
are functioning or not, and so on. Some of these tools are:
 Digital or Analog multimeters
 Oscilloscope
 LCR meters
 Variable Power supply with a metered indication

Digital Trouble shooting


Troubleshooting digital circuitry is fundamentally testing for normal responses from external gates and flipflops in the circuit and
checking for normal operation.
Logic probe is the most important tool used in digital circuitry troubleshooting. It is employed to trace logic levels and pulse
throughintegrated circuitry to determine whether the point under test is logic high, logic low, open circuited or pulsing.

Generalized Troubleshooting
Power up the Circuit.
Before checking with the above tools, plug the circuit to the main power supply so that it is possible to test it in different ways.

Check the Power Supply Block


Keep the multimeter probes across the transformer, diodes, capacitor, and regulator IC, and check whether appropriate values are
found or not by inserting the multimeter in volts mode.

Check the Individual Components


Check the voltage across the individual components, and if any component does not show any voltage across it, then switch off the
supply, and then again test the components by respective meters like LCR for the capacitor, diode by multimeter, and so on.
Check the Main Controller
Test the main controller base power supply with respect to the ground without placing a controller on it. And also, check whether some
pins are shorted or not, for the microcontroller, check respective power supply pins voltage.
Place the ICs on the base, and give the input to the controller, and then check whether the output control signals are coming or not at
appropriate pins

Using oscilloscope -
 Check if crystal / clock is working and oscillating. The frequency of clock should match the crystal frequency.
 Check if control signals like WR, RD, ALE are operating fine at Microcontroller pins as well as to pins of external ROM
 Check that none of the interrupts are permanently active
 Check if signals on Data and Address bus are active indicating that some address and data is being transferred on the bus.If
the data and address being transferred are to be accurately monitored, then a logic analyser is to be used instead of an
oscilloscope.
If all signs indiciate that Microcontrollers are functioning and are active and yet the program is not working as desired, then it is highly
likely that the program has a bug and it is not operating as desired. Efforts should be made to debug software step by step and verify if
the I/O Ports of microcontrollers are having the desired signals

TROUBLESHOOTING of microcontroller kit:


For the 8051 system to work properly, 2 circuits connected to the system need to work properly.
1. Reset circuit comprising of reset switch, C3 (10mF/63), R2 (1K), R1 (8K2), D1 (1N4148).
2. Oscillator circuit comprising of crystal and two ceramic capacitors C1 (33pF) and C2 (33pF). And pin VPP/EA should be connected to
Vcc. The Reset pin is active high, meaning when the pin is made high controller is reset. This means the Reset circuit should be such
that the Reset pin should be normally low and when Reset switch is pressed, the pin should become high. If Reset switch is kept
pressed, all lines should become high (all LEDs should become red). If Oscillator circuit is working properly a square waveform is
observed on ALE pin (pin no.30). Because of this, the LED connected to this pin glows dimly (flickering at a high frequency).When the
8051 is clocked correctly, this pin outputs a square wave at 1/6 (oscillator frequencyA jumper is provided for VPP/EA line to make it
high (Vcc) or low (GND).

Key Take away from this UO:

To start the process of troubleshooting, first step should be to have a close visual inspection of the system. Then understand the basic
functionality of the system. Then proceed to analyse the cause of the trouble.

You might also like