0% found this document useful (0 votes)
38 views

Introduction To 8051 Microcontroller

Uploaded by

marumbomwanaisha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Introduction To 8051 Microcontroller

Uploaded by

marumbomwanaisha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to 8051 Microcontroller



Introduction –

8051 is one of the first and most popular microcontrollers also


known as MCS-51. Intel introduced it in the year 1981. Initially, it
came out as an N-type metal-oxide-semiconductor (NMOS) based
microcontroller, but later versions were based on complementary
metal-oxide-semiconductor(CMOS) technology. These
microcontrollers were named 80C51, where C in the name tells that
it is based on CMOS technology. It is an 8-bit microcontroller which
means the data bus is 8-bit. Therefore, it can process 8 bits at a
time. It is used in a wide variety of embedded systems like robotics,
remote controls, the automotive industry, telecom applications,
power tools, etc.

Fi
gure – 8051 Microcontroller System on a Chip :
It is referred to as a System on a Chip (SoC) microcontroller because
it is a chip circuit/integrated circuit that holds many components of
a computer together on a single chip. These components include a
CPU, memory, input-output ports (I/O ports), timers, and secondary
storage. Features – There are some key features of 8051 that work
as a foundation for students to learn microcontrollers.
8051 μc family member –
8051 μc have some family members 8052 microcontroller & 8031
microcontroller. 8052μc has 8K bytes of on-chip program ROM
instead of 4K bytes, and 128 bytes of RAM. and 8031μc has 0K
bytes of on-chip program ROM, and 128 bytes of RAM.
The Key features of the 8051 Microcontroller –
 4 KB on-chip ROM (Program memory).
 128 bytes on-chip RAM (Data memory).
 The 8-bit data bus (bidirectional).
 16-bit address bus (unidirectional).
 Two 16-bit timers.
 Instruction cycle of 1 microsecond with 12 MHz crystal.
 Four 8-bit input/output ports.
 128 user-defined flags.
 Four register banks of 8 bit each.
 16-byte bit-addressable RAM.
 The general purpose registers are 32 each is 8-bit.
 8051 has two external and three internal interrupts.
 8051 microcontroller specifies some special function features like
UARTs, ADC, Op-amp, etc.
 It has a 16-bit program counter and data pointer.
Block Diagram of 8051 μc –
Block-Structure Diagram

Application of 8051 Microcontroller –


1. Automation: The 8051 microcontroller is widely used in
automotive applications.
They are widely used in hybrid vehicles to control engine options.
In addition, functions such as cruise control and anti-brake
mechanism have been further enhanced thanks to the integration
of a microcontroller.
2. Medical Devices: Convenient medical devices such as blood
glucose and blood pressure monitors contain microcontrollers
that display measurements.
3. Energy management: Competent measurement systems
support energy consumption calculations in home and industrial
environments. These measuring systems are prepared by
integrating a microcontroller.
4. Touch Screen: Many microcontroller vendors incorporate touch
functionality into their designs. Portable devices such as media
players, and gaming devices.
Uses of 8051 Microcontroller :
Here are some of the most common uses of the 8051
microcontroller:
1. Embedded Systems: The 8051 microcontroller is commonly used
in embedded systems, such as home automation systems,
security systems, and industrial control systems. Its low cost,
small size, and ease of programming make it an ideal choice for
these applications.
2. Automotive Systems: The 8051 microcontroller is used in
automotive systems, such as engine control units, anti-lock
braking systems, and airbag systems, to control various functions
and ensure safe and efficient operation.
3. Robotics: The 8051 microcontroller is used in robotics
applications to control the movement and operation of robots. It
is commonly used to control the motors, sensors, and other
peripherals of the robot.
4. Consumer Electronics: The 8051 microcontroller is used in a
variety of consumer electronics products, such as digital cameras,
gaming systems, and audio players. It is commonly used to
control the user interface, display, and other peripherals of these
devices.
5. Communication Systems: The 8051 microcontroller is used in
communication systems, such as modems, routers, and switches,
to control the data transfer and communication protocols.
6. Medical Devices: The 8051 microcontroller is used in medical
devices, such as insulin pumps, heart monitors, and blood
glucose meters, to control various functions and provide accurate
and reliable results.
7. Industrial Control Systems: The 8051 microcontroller is used in
industrial control systems, such as process control systems and
manufacturing equipment, to control and monitor various
processes and operations.

Issues in 8051 Microcontroller :


Here are some of the common issues in the 8051 microcontroller:
1. Limited Memory: The 8051 microcontroller has limited program
memory and data memory. The program memory is typically 4 KB
or 8 KB, and the data memory is typically 128 bytes or 256 bytes.
This limitation can be an issue when developing complex
applications that require more memory.
2. Limited Processing Power: The 8051 microcontroller has limited
processing power compared to modern microcontrollers. Its clock
speed is typically between 12 MHz and 24 MHz, and its instruction
set is limited. This limitation can be an issue when developing
complex applications that require high processing power.
3. Limited Peripheral Support: The 8051 microcontroller has limited
support for peripherals compared to modern microcontrollers. It
has a limited number of input/output pins, and its communication
interfaces are limited. This limitation can be an issue when
developing applications that require a large number of
peripherals.
4. Limited Development Tools: The development tools for the 8051
microcontroller are limited compared to modern microcontrollers.
The available compilers, debuggers, and simulators are not as
advanced as those available for modern microcontrollers. This
limitation can be an issue when developing complex applications
that require advanced development tools.
5. Limited Security Features: The 8051 microcontroller has limited
security features compared to modern microcontrollers. It does
not have hardware security features, such as memory protection
and encryption, which can be an issue in applications that require
high security.

Block Diagram of 8259 Microprocessor




 8259 microprocessor can be programmed according to given


interrupts condition and it can be provided either with level or
edge-triggered interrupt level.
 It can be programmed to either work in 8085 or in 8086
microprocessors.
 Individual interrupt bits can be masked.
 By cascading Nine 8259’s in Master-Slave Configuration we can
handle up to 64 interrupt pins.

It contains 3 registers commonly known as ISR, IRR, IMR & there is 1


priority resolver (PR).

1. Interrupt Request Register (IRR): It stores those bits which


are requested for their interrupt services.
2. Interrupt Service Register (ISR): It stores the interrupt levels
which is currently being served.
3. Interrupt Mask Register (IMR): It stores interrupt levels that
have to be masked. These interrupt levels are already accepted
by the 8259 microprocessor.
Priority Resolver (PR): It examines all the 3 registers and sets the
priority of interrupts and sets the interrupt levels in ISR which has
the highest priority and the rest of the interrupt bit is IRR which is
already accepted.
SP/EN (low active pin): If its value is 1 it works in master mode &
if its value=e is 0 then it works in slave mode.
Cascade Buffer: It is used to cascade more number of
Programmable Interrupt Controller to increase the interrupts
handling capability up to 64 levels.
Advantages:

Interrupt management: The 8259 microprocessor is a specialized


chip that is dedicated to managing interrupts, which can help to
improve system performance and reduce the workload on the main
CPU.
Programmability: The 8259 microprocessor is programmable,
which means that it can be customized to handle specific types of
interrupts and to prioritize different interrupt requests.
Compatibility: The 8259 microprocessor is compatible with a wide
range of microprocessors, making it a popular choice for interrupt
management in many different systems.
Multiple interrupt inputs: The 8259 microprocessor can handle
multiple interrupt inputs, which makes it a useful peripheral for
managing complex systems with multiple devices.
Ease of use: The 8259 microprocessor includes simple interface
pins and registers, making it relatively easy to use and program.

Disadvantages:

Cost: While the 8259 microprocessor is relatively affordable, it does


add cost to a system, particularly if multiple 8259s are required.
Limited functionality: While the 8259 microprocessor is a useful
peripheral for interrupt management, it does not include more
advanced features, such as DMA (direct memory access) or
advanced error correction.
Limited number of interrupts: The 8259 microprocessor can only
handle a limited number of interrupt requests at once, which may be
insufficient for some applications.
Complex programming: Although the interface pins and registers
of the 8259 microprocessor are relatively simple, programming the
8259 can be complex, requiring careful attention to interrupt
prioritization and other parameters.

Microprocessor | 8251 USART




Prerequisite – 8259 PIC Microprocessor 8251 universal synchronous


asynchronous receiver transmitter (USART) acts as a mediator
between microprocessor and peripheral to transmit serial data into
parallel form and vice versa.
1. It takes data serially from peripheral (outside devices) and
converts into parallel data.
2. After converting the data into parallel form, it transmits it to the
CPU.
3. Similarly, it receives parallel data from microprocessor and
converts it into serial form.
4. After converting data into serial form, it transmits it to outside
device (peripheral).
Block Diagram of 8251 USART –

It contains the following blocks:


1. Data bus buffer – This block helps in interfacing the internal
data bus of 8251 to the system data bus. The data transmission is
possible between 8251 and CPU by the data bus buffer block.
2. Read/Write control logic – It is a control block for overall
device. It controls the overall working by selecting the operation
to be done. The operation selection depends upon input signals
as:
3. In
this way, this unit selects one of the three registers- data buffer
register, control register, status register.
4. Modem control (modulator/demodulator) – A device converts
analog signals to digital signals and vice-versa and helps the
computers to communicate over telephone lines or cable wires.
The following are active-low pins of Modem.
 DSR: Data Set Ready signal is an input signal.
 DTR: Data terminal Ready is an output signal.
 CTS: It is an input signal which controls the data transmit
circuit. RTS: It is an output signal which is used to set the
status RTS.
5. Transmit buffer – This block is used for parallel to serial
converter that receives a parallel byte for conversion into serial
signal and further transmission onto the common channel.
 TXD: It is an output signal, if its value is one, means
transmitter will transmit the data.
6. Transmit control – This block is used to control the data
transmission with the help of following pins:
 TXRDY: It means transmitter is ready to transmit data
character.
 TXEMPTY: An output signal which indicates that TXEMPTY pin
has transmitted all the data characters and transmitter is
empty now.
 TXC: An active-low input pin which controls the data
transmission rate of transmitted data.
7. Receive buffer – This block acts as a buffer for the received
data.
 RXD: An input signal which receives the data.
8. Receive control – This block controls the receiving data.
 RXRDY: An input signal indicates that it is ready to receive the
data.
 RXC: An active-low input signal which controls the data
transmission rate of received data.
 SYNDET/BD: An input or output terminal. External
synchronous mode-input terminal and asynchronous mode-
output terminal.

Advantages:

Versatility: The 8251 USART can be used for both synchronous and
asynchronous communication, making it a versatile peripheral.
Error detection: The USART includes built-in error detection
features, such as parity checking, which help to ensure the accuracy
of transmitted data.
Flow control: The USART includes flow control features, which
allow for the regulation of data transmission and reception,
preventing data loss and overloading.
Compatibility: The 8251 USART is compatible with a wide range of
microprocessors, making it a popular choice for serial
communication in many different systems.
Ease of use: The USART includes simple interface pins and
registers, making it relatively easy to use and program.

Disadvantages:

Limited speed: The 8251 USART has a relatively low maximum


data transfer rate of 115.2 kbps, which may be insufficient for some
applications.
Limited buffer size: The USART has a small internal buffer size,
which may result in data loss if data is not read from the buffer in a
timely manner.
Complex programming: Although the interface pins and registers
of the USART are relatively simple, programming the USART can be
complex, requiring careful attention to timing and other parameters.
Cost: While the 8251 USART is relatively affordable, it does add cost
to a system, particularly if multiple USARTs are required.
Limited functionality: While the 8251 USART is a useful peripheral
for serial communication, it does not include more advanced
features, such as DMA (direct memory access) or advanced error
correction.
"GeeksforGeeks helped me ace the GATE exam! Whenever I had any
doubt regarding any topic, GFG always helped me and made my
concepts quiet clear

You might also like