INT 1 Ch and PAL controls process variables

Aug. 17, 1998
The design presented here provides a simple method for controlling process variables such as temperature, pressure, flow, etc., via user-selectable control functions (e.g., proportional, integral, and differential). The PAL chip 16L8 is programmed to...

The design presented here provides a simple method for controlling process variables such as temperature, pressure, flow, etc., via user-selectable control functions (e.g., proportional, integral, and differential). The PAL chip 16L8 is programmed to work as a 4-bit subtractor. Two such PAL 16L8s, shown in the figure, accept two 8-bit data bytes representing the setpoint value (B) and the measured process variable value (A). They provide an 8-bit error signal through the subtraction process. By selecting the PAL ICs through chip select —CS1, the PC reads this “Error Value.” The error output is merely the deviation between the set and measuring parameters.

If the measured parameter is high in comparison with the set parameter, the PAL error output will be negative; otherwise it will be positive. The MSB of the error output indicates the sign bit. The logic high and logic low in the sign bit indicate that the error is negative and positive, respectively.

The “Special BIOS” interrupt, (INT 1Ch), available in all PCs, is used in this design to read the error value through the PAL port, as well as write the appropriate control responses to the DAC port by selecting the DAC through —CS2. The INT 1Ch interrupt is a hardware interrupt (see “Special BIOS Interrupt for Real-time Data Acquisition and Control,” ELECTRONIC DESIGN, May 1, 1997, p. 173). It automatically occurs 18.2 times per second and is invoked by the BIOS timer interrupt after it updates the time-of-day count.

At startup, the vector for the interrupt points to an IRET (interrupt return) instruction—when the interrupt is called, it simply returns. Changing this interrupt vector to point to a procedure in your program will cause the procedure to be called 18.2 times per second.

Variables in typical process control environments are very slow compared to the INT 1Ch interrupt rate. For every INT 1Ch, the ISR program in this application must read the PAL port and write the appropriate control function digital response in the DAC port. The data output to the control port may be for proportional, integral, differential, or on/off control functions, depending upon the procedure in the user program for INT 1Ch. Remember that once the vector is changed, the procedure will immediately begin to be invoked every 18th of a second.

Care should be taken to save changed registers and to minimize code execution time in this interrupt handler. Depending upon the error value, the DAC output and hence the op-amp output that drives the load through the buffer will be updated at each INT 1Ch interrupt.

See associated listing

Sponsored Recommendations

Highly Integrated 20A Digital Power Module for High Current Applications

March 20, 2024
Renesas latest power module delivers the highest efficiency (up to 94% peak) and fast time-to-market solution in an extremely small footprint. The RRM12120 is ideal for space...

Empowering Innovation: Your Power Partner for Tomorrow's Challenges

March 20, 2024
Discover how innovation, quality, and reliability are embedded into every aspect of Renesas' power products.

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!