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

MICROCONTROLLER TUTORIALS - 8051

Videos

Products

Sitemap

Circuits

Tutorials

8051

Introduction

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
Timers

Chapter 8
Serial Port Operations

Chapter 9
Interrupts

Additional Features in 8052

8052 Instruction Set

8051 Microcontroller
Setting Up Interrupts

Author : Craig Steiner

Source : 8052.com

Setting Up Interrupts

By default at power up, all interrupts are disabled. This means that even if, for example, the TF0 bit is set, the 8051 will not execute the interrupt. Your program must specifically tell the 8051 that it wishes to enable interrupts and specifically which interrupts it wishes to enable.

Your program may enable and disable interrupts by modifying the IE SFR (A8h):

Bit

Name

Bit Address

Explanation of Function

7

EA

AFh

Global Interrupt Enable/Disable

6

-

AEh

Undefined

5

-

ADh

Undefined

4

ES

ACh

Enable Serial Interrupt

3

ET1

ABh

Enable Timer 1 Interrupt

2

EX1

AAh

Enable External 1 Interrupt

1

ET0

A9h

Enable Timer 0 Interrupt

0

EX0

A8h

Enable External 0 Interrupt

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

<<<<  Back to 8051 / 52  Microcontroller Tutorial