Free Print Subscription Printer-friendly version Email to a Friend

Microprocessor’s single-interrupt input processes multiple external interrupts

( 01 Jun 2006 )
Abel Raynus, Armatron International Inc, Malden, MA

On the lower end of the performance spectrum, many widely available and inexpensive microcontrollers pay for their small pc-board footprints by omitting functions. For example, most low end processors provide only one external-interrupt input pin and only one address vector in memory for the service routine that processes external IRQs (interrupt requests). However, a project occasionally requires that several interrupt-service programs must process multiple external interrupts from various sources. Cost and inventory constraints may make it undesirable to choose another microcontroller whose only advantage is the availability of a few more interrupt pins.

For example, Freescale Semiconductor’s (www.freescale.com) popular Nitron family of
Flash-memory microcontrollers, such as the MC68HC908QT and QY, offer only one IRQ input pin. You can use one-time-programmable versions of the family, such as the MC68HC705KJ1 or MC68HC-705J1A, that offer five externalinterrupt inputs but omit some of the family’s valuable functions, such as Flash memory, built-in analog-to digital conversion, and an advanced instruction set. You could also select a larger microcontroller, such as the MC68HC908JL3, from the same product family to gain eight external-interrupt inputs at the expense of significant increases in cost and pc-board area.

This Design Idea offers an alternative that retains the small processor and adds extra interrupt inputs. The technique involves applying the interrupt signals to an AND gate to generate an IRQ signal and using the microcontroller’s inputs to recognize the interrupt’s source.

<%@ LANGUAGE="VBSCRIPT" %>
<% Randomize: ord=int(rnd*1000000000) %>


For example, consider the four external-interrupt sources in Figure 1. If you apply no interrupt signals and if all of the AND gate’s inputs rest at logic ones, the IRQ level also remains at logic one. Applying an interrupt signal (a logic-zero level) to any one of four inputs, INT1 through INT4, drives the gate’s output to a low level and triggers the interrupt. The interrupt-service routine recognizes the interrupt’s source by testing the levels of input pins PA0, PA1, PA4, and PA5 and executing the corresponding interrupt-service routine.



The MC68HC908QY2 microcontroller, IC1, includes built-in pullup resistors that eliminate the need for external resistors, and you can use an inexpensive and readily available 74LS21 for IC2. For demonstration purposes, this circuit displays the address of an incoming interrupt by lighting one of four corresponding LED indicators for 3 sec. The software routine in Listing 1 that assigns a priority to each interrupt uses the standard set of assembler instructions and can apply to any microcontroller. You can download Listing 1, as well as the sample’s assembler code and its accompanying table of equations (Listing 2) from www.edn.com/060302di.

 
Free Print Subscription Printer-friendly version Email to a Friend
Article Rating 
Average Rate: No rating yet
 
Poor Quite Good Good Very Good Excellent
 
 
Related Content 
 
WEBCASTS
 
KNOWLEDGE CENTER
Fairchild Semiconductor :
 
 
Highest Rated  
Feedback Loop  
ADS BY GOOGLE 
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
RESOURCE CENTER
 
 
PRODUCT NEWS
 
FEATURED SPONSORS


 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 

 
 
RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
How do you expect your company to perform this year?
Worse than last year
Same as last year
Better than last year
View results
 
Outlook and Trends 2008


     
     
Power Technology E-newsletter 
Dual-input, Single-output Power Supply Selector Switch Reduces System Size while Improving Integrity EDNA, February 08
Analog Devices completes sale of CPU voltage and PC thermal monitoring business to ON SemiconductorEDNA, January 08
Fairchild’s Green FPS Power Switches Increase Efficiency, Reduce EMI in Power Supply Designs EDNA, December 07
 
Test and Measurement E-newsletter 
Agilent Technologies and Anite Announce Strategic Partnership to Deliver 3GPP LTE Test Solutions for Wireless R&D EDNA, November 07
WiMAX Technology Leaders Aeroflex and Sequans Partner to Speed Product Development and Deployment of WiMAX Test EDNA, October 07
Tektronix’ IMS Solution Proves Successful in Industry Forum Tests EDNA, September 07
 
     
     
 
KNOWLEDGE CENTER
 
Fairchild Semiconductor :
 
Texas Instruments: DaVinci™ Technology
 
Texas Instruments: Safe Bet Series
 
INDUSTRY LINKS
 
Photonics Association (Singapore)
Singapore Industrial Automation Association (SIAA)
Taiwan Semiconductor Industry Association (TSIA)
 
 
 
OUR SPONSORS
 









Texas Instruments: New Technical Video360 Podcast Demonstrates Advantages of DaVinci™ Techonology

 

 
 
ADS BY GOOGLE