Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre









Chapter 1
Types of Memory

Chapter 2
Special Function Registers

Chapter 3
Basic Registers

Chapter 4
Addressing Modes

Chapter 5
Program Flow

Chapter 6
Low Level Information

Chapter 7

Chapter 8
Serial Port Operations

Chapter 9

Additional Features in 8052

8052 Instruction Set

8051 Microcontroller - Interrupts

Author : Craig Steiner

Source : 8052.com

As the name implies, an interrupt is some event which interrupts normal program execution.

As stated earlier, program flow is always sequential, being altered only by those instructions which expressly cause program flow to deviate in some way. However, interrupts give us a mechanism to "put on hold" the normal program flow, execute a subroutine, and then resume normal program flow as if we had never left it. This subroutine, called an interrupt handler, is only executed when a certain event (interrupt) occurs. The event may be one of the timers "overflowing," receiving a character via the serial port, transmitting a character via the serial port, or one of two "external events." The 8051 may be configured so that when any of these events occur the main program is temporarily suspended and control passed to a special section of code which presumably would execute some function related to the event that occurred. Once complete, control would be returned to the original program. The main program never even knows it was interrupted.

>>> Enter here for detail on "Interrupts" <<<
<<< Click here to come back on (8051 - Interrupts)

<<<<  Back to 8051 / 52  Microcontroller Tutorial