User's Manual

PMAC User Manual
254 Writing a Host Communications Program
IR6
IR7
IR5
IR4
IR3
IR2
IR1
IR0
W3 W2 W1
PC
8259
PIC
INT
80x86 CPU
BREQ
PMAC
8259
PIC
IPOS
HOST REQUEST
BOARD EXITING RESET
IE PUSHED BUTTON
BOARD ENTERING RESET
IE WATCHDOG TIMEOUT
EROR
FE1
SOFTWARE
PMAC
STD32
INTRQ2*
INTRQ1*
INTRQ*
Figure 55 PMAC STD Interrupt Structure
In PMACINT.C note the setup particularly (unmasking and vectoring the PC interrupt properly), the
interrupt service routine, and the restoration of the old interrupt setup and the end of the program.
Note:
PMAC can also perform interrupt-based communications with the PC over the
serial data port (RS-232. on the PC). This interrupt capability is inherent in the
PC's RS-232 port and does not rely on the PMAC PIC in any way, but from the PC
end, it can be treated very much like the bus-communications interrupt scheme.
Files are provided for those interested in this technique.
There are other common uses of interrupts. Use of the BREQ line allows for an interrupt-driven line-by-
line handshaking in the downloading of program lines that is useful for fast real-time communications to
rotary program buffers.. The IPOS line can signal the host that the system has gotten to the proper
position and stabilized so that the desired action is ready to be taken. The F1ER line can tell the host that
an axis is not following well and that remedial action needs to be taken.