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: Not Rated

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?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (182 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (168 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (76 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (74 views today)
    5) Bidirectional H-Bridge DC-Motor Motion Controller
    (65 views today)
    ALL TOP 20







    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.
    (Acceptable Use Policy)
     
     

    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