Interrupts with the 8031 - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Interrupts with the 8031

Description:

The PC is set to the proper address value when an interrupt is received: ... TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0. SCON (bit addressable) SM0 SM1 SM2 REN TB8 RB8 TI RI ... – PowerPoint PPT presentation

Number of Views:103
Avg rating:5.0/5.0
Slides: 9
Provided by: lance94
Category:
Tags: interrupts | it1

less

Transcript and Presenter's Notes

Title: Interrupts with the 8031


1
Interrupts with the 8031
ECET3220
2
Types of Interrupts
  • Externally triggered (EX0,EX1)
  • Timing/Counter INTs (T1,T0)
  • Serial Port INTs (ES)
  • Recall
  • Interrupts cause normal program
  • operation to halt and places the
  • return address of the next
  • instruction (PC) on the stack.

3
Vector Addresses
  • The PC is set to the proper address value when
    an interrupt is received
  • Reset all to default states (POR) 00H
  • External INT0 (IE0) 03H
  • Counter/Timer 0 (TF0) 0BH
  • External INT1 (IE1) 13H
  • Counter/Timer 1(TF1) 1BH
  • Serial Interrupt (RITI) 23H

4
8031 Pins of Interrupts
  • RI is P3.0
  • TI is P3.1
  • INT0 is P3.2
  • INT1 is P3.3
  • T0 is P3.4
  • T1 is P3.5
  • Remember to write a 1 to these Port bits if
    they are used as inputs.

5
Enabling Interrupts
  • In order to enable interrupts, use
  • the IE control byte. (bit addressable)
  • EA1 Interrupts are enabled individually
  • EA0 means no interrupts acknowledged
  • EX11 means to enable external INT 1
  • EX10 means to disable external INT 1
  • ES,ET0,ET1,EX0 - work in a similar
  • manner as EX1 to enable or disable

EA --- --- ES ET1 EX1 ET0 EX0
6
Interrupt Priority
  • To change interrupt priority, use the IP byte.
    (bit addressable)
  • If the bit is 0, the corresponding interrupt has
    a lower priority and if the bit is 1 the
    corresponding interrupt has a higher priority.
    (Example 00001010 changes the priority order from
    the default order to TF0, TF1, IE0, IE1, RI or
    TI.

--- --- --- PS PT1 PX1 PT0 PX0
7
Interrupt Control Registers
  • TCON (bit addressable)

TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
  • TMOD (NOT bit addressable)

GATE C/T M1 M0 GATE C/T M1 M0
  • SCON (bit addressable)

SM0 SM1 SM2 REN TB8 RB8 TI RI
8
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com