Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]

PC's Interrupt Measures RPM



Contributing Author  |   ED Online ID #6232  |   February 22, 1999

Article Rating:

This simple design measures the speed in RPM of a rotating wheel by using the PC’s special BIOS interrupt INT1CH and its printer interrupt IRQ4. An infrared optocoupler mounted on the wheel side senses the wheel rotation and generates clock pulses, which initiate an interrupt to the PC through IRQ4 (see the figure).

Each rotation generates an interrupt that enables the interrupt handler routine written in Turbo “C” (see the listing). The handler software increments a global counter “RPMCOUNT” for each occurrence of IRQ4. The timer handler routine written for Special BIOS interrupt INT1CH increments another global counter “TICKER” for each clock tick of INT1CH. It also monitors the number of revolutions stored in “RPMCOUNT” for each one-second interval. The special BIOS interrupt (INT1CH), which does nothing until you provide a routine for it, automatically occurs 18.2 times per second. INT1CH is invoked by the BIOS timer interrupt after it has updated the time-of-day count.

The variable “RPM” provides number of rotations per minute (RPM) of the rotating wheel by multiplying the variable “RPMCURR” by 60. That’s because the variable “RPMCURR” contains the measurement for a one-second interval. Consequently, this simple design is able to precisely measure RPM of a rotating wheel in the PC environment.




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • In EDA, A Year Of Mergers, Failed And Otherwise
  • 2008 BEST Electronic Design Winners
  • Engineers Rely On Internet For Product Info
  • Rochester Electronics Establishes New Design and Technology Group
  • November 17, 2008
  • Custom Sources Light Way To 22-nm IC Lithography
  • Software Turns Scopes Into Vector RF Signal Analyzers
  • Couple’s $15 Million Gift Advances Rice Engineering Education
    1) Behind The Bright Lights, LED Drivers Evolve To Meet New Requirements
    (721 views today)
    2) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (270 views today)
    3) Wi-Fi Chips Stand Out In A Sea Of Wireless Products
    (194 views today)
    4) What's All This "Adjustable Slew Rate Stuff," Anyhow?
    (185 views today)
    5) Ten Top Design Skills For Tough Times
    (184 views today)
    ALL TOP 20







    Reader Comments

    I writ the program in a turbo c editor but got a error of function call missing on defined oldhandler funcnction.Please tell how to rectify the problem and send me a compiled file if possible.

    sachin -April 09, 2005   (Article Rating: )

    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources