Electronic Design

Special BIOS interrupt for real-time data acquisition and control

APC’s BIOS contains a special “dummy” interrupt (INT 1CH) that does nothing unless a routine is provided for it. At startup, the vector for the interrupt points to an IRET (interrupt return) instruction. When the interrupt is called, it simply returns (see the figure).

The INT 1C interrupt is a hardware interrupt that automatically occurs 18.2 times per second, and the “dummy” interrupt is invoked by the BIOS timer interrupt after it updates the time-of-day count. This “dummy” interrupt is available in all PCs and can be used for data acquisition and control in process control instrumentation. Some examples are sensing and controlling of pressure, flow, furnace temperature, a motor’s RPM, etc.

To take advantage of this feature, simply change the vector for this interrupt to point to a procedure in your program. Then that procedure will be called 18.2 times per second. Care should be taken to minimize execution time when writing this interrupt handler. Typically, 18 times per second is a sufficient amount of time for the interrupt handler to achieve its tasks.

Variables in process control instrumentation are very slow compared to this INT 1CH time of occurrence. Looking at the figure, the variable COUNT is incremented by one every INT 1CH until the count reaches 100.

A similar procedure can be written in the place of COUNT, for both sensing a port in the add-on card and writing an appropriate control function value to the control port. The data written to the control port may be for proportional, integral, differential, or on/off control functions.

In the figure, the vector for interrupt 1CH is changed to point to a procedure called COUNT. Remember that once the vector is changed, COUNT will immediately be invoked every 18th of a second. Be very careful about saving changed registers.

See associated listing

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish