The document provides an overview of microcontrollers and the 8051 microcontroller. It begins with a brief history of microcontrollers and how they evolved from microprocessors by integrating RAM, ROM, I/O and other components onto a single chip. It then describes the architecture and components of the 8051 microcontroller, including its memory mapping, registers, I/O ports, timers and interrupts. Examples are given of how the 8051's timers and I/O ports can be programmed. The document aims to educate designers on the capabilities and programming of the 8051 microcontroller.
The document provides an overview of the 8051 microcontroller, including its block diagram, pin descriptions, registers, memory mapping, stack, timers, and interrupts. It describes the CPU, RAM, ROM, I/O ports, timers, and interrupt control that are integrated into a single chip in the 8051 microcontroller. It also explains various registers related to timers and interrupts in the 8051.
The document discusses the 8051 microcontroller. It provides three key criteria for choosing a microcontroller: 1) meeting computing needs efficiently and cost effectively, 2) availability of software development tools, and 3) reliable sources. It then describes the basic components and features of the 8051, including 4K bytes of ROM, 128 bytes of RAM, four 8-bit I/O ports, two timers/counters, a serial interface, and support for external memory. Finally, it explains the memory organization and allocation of the 8051, distinguishing program memory, data memory, and external RAM.
The document discusses the 8051 microcontroller, its features, and applications. It provides details on the 8051's architecture including its CPU, memory blocks, I/O ports, timers/counters, and serial communication capabilities. It describes the 8051's registers including TMOD and TCON for timer control. The document also covers the 8051's memory mapping and provides many examples of how 8051 microcontrollers are used in applications like cell phones, appliances, industrial systems, and more.
The document discusses the 8051 microcontroller. It begins by describing the key features of the 8051 microcontroller, including that it has an 8-bit CPU, 4KB of internal program memory, 128 bytes of internal data memory, 32 I/O lines that can be used as ports, and two 16-bit timer counters. It then provides more details on the internal architecture, describing the ALU, registers, memory organization, and other components. It concludes by explaining features like the register banks and stack memory.
The document describes the 8051 microcontroller, its features which include 4 I/O ports, 2 timers, serial communication interface, and interrupts. It discusses the internal architecture such as memory organization, registers, and oscillator circuit. The document also provides details on the ports, timers, serial communication, and power modes of the 8051 microcontroller.
The document discusses the 8051 microcontroller. It lists advantages of microcontroller-based systems such as lower cost, smaller size, and higher reliability compared to microprocessor-based systems. It describes some 8051 family members and compares their features such as ROM type, RAM size, and number of timers. It also discusses important components of the 8051 like ROM, RAM, I/O ports, timers, and serial port. The document provides block diagrams of the 8051 internal architecture and pinout. It describes the functions of various pins and registers.
The document provides information about the 8051 microcontroller. It discusses the internal architecture and features of the 8051 microcontroller. The 8051 has 4KB of ROM, 128 bytes of RAM, four I/O ports, two timers, interrupts and more built into a single chip. It also compares microprocessors and microcontrollers, explaining that microcontrollers have internal memory and I/O ports built-in, while microprocessors do not. Additionally, it outlines the memory organization of the 8051, including its internal and external memory layout.
The document provides an overview of the 8051 microcontroller, including its block diagram, pin descriptions, registers, memory mapping, stack, timers, and interrupts. It describes the CPU, RAM, ROM, I/O ports, timers, and interrupt control that are integrated into a single chip in the 8051 microcontroller. It also explains various registers related to timers and interrupts in the 8051.
The document discusses the 8051 microcontroller. It provides three key criteria for choosing a microcontroller: 1) meeting computing needs efficiently and cost effectively, 2) availability of software development tools, and 3) reliable sources. It then describes the basic components and features of the 8051, including 4K bytes of ROM, 128 bytes of RAM, four 8-bit I/O ports, two timers/counters, a serial interface, and support for external memory. Finally, it explains the memory organization and allocation of the 8051, distinguishing program memory, data memory, and external RAM.
The document discusses the 8051 microcontroller, its features, and applications. It provides details on the 8051's architecture including its CPU, memory blocks, I/O ports, timers/counters, and serial communication capabilities. It describes the 8051's registers including TMOD and TCON for timer control. The document also covers the 8051's memory mapping and provides many examples of how 8051 microcontrollers are used in applications like cell phones, appliances, industrial systems, and more.
The document discusses the 8051 microcontroller. It begins by describing the key features of the 8051 microcontroller, including that it has an 8-bit CPU, 4KB of internal program memory, 128 bytes of internal data memory, 32 I/O lines that can be used as ports, and two 16-bit timer counters. It then provides more details on the internal architecture, describing the ALU, registers, memory organization, and other components. It concludes by explaining features like the register banks and stack memory.
The document describes the 8051 microcontroller, its features which include 4 I/O ports, 2 timers, serial communication interface, and interrupts. It discusses the internal architecture such as memory organization, registers, and oscillator circuit. The document also provides details on the ports, timers, serial communication, and power modes of the 8051 microcontroller.
The document discusses the 8051 microcontroller. It lists advantages of microcontroller-based systems such as lower cost, smaller size, and higher reliability compared to microprocessor-based systems. It describes some 8051 family members and compares their features such as ROM type, RAM size, and number of timers. It also discusses important components of the 8051 like ROM, RAM, I/O ports, timers, and serial port. The document provides block diagrams of the 8051 internal architecture and pinout. It describes the functions of various pins and registers.
The document provides information about the 8051 microcontroller. It discusses the internal architecture and features of the 8051 microcontroller. The 8051 has 4KB of ROM, 128 bytes of RAM, four I/O ports, two timers, interrupts and more built into a single chip. It also compares microprocessors and microcontrollers, explaining that microcontrollers have internal memory and I/O ports built-in, while microprocessors do not. Additionally, it outlines the memory organization of the 8051, including its internal and external memory layout.
The 8279 is a programmable keyboard/display interface that can simultaneously drive a display and interface with a keyboard, freeing the CPU for other tasks. It improves on the 8255 interface by handling display refreshing and keyboard polling internally, reducing CPU overhead. It contains an 8-byte FIFO buffer to store keyboard data and supports various modes like scanned keyboard, sensor matrix, and strobed input.
The document discusses the 8051 microcontroller, including its features, applications, and programming. It provides an overview of the 8051 architecture, describing its registers, memory mapping, I/O ports, timers, and interrupts. It also discusses how the 8051 is commonly used in applications like home appliances, industrial equipment, and toys.
The document provides an overview of the 8051 microcontroller. It describes what a microcontroller is and lists some common uses. It then discusses the specific 8051 microcontroller, noting it was introduced by Intel in 1980 and has features like an 8-bit CPU, timers, serial port, and ability to interface with external memory. The document outlines the memory organization and I/O ports of the 8051 as well as interrupts, timers/counters, and serial communication capabilities.
8051 Microcontroller Tutorial and Architecture with Applicationselprocus
8051 is an 8-bit family of microcontroller developed by Intel, microcontroller was also referred as “system on a chip” because it has 128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single
chip. The CPU can work for only 8bits of data at a time because 8051 is an 8-bit processor.
Microcontroller 8051 and its interfacingAnkur Mahajan
The document discusses microcontrollers and interfacing. It begins with definitions of microprocessors and microcontrollers, comparing their differences. It then focuses on the 8051 microcontroller, describing its features, block diagram, manufacturers, and addressing modes. The document outlines how to write programs for the 8051 and discusses real-world interfacing examples like LCDs, ADCs, relays, motors. It concludes with applications of the 8051 and contact information.
This document provides an overview of microcontrollers and the 8051 microcontroller. It discusses the basic components of microprocessors and microcontrollers, compares microprocessors and microcontrollers, lists common applications of microcontrollers in embedded systems, and criteria for choosing a microcontroller. It then focuses on the features, pin descriptions and functions, and CPU operation of the 8051 microcontroller.
The document discusses the timers/counters of the 8051 microcontroller. It describes:
1) The two timers/counters - timer/counter 0 and timer/counter 1 that can be used as timers or event counters.
2) How the timers work using internal clock pulses to count up and trigger interrupts when they overflow.
3) The timer mode and control registers that are used to configure the timers for different modes and start/stop them.
4) Examples of using the timers to generate delays and square waves for applications like measuring wheel rotations.
Microcontrollers are small computers that integrate RAM, ROM, I/O ports and other components onto a single chip. They are used in applications where cost, power and space are critical. The document compares microprocessors and microcontrollers, noting that microcontrollers have all components on one chip while microprocessors have separate chips. It then describes the typical internal blocks of a microcontroller, including the CPU, memory, I/O ports, timers and serial ports. Block diagrams show the connections between these internal components.
The document discusses the 8051 microcontroller, including its architecture, pin configuration, memory organization, timers, interrupts, and interfacing capabilities. It describes the 8051's features like on-chip RAM, ROM, timers and low power consumption which make it suitable for control applications. The document outlines the differences between microprocessors and microcontrollers, and covers various interfacing examples like switches, LEDs, 7-segment displays, LCDs, ADCs and relay interfacing. It concludes with common applications of the 8051 such as in automobiles, industrial processing, robotics and consumer electronics.
The document discusses the Intel 8051 microcontroller. It provides an overview of the 8051, including that it is an 8-bit microcontroller developed by Intel in 1981. It describes some key features, such as having 128 bytes of RAM, 4K bytes of ROM, timers, ports, and that it can be programmed using 8051 assembly language. It also provides details on the architecture of the 8051, describing components like the CPU, memory, buses, interrupts, timers/counters, and input/output ports. It includes a diagram of the pinout of the 8051 microcontroller.
The document discusses the Microcontroller 8051. It provides a block diagram and pin description of the 8051. It describes the registers, memory mapping, stack, I/O ports, timers and interrupts of the 8051 microcontroller. It compares microprocessors and microcontrollers, discussing the differences in hardware structure and applications.
A microcontroller is a single-chip microprocessor system consisting of a CPU, memory, and input/output ports. It can be considered a complete computer on a single chip. The 8051 was an early microcontroller developed by Intel for use in embedded systems. It had 4KB of program memory, 128 bytes of data memory, timers, counters, and I/O ports. The 8051 has separate memory spaces for program and data memory and its CPU, registers, timers and I/O ports allow it to monitor and control external devices.
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
this ppt is related to the intrupts related to the 8051 microcontroller ..
topics are introduction to intrupts
intrerrupts vs pollings
difference between intrupts snd pollings
This document discusses serial communication with the 8051 microcontroller. It begins by contrasting serial and parallel communication, listing advantages of serial. It then explains asynchronous serial communication protocols. Next, it describes half and full duplex transmission, data framing, transfer rates, and the RS-232 standard. Finally, it provides examples of initializing and programming the 8051 for serial communication using timers, registers, and algorithms.
The document discusses the 8051 microcontroller. It begins by explaining why we need to learn about microprocessors and microcontrollers, noting that many modern devices are controlled by them. It then covers the basic components of a microprocessor/controller including the CPU, I/O, memory, timers, and interrupts. The rest of the document provides details on the 8051 microcontroller, including its architecture, memory structure, registers, ports and other features. It compares microprocessors and microcontrollers, and discusses how to choose between different microcontroller options for embedded systems.
The document discusses the 8086 system bus structure. It describes the minimum and maximum modes of operation for the 8086 microprocessor. In minimum mode, the 8086 issues control signals directly to memory and I/O devices. In maximum mode, control signals are issued by the Intel 8288 bus controller to support multiprocessor systems. The document also covers programmed and interrupt-driven I/O techniques for data transfer with input/output devices.
The document discusses various aspects of 8051 assembly language programming including:
- The most commonly used 8-bit registers in the 8051 and the 16-bit program counter and data pointer registers.
- Examples of MOV and ADD instructions to move data between registers and perform arithmetic operations in the accumulator register.
- The steps required to assemble and run an 8051 program, including creating an assembly source file, assembling it to produce object and list files, and optionally linking files to run on a simulator.
- Memory allocation and usage in the 8051 including the 64KB program memory space accessed by the 16-bit program counter and RAM allocation for registers and stack.
This document provides an overview of the 8051 microcontroller architecture. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two timers/counters, one serial interface, and other features. It also discusses the different addressing modes for 8051 assembly language programming including immediate, register, direct, register indirect, and external direct addressing.
The document provides an introduction to microcontrollers, specifically focusing on the Intel 8051 microcontroller. It defines microcontrollers and distinguishes them from microprocessors by noting that microcontrollers contain peripherals like RAM, ROM, I/O ports and timers on a single chip, while microprocessors require external circuitry. It then describes the architecture and features of the Intel 8051 microcontroller, including its 4KB program memory, 128 bytes of data memory, 32 general purpose registers, two timers, interrupts and I/O ports. Development tools for microcontrollers like editors, assemblers, compilers and debuggers/simulators are also discussed.
The document discusses the 8051 microcontroller. It begins with an introduction and table of contents. It then provides details about the 8051 including its block diagram, pin descriptions and functions, memory mapping, registers, stack, I/O port programming, timers, and interrupts.
The 8279 is a programmable keyboard/display interface that can simultaneously drive a display and interface with a keyboard, freeing the CPU for other tasks. It improves on the 8255 interface by handling display refreshing and keyboard polling internally, reducing CPU overhead. It contains an 8-byte FIFO buffer to store keyboard data and supports various modes like scanned keyboard, sensor matrix, and strobed input.
The document discusses the 8051 microcontroller, including its features, applications, and programming. It provides an overview of the 8051 architecture, describing its registers, memory mapping, I/O ports, timers, and interrupts. It also discusses how the 8051 is commonly used in applications like home appliances, industrial equipment, and toys.
The document provides an overview of the 8051 microcontroller. It describes what a microcontroller is and lists some common uses. It then discusses the specific 8051 microcontroller, noting it was introduced by Intel in 1980 and has features like an 8-bit CPU, timers, serial port, and ability to interface with external memory. The document outlines the memory organization and I/O ports of the 8051 as well as interrupts, timers/counters, and serial communication capabilities.
8051 Microcontroller Tutorial and Architecture with Applicationselprocus
8051 is an 8-bit family of microcontroller developed by Intel, microcontroller was also referred as “system on a chip” because it has 128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single
chip. The CPU can work for only 8bits of data at a time because 8051 is an 8-bit processor.
Microcontroller 8051 and its interfacingAnkur Mahajan
The document discusses microcontrollers and interfacing. It begins with definitions of microprocessors and microcontrollers, comparing their differences. It then focuses on the 8051 microcontroller, describing its features, block diagram, manufacturers, and addressing modes. The document outlines how to write programs for the 8051 and discusses real-world interfacing examples like LCDs, ADCs, relays, motors. It concludes with applications of the 8051 and contact information.
This document provides an overview of microcontrollers and the 8051 microcontroller. It discusses the basic components of microprocessors and microcontrollers, compares microprocessors and microcontrollers, lists common applications of microcontrollers in embedded systems, and criteria for choosing a microcontroller. It then focuses on the features, pin descriptions and functions, and CPU operation of the 8051 microcontroller.
The document discusses the timers/counters of the 8051 microcontroller. It describes:
1) The two timers/counters - timer/counter 0 and timer/counter 1 that can be used as timers or event counters.
2) How the timers work using internal clock pulses to count up and trigger interrupts when they overflow.
3) The timer mode and control registers that are used to configure the timers for different modes and start/stop them.
4) Examples of using the timers to generate delays and square waves for applications like measuring wheel rotations.
Microcontrollers are small computers that integrate RAM, ROM, I/O ports and other components onto a single chip. They are used in applications where cost, power and space are critical. The document compares microprocessors and microcontrollers, noting that microcontrollers have all components on one chip while microprocessors have separate chips. It then describes the typical internal blocks of a microcontroller, including the CPU, memory, I/O ports, timers and serial ports. Block diagrams show the connections between these internal components.
The document discusses the 8051 microcontroller, including its architecture, pin configuration, memory organization, timers, interrupts, and interfacing capabilities. It describes the 8051's features like on-chip RAM, ROM, timers and low power consumption which make it suitable for control applications. The document outlines the differences between microprocessors and microcontrollers, and covers various interfacing examples like switches, LEDs, 7-segment displays, LCDs, ADCs and relay interfacing. It concludes with common applications of the 8051 such as in automobiles, industrial processing, robotics and consumer electronics.
The document discusses the Intel 8051 microcontroller. It provides an overview of the 8051, including that it is an 8-bit microcontroller developed by Intel in 1981. It describes some key features, such as having 128 bytes of RAM, 4K bytes of ROM, timers, ports, and that it can be programmed using 8051 assembly language. It also provides details on the architecture of the 8051, describing components like the CPU, memory, buses, interrupts, timers/counters, and input/output ports. It includes a diagram of the pinout of the 8051 microcontroller.
The document discusses the Microcontroller 8051. It provides a block diagram and pin description of the 8051. It describes the registers, memory mapping, stack, I/O ports, timers and interrupts of the 8051 microcontroller. It compares microprocessors and microcontrollers, discussing the differences in hardware structure and applications.
A microcontroller is a single-chip microprocessor system consisting of a CPU, memory, and input/output ports. It can be considered a complete computer on a single chip. The 8051 was an early microcontroller developed by Intel for use in embedded systems. It had 4KB of program memory, 128 bytes of data memory, timers, counters, and I/O ports. The 8051 has separate memory spaces for program and data memory and its CPU, registers, timers and I/O ports allow it to monitor and control external devices.
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
this ppt is related to the intrupts related to the 8051 microcontroller ..
topics are introduction to intrupts
intrerrupts vs pollings
difference between intrupts snd pollings
This document discusses serial communication with the 8051 microcontroller. It begins by contrasting serial and parallel communication, listing advantages of serial. It then explains asynchronous serial communication protocols. Next, it describes half and full duplex transmission, data framing, transfer rates, and the RS-232 standard. Finally, it provides examples of initializing and programming the 8051 for serial communication using timers, registers, and algorithms.
The document discusses the 8051 microcontroller. It begins by explaining why we need to learn about microprocessors and microcontrollers, noting that many modern devices are controlled by them. It then covers the basic components of a microprocessor/controller including the CPU, I/O, memory, timers, and interrupts. The rest of the document provides details on the 8051 microcontroller, including its architecture, memory structure, registers, ports and other features. It compares microprocessors and microcontrollers, and discusses how to choose between different microcontroller options for embedded systems.
The document discusses the 8086 system bus structure. It describes the minimum and maximum modes of operation for the 8086 microprocessor. In minimum mode, the 8086 issues control signals directly to memory and I/O devices. In maximum mode, control signals are issued by the Intel 8288 bus controller to support multiprocessor systems. The document also covers programmed and interrupt-driven I/O techniques for data transfer with input/output devices.
The document discusses various aspects of 8051 assembly language programming including:
- The most commonly used 8-bit registers in the 8051 and the 16-bit program counter and data pointer registers.
- Examples of MOV and ADD instructions to move data between registers and perform arithmetic operations in the accumulator register.
- The steps required to assemble and run an 8051 program, including creating an assembly source file, assembling it to produce object and list files, and optionally linking files to run on a simulator.
- Memory allocation and usage in the 8051 including the 64KB program memory space accessed by the 16-bit program counter and RAM allocation for registers and stack.
This document provides an overview of the 8051 microcontroller architecture. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two timers/counters, one serial interface, and other features. It also discusses the different addressing modes for 8051 assembly language programming including immediate, register, direct, register indirect, and external direct addressing.
The document provides an introduction to microcontrollers, specifically focusing on the Intel 8051 microcontroller. It defines microcontrollers and distinguishes them from microprocessors by noting that microcontrollers contain peripherals like RAM, ROM, I/O ports and timers on a single chip, while microprocessors require external circuitry. It then describes the architecture and features of the Intel 8051 microcontroller, including its 4KB program memory, 128 bytes of data memory, 32 general purpose registers, two timers, interrupts and I/O ports. Development tools for microcontrollers like editors, assemblers, compilers and debuggers/simulators are also discussed.
The document discusses the 8051 microcontroller. It begins with an introduction and table of contents. It then provides details about the 8051 including its block diagram, pin descriptions and functions, memory mapping, registers, stack, I/O port programming, timers, and interrupts.
The document discusses various topics related to interfacing an 8051 microcontroller, including:
1. Serial communication between an 8051 and PC using RS-232 and a MAX232 chip.
2. Half-duplex and asynchronous serial communication modes.
3. Addressing modes of the 8051 including register, direct, indirect, and indexed addressing.
4. Instructions sets, registers, and programming of the 8051 microcontroller.
The document discusses input/output (I/O) interfacing techniques with the 8085 microprocessor. It describes the fundamentals of I/O devices like input and output ports, and how they are used to transfer data to and from devices like keyboards and displays. The document outlines two techniques for interfacing I/O devices: memory mapped I/O which uses memory addresses and instructions to transfer data, and I/O mapped I/O which uses dedicated I/O addresses and instructions. Circuits for decoding addresses to select specific I/O devices are also presented.
The document provides an overview of the Intel 8051 microcontroller, describing its features such as 4K bytes of ROM, 128 bytes of RAM, 32 I/O lines, two timers, a serial port, and six interrupt sources, and discusses how it is commonly used in embedded systems due to its low cost. Memory mapping, registers, ports, and other architectural aspects of the 8051 are also explained at a high level. Applications of microcontrollers in various electronic devices are highlighted to illustrate their widespread use.
Project report on embedded system using 8051 microcontrollerVandna Sambyal
The document describes a home security prototype project that was developed using an 8051 microcontroller to control various devices like LEDs, DC motors, relays and sensors. It provides details on the circuit diagram and working of the home security system, which uses components like a microcontroller, motion sensor, door sensor and siren to detect intrusion and alert users. The document also includes information on microcontrollers, their architecture, programming and how to interface them with external devices.
An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. Embedded systems are present in many devices such as household appliances, vehicles, medical equipment, smartphones, and more. They typically use microcontrollers or microprocessors to monitor and control embedded hardware components. Key components of embedded systems include a CPU, memory, I/O ports, and timers/counters. Microcontrollers integrate most of these components onto a single chip, while microprocessors require external components. Embedded systems use various addressing modes and have inputs like interrupts and timers that allow them to interact with the external environment. Common applications areas of embedded systems include consumer electronics, industrial automation, automotive systems,
This document discusses memory and I/O interfacing with the 8085 microprocessor. It defines interfaces as points of interaction between components that allow communication. Memory interfacing requires address decoding and multiplexing of address and data lines. I/O devices can be interfaced either through memory mapping or I/O mapping. Common memory types include RAM, ROM, SRAM and DRAM. RAM can be static or dynamic. ROM includes PROM, EPROM and EEPROM. A stack is a reserved part of memory used to temporarily store information during program execution.
It is a presentation for the Embedded System Basics. It will be very useful for the engineering students who need to know the basics of Embedded System.
The document provides an overview of the 8051 microcontroller, including its features, applications, and architecture. It discusses the 8051's registers, memory mapping, I/O ports, timers, and interrupts. It also covers the evolution of microcontrollers from early chips like the Intel 8048 and 8051 to more modern 32-bit architectures. The 8051 is highlighted as a popular microcontroller due to its small size, low cost, and ability to be used in a wide range of applications.
This document discusses an embedded systems presentation submitted by Amandeep Singh. It provides definitions and examples of embedded systems, noting they are designed for specific applications like industrial machines, medical equipment, and toys. It also summarizes key aspects of embedded system components like microcontrollers, addressing modes, and applications. Recent examples highlighted are devices that aid communication for the deaf, integrate weighing and dimension measuring, and allow adjustable cushioning in smart shoes.
The document describes the architecture and components of an 8051 microcontroller. It includes details about the CPU registers like the accumulator, program status word, stack pointer, and timers. It describes the ports, interrupts, and memory organization. The special function registers control functions like timers, serial communication, and interrupts. The timers can be configured in different modes to generate time delays or count events. External memory can be accessed using address and data lines connected to the ports.
The document describes the architecture and components of an 8051 microcontroller. It contains:
- An 8-bit CPU with registers A and B, 4KB internal ROM, 16-bit program counter and data pointer, 128 bytes of RAM, and an 8-bit program status word.
- Two 16-bit counters/timers, four 8-bit I/O ports, and interrupts.
- Registers including accumulator, B register, program status word, stack pointer, and data pointer.
- Timers, serial I/O, and I/O ports for input/output.
The document provides information about the 8051 microcontroller, including:
1) An overview of the 8051 microcontroller, its features such as 4K bytes of ROM, 128 bytes of RAM, four 8-bit I/O ports, and two 16-bit timers.
2) Details about the registers of the 8051 including the accumulator, program status word, stack pointer, and special function registers for timers and I/O ports.
3) Explanations of memory mapping and I/O port programming for the 8051.
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...sangeeta jogade
The document provides an overview of fundamentals related to microcontrollers including the 8051 microcontroller. It defines common terms like binary number, bit, byte, word, bus, register, integrated circuit, and microprocessor. It then discusses the 8051 microcontroller specifically, covering its memory organization, I/O ports, timers, interrupts, and special function registers. The document is intended as a revision guide for understanding basic microcontroller concepts centered around the popular 8051 microcontroller.
The document discusses microprocessors and microcontrollers. It describes how microprocessors have external RAM, ROM, and I/O ports, while microcontrollers have RAM, ROM, I/O ports, and other components integrated into a single chip. The 8051 microcontroller is presented as a common example that has on-chip memory and I/O in addition to a CPU. Key features of the 8051 such as its memory organization, registers, addressing modes, and instruction set are outlined.
Advanced Embedded Automatic Car Parking Systemtheijes
The International Journal of Engineering & Science is aimed at providing a platform for researchers, engineers, scientists, or educators to publish their original research results, to exchange new ideas, to disseminate information in innovative designs, engineering experiences and technological skills. It is also the Journal's objective to promote engineering and technology education. All papers submitted to the Journal will be blind peer-reviewed. Only original articles will be published.
This document provides information about basic embedded system training and characteristics of embedded systems. It discusses that embedded systems are information processing systems embedded into larger products that can only perform designed operations. Embedded systems must be dependable, efficient, dedicated towards certain applications, and have dedicated user interfaces. It also compares embedded systems and general purpose computing, and provides examples of digital logic operations like binary addition, subtraction, logic gates and instructions in microcontrollers.
The document provides information on the 8051 microcontroller architecture. It discusses the oscillator, program counter, data pointer, registers A and B, flags and program status word, internal memory including RAM, stack pointer, special function registers, internal ROM, input/output pins including the four ports, counters, timers, and interrupts. The 8051 is an 8-bit microcontroller with 40 pins, 128 bytes of internal RAM, 4KB of internal ROM, and features like timers, counters, serial port, and interrupts that allow it to be used in embedded systems.
The document discusses embedded systems and microcontrollers. It provides details about the 8051 and 8085 microcontrollers, including their architecture, pins, applications, addressing modes, and interrupts. The 8051 has features like 4KB ROM, 128B RAM, timers, serial port, I/O ports. Common applications include digital clocks and traffic lights. It uses addressing modes like immediate, register indirect, and direct. The 8085 is an 8-bit microprocessor with multiplexed address/data bus and works on a 5V supply.
Live B tech Projects & Industrial Training @Technogroovy Technogroovy India
like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
The microprocessor is the core of computer systems.
Nowadays many communication, digital entertainment, portable devices, are controlled by them.
A designer should know what types of components he needs, ways to reduce production costs and product reliable.
BASIC INFORMATION OF ARCHITECTURE OF MICRO-CONTROLLER 8051 AS PER GTU SYLLABUS. Please Comment if u Like.. n Give u r feedback..
For More Information Go to
http://www.noesiseducation.blogspot.com
This document provides an overview of the 8051 microcontroller architecture and instructions. It describes the main components of the 8051, including the CPU, timers, memory, I/O ports, and instruction set. The 8051 is commonly used in applications such as automobiles, appliances, security systems, and more due to its high integration, small size, and low cost. Its architecture incorporates RAM, ROM, I/O ports, serial communication interfaces and other features onto a single chip. The document outlines the 8051 instruction set and provides examples of how it is programmed and applied.
The document provides an overview of PIC microcontrollers and the key features of the PIC16F72 microcontroller. It discusses the microcontroller's program memory, data memory, I/O ports, timers, and peripheral features. The three timers - Timer 0, Timer 1, and Timer 2 - are described, with Timer 0 and Timer 1 discussed in further detail regarding their configuration and operating modes.
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
This document outlines the course objectives and units of an embedded systems and IoT course. The course aims to teach students about embedded processor architecture and programming, interfacing I/O devices, the evolution of the Internet of Things, and building low-cost embedded and IoT systems using platforms like Arduino and Raspberry Pi. The units cover topics like 8-bit embedded processors, embedded C programming, IoT and Arduino programming, IoT communication protocols, and applications development for home automation, smart agriculture, and smart cities.
The document provides information on the 8051 microcontroller, including its architecture and key components. It discusses that the 8051 is an 8-bit microcontroller with 4KB of program memory, 128 bytes of RAM, two timers, five interrupt sources, and 32 I/O lines across four ports. The block diagram shows the 8051 has an 8-bit ALU, registers, program counter, stack pointer, and interfaces to memory and I/O. Key components include the accumulator, B register, R registers, program counter, and stack/stack pointer.
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...DharmaBanothu
The Network on Chip (NoC) has emerged as an effective
solution for intercommunication infrastructure within System on
Chip (SoC) designs, overcoming the limitations of traditional
methods that face significant bottlenecks. However, the complexity
of NoC design presents numerous challenges related to
performance metrics such as scalability, latency, power
consumption, and signal integrity. This project addresses the
issues within the router's memory unit and proposes an enhanced
memory structure. To achieve efficient data transfer, FIFO buffers
are implemented in distributed RAM and virtual channels for
FPGA-based NoC. The project introduces advanced FIFO-based
memory units within the NoC router, assessing their performance
in a Bi-directional NoC (Bi-NoC) configuration. The primary
objective is to reduce the router's workload while enhancing the
FIFO internal structure. To further improve data transfer speed,
a Bi-NoC with a self-configurable intercommunication channel is
suggested. Simulation and synthesis results demonstrate
guaranteed throughput, predictable latency, and equitable
network access, showing significant improvement over previous
designs
Applications of artificial Intelligence in Mechanical Engineering.pdfAtif Razi
Historically, mechanical engineering has relied heavily on human expertise and empirical methods to solve complex problems. With the introduction of computer-aided design (CAD) and finite element analysis (FEA), the field took its first steps towards digitization. These tools allowed engineers to simulate and analyze mechanical systems with greater accuracy and efficiency. However, the sheer volume of data generated by modern engineering systems and the increasing complexity of these systems have necessitated more advanced analytical tools, paving the way for AI.
AI offers the capability to process vast amounts of data, identify patterns, and make predictions with a level of speed and accuracy unattainable by traditional methods. This has profound implications for mechanical engineering, enabling more efficient design processes, predictive maintenance strategies, and optimized manufacturing operations. AI-driven tools can learn from historical data, adapt to new information, and continuously improve their performance, making them invaluable in tackling the multifaceted challenges of modern mechanical engineering.
Levelised Cost of Hydrogen (LCOH) Calculator ManualMassimo Talia
The aim of this manual is to explain the
methodology behind the Levelized Cost of
Hydrogen (LCOH) calculator. Moreover, this
manual also demonstrates how the calculator
can be used for estimating the expenses associated with hydrogen production in Europe
using low-temperature electrolysis considering different sources of electricity
Build the Next Generation of Apps with the Einstein 1 Platform.
Rejoignez Philippe Ozil pour une session de workshops qui vous guidera à travers les détails de la plateforme Einstein 1, l'importance des données pour la création d'applications d'intelligence artificielle et les différents outils et technologies que Salesforce propose pour vous apporter tous les bénéfices de l'IA.
Height and depth gauge linear metrology.pdfq30122000
Height gauges may also be used to measure the height of an object by using the underside of the scriber as the datum. The datum may be permanently fixed or the height gauge may have provision to adjust the scale, this is done by sliding the scale vertically along the body of the height gauge by turning a fine feed screw at the top of the gauge; then with the scriber set to the same level as the base, the scale can be matched to it. This adjustment allows different scribers or probes to be used, as well as adjusting for any errors in a damaged or resharpened probe.
Open Channel Flow: fluid flow with a free surfaceIndrajeet sahu
Open Channel Flow: This topic focuses on fluid flow with a free surface, such as in rivers, canals, and drainage ditches. Key concepts include the classification of flow types (steady vs. unsteady, uniform vs. non-uniform), hydraulic radius, flow resistance, Manning's equation, critical flow conditions, and energy and momentum principles. It also covers flow measurement techniques, gradually varied flow analysis, and the design of open channels. Understanding these principles is vital for effective water resource management and engineering applications.
Supermarket Management System Project Report.pdfKamal Acharya
Supermarket management is a stand-alone J2EE using Eclipse Juno program.
This project contains all the necessary required information about maintaining
the supermarket billing system.
The core idea of this project to minimize the paper work and centralize the
data. Here all the communication is taken in secure manner. That is, in this
application the information will be stored in client itself. For further security the
data base is stored in the back-end oracle and so no intruders can access it.
2. Introduction
Block Diagram and Pin
Description of the 8051
Registers
Memory mapping in 8051
Stack in the 8051
I/O Port Programming
Timers
Interrupts &
Applications
3. Its not an exaggeration if I say that ,today
there is no electronic gadget on the earth
which is designed without a Microcontroller.
Ex: communication devices, digital
entertainment, portable devices etc…
Not believable ??? See the next
slide
4. Personal information products: Cell phone, pager,
watch, pocket recorder, calculator
Laptop components: mouse, keyboard, modem,
fax card, sound card, battery charger
Home appliances: door lock, alarm clock,
thermostat, air conditioner, TV remote, VCR, small
refrigerator, exercise equipment, washer/dryer,
microwave oven
Industrial equipment: Temperature/pressure
controllers, Counters, timers, RPM Controllers
Toys: video games, cars, dolls, etc.
5. So, A good designer should
always know what type of
controller he/she is using ,their
architecture, advantages ,
disadvantages , ways to reduce
production costs and product
reliability etc….
O.K ????
6. A smaller computer
On-chip RAM, ROM, I/O ports...
Example : Motorola’s 6811, Intel’s 8051,
Zilog’s Z8 and PIC 16X
RAM ROM
I/O
Port
Timer
Serial
COM
Port
CPU
A single chip
Microcontroller
7. General-purpose microprocessor
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example : Intel’s x86, Motorola’s 680x0
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
8. Microprocessor
CPU is stand-alone, RAM,
ROM, I/O, timer are separate
designer can decide on the
amount of ROM, RAM and
I/O ports.
expansive
versatility
general-purpose
Microcontroller
• CPU, RAM, ROM, I/O and
timer are all on a single chip
• fix amount of on-chip ROM,
RAM, I/O ports
• Highly bit addressable
• for applications in which cost,
power and space are critical
• single-purpose
Microprocessor vs. Microcontroller
9. Flashback !!!!
In the year 1976, Motorola created a
Microprocessor chip called 6801 which replaced
its brother 6800 with certain add-on chips to
make a computer. This paved the way for the
new revolution in the history of chip design and
gave birth to a new entity called
MICROCONTROLLER.
The INTEL bagged the credit of producing the
first Microcontroller 8048 with a CPU and 1K
bytes of EPROM, 64 Bytes of RAM an 8-Bit
Timer and 27 I/O pins in 1976.
10. Then followed the most popular controller 8051 in
the year 1980 with 4K bytes of ROM,128 Bytes of
RAM , a serial port, two 16-bit Timers , and 32 I/O
pins.
The 8051 family has many additions and
improvements over the years and remains a most
soughtafter tool for todays circuit designers.
The same INTEL introduced a 16 bit controller
8096 in the year 1982
11. Later INTEL introduced 80c196 series of 16-bit
microcontrollers for mainly industrial applications
Microchip, another company has introduced a
microcontroller PIC 16C64 an 8-bit in the year
1985.
32-bit microcontrollers have been developed by
IBM and Motorola-MPC 505 is a 32-bit RISC
controller of Motorola
The 403 GA is a 32 -bit RISC embedded
controller of IBM
12. In recent times ARM company (Advanced Risc
machines) has developed and introduced 32 bit
controllers which are highend application
devices,especially communication devices like
mobiles , ipods etc..
13.
14. CPU
Program
+ Data
Address Bus
Data Bus
Memory
Von Neumann
Architecture
CPU
Program
Address Bus
Data Bus
Harvard
Architecture
Memory
Data
Address Bus
Fetch Bus
0
0
0
2n
15. 4K bytes ROM
128 bytes RAM
Four 8-bit I/O ports
Two 16-bit timers
Serial interface
64K external code memory space
64K data memory space
16. Oscillator
and timing
4096 Bytes
Program Memory
(ROM)
128 Bytes
Data Memory
(RAM)
Two 16 Bit
Timer/Event
Counters
8051
CPU
64 K Byte Bus
Expansion
Control
Programmable
I/O
Programmable
Serial Port Full
Duplex UART
Synchronous Shifter
Internal data bus
External interrupts
subsystem interrupts
Control Parallel ports
Address Data Bus
I/O pins
Serial Input
Serial Output
17. Pin Description of the 8051Pin Description of the 8051
The 8051 is a 40
pin device, but out
of these 40 pins,
32 are used for
I/O.
24 of these are
dual purpose, i.e.
they can operate
as I/O or a control
line or as part of
address or date
bus.
18. A (8-bit Accumulator)
B (8-bit register for Mul &Div)
PSW (8-bit Program Status Word)
SP (8-bit Stack Pointer)
PC (16-bit Program Counter)
DPTR (16-bit Data Pointer)
19. DATA registers
CONTROL registers
•Timers
•Serial ports
•Interrupt system
•Analog to Digital converter
•Digital to Analog converter
etc..
Addresses 80h – FFh
Direct Addressing is used to
access SFRs
20.
21.
22.
23. Memory mapping in 8051Memory mapping in 8051
ROM memory map in 8051 family
0000H
0FFFH
0000H
1FFFH
0000H
7FFFH
8051
8752
4k
DS5000-32
8k 32k
from Atmel
Corporation
from Dallas
Semiconductor
24. RAM memory space allocation in the 8051
7FH
30H
2FH
20H
1FH
17H
10H
0FH
07H
08H
18H
00H
Register Bank 0
)Stack) Register Bank 1
Register Bank 2
Register Bank 3
Bit-Addressable RAM
Scratch pad RAM
25. 8051 has 4 Ports. Port 0, Port1, Port2 , Port3
Port 0 is a dual purpose port, it is located from
pin 32 to pin 39 (8 pins). To use this port as both
input/output ports each pin must be connected
externally to a 10 k ohm pull-up resistor.This is
because Port 0 is an open drain.
Simple ex:Simple ex: MOV A, #22MOV A, #22
BACKBACK MOV P0 ,AP0 ,A
ACALL DELAYACALL DELAY
CPL ACPL A
SJMP BACKSJMP BACK
26.
27. Port 1 is a dedicated I/O port from pin 1 to pin 8.Upon
reset it is configured as outport. It is generally used for
interfacing to external device thus if you need to
connect to switches or LEDs, you could make use of
these 8 pins,but it doesn’t need any pull-up resistors as
it is having internally
Like port 0, port 2 is a dual-purpose port.(Pins 21
through 28) It can be used for general I/O or as the
high byte of the address bus for designs with external
code memory.Like P1 ,Port2 also doesn’t require any
pull-up resistors
28. Port 3 is also dual purpose but designers generally
avoid using this port unnecessarily for I/O because
the pins have alternate functions which are related
to special features of the 8051. Indiscriminate use
of these pins may interfere with the normal
operation of the 8051.
However, for a programmer, it is the same to
program P0, P1, P2 and P3.
All the ports upon RESET are configured as output.
To use any of the ports as an input port,it must be
set)Programmed)
29.
30. The internal circuitry for the I/O port is shown in the
next slide
If you want to read in from a pin, you must first give
a logic ‘1’ to the port latch to turn off the FET
otherwise the data read in will always be logic ‘0’.
When you write to the port you are actually writing to
the latch e.g. a logic 0 given to the latch will be
inverted and turn on the FET which cause the port
pin to be connected to Gnd )logic 0).
31.
32. The 8051 has 2 timers/counters:
Timer/Counter 0
Timer/Counter 1
They can be used as
1. The Timer :Used as a time delay generator.
The clock source is the internal crystal frequency of the
8051.
1. An event counter.
External input from input pin to count the number of
events on registers.
These clock pulses cold represent the number of people
passing through an entrance, or the number of wheel
rotations, or any other event that can be converted to pulses.
33. Set the initial value of registers
Start the timer and then the 8051 counts
up.
Input from internal system clock )machine
cycle)
When the registers equal to 0 and the 8051
sets a bit to denote time out
to
LCD
P1
8051
TL0
TH0
P2
Set
Timer 0
34. Count the number of events
◦ Show the number of events on registers
◦ External input from T0 input pin )P3.4) for Counter
0
◦ External input from T1 input pin )P3.5) for Counter
1
◦ External input from Tx input pin.
◦ We use Tx to denote T0 or T1.
T0
to
LCD
P3.4
P1
8051
a switch
TL0
TH0
35. 8051 has two 16-bit Timer registers ,Timer 0 &
Timer 1.
As 8051 has 8-bit architecture , each Timer
register is treated as two 8-bit registers namely
TH0, TL0, TH1, TL1.
One 8-bit mode register -TMOD.
One 8-bit control register-TCON.
36. Both Timer 0 &Timer 1 use the same Mode
register TMOD.
It is an-8-bit register .The lower 4-bits are meant
for Timer 0 &the upper 4-bits are meant for Timer
1
It is not bit addressible.
It is used similar to any other register of 8051 .
For ex:
MOV TMOD,#21H
GATE C/T M1 M0 GATE C/T M1 M0
Timer 1 Timer 0
(MSB) (LSB)
37. Every timer has a mean of starting and stopping.
◦ GATE=0
Internal control
The start and stop of the timer are controlled by way of
software.
Set/clear the TR for start/stop timer.
SETB TR0
CLR TR0
◦ GATE=1
External control
The hardware way of starting and stopping the timer by
software and an external source.
Timer/counter is enabled only while the INT pin is high and the
TR control pin is set )TR).
38. C/T : Timer or counter selected cleared for timer operation
)input from internal system clock). Set for counter
operation )input from Tx input pin).
M1,M0 : Used for mode selection.Because the Timers of 8051
can be set in 4-different modes.
M1 M0 Mode Operation
0 0 0 13-bit timer mode 8-bit THx + 5-bit TLx )x= 0 or
1)
0 1 1 16-bit timer mode 8-bit THx + 8-bit TLx
1 0 2 8-bit auto reload 8-bit auto reload
timer/counter;
THx holds a value which is to be reloaded into
TLx each time it overflows.
1 1 3 Split timer mode
39.
40. For this , let us consider timer 0 as an example.
16-bit timer )TH0 and TL0)
TH0-TL0 is incremented continuously when TR0 is set
to 1. And the 8051 stops to increment TH0-TL0 when
TR0 is cleared.
The timer works with the internal system clock. In
other words, the timer counts up each machine cycle.
When the timer )TH0-TL0) reaches its maximum of
FFFFH, it rolls over to 0000, and TF0 is raised.
Programmer should check TF0 and stop the timer 0.
41. 1. Choose mode 1 timer 0
◦ MOV TMOD,#01H
1. Set the original value to TH0 and TL0.
◦ MOV TH0,#FFH
◦ MOV TL0,#FCH
1. You better to clear the TF: TF0=0.
◦ CLR TF0
1. Start the timer.
◦ SETB TR0
42. 5. The 8051 starts to count up by incrementing the TH0-
TL0.
◦ TH0-TL0= FFFCH,FFFDH,FFFEH,FFFFH,0000H
FFFC FFFD FFFE FFFF 0000
TF = 0 TF = 0 TF = 0 TF = 0 TF = 1
TH0 TL0Start timer
Stop timer
Monitor TF until TF=1
TR0=1 TR0=0
TF
43. 6. When TH0-TL0 rolls over from FFFFH to 0000,
the 8051 set TF0=1.
TH0-TL0= FFFE H, FFFF H, 0000 H (Now TF0=1)
6. Keep monitoring the timer flag (TF) to see if it is
raised.
AGAIN: JNB TF0, AGAIN
6. Clear TR0 to stop the process.
CLR TR0
6. Clear the TF flag for the next round.
CLR TF0
44. TCON RegisterTCON Register
Timer control register TMOD is a 8-bit
register which is bit addressable and in
which Upper nibble is for timer/counter,
lower nibble is for interrupts
45. TR (Timer run control bit)
◦ TR0 for Timer/counter 0; TR1 for Timer/counter 1.
◦ TR is set by programmer to turn timer/counter on/off.
TR=0 : off (stop)
TR=1 : on (start)
TF (timer flag, control flag)
◦ TF0 for timer/counter 0; TF1 for timer/counter 1.
◦ TF is like a carry. Originally, TF=0. When TH-TL roll
over to 0000 from FFFFH, the TF is set to 1.
TF=0 : not reach
TF=1: reach
If we enable interrupt, TF=1 will trigger ISR.
47. Using a port ,by a simple program you can generate
a Square wave of any duty cycle.
HERE : SETB P1.0 (Make bit of Port 0 High)
LCALL DELAY
CLR P1.0
LCALL DELAY
SJMP HERE : Keep doing it
Here same delay is used for both
High & low
48. HEREHERE : SETB P1.0 ( Make bit of Port 0 High): SETB P1.0 ( Make bit of Port 0 High)
LCALL DELAYLCALL DELAY
LCALL DELAYLCALL DELAY
CLR P1.0CLR P1.0
LCALL DELAYLCALL DELAY
SJMP HERE : Keep doing itSJMP HERE : Keep doing it
49. DELAY:
SETB TR0 ;start the timer 0
AGAIN: JNB TF0,AGAIN
CLR TR0 ;stop timer 0
CLR TF0 ;clear timer 0 flag
RET
Square wave of 50% duty on P1.5
Timer 0 is used
; each loop is a half clock
MOV TMOD,#01 ;Timer 0,mode 1(16-bit)
HERE: MOV TL0,#0F2H ;Timer value = FFF2H
MOV TH0,#0FFH
CPL P1.5
ACALL DELAY
SJMP HERE
53. The 8051 has two pins for transferring and
receiving data by serial communication. These
two pins are part of the Port3(P3.0 &P3.1)
These pins are TTL compatible and hence they
require a line driver to make them RS232
compatible
Max232 chip is one such line driver in use.
Serial communication is controlled by an 8-bit
register called SCON register,it is a bit
addressable register.
54.
55.
56. These two bits of SCON register determine the
framing of data by specifying the number of bits
per character and start bit and stop bits. There are
4 serial modes.
SM0 SM1
0 0 Serial Mode 0
0 1 Serial Mode 1, 8 bit data,
1 stop bit, 1 start bit
1 0 Serial Mode 2
1 1 Serial Mode 3
57. REN (Receive Enable) also referred as SCON.4.
When it is high,it allows the 8051 to receive data
on the RxD pin. So to receive and transfer data
REN must be set to 1.When REN=0,the receiver
is disabled. This is achieved as below
SETB SCON.4
& CLR SCON.4
58. TI (Transmit interrupt) is the D1 bit of SCON register.
When 8051 finishes the transfer of 8-bit character, it
raises the TI flag to indicate that it is ready to transfer
another byte. The TI bit is raised at the beginning of the
stop bit.
RI (Receive interrupt) is the D0 bit of the SCON register.
When the 8051 receives data serially ,via RxD, it gets rid
of the start and stop bits and places the byte in the SBUF
register.Then it raises the RI flag bit to indicate that a
byte has been received and should be picked up before it
is lost.RI is raised halfway through the stop bit.
59. An interrupt is an external or internal event that
disturbs the microcontroller to inform it that a
device needs its service.
A Microcontroller can serve various devices.
There are two ways to do that:
◦ interrupts &
◦ polling.
The program which is associated with the
interrupt is called the interrupt service
routine (ISR) or interrupt handler.
60. Upon receiving the interrupt signal the
Microcontroller , finish current instruction and saves
the PC on stack.
Jumps to a fixed location in memory depending on
type of interrupt
Starts to execute the interrupt service routine until
RETI (return from interrupt)
Upon executing the RETI the microcontroller returns to
the place where it was interrupted. Get pop PC from
stack
61. Original 8051 has 6 sources of interrupts
◦ Reset
◦ Timer 0 overflow
◦ Timer 1 overflow
◦ External Interrupt 0
◦ External Interrupt 1
◦ Serial Port events (buffer full, buffer empty, etc)
Enhanced version has 22 sources
◦ More timers, programmable counter array, ADC, more
external interrupts, another serial port (UART)
62. Each interrupt has a specific place in code memory
where program execution (interrupt service routine)
begins.
External Interrupt 0: 0003h
Timer 0 overflow: 000Bh
External Interrupt 1: 0013h
Timer 1 overflow: 001Bh
Serial : 0023h
Timer 2 overflow(8052+) 002bh
Interrupt Vectors
63. Interrupt Enable RegisterInterrupt Enable Register
Upon reset all Interrupts are disabled & do
not respond to the Microcontroller
These interrupts must be enabled by software
in order for the Microcontroller to respond to
them.
This is done by an 8-bit register called
Interrupt Enable Register (IE).
65. Enabling and disabling an
interrupt
By bit operation
Recommended in the middle of program
SETB EA ;Enable All
SETB ET0 ;Enable Timer0 ovrf
SETB ET1 ;Enable Timer1 ovrf
SETB EX0 ;Enable INT0
SETB EX1 ;Enable INT1
SETB ES ;Enable Serial port
By Mov instruction
Recommended in the first of program
MOV IE, #10010110B
SETB IE.7
SETB IE.1
SETB IE.3
SETB IE.0
SETB IE.2
SETB IE.4
66. What if two interrupt sources interrupt at the
same time?
The interrupt with the highest PRIORITY gets
serviced first.
All interrupts have a power on default priority
order.
1. External interrupt 0 (INT0)
2. Timer interrupt0 (TF0)
3. External interrupt 1 (INT1)
4. Timer interrupt1 (TF1)
5. Serial communication (RI+TI)
Priority can also be set to “high” or “low” by IP
reg.
Interrupt PrioritiesInterrupt Priorities
67. IP.7: reserved
IP.6: reserved
IP.5: Timer 2 interrupt priority bit (8052 only)
IP.4: Serial port interrupt priority bit
IP.3: Timer 1 interrupt priority bit
IP.2: External interrupt 1 priority bit
IP.1: Timer 0 interrupt priority bit
IP.0: External interrupt 0 priority bit
--- PX0PT0PX1PT1PSPT2---
68. MOV IP , #00000100B or SETB IP.2 gives
priority order
1. Int1
2. Int0
3. Timer0
4. Timer1
5. Serial
MOV IP , #00001100B gives priority order
1. Int1
2. Timer1
3. Int0
4. Timer0
5. Serial
--- PX0PT0PX1PT1PSPT2---
69. --- PX0PT0PX1PT1PSPT2---
A high-priority interrupt can interrupt a low-A high-priority interrupt can interrupt a low-
priority interrupypriority interrupy
All interrupt are latched internallyAll interrupt are latched internally
Low-priority interrupt wait until 8051 hasLow-priority interrupt wait until 8051 has
finished servicing the high-priority interruptfinished servicing the high-priority interrupt