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
Panasonic Key Devices Guide 2008:
 
Fairchild Semiconductor :
 
 
Highest Rated  
 
Feedback Loop  
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
RESOURCE CENTER


 
 
PRODUCT NEWS
 
FEATURED SPONSORS


 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 

 
 
RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
What type of environmental regulation do you think will be most beneficial for the tech industry?
Proper recycling and disposal
Push for power efficiency and energy conservation
Chemical/lead regulation
View results
 
Outlook and Trends 2008


 

Reed Electronics Group | Reed Business Information Asia |
EDN India | EDN Taiwan | EDN Korea | EDN Japan | EDN China | EDN | EDN Europe
ECN Asia | ECN Taiwan | ECN Korea | ECN China | EB Asia | WDDA | WDDA Taiwan | WDDA China

 
ABOUT EDN Asia | FREE SUBSCRIPTION | CONTACT US
   
© 2008 Reed Business Information, a division of Reed Elsevier Inc.
All rights reserved. Use of this web site is subject to its Terms and Conditions of Use. View our Privacy Policy.